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
src
EvtGenModels
EvtBto2piCPiso.cpp
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
#include "
EvtGenModels/EvtBto2piCPiso.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtConst.hh
"
25
#include "
EvtGenBase/EvtGenKine.hh
"
26
#include "
EvtGenBase/EvtId.hh
"
27
#include "
EvtGenBase/EvtPDL.hh
"
28
#include "
EvtGenBase/EvtParticle.hh
"
29
#include "
EvtGenBase/EvtRandom.hh
"
30
#include "
EvtGenBase/EvtReport.hh
"
31
32
#include <stdlib.h>
33
#include <string>
34
35
std::string
EvtBto2piCPiso::getName
()
const
36
{
37
return
"BTO2PI_CP_ISO"
;
38
}
39
40
EvtDecayBase
*
EvtBto2piCPiso::clone
()
const
41
{
42
return
new
EvtBto2piCPiso
;
43
}
44
45
void
EvtBto2piCPiso::init
()
46
{
47
// check that there are 10 arguments
48
49
checkNArg
( 10 );
50
checkNDaug
( 2 );
51
52
checkSpinParent
(
EvtSpinType::SCALAR
);
53
54
checkSpinDaughter
( 0,
EvtSpinType::SCALAR
);
55
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
56
}
57
58
void
EvtBto2piCPiso::initProbMax
()
59
{
60
//added by Lange Jan4,2000
61
static
const
EvtId
PI0 =
EvtPDL::getId
(
"pi0"
);
62
static
const
EvtId
PIP =
EvtPDL::getId
(
"pi+"
);
63
static
const
EvtId
PIM =
EvtPDL::getId
(
"pi-"
);
64
65
//this may need to be revised
66
67
if
( ( (
getDaugs
()[0] == PIP ) && (
getDaugs
()[1] == PIM ) ) ||
68
( (
getDaugs
()[0] == PIM ) && (
getDaugs
()[1] == PIP ) ) ) {
69
setProbMax
( 4.0 *
70
(
getArg
( 2 ) *
getArg
( 2 ) +
getArg
( 4 ) *
getArg
( 4 ) ) );
71
}
72
73
if
( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PI0 ) ) {
74
setProbMax
( 2.0 * ( 4.0 *
getArg
( 2 ) *
getArg
( 2 ) +
75
getArg
( 4 ) *
getArg
( 4 ) ) );
76
}
77
78
if
( ( (
getDaugs
()[0] == PIP ) && (
getDaugs
()[1] == PI0 ) ) ||
79
( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PIP ) ) ) {
80
setProbMax
( 6.0 *
getArg
( 2 ) *
getArg
( 2 ) );
81
}
82
83
if
( ( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PIM ) ) ||
84
( (
getDaugs
()[0] == PIM ) && (
getDaugs
()[1] == PI0 ) ) ) {
85
setProbMax
( 6.0 *
getArg
( 4 ) *
getArg
( 4 ) );
86
}
87
}
88
89
void
EvtBto2piCPiso::decay
(
EvtParticle
* p )
90
{
91
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
92
93
//added by Lange Jan4,2000
94
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
95
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
96
static
const
EvtId
PI0 =
EvtPDL::getId
(
"pi0"
);
97
static
const
EvtId
PIP =
EvtPDL::getId
(
"pi+"
);
98
static
const
EvtId
PIM =
EvtPDL::getId
(
"pi-"
);
99
100
double
t;
101
EvtId
other_b;
102
int
charged = 0;
103
104
//randomly generate the tag (B0 or B0B)
105
106
double
tag =
EvtRandom::Flat
( 0.0, 1.0 );
107
if
( tag < 0.5 ) {
108
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 1.0 );
109
other_b = B0;
110
}
else
{
111
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.0 );
112
other_b = B0B;
113
}
114
115
EvtComplex
amp;
116
117
EvtComplex
A, Abar;
118
EvtComplex
A2, A2_bar, A0, A0_bar;
119
120
A2 =
EvtComplex
(
getArg
( 2 ) * cos(
getArg
( 3 ) ),
121
getArg
( 2 ) * sin(
getArg
( 3 ) ) );
122
A2_bar =
EvtComplex
(
getArg
( 4 ) * cos(
getArg
( 5 ) ),
123
getArg
( 4 ) * sin(
getArg
( 5 ) ) );
124
125
A0 =
EvtComplex
(
getArg
( 6 ) * cos(
getArg
( 7 ) ),
126
getArg
( 6 ) * sin(
getArg
( 7 ) ) );
127
A0_bar =
EvtComplex
(
getArg
( 8 ) * cos(
getArg
( 9 ) ),
128
getArg
( 8 ) * sin(
getArg
( 9 ) ) );
129
130
//depending on what combination of pi pi we have, there will be different
131
//A and Abar
132
133
if
( ( (
getDaugs
()[0] == PIP ) && (
getDaugs
()[1] == PI0 ) ) ||
134
( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PIP ) ) ) {
135
//pi+ pi0, so just A_2
136
137
charged = 1;
138
A = 3.0 * A2;
139
}
140
141
if
( ( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PIM ) ) ||
142
( (
getDaugs
()[0] == PIM ) && (
getDaugs
()[1] == PI0 ) ) ) {
143
//pi- pi0, so just A2_bar
144
145
charged = 1;
146
A = 3.0 * A2_bar;
147
}
148
149
if
( ( (
getDaugs
()[0] == PIP ) && (
getDaugs
()[1] == PIM ) ) ||
150
( (
getDaugs
()[0] == PIM ) && (
getDaugs
()[1] == PIP ) ) ) {
151
//pi+ pi-, so A_2 - A_0
152
153
charged = 0;
154
A = sqrt( 2.0 ) * ( A2 - A0 );
155
Abar = sqrt( 2.0 ) * ( A2_bar - A0_bar );
156
}
157
158
if
( (
getDaugs
()[0] == PI0 ) && (
getDaugs
()[1] == PI0 ) ) {
159
//pi0 pi0, so 2*A_2 + A_0
160
161
charged = 0;
162
A = 2.0 * A2 + A0;
163
Abar = 2.0 * A2_bar + A0_bar;
164
}
165
166
if
( charged == 0 ) {
167
if
( other_b == B0B ) {
168
amp = A * cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
169
EvtComplex
( cos( -2.0 *
getArg
( 0 ) ),
170
sin( -2.0 *
getArg
( 0 ) ) ) *
171
EvtComplex
( 0.0, 1.0 ) * Abar *
172
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
173
}
174
if
( other_b == B0 ) {
175
amp = A *
176
EvtComplex
( cos( 2.0 *
getArg
( 0 ) ),
177
sin( 2.0 *
getArg
( 0 ) ) ) *
178
EvtComplex
( 0.0, 1.0 ) *
179
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
180
Abar * cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
181
}
182
}
else
183
amp = A;
184
185
vertex
( amp );
186
187
return
;
188
}
189
190
std::string
EvtBto2piCPiso::getParamName
(
int
i )
191
{
192
switch
( i ) {
193
case
0:
194
return
"weakPhase"
;
195
case
1:
196
return
"deltaM"
;
197
case
2:
198
return
"A2"
;
199
case
3:
200
return
"A2Phase"
;
201
case
4:
202
return
"A2bar"
;
203
case
5:
204
return
"A2barPhase"
;
205
case
6:
206
return
"A0"
;
207
case
7:
208
return
"A0Phase"
;
209
case
8:
210
return
"A0bar"
;
211
case
9:
212
return
"A0barPhase"
;
213
default
:
214
return
""
;
215
}
216
}
217
218
std::string
EvtBto2piCPiso::getParamDefault
(
int
i )
219
{
220
switch
( i ) {
221
case
2:
222
return
"1.0"
;
223
case
3:
224
return
"0.0"
;
225
case
4:
226
return
"1.0"
;
227
case
5:
228
return
"0.0"
;
229
case
6:
230
return
"1.0"
;
231
case
7:
232
return
"0.0"
;
233
case
8:
234
return
"1.0"
;
235
case
9:
236
return
"0.0"
;
237
default
:
238
return
""
;
239
}
240
}
EvtBto2piCPiso.hh
EvtCPUtil.hh
EvtConst.hh
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtBto2piCPiso
Definition
EvtBto2piCPiso.hh:27
EvtBto2piCPiso::getParamName
std::string getParamName(int i) override
Definition
EvtBto2piCPiso.cpp:190
EvtBto2piCPiso::getParamDefault
std::string getParamDefault(int i) override
Definition
EvtBto2piCPiso.cpp:218
EvtBto2piCPiso::decay
void decay(EvtParticle *p) override
Definition
EvtBto2piCPiso.cpp:89
EvtBto2piCPiso::initProbMax
void initProbMax() override
Definition
EvtBto2piCPiso.cpp:58
EvtBto2piCPiso::clone
EvtDecayBase * clone() const override
Definition
EvtBto2piCPiso.cpp:40
EvtBto2piCPiso::getName
std::string getName() const override
Definition
EvtBto2piCPiso.cpp:35
EvtBto2piCPiso::init
void init() override
Definition
EvtBto2piCPiso.cpp:45
EvtCPUtil::getInstance
static EvtCPUtil * getInstance()
Definition
EvtCPUtil.cpp:42
EvtCPUtil::OtherB
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition
EvtCPUtil.cpp:372
EvtComplex
Definition
EvtComplex.hh:29
EvtConst::c
static const double c
Definition
EvtConst.hh:30
EvtDecayAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtDecayAmp.hh:37
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
EvtDecayBase::checkSpinParent
void checkSpinParent(EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:534
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
EvtDecayBase::checkNDaug
void checkNDaug(int d1, int d2=-1)
Definition
EvtDecayBase.cpp:516
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition
EvtDecayBase.cpp:492
EvtDecayBase::getDaugs
const EvtId * getDaugs() const
Definition
EvtDecayBase.hh:65
EvtId
Definition
EvtId.hh:27
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition
EvtPDL.cpp:283
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::initializePhaseSpace
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition
EvtParticle.cpp:1100
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
Generated by
1.16.1