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
EvtSVPCP.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/EvtSVPCP.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtComplex.hh
"
25
#include "
EvtGenBase/EvtConst.hh
"
26
#include "
EvtGenBase/EvtGenKine.hh
"
27
#include "
EvtGenBase/EvtId.hh
"
28
#include "
EvtGenBase/EvtPDL.hh
"
29
#include "
EvtGenBase/EvtParticle.hh
"
30
#include "
EvtGenBase/EvtReport.hh
"
31
#include "
EvtGenBase/EvtTensor3C.hh
"
32
#include "
EvtGenBase/EvtTensor4C.hh
"
33
#include "
EvtGenBase/EvtVector4C.hh
"
34
#include "
EvtGenBase/EvtVector4R.hh
"
35
36
#include <stdlib.h>
37
#include <string>
38
39
std::string
EvtSVPCP::getName
()
const
40
{
41
return
"SVP_CP"
;
42
}
43
44
EvtDecayBase
*
EvtSVPCP::clone
()
const
45
{
46
return
new
EvtSVPCP
;
47
}
48
49
void
EvtSVPCP::initProbMax
()
50
{
51
setProbMax
( 2 * (
getArg
( 3 ) *
getArg
( 3 ) +
getArg
( 5 ) *
getArg
( 5 ) ) );
52
}
53
54
void
EvtSVPCP::init
()
55
{
56
// check that there are 7 arguments
57
checkNArg
( 7 );
58
checkNDaug
( 2 );
59
60
checkSpinParent
(
EvtSpinType::SCALAR
);
61
62
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
63
checkSpinDaughter
( 1,
EvtSpinType::PHOTON
);
64
}
65
66
void
EvtSVPCP::decay
(
EvtParticle
* p )
67
{
68
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
69
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
70
71
double
t;
72
EvtId
other_b;
73
74
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.5 );
75
76
EvtComplex
G1P, G1M, G1_T_even, G1_T_odd;
77
78
double
norm =
getArg
( 3 ) *
getArg
( 3 ) +
getArg
( 5 ) *
getArg
( 5 );
79
80
G1P =
EvtComplex
(
getArg
( 3 ) * cos(
getArg
( 4 ) ) / norm,
81
getArg
( 3 ) * sin(
getArg
( 4 ) ) / norm );
82
G1M =
EvtComplex
(
getArg
( 5 ) * cos(
getArg
( 6 ) ) / norm,
83
getArg
( 5 ) * sin(
getArg
( 6 ) ) / norm );
84
85
G1_T_even = ( G1P + G1M ) / sqrt( 2.0 );
86
G1_T_odd = ( G1P - G1M ) / sqrt( 2.0 );
87
88
EvtComplex
lambda_km =
EvtComplex
( cos( -2 *
getArg
( 0 ) ),
89
sin( -2 *
getArg
( 0 ) ) );
90
91
double
cdmt = cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
92
double
sdmt = sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
93
94
EvtComplex
cG1_T_even, cG1_T_odd;
95
96
if
( other_b == B0B ) {
97
cG1_T_even = G1_T_even *
98
( cdmt + lambda_km *
EvtComplex
( 0.0,
getArg
( 2 ) * sdmt ) );
99
cG1_T_odd = G1_T_odd *
100
( cdmt - lambda_km *
EvtComplex
( 0.0,
getArg
( 2 ) * sdmt ) );
101
}
102
if
( other_b == B0 ) {
103
cG1_T_even = G1_T_even *
104
( cdmt + ( 1.0 / lambda_km ) *
105
EvtComplex
( 0.0,
getArg
( 2 ) * sdmt ) );
106
cG1_T_odd = -G1_T_odd *
107
( cdmt - ( 1.0 / lambda_km ) *
108
EvtComplex
( 0.0,
getArg
( 2 ) * sdmt ) );
109
}
110
111
EvtComplex
hp, hm, h0;
112
113
// This part is adopted from EvtSVVHel and since there is
114
// a photon that can not have helicity 0 this is put in by
115
// setting the h0 amplitude to 0.
116
hm = ( cG1_T_even - cG1_T_odd ) / sqrt( 2.0 );
117
hp = ( cG1_T_even + cG1_T_odd ) / sqrt( 2.0 );
118
h0 =
EvtComplex
( 0.0, 0.0 );
119
120
EvtParticle
*v1, *ph;
121
122
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
123
v1 = p->
getDaug
( 0 );
124
ph = p->
getDaug
( 1 );
125
EvtVector4R
momv1 = v1->
getP4
();
126
EvtVector4R
momph = ph->
getP4
();
127
128
EvtTensor4C
d, g;
129
130
g.
setdiag
( 1.0, -1.0, -1.0, -1.0 );
131
132
EvtVector4R
v, vp;
133
134
v = momv1 / momv1.
d3mag
();
135
vp = ( momv1 + momph ) / ( momv1 + momph ).
mass
();
136
137
d = ( ( 1.0 / sqrt( 3.0 ) ) * ( h0 - ( hp + hm ) ) * ( -1.0 / sqrt( 3.0 ) ) ) *
138
g +
139
( ( 1.0 / sqrt( 2.0 ) ) * ( hp - hm ) *
EvtComplex
( 0.0, 1.0 ) *
140
( sqrt( 1.0 / 2.0 ) ) ) *
141
dual
(
EvtGenFunctions::directProd
( v, vp ) ) +
142
( sqrt( 2.0 / 3.0 ) * ( h0 + 0.5 * ( hp + hm ) ) * sqrt( 3.0 / 2.0 ) ) *
143
(
EvtGenFunctions::directProd
( v, v ) + ( 1.0 / 3.0 ) * g );
144
145
EvtVector4C
ep0, ep1, ep2;
146
147
ep0 = d.
cont1
( v1->
eps
( 0 ).
conj
() );
148
ep1 = d.
cont1
( v1->
eps
( 1 ).
conj
() );
149
ep2 = d.
cont1
( v1->
eps
( 2 ).
conj
() );
150
151
EvtVector4C
ep20, ep21, ep22;
152
153
ep20 = ph->
epsParentPhoton
( 0 ).
conj
();
154
ep21 = ph->
epsParentPhoton
( 1 ).
conj
();
155
156
vertex
( 0, 0, ep0 * ep20 );
157
vertex
( 0, 1, ep0 * ep21 );
158
159
vertex
( 1, 0, ep1 * ep20 );
160
vertex
( 1, 1, ep1 * ep21 );
161
162
vertex
( 2, 0, ep2 * ep20 );
163
vertex
( 2, 1, ep2 * ep21 );
164
165
return
;
166
}
167
168
std::string
EvtSVPCP::getParamName
(
int
i )
169
{
170
switch
( i ) {
171
case
0:
172
return
"weakPhase"
;
173
case
1:
174
return
"deltaM"
;
175
case
2:
176
return
"finalStateCP"
;
177
case
3:
178
return
"Af"
;
179
case
4:
180
return
"AfPhase"
;
181
case
5:
182
return
"Abarf"
;
183
case
6:
184
return
"AbarfPhase"
;
185
default
:
186
return
""
;
187
}
188
}
189
190
std::string
EvtSVPCP::getParamDefault
(
int
i )
191
{
192
switch
( i ) {
193
case
3:
194
return
"1.0"
;
195
case
4:
196
return
"0.0"
;
197
case
5:
198
return
"1.0"
;
199
case
6:
200
return
"0.0"
;
201
default
:
202
return
""
;
203
}
204
}
EvtCPUtil.hh
EvtComplex.hh
EvtConst.hh
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtSVPCP.hh
EvtTensor3C.hh
dual
EvtTensor4C dual(const EvtTensor4C &t2)
Definition
EvtTensor4C.cpp:363
EvtTensor4C.hh
EvtVector4C.hh
EvtVector4R.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::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
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::epsParentPhoton
virtual EvtVector4C epsParentPhoton(int i) const
Definition
EvtParticle.cpp:635
EvtParticle::eps
virtual EvtVector4C eps(int i) const
Definition
EvtParticle.cpp:623
EvtSVPCP
Definition
EvtSVPCP.hh:38
EvtSVPCP::init
void init() override
Definition
EvtSVPCP.cpp:54
EvtSVPCP::getParamDefault
std::string getParamDefault(int i) override
Definition
EvtSVPCP.cpp:190
EvtSVPCP::clone
EvtDecayBase * clone() const override
Definition
EvtSVPCP.cpp:44
EvtSVPCP::getName
std::string getName() const override
Definition
EvtSVPCP.cpp:39
EvtSVPCP::decay
void decay(EvtParticle *p) override
Definition
EvtSVPCP.cpp:66
EvtSVPCP::initProbMax
void initProbMax() override
Definition
EvtSVPCP.cpp:49
EvtSVPCP::getParamName
std::string getParamName(int i) override
Definition
EvtSVPCP.cpp:168
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtTensor4C
Definition
EvtTensor4C.hh:38
EvtTensor4C::setdiag
void setdiag(double t00, double t11, double t22, double t33)
Definition
EvtTensor4C.cpp:202
EvtTensor4C::cont1
EvtVector4C cont1(const EvtVector4C &v4) const
Definition
EvtTensor4C.cpp:446
EvtVector4C
Definition
EvtVector4C.hh:30
EvtVector4C::conj
EvtVector4C conj() const
Definition
EvtVector4C.hh:204
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cpp:48
EvtVector4R::d3mag
double d3mag() const
Definition
EvtVector4R.cpp:192
EvtGenFunctions::directProd
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
Definition
EvtTensor3C.cpp:153
Generated by
1.17.0