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
EvtTVP.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/EvtTVP.hh
"
22
23
#include "
EvtGenBase/EvtDiracSpinor.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
#include "
EvtGenBase/EvtSpinType.hh
"
27
#include "
EvtGenBase/EvtTensor4C.hh
"
28
#include "
EvtGenBase/EvtVector4C.hh
"
29
30
#include <cmath>
31
32
std::string
EvtTVP::getName
()
const
33
{
34
return
"TVP"
;
35
}
36
37
EvtDecayBase
*
EvtTVP::clone
()
const
38
{
39
return
new
EvtTVP
;
40
}
41
42
void
EvtTVP::decay
(
EvtParticle
* root )
43
{
44
if
(
getNDaug
() == 2 ) {
45
decay_2body
( root );
46
}
else
if
(
getNDaug
() == 3 ) {
47
decay_3body
( root );
48
}
49
}
50
51
void
EvtTVP::init
()
52
{
53
checkSpinParent
(
EvtSpinType::TENSOR
);
54
55
if
(
getNDaug
() == 2 ) {
// chi -> gamma psi radiative mode
56
checkNArg
( 0 );
57
checkSpinDaughter
( 0,
EvtSpinType::PHOTON
);
58
checkSpinDaughter
( 1,
EvtSpinType::VECTOR
);
59
}
else
if
(
getNDaug
() == 3 ) {
// chi -> psi lepton lepton
60
checkNDaug
( 3 );
61
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
62
checkSpinDaughter
( 1,
EvtSpinType::DIRAC
);
63
checkSpinDaughter
( 2,
EvtSpinType::DIRAC
);
64
checkNArg
( 1 );
65
m_delta
=
getArg
( 0 );
66
}
67
}
68
69
void
EvtTVP::initProbMax
()
70
{
71
if
(
getNDaug
() == 2 ) {
72
const
EvtId
parId =
getParentId
();
73
if
( parId ==
EvtPDL::getId
(
"chi_b2"
) ) {
74
setProbMax
( 15.0 );
75
}
else
{
76
setProbMax
( 2.5 );
77
}
78
79
}
else
if
(
getNDaug
() == 3 ) {
80
double
dSq =
m_delta
*
m_delta
;
81
double
denom = dSq - 0.2;
82
double
ratio( 1.0 );
83
if
( fabs( denom ) > 1e-10 ) {
84
ratio = dSq / denom;
85
}
86
double
ffCor = ratio * ratio;
87
88
const
EvtId
daugId =
getDaug
( 1 );
89
const
EvtId
parId =
getParentId
();
90
91
if
( daugId ==
EvtPDL::getId
(
"mu+"
) ||
92
daugId ==
EvtPDL::getId
(
"mu-"
) ) {
93
if
( parId ==
EvtPDL::getId
(
"chi_c2"
) ) {
94
setProbMax
( ffCor * 85.0 );
// tested on 1e6 events
95
}
else
if
( parId ==
EvtPDL::getId
(
"chi_b2"
) ) {
96
setProbMax
( ffCor * 750.0 );
// tested on 1e6 events
97
}
98
99
}
else
if
( daugId ==
EvtPDL::getId
(
"e+"
) ||
100
daugId ==
EvtPDL::getId
(
"e-"
) ) {
101
if
( parId ==
EvtPDL::getId
(
"chi_c2"
) ) {
102
setProbMax
( ffCor * 3.5e3 );
// tested on 1e5 events
103
}
else
if
( parId ==
EvtPDL::getId
(
"chi_b2"
) ) {
104
setProbMax
( ffCor * 2.6e4 );
105
}
106
}
107
}
108
}
109
110
void
EvtTVP::decay_2body
(
EvtParticle
* root )
111
{
112
root->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
113
114
// Photon is the first particle and psi is the second
115
// to ensure decay file backwards compatibility
116
EvtParticle
* photon = root->
getDaug
( 0 );
117
EvtParticle
* psi = root->
getDaug
( 1 );
118
119
EvtVector4R
p = psi->
getP4
(),
// psi momentum
120
k = photon->
getP4
();
// Photon momentum
121
122
for
(
int
iPsi = 0; iPsi < 3; iPsi++ ) {
123
EvtVector4C
epsPsi = psi->
epsParent
( iPsi ).
conj
();
124
125
for
(
int
iGamma = 0; iGamma < 2; iGamma++ ) {
126
EvtVector4C
epsGamma = photon->
epsParentPhoton
( iGamma ).
conj
();
127
128
for
(
int
iChi = 0; iChi < 5; iChi++ ) {
129
EvtTensor4C
epsChi = root->
epsTensor
( iChi );
130
131
// Baranov PRD 85,014034 (2012), Eq 11
132
// amp = p^mu epsPsi^a epsChi_{a b} [k_mu epsGamma_b - k_b epsGamma_mu]
133
EvtVector4C
eee = epsChi.
cont1
( epsPsi );
134
EvtVector4C
vvv = ( p * k ) * eee - ( k * eee ) * p;
135
EvtComplex
amp = vvv * epsGamma;
136
vertex
( iChi, iGamma, iPsi, amp );
137
}
138
}
139
}
140
}
141
142
void
EvtTVP::decay_3body
(
EvtParticle
* root )
143
{
144
root->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
145
EvtParticle
* psi = root->
getDaug
( 0 );
146
EvtParticle
* mup = root->
getDaug
( 1 );
147
EvtParticle
* mum = root->
getDaug
( 2 );
148
149
EvtVector4R
p = psi->
getP4
(),
// psi momentum
150
k1 = mup->
getP4
(),
// mu+ momentum
151
k2 = mum->
getP4
(),
// mu- momentum
152
k = k1 + k2;
// photon momentum
153
154
double
kSq = k * k;
155
156
// The decay amplitude needs four-vector products. Make sure we have
157
// valid values for these, otherwise set the amplitude to zero.
158
// We need to set _amp2 (EvtDecayAmp) via the vertex() function call
159
// even when the amplitude is zero, otherwise the amplitude from the
160
// previous accepted event will be used, potentially leading to biases
161
162
// Selection on k^2 to avoid inefficient generation for the electron modes
163
bool
validAmp(
true
);
164
if
( kSq < 1e-3 ) {
165
validAmp =
false
;
166
}
167
168
double
dSq =
m_delta
*
m_delta
;
169
double
dSqDenom = dSq - kSq;
170
if
( fabs( dSqDenom ) < 1e-10 ) {
171
validAmp =
false
;
172
}
173
174
double
factor( 1.0 );
175
if
( validAmp ) {
176
factor = dSq / ( dSqDenom * kSq );
177
}
178
179
// Calculate the amplitude terms, looping over the psi and lepton states
180
int
iPols[4] = { 0, 0, 0, 0 };
181
182
for
(
int
iChi = 0; iChi < 5; iChi++ ) {
183
iPols[0] = iChi;
184
EvtTensor4C
epsChi = root->
epsTensor
( iChi );
185
186
for
(
int
iPsi = 0; iPsi < 3; iPsi++ ) {
187
iPols[1] = iPsi;
188
EvtVector4C
epsPsi = psi->
epsParent
( iPsi ).
conj
();
189
190
for
(
int
iMplus = 0; iMplus < 2; iMplus++ ) {
191
iPols[2] = iMplus;
192
EvtDiracSpinor
spMplus = mup->
spParent
( iMplus );
193
194
for
(
int
iMminus = 0; iMminus < 2; iMminus++ ) {
195
iPols[3] = iMminus;
196
EvtDiracSpinor
spMminus = mum->
spParent
( iMminus );
197
EvtVector4C
epsGamma =
EvtLeptonVCurrent
( spMplus, spMminus );
198
199
// Based on Baranov PRD 85,014034 (2012), Eq 11
200
// amp = p^mu epsPsi^a epsChi_{a b} [k_mu epsGamma_b - k_b epsGamma_mu]/k^2
201
EvtVector4C
eee = epsChi.
cont1
( epsPsi );
202
EvtVector4C
vvv = ( p * k ) * eee - ( k * eee ) * p;
203
EvtComplex
amp( 0.0, 0.0 );
204
if
( validAmp ) {
205
amp = vvv * epsGamma;
206
}
207
amp *= factor;
208
209
// Set the amplitude matrix element using the vertex function
210
vertex
( iPols, amp );
211
}
212
}
213
}
214
}
215
}
EvtLeptonVCurrent
EvtVector4C EvtLeptonVCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
Definition
EvtDiracSpinor.cpp:208
EvtDiracSpinor.hh
EvtPDL.hh
EvtParticle.hh
EvtSpinType.hh
EvtTVP.hh
EvtTensor4C.hh
EvtVector4C.hh
EvtComplex
Definition
EvtComplex.hh:29
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
EvtDecayBase::getDaugs
const EvtId * getDaugs() const
Definition
EvtDecayBase.hh:65
EvtDiracSpinor
Definition
EvtDiracSpinor.hh:32
EvtId
Definition
EvtId.hh:27
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::spParent
virtual EvtDiracSpinor spParent(int) const
Definition
EvtParticle.cpp:660
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::epsTensor
virtual EvtTensor4C epsTensor(int i) const
Definition
EvtParticle.cpp:720
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
EvtSpinType::TENSOR
@ TENSOR
Definition
EvtSpinType.hh:32
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtTVP
Definition
EvtTVP.hh:36
EvtTVP::decay_3body
void decay_3body(EvtParticle *p)
Definition
EvtTVP.cpp:142
EvtTVP::clone
EvtDecayBase * clone() const override
Definition
EvtTVP.cpp:37
EvtTVP::decay_2body
void decay_2body(EvtParticle *p)
Definition
EvtTVP.cpp:110
EvtTVP::init
void init() override
Definition
EvtTVP.cpp:51
EvtTVP::getName
std::string getName() const override
Definition
EvtTVP.cpp:32
EvtTVP::initProbMax
void initProbMax() override
Definition
EvtTVP.cpp:69
EvtTVP::decay
void decay(EvtParticle *p) override
Definition
EvtTVP.cpp:42
EvtTVP::m_delta
double m_delta
Definition
EvtTVP.hh:49
EvtTensor4C
Definition
EvtTensor4C.hh:38
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
Generated by
1.17.0