EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtCPUtil.hh
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
21#ifndef EVTCPUTIL_HH
22#define EVTCPUTIL_HH
23
25class EvtParticle;
26class EvtId;
27
28class EvtCPUtil {
29 public:
30 EvtCPUtil( int mixingType );
32
34 {
37 };
38
39 static EvtCPUtil* getInstance();
40
41 void setMixingType( int mixingType ) { m_mixingType = mixingType; }
42 int getMixingType() { return m_mixingType; }
43
44 void fractB0CP( EvtComplex Af, EvtComplex Abarf, double deltam, double beta,
45 double& fract );
46
47 void fractB0nonCP( EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar,
48 EvtComplex Abarfbar, double deltam, double beta,
49 int flip, double& fract );
50
51 // Mark Whitehead 7/12/2009
52 // Add required lines from EvtIncoherentMixing.hh to fix CPV
53
54 // Functions to check if a B has mixed (comes from a B)
55 bool isB0Mixed( EvtParticle* );
56 bool isBsMixed( EvtParticle* );
57
58 bool flipIsEnabled();
59 void enableFlip();
60 void disableFlip();
61
62 void OtherB( EvtParticle* p, double& t, EvtId& otherb );
63
64 void OtherCoherentB( EvtParticle* p, double& t, EvtId& otherb, double probB0 );
65 void OtherIncoherentB( EvtParticle* p, double& t, EvtId& otherb,
66 double probB0 );
67
68 void OtherB( EvtParticle* p, double& t, EvtId& otherb, double probB0 );
69
70 //id is the produced particle
71 //t returns the lifetime of the particle
72 //and mix will be 1 if it mixed otherwise 0
73 void incoherentMix( const EvtId id, double& t, int& mix );
74
75 double getDeltaGamma( const EvtId id );
76 double getDeltaM( const EvtId id );
77
78 private:
81};
82
83#endif
bool isBsMixed(EvtParticle *)
int m_mixingType
Definition EvtCPUtil.hh:80
void OtherIncoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
int getMixingType()
Definition EvtCPUtil.hh:42
static EvtCPUtil * getInstance()
Definition EvtCPUtil.cpp:42
void OtherCoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
bool flipIsEnabled()
void setMixingType(int mixingType)
Definition EvtCPUtil.hh:41
void disableFlip()
void fractB0nonCP(EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar, EvtComplex Abarfbar, double deltam, double beta, int flip, double &fract)
Definition EvtCPUtil.cpp:84
double getDeltaM(const EvtId id)
bool isB0Mixed(EvtParticle *)
EvtCPUtil(int mixingType)
Definition EvtCPUtil.cpp:36
bool m_enableFlip
Definition EvtCPUtil.hh:79
void enableFlip()
void fractB0CP(EvtComplex Af, EvtComplex Abarf, double deltam, double beta, double &fract)
Definition EvtCPUtil.cpp:56
void incoherentMix(const EvtId id, double &t, int &mix)
double getDeltaGamma(const EvtId id)
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition EvtId.hh:27