EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenBase
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
class
EvtParticle
;
26
class
EvtId
;
27
28
class
EvtCPUtil
{
29
public
:
30
EvtCPUtil
(
int
mixingType );
31
~EvtCPUtil
();
32
33
enum
MixingType
34
{
35
Coherent
= 0,
36
Incoherent
= 1
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
:
79
bool
m_enableFlip
;
80
int
m_mixingType
;
81
};
82
83
#endif
EvtComplex.hh
EvtCPUtil
Definition
EvtCPUtil.hh:28
EvtCPUtil::isBsMixed
bool isBsMixed(EvtParticle *)
Definition
EvtCPUtil.cpp:292
EvtCPUtil::m_mixingType
int m_mixingType
Definition
EvtCPUtil.hh:80
EvtCPUtil::OtherIncoherentB
void OtherIncoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
Definition
EvtCPUtil.cpp:330
EvtCPUtil::getMixingType
int getMixingType()
Definition
EvtCPUtil.hh:42
EvtCPUtil::getInstance
static EvtCPUtil * getInstance()
Definition
EvtCPUtil.cpp:42
EvtCPUtil::MixingType
MixingType
Definition
EvtCPUtil.hh:34
EvtCPUtil::Incoherent
@ Incoherent
Definition
EvtCPUtil.hh:36
EvtCPUtil::Coherent
@ Coherent
Definition
EvtCPUtil.hh:35
EvtCPUtil::OtherCoherentB
void OtherCoherentB(EvtParticle *p, double &t, EvtId &otherb, double probB0)
Definition
EvtCPUtil.cpp:152
EvtCPUtil::flipIsEnabled
bool flipIsEnabled()
Definition
EvtCPUtil.cpp:565
EvtCPUtil::~EvtCPUtil
~EvtCPUtil()
EvtCPUtil::setMixingType
void setMixingType(int mixingType)
Definition
EvtCPUtil.hh:41
EvtCPUtil::disableFlip
void disableFlip()
Definition
EvtCPUtil.cpp:573
EvtCPUtil::fractB0nonCP
void fractB0nonCP(EvtComplex Af, EvtComplex Abarf, EvtComplex Afbar, EvtComplex Abarfbar, double deltam, double beta, int flip, double &fract)
Definition
EvtCPUtil.cpp:84
EvtCPUtil::getDeltaM
double getDeltaM(const EvtId id)
Definition
EvtCPUtil.cpp:551
EvtCPUtil::isB0Mixed
bool isB0Mixed(EvtParticle *)
Definition
EvtCPUtil.cpp:310
EvtCPUtil::EvtCPUtil
EvtCPUtil(int mixingType)
Definition
EvtCPUtil.cpp:36
EvtCPUtil::m_enableFlip
bool m_enableFlip
Definition
EvtCPUtil.hh:79
EvtCPUtil::enableFlip
void enableFlip()
Definition
EvtCPUtil.cpp:569
EvtCPUtil::fractB0CP
void fractB0CP(EvtComplex Af, EvtComplex Abarf, double deltam, double beta, double &fract)
Definition
EvtCPUtil.cpp:56
EvtCPUtil::incoherentMix
void incoherentMix(const EvtId id, double &t, int &mix)
Definition
EvtCPUtil.cpp:463
EvtCPUtil::getDeltaGamma
double getDeltaGamma(const EvtId id)
Definition
EvtCPUtil.cpp:531
EvtCPUtil::OtherB
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition
EvtCPUtil.cpp:372
EvtComplex
Definition
EvtComplex.hh:29
EvtId
Definition
EvtId.hh:27
EvtParticle
Definition
EvtParticle.hh:45
Generated by
1.17.0