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
src
EvtGenModels
EvtSVVNONCPEIGEN.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/EvtSVVNONCPEIGEN.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtConst.hh
"
25
#include "
EvtGenBase/EvtGenKine.hh
"
26
#include "
EvtGenBase/EvtPDL.hh
"
27
#include "
EvtGenBase/EvtParticle.hh
"
28
#include "
EvtGenBase/EvtRandom.hh
"
29
#include "
EvtGenBase/EvtReport.hh
"
30
#include "
EvtGenBase/EvtVector4C.hh
"
31
32
#include "
EvtGenModels/EvtSVVHelAmp.hh
"
33
34
#include <stdlib.h>
35
#include <string>
36
37
std::string
EvtSVVNONCPEIGEN::getName
()
const
38
{
39
return
"SVV_NONCPEIGEN"
;
40
}
41
42
EvtDecayBase
*
EvtSVVNONCPEIGEN::clone
()
const
43
{
44
return
new
EvtSVVNONCPEIGEN
;
45
}
46
47
void
EvtSVVNONCPEIGEN::init
()
48
{
49
// check that there are 27 arguments
50
checkNArg
( 27, 15 );
51
checkNDaug
( 2 );
52
53
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
54
checkSpinDaughter
( 1,
EvtSpinType::VECTOR
);
55
56
// The ordering of A_f is :
57
// A_f[0-2] = A_f
58
// A_f[3-5] = Abar_f
59
// A_f[6-8] = A_fbar
60
// A_f[9-11] = Abar_fbar
61
//
62
// Each of the 4 amplitudes include the 3 different helicity states in
63
// the order +, 0, -. See more about helicity amplitude ordering in ::decay
64
65
int
i = 0;
66
int
j = (
getNArg
() - 3 ) / 2;
67
68
for
( i = 0; i < j; ++i ) {
69
m_A_f
[i] =
getArg
( ( 2 * i ) + 3 ) *
70
EvtComplex
( cos(
getArg
( ( 2 * i ) + 4 ) ),
71
sin(
getArg
( ( 2 * i ) + 4 ) ) );
72
}
73
74
// If only 6 amplitudes are specified, calculate the last 6 from the first 6:
75
if
( 6 == j ) {
76
for
( i = 0; i < 3; ++i ) {
77
m_A_f
[6 + i] =
m_A_f
[3 + i];
78
m_A_f
[9 + i] =
m_A_f
[i];
79
}
80
}
81
}
82
83
void
EvtSVVNONCPEIGEN::initProbMax
()
84
{
85
double
probMax = 0;
86
for
(
int
i = 0; i < 12; ++i ) {
87
double
amp =
abs
(
m_A_f
[i] );
88
probMax += amp * amp;
89
}
90
91
setProbMax
( probMax );
92
}
93
94
void
EvtSVVNONCPEIGEN::decay
(
EvtParticle
* p )
95
{
96
//added by Lange Jan4,2000
97
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
98
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
99
100
double
t;
101
EvtId
other_b;
102
EvtId
daugs[2];
103
104
// MB: flip selects the final of the decay
105
int
flip = ( ( p->
getId
() == B0 ) ? 0 : 1 );
106
daugs[0] =
getDaug
( 0 );
107
daugs[1] =
getDaug
( 1 );
108
p->
initializePhaseSpace
( 2, daugs );
109
110
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.5 );
111
112
EvtComplex
amp[3];
113
114
double
dmt2 =
getArg
( 0 ) * t / ( 2 *
EvtConst::c
);
115
double
phiCKM = ( 2.0 *
getArg
( 1 ) +
getArg
( 2 ) );
// 2b+g
116
EvtComplex
ePlusIPhi( cos( phiCKM ), sin( phiCKM ) );
117
EvtComplex
eMinusIPhi( cos( -phiCKM ), sin( -phiCKM ) );
118
119
// flip == 0 : D*-rho+
120
// flip == 1 : D*+rho-
121
122
if
( !flip ) {
123
if
( other_b == B0B ) {
124
// At t=0 we have a B0
125
for
(
int
i = 0; i < 3; ++i ) {
126
amp[i] =
m_A_f
[i] * cos( dmt2 ) +
127
eMinusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
128
m_A_f
[i + 3];
129
}
130
}
131
if
( other_b == B0 ) {
132
// At t=0 we have a B0bar
133
for
(
int
i = 0; i < 3; ++i ) {
134
amp[i] =
m_A_f
[i] * ePlusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) +
135
m_A_f
[i + 3] * cos( dmt2 );
136
}
137
}
138
}
else
{
139
if
( other_b == B0B ) {
140
// At t=0 we have a B0
141
142
// M.Baak 01/16/2004
143
// Note: \bar{H}+- = H-+
144
// If one wants to use the correct helicities for B0 and B0bar decays but the same formula-notation (as done in EvtSVV_HelAmp),
145
// count the B0bar helicities backwards. (Equivalently, one could flip the chi angle.)
146
147
for
(
int
i = 0; i < 3; ++i ) {
148
amp[i] =
m_A_f
[8 - i] * cos( dmt2 ) +
149
eMinusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
150
m_A_f
[11 - i];
151
}
152
}
153
if
( other_b == B0 ) {
154
// At t=0 we have a B0bar
155
for
(
int
i = 0; i < 3; ++i ) {
156
amp[i] =
m_A_f
[8 - i] * ePlusIPhi *
157
EvtComplex
( 0.0, sin( dmt2 ) ) +
158
m_A_f
[11 - i] * cos( dmt2 );
159
}
160
}
161
}
162
163
EvtSVVHelAmp::SVVHel
( p,
m_amp2
, daugs[0], daugs[1], amp[0], amp[1], amp[2] );
164
165
return
;
166
}
167
168
std::string
EvtSVVNONCPEIGEN::getParamName
(
int
i )
169
{
170
switch
( i ) {
171
case
0:
172
return
"deltaM"
;
173
case
1:
174
return
"weakPhase1"
;
175
case
2:
176
return
"weakPhase2"
;
177
case
3:
178
return
"AfPlusHelAmp"
;
179
case
4:
180
return
"AfPlusHelAmpPhase"
;
181
case
5:
182
return
"AfZeroHelAmp"
;
183
case
6:
184
return
"AfZeroHelAmpPhase"
;
185
case
7:
186
return
"AfMinusHelAmp"
;
187
case
8:
188
return
"AfMinusHelAmpPhase"
;
189
case
9:
190
return
"AbarfPlusHelAmp"
;
191
case
10:
192
return
"AbarfPlusHelAmpPhase"
;
193
case
11:
194
return
"AbarfZeroHelAmp"
;
195
case
12:
196
return
"AbarfZeroHelAmpPhase"
;
197
case
13:
198
return
"AbarfMinusHelAmp"
;
199
case
14:
200
return
"AbarfMinusHelAmpPhase"
;
201
case
15:
202
return
"AfbarPlusHelAmp"
;
203
case
16:
204
return
"AfbarPlusHelAmpPhase"
;
205
case
17:
206
return
"AfbarZeroHelAmp"
;
207
case
18:
208
return
"AfbarZeroHelAmpPhase"
;
209
case
19:
210
return
"AfbarMinusHelAmp"
;
211
case
20:
212
return
"AfbarMinusHelAmpPhase"
;
213
case
21:
214
return
"AbarfbarPlusHelAmp"
;
215
case
22:
216
return
"AbarfbarPlusHelAmpPhase"
;
217
case
23:
218
return
"AbarfbarZeroHelAmp"
;
219
case
24:
220
return
"AbarfbarZeroHelAmpPhase"
;
221
case
25:
222
return
"AbarfbarMinusHelAmp"
;
223
case
26:
224
return
"AbarfbarMinusHelAmpPhase"
;
225
default
:
226
return
""
;
227
}
228
}
229
230
std::string
EvtSVVNONCPEIGEN::getParamDefault
(
int
i )
231
{
232
switch
( i ) {
233
case
3:
234
return
"1.0"
;
235
case
4:
236
return
"0.0"
;
237
case
5:
238
return
"1.0"
;
239
case
6:
240
return
"0.0"
;
241
case
7:
242
return
"1.0"
;
243
case
8:
244
return
"0.0"
;
245
case
9:
246
return
"1.0"
;
247
case
10:
248
return
"0.0"
;
249
case
11:
250
return
"1.0"
;
251
case
12:
252
return
"0.0"
;
253
case
13:
254
return
"1.0"
;
255
case
14:
256
return
"0.0"
;
257
default
:
258
return
""
;
259
}
260
}
EvtCPUtil.hh
abs
double abs(const EvtComplex &c)
Definition
EvtComplex.hh:203
EvtConst.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtSVVHelAmp.hh
EvtSVVNONCPEIGEN.hh
EvtVector4C.hh
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::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
EvtDecayBase::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
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
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
EvtParticle::getId
EvtId getId() const
Definition
EvtParticle.cpp:124
EvtSVVHelAmp::SVVHel
static void SVVHel(EvtParticle *parent, EvtAmp &, EvtId n_v1, EvtId n_v2, const EvtComplex &hp, const EvtComplex &h0, const EvtComplex &hm)
Definition
EvtSVVHelAmp.cpp:78
EvtSVVNONCPEIGEN
Definition
EvtSVVNONCPEIGEN.hh:65
EvtSVVNONCPEIGEN::getName
std::string getName() const override
Definition
EvtSVVNONCPEIGEN.cpp:37
EvtSVVNONCPEIGEN::getParamName
std::string getParamName(int i) override
Definition
EvtSVVNONCPEIGEN.cpp:168
EvtSVVNONCPEIGEN::clone
EvtDecayBase * clone() const override
Definition
EvtSVVNONCPEIGEN.cpp:42
EvtSVVNONCPEIGEN::m_A_f
EvtComplex m_A_f[12]
Definition
EvtSVVNONCPEIGEN.hh:79
EvtSVVNONCPEIGEN::init
void init() override
Definition
EvtSVVNONCPEIGEN.cpp:47
EvtSVVNONCPEIGEN::initProbMax
void initProbMax() override
Definition
EvtSVVNONCPEIGEN.cpp:83
EvtSVVNONCPEIGEN::decay
void decay(EvtParticle *p) override
Definition
EvtSVVNONCPEIGEN.cpp:94
EvtSVVNONCPEIGEN::getParamDefault
std::string getParamDefault(int i) override
Definition
EvtSVVNONCPEIGEN.cpp:230
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
Generated by
1.17.0