evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
24 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtPatches.hh"
26 class EvtParticle;
27 class EvtId;
28 
29 class EvtCPUtil {
30  public:
31  EvtCPUtil( int mixingType );
32  ~EvtCPUtil();
33 
35  {
36  Coherent = 0,
38  };
39 
40  static EvtCPUtil* getInstance();
41 
42  void setMixingType( int mixingType ) { _mixingType = mixingType; }
43  int getMixingType() { return _mixingType; }
44 
45  void fractB0CP( EvtComplex Af, EvtComplex Abarf, double deltam, double beta,
46  double& fract );
47 
48  void fractB0nonCP( EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar,
49  EvtComplex Abarfbar, double deltam, double beta,
50  int flip, double& fract );
51 
52  // Mark Whitehead 7/12/2009
53  // Add required lines from EvtIncoherentMixing.hh to fix CPV
54 
55  // Functions to check if a B has mixed (comes from a B)
56  bool isB0Mixed( EvtParticle* );
57  bool isBsMixed( EvtParticle* );
58 
59  bool flipIsEnabled();
60  void enableFlip();
61  void disableFlip();
62 
63  void OtherB( EvtParticle* p, double& t, EvtId& otherb );
64 
65  void OtherCoherentB( EvtParticle* p, double& t, EvtId& otherb, double probB0 );
66  void OtherIncoherentB( EvtParticle* p, double& t, EvtId& otherb,
67  double probB0 );
68 
69  void OtherB( EvtParticle* p, double& t, EvtId& otherb, double probB0 );
70 
71  //id is the produced particle
72  //t returns the lifetime of the particle
73  //and mix will be 1 if it mixed otherwise 0
74  void incoherentMix( const EvtId id, double& t, int& mix );
75 
76  double getDeltaGamma( const EvtId id );
77  double getDeltaM( const EvtId id );
78 
79  private:
82 };
83 
84 #endif
bool isB0Mixed(EvtParticle *)
Definition: EvtCPUtil.cpp:310
void disableFlip()
Definition: EvtCPUtil.cpp:571
void OtherCoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
Definition: EvtCPUtil.cpp:153
void fractB0nonCP(EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar, EvtComplex Abarfbar, double deltam, double beta, int flip, double &fract)
Definition: EvtCPUtil.cpp:85
bool _enableFlip
Definition: EvtCPUtil.hh:80
bool isBsMixed(EvtParticle *)
Definition: EvtCPUtil.cpp:292
void OtherIncoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
Definition: EvtCPUtil.cpp:330
double getDeltaGamma(const EvtId id)
Definition: EvtCPUtil.cpp:529
bool flipIsEnabled()
Definition: EvtCPUtil.cpp:563
void setMixingType(int mixingType)
Definition: EvtCPUtil.hh:42
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
Definition: EvtId.hh:27
void fractB0CP(EvtComplex Af, EvtComplex Abarf, double deltam, double beta, double &fract)
Definition: EvtCPUtil.cpp:57
void incoherentMix(const EvtId id, double &t, int &mix)
Definition: EvtCPUtil.cpp:461
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtCPUtil(int mixingType)
Definition: EvtCPUtil.cpp:37
double getDeltaM(const EvtId id)
Definition: EvtCPUtil.cpp:549
void enableFlip()
Definition: EvtCPUtil.cpp:567
int _mixingType
Definition: EvtCPUtil.hh:81
int getMixingType()
Definition: EvtCPUtil.hh:43