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
EvtSVSCPiso.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/EvtSVSCPiso.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
#include "
EvtGenBase/EvtVector4C.hh
"
32
33
#include <stdlib.h>
34
#include <string>
35
36
std::string
EvtSVSCPiso::getName
()
const
37
{
38
return
"SVS_CP_ISO"
;
39
}
40
41
EvtDecayBase
*
EvtSVSCPiso::clone
()
const
42
{
43
return
new
EvtSVSCPiso
;
44
}
45
46
void
EvtSVSCPiso::init
()
47
{
48
// check that there are 27 arguments
49
checkNArg
( 27 );
50
checkNDaug
( 2 );
51
52
checkSpinParent
(
EvtSpinType::SCALAR
);
53
54
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
55
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
56
57
// Set amplitude coefficients
58
setAmpCoeffs
();
59
// Calculate amplitude terms
60
calcAmpTerms
();
61
}
62
63
void
EvtSVSCPiso::setAmpCoeffs
()
64
{
65
m_Tp0
=
EvtComplex
(
getArg
( 3 ) * cos(
getArg
( 4 ) ),
66
getArg
( 3 ) * sin(
getArg
( 4 ) ) );
67
m_Tp0_bar
=
EvtComplex
(
getArg
( 5 ) * cos(
getArg
( 6 ) ),
68
getArg
( 5 ) * sin(
getArg
( 6 ) ) );
69
m_T0p
=
EvtComplex
(
getArg
( 7 ) * cos(
getArg
( 8 ) ),
70
getArg
( 7 ) * sin(
getArg
( 8 ) ) );
71
m_T0p_bar
=
EvtComplex
(
getArg
( 9 ) * cos(
getArg
( 10 ) ),
72
getArg
( 9 ) * sin(
getArg
( 10 ) ) );
73
m_Tpm
=
EvtComplex
(
getArg
( 11 ) * cos(
getArg
( 12 ) ),
74
getArg
( 11 ) * sin(
getArg
( 12 ) ) );
75
m_Tpm_bar
=
EvtComplex
(
getArg
( 13 ) * cos(
getArg
( 14 ) ),
76
getArg
( 13 ) * sin(
getArg
( 14 ) ) );
77
m_Tmp
=
EvtComplex
(
getArg
( 15 ) * cos(
getArg
( 16 ) ),
78
getArg
( 15 ) * sin(
getArg
( 16 ) ) );
79
m_Tmp_bar
=
EvtComplex
(
getArg
( 17 ) * cos(
getArg
( 18 ) ),
80
getArg
( 17 ) * sin(
getArg
( 18 ) ) );
81
m_P0
=
EvtComplex
(
getArg
( 19 ) * cos(
getArg
( 20 ) ),
82
getArg
( 19 ) * sin(
getArg
( 20 ) ) );
83
m_P0_bar
=
EvtComplex
(
getArg
( 21 ) * cos(
getArg
( 22 ) ),
84
getArg
( 21 ) * sin(
getArg
( 22 ) ) );
85
m_P1
=
EvtComplex
(
getArg
( 23 ) * cos(
getArg
( 24 ) ),
86
getArg
( 23 ) * sin(
getArg
( 24 ) ) );
87
m_P1_bar
=
EvtComplex
(
getArg
( 25 ) * cos(
getArg
( 26 ) ),
88
getArg
( 25 ) * sin(
getArg
( 26 ) ) );
89
}
90
91
void
EvtSVSCPiso::initProbMax
()
92
{
93
const
double
max1 =
abs2
(
m_A_f
) +
abs2
(
m_Abar_f
);
94
const
double
max2 =
abs2
(
m_A_fbar
) +
abs2
(
m_Abar_fbar
);
95
// Amplitude has momentum normalisation that roughly scales with (parent mass)/2
96
// so probability will scale with 0.25 * parenMassSq. Use 0.3 * parMassSq
97
// in case we get larger normalisation values
98
const
double
parMass =
EvtPDL::getMeanMass
(
getParentId
() );
99
const
double
max = 0.3 * parMass * parMass * ( max1 + max2 );
100
setProbMax
( max );
101
}
102
103
void
EvtSVSCPiso::decay
(
EvtParticle
* p )
104
{
105
//added by Lange Jan4,2000
106
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
107
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
108
109
double
t;
110
EvtId
other_b;
111
112
int
first_time = 0;
113
int
flip = 0;
114
EvtId
ds[2];
115
116
// Randomly generate the tag (B0 or B0B)
117
const
double
tag =
EvtRandom::Flat
( 0.0, 1.0 );
118
if
( tag < 0.5 ) {
119
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 1.0 );
120
other_b = B0;
121
}
else
{
122
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.0 );
123
other_b = B0B;
124
}
125
126
if
( p->
getNDaug
() == 0 )
127
first_time = 1;
128
129
if
( first_time ) {
130
if
(
EvtRandom::Flat
( 0.0, 1.0 ) <
getArg
( 2 ) )
131
flip = 1;
132
}
else
{
133
if
(
getDaug
( 0 ) != p->
getDaug
( 0 )->
getId
() )
134
flip = 1;
135
}
136
137
if
( !flip ) {
138
ds[0] =
getDaug
( 0 );
139
ds[1] =
getDaug
( 1 );
140
}
else
{
141
ds[0] =
EvtPDL::chargeConj
(
getDaug
( 0 ) );
142
ds[1] =
EvtPDL::chargeConj
(
getDaug
( 1 ) );
143
}
144
145
p->
initializePhaseSpace
(
getNDaug
(), ds );
146
147
EvtParticle
*v, *s;
148
v = p->
getDaug
( 0 );
149
s = p->
getDaug
( 1 );
150
151
EvtComplex
amp;
152
153
if
(
m_charged
== 0 ) {
154
if
( !flip ) {
155
if
( other_b == B0B ) {
156
amp =
m_A_f
* cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
157
EvtComplex
( cos( -2.0 *
getArg
( 0 ) ),
158
sin( -2.0 *
getArg
( 0 ) ) ) *
159
EvtComplex
( 0.0, 1.0 ) *
m_Abar_f
*
160
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
161
}
162
if
( other_b == B0 ) {
163
amp =
m_A_f
*
164
EvtComplex
( cos( 2.0 *
getArg
( 0 ) ),
165
sin( 2.0 *
getArg
( 0 ) ) ) *
166
EvtComplex
( 0.0, 1.0 ) *
167
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
168
m_Abar_f
* cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
169
}
170
}
else
{
171
if
( other_b == B0B ) {
172
amp =
m_A_fbar
* cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
173
EvtComplex
( cos( -2.0 *
getArg
( 0 ) ),
174
sin( -2.0 *
getArg
( 0 ) ) ) *
175
EvtComplex
( 0.0, 1.0 ) *
m_Abar_fbar
*
176
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
177
}
178
if
( other_b == B0 ) {
179
amp =
m_A_fbar
*
180
EvtComplex
( cos( 2.0 *
getArg
( 0 ) ),
181
sin( 2.0 *
getArg
( 0 ) ) ) *
182
EvtComplex
( 0.0, 1.0 ) *
183
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
184
m_Abar_fbar
* cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
185
}
186
}
187
188
}
else
{
189
amp =
m_A_f
;
190
}
191
192
const
EvtVector4R
p4_parent = v->
getP4
() + s->
getP4
();
193
const
double
norm = 1.0 / v->
getP4
().
d3mag
();
194
195
vertex
( 0, amp * norm * p4_parent * ( v->
epsParent
( 0 ) ) );
196
vertex
( 1, amp * norm * p4_parent * ( v->
epsParent
( 1 ) ) );
197
vertex
( 2, amp * norm * p4_parent * ( v->
epsParent
( 2 ) ) );
198
199
return
;
200
}
201
202
void
EvtSVSCPiso::calcAmpTerms
()
203
{
204
const
int
Q1 =
EvtPDL::chg3
(
getDaug
( 0 ) );
205
const
int
Q2 =
EvtPDL::chg3
(
getDaug
( 1 ) );
206
207
//***********************charged modes****************************
208
209
if
( Q1 > 0 && Q2 == 0 ) {
210
//V+ S0, so T+0 + 2 P1
211
212
m_charged
= 1;
213
m_A_f
=
m_Tp0
+ 2.0 *
m_P1
;
214
}
215
216
if
( Q1 < 0 && Q2 == 0 ) {
217
//V- S0, so T+0_bar + 2P1_bar
218
219
m_charged
= 1;
220
m_A_f
=
m_Tp0_bar
+ 2.0 *
m_P1_bar
;
221
}
222
223
if
( Q1 == 0 && Q2 > 0 ) {
224
//V0 S+, so T0+ - 2 P1
225
226
m_charged
= 1;
227
m_A_f
=
m_T0p
- 2.0 *
m_P1
;
228
}
229
230
if
( Q1 == 0 && Q2 < 0 ) {
231
//V0 S-, so T0+_bar - 2 P1_bar
232
233
m_charged
= 1;
234
m_A_f
=
m_T0p_bar
- 2.0 *
m_P1_bar
;
235
}
236
237
//***********************neutral modes***************************
238
239
//V+ S-, so Af = T+- + P1 + P0
240
m_Apm
=
m_Tpm
+
m_P1
+
m_P0
;
241
m_Apm_bar
=
m_Tpm_bar
+
m_P1_bar
+
m_P0_bar
;
242
243
//V- S+, so Af = T-+ - P1 + P0
244
m_Amp
=
m_Tmp
-
m_P1
+
m_P0
;
245
m_Amp_bar
=
m_Tmp_bar
-
m_P1_bar
+
m_P0
;
246
247
if
( Q1 > 0 && Q2 < 0 ) {
248
//V+ S-
249
m_charged
= 0;
250
m_A_f
=
m_Apm
;
251
m_Abar_f
=
m_Apm_bar
;
252
m_A_fbar
=
m_Amp
;
253
m_Abar_fbar
=
m_Amp_bar
;
254
}
255
256
if
( Q1 < 0 && Q2 > 0 ) {
257
//V- S+
258
m_charged
= 0;
259
m_A_f
=
m_Amp
;
260
m_Abar_f
=
m_Amp_bar
;
261
m_A_fbar
=
m_Apm
;
262
m_Abar_fbar
=
m_Apm_bar
;
263
}
264
265
if
( Q1 == 0 && Q2 == 0 ) {
266
//V0 S0
267
m_charged
= 0;
268
m_A_f
=
m_T0p
+
m_Tp0
-
m_Tpm
-
m_Tmp
- 2.0 *
m_P0
;
269
m_Abar_f
=
m_T0p_bar
+
m_Tp0_bar
-
m_Tpm_bar
-
m_Tmp_bar
- 2.0 *
m_P0_bar
;
270
m_A_fbar
=
m_A_f
;
271
m_Abar_fbar
=
m_Abar_f
;
272
}
273
}
EvtCPUtil.hh
abs2
double abs2(const EvtComplex &c)
Definition
EvtComplex.hh:211
EvtConst.hh
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtSVSCPiso.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::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::getParentId
EvtId getParentId() const
Definition
EvtDecayBase.hh:60
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::chg3
static int chg3(EvtId i)
Definition
EvtPDL.cpp:366
EvtPDL::getMeanMass
static double getMeanMass(EvtId i)
Definition
EvtPDL.cpp:306
EvtPDL::chargeConj
static EvtId chargeConj(EvtId id)
Definition
EvtPDL.cpp:201
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition
EvtPDL.cpp:283
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::epsParent
virtual EvtVector4C epsParent(int i) const
Definition
EvtParticle.cpp:611
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
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::getNDaug
size_t getNDaug() const
Definition
EvtParticle.cpp:154
EvtRandom::Flat
static double Flat()
Definition
EvtRandom.cpp:95
EvtSVSCPiso
Definition
EvtSVSCPiso.hh:34
EvtSVSCPiso::m_Amp
EvtComplex m_Amp
Definition
EvtSVSCPiso.hh:53
EvtSVSCPiso::m_T0p
EvtComplex m_T0p
Definition
EvtSVSCPiso.hh:46
EvtSVSCPiso::m_A_f
EvtComplex m_A_f
Definition
EvtSVSCPiso.hh:51
EvtSVSCPiso::m_T0p_bar
EvtComplex m_T0p_bar
Definition
EvtSVSCPiso.hh:46
EvtSVSCPiso::getName
std::string getName() const override
Definition
EvtSVSCPiso.cpp:36
EvtSVSCPiso::m_P0_bar
EvtComplex m_P0_bar
Definition
EvtSVSCPiso.hh:48
EvtSVSCPiso::m_Tmp_bar
EvtComplex m_Tmp_bar
Definition
EvtSVSCPiso.hh:47
EvtSVSCPiso::m_Amp_bar
EvtComplex m_Amp_bar
Definition
EvtSVSCPiso.hh:53
EvtSVSCPiso::m_charged
int m_charged
Definition
EvtSVSCPiso.hh:55
EvtSVSCPiso::setAmpCoeffs
void setAmpCoeffs()
Definition
EvtSVSCPiso.cpp:63
EvtSVSCPiso::m_Abar_fbar
EvtComplex m_Abar_fbar
Definition
EvtSVSCPiso.hh:52
EvtSVSCPiso::m_Tmp
EvtComplex m_Tmp
Definition
EvtSVSCPiso.hh:47
EvtSVSCPiso::m_Tp0_bar
EvtComplex m_Tp0_bar
Definition
EvtSVSCPiso.hh:46
EvtSVSCPiso::m_Tpm
EvtComplex m_Tpm
Definition
EvtSVSCPiso.hh:47
EvtSVSCPiso::m_P0
EvtComplex m_P0
Definition
EvtSVSCPiso.hh:48
EvtSVSCPiso::clone
EvtDecayBase * clone() const override
Definition
EvtSVSCPiso.cpp:41
EvtSVSCPiso::m_Abar_f
EvtComplex m_Abar_f
Definition
EvtSVSCPiso.hh:51
EvtSVSCPiso::init
void init() override
Definition
EvtSVSCPiso.cpp:46
EvtSVSCPiso::m_A_fbar
EvtComplex m_A_fbar
Definition
EvtSVSCPiso.hh:52
EvtSVSCPiso::m_Apm_bar
EvtComplex m_Apm_bar
Definition
EvtSVSCPiso.hh:53
EvtSVSCPiso::decay
void decay(EvtParticle *p) override
Definition
EvtSVSCPiso.cpp:103
EvtSVSCPiso::m_Tp0
EvtComplex m_Tp0
Definition
EvtSVSCPiso.hh:46
EvtSVSCPiso::m_Tpm_bar
EvtComplex m_Tpm_bar
Definition
EvtSVSCPiso.hh:47
EvtSVSCPiso::initProbMax
void initProbMax() override
Definition
EvtSVSCPiso.cpp:91
EvtSVSCPiso::m_P1
EvtComplex m_P1
Definition
EvtSVSCPiso.hh:48
EvtSVSCPiso::calcAmpTerms
void calcAmpTerms()
Definition
EvtSVSCPiso.cpp:202
EvtSVSCPiso::m_Apm
EvtComplex m_Apm
Definition
EvtSVSCPiso.hh:53
EvtSVSCPiso::m_P1_bar
EvtComplex m_P1_bar
Definition
EvtSVSCPiso.hh:48
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::d3mag
double d3mag() const
Definition
EvtVector4R.cpp:192
Generated by
1.16.1