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
EvtVVP.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/EvtVVP.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
EvtVVP::getName
()
const
33
{
34
return
"VVP"
;
35
}
36
37
EvtDecayBase
*
EvtVVP::clone
()
const
38
{
39
return
new
EvtVVP
;
40
}
41
42
void
EvtVVP::init
()
43
{
44
checkSpinParent
(
EvtSpinType::VECTOR
);
45
46
if
(
getNDaug
() == 2 ) {
// chi -> gamma psi radiative mode
47
// This model needs 0 parameters, but previously was defined as requiring 8!
48
// Check for 0 or 8 parameters in the decay file for backwards compatibility
49
checkNArg
( 0, 8 );
50
checkNDaug
( 2 );
51
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
52
checkSpinDaughter
( 1,
EvtSpinType::PHOTON
);
53
54
}
else
if
(
getNDaug
() == 3 ) {
// chi -> psi lepton lepton
55
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
56
checkSpinDaughter
( 1,
EvtSpinType::DIRAC
);
57
checkSpinDaughter
( 2,
EvtSpinType::DIRAC
);
58
checkNArg
( 1 );
59
m_delta
=
getArg
( 0 );
60
}
61
}
62
63
void
EvtVVP::initProbMax
()
64
{
65
if
(
getNDaug
() == 2 ) {
66
setProbMax
( 2.0 );
67
68
}
else
if
(
getNDaug
() == 3 ) {
69
const
EvtId
daugId =
getDaug
( 1 );
70
71
if
( daugId ==
EvtPDL::getId
(
"mu+"
) ||
72
daugId ==
EvtPDL::getId
(
"mu-"
) ) {
73
setProbMax
( 15.0 );
74
}
else
if
( daugId ==
EvtPDL::getId
(
"e+"
) ||
75
daugId ==
EvtPDL::getId
(
"e-"
) ) {
76
setProbMax
( 600.0 );
77
}
78
}
79
}
80
81
void
EvtVVP::decay
(
EvtParticle
* root )
82
{
83
if
(
getNDaug
() == 2 ) {
84
decay_2body
( root );
85
}
else
if
(
getNDaug
() == 3 ) {
86
decay_3body
( root );
87
}
88
}
89
90
void
EvtVVP::decay_2body
(
EvtParticle
* p )
91
{
92
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
93
// Vector is first particle, photon is the second
94
EvtParticle
*v, *ph;
95
v = p->
getDaug
( 0 );
96
ph = p->
getDaug
( 1 );
97
EvtVector3C
epsp[3];
98
EvtVector3C
epsv[3];
99
EvtVector3C
epsph[2];
100
epsp[0] = p->
eps
( 0 ).
vec
();
101
epsp[1] = p->
eps
( 1 ).
vec
();
102
epsp[2] = p->
eps
( 2 ).
vec
();
103
104
epsv[0] = v->
eps
( 0 ).
vec
().
conj
();
105
epsv[1] = v->
eps
( 1 ).
vec
().
conj
();
106
epsv[2] = v->
eps
( 2 ).
vec
().
conj
();
107
108
epsph[0] = ph->
epsParentPhoton
( 0 ).
vec
().
conj
();
109
epsph[1] = ph->
epsParentPhoton
( 1 ).
vec
().
conj
();
110
111
int
i, j, k;
112
for
( i = 0; i < 3; i++ ) {
113
for
( j = 0; j < 3; j++ ) {
114
for
( k = 0; k < 2; k++ ) {
115
vertex
( i, j, k, epsp[i].
cross
( epsv[j] ) * epsph[k] );
116
}
117
}
118
}
119
}
120
121
void
EvtVVP::decay_3body
(
EvtParticle
* root )
122
{
123
root->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
124
EvtParticle
* psi = root->
getDaug
( 0 );
125
EvtParticle
* mup = root->
getDaug
( 1 );
126
EvtParticle
* mum = root->
getDaug
( 2 );
127
128
EvtVector4R
k1 = mup->
getP4
(),
// mu+ momentum
129
k2 = mum->
getP4
(),
// mu- momentum
130
k = k1 + k2;
// photon momentum
131
132
double
kSq = k * k;
133
134
// The decay amplitude needs four-vector products. Make sure we have
135
// valid values for these, otherwise set the amplitude to zero.
136
// We need to set _amp2 (EvtDecayAmp) via the vertex() function call
137
// even when the amplitude is zero, otherwise the amplitude from the
138
// previous accepted event will be used, potentially leading to biases
139
140
// Selection on k^2 to avoid inefficient generation for the electron modes
141
bool
validAmp(
true
);
142
if
( kSq < 1e-3 ) {
143
validAmp =
false
;
144
}
145
146
// Extra checks to make sure we are not dividing by zero
147
double
dSq =
m_delta
*
m_delta
;
148
double
dSqDenom = dSq - kSq;
149
if
( fabs( dSqDenom ) < 1e-10 ) {
150
validAmp =
false
;
151
}
152
153
double
factor( 1.0 );
154
if
( validAmp ) {
155
factor = dSq / ( dSqDenom * kSq );
156
}
157
158
int
iPols[4] = { 0, 0, 0, 0 };
159
160
// Calculate the amplitude terms, looping over the chi, psi and lepton states
161
for
(
int
iChi = 0; iChi < 3; iChi++ ) {
162
iPols[0] = iChi;
163
EvtVector4C
epsChi = root->
epsParent
( iChi );
164
165
for
(
int
iPsi = 0; iPsi < 3; iPsi++ ) {
166
iPols[1] = iPsi;
167
EvtVector4C
epsPsi = psi->
epsParent
( iPsi ).
conj
();
168
169
for
(
int
iMplus = 0; iMplus < 2; iMplus++ ) {
170
iPols[2] = iMplus;
171
EvtDiracSpinor
spMplus = mup->
spParent
( iMplus );
172
173
for
(
int
iMminus = 0; iMminus < 2; iMminus++ ) {
174
iPols[3] = iMminus;
175
EvtDiracSpinor
spMminus = mum->
spParent
( iMminus );
176
EvtVector4C
epsGamma =
177
EvtLeptonVCurrent
( spMplus, spMminus ).
conj
();
178
179
// Based on Baranov PRD 85,014034 (2012), Eq 10
180
// amp = e_{mu nu alpha beta} epsChi^mu epsPsi^nu epsGamma^alpha k^beta/k^2
181
EvtComplex
amp( 0.0, 0.0 );
182
if
( validAmp ) {
183
amp = k *
dual
(
EvtGenFunctions::directProd
( epsChi,
184
epsPsi ) )
185
.
cont1
( epsGamma );
186
}
187
amp *= factor;
188
189
// Set the amplitude matrix element using the vertex function
190
vertex
( iPols, amp );
191
}
192
}
193
}
194
}
195
}
EvtLeptonVCurrent
EvtVector4C EvtLeptonVCurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
Definition
EvtDiracSpinor.cpp:208
EvtDiracSpinor.hh
EvtPDL.hh
EvtParticle.hh
EvtSpinType.hh
dual
EvtTensor4C dual(const EvtTensor4C &t2)
Definition
EvtTensor4C.cpp:363
EvtTensor4C.hh
EvtVVP.hh
cross
EvtVector3R cross(const EvtVector3R &p1, const EvtVector3R &p2)
Definition
EvtVector3R.cpp:77
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::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::eps
virtual EvtVector4C eps(int i) const
Definition
EvtParticle.cpp:623
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:34
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtTensor4C::cont1
EvtVector4C cont1(const EvtVector4C &v4) const
Definition
EvtTensor4C.cpp:446
EvtVVP::init
void init() override
Definition
EvtVVP.cpp:42
EvtVVP::EvtVVP
EvtVVP()
Definition
EvtVVP.hh:37
EvtVVP::decay_3body
void decay_3body(EvtParticle *p)
Definition
EvtVVP.cpp:121
EvtVVP::getName
std::string getName() const override
Definition
EvtVVP.cpp:32
EvtVVP::m_delta
double m_delta
Definition
EvtVVP.hh:49
EvtVVP::decay
void decay(EvtParticle *p) override
Definition
EvtVVP.cpp:81
EvtVVP::clone
EvtDecayBase * clone() const override
Definition
EvtVVP.cpp:37
EvtVVP::decay_2body
void decay_2body(EvtParticle *p)
Definition
EvtVVP.cpp:90
EvtVVP::initProbMax
void initProbMax() override
Definition
EvtVVP.cpp:63
EvtVector3C
Definition
EvtVector3C.hh:29
EvtVector3C::conj
EvtVector3C conj() const
Definition
EvtVector3C.hh:178
EvtVector4C
Definition
EvtVector4C.hh:30
EvtVector4C::conj
EvtVector4C conj() const
Definition
EvtVector4C.hh:204
EvtVector4C::vec
EvtVector3C vec() const
Definition
EvtVector4C.hh:103
EvtVector4R
Definition
EvtVector4R.hh:29
EvtGenFunctions::directProd
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
Definition
EvtTensor3C.cpp:153
Generated by
1.17.0