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
EvtTauHadnu.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/EvtTauHadnu.hh
"
22
23
#include "
EvtGenBase/EvtDiracSpinor.hh
"
24
#include "
EvtGenBase/EvtGenKine.hh
"
25
#include "
EvtGenBase/EvtIdSet.hh
"
26
#include "
EvtGenBase/EvtPDL.hh
"
27
#include "
EvtGenBase/EvtParticle.hh
"
28
#include "
EvtGenBase/EvtReport.hh
"
29
#include "
EvtGenBase/EvtVector4C.hh
"
30
31
#include <iostream>
32
#include <stdlib.h>
33
#include <string>
34
35
using namespace
std;
36
37
std::string
EvtTauHadnu::getName
()
const
38
{
39
return
"TAUHADNU"
;
40
}
41
42
EvtDecayBase
*
EvtTauHadnu::clone
()
const
43
{
44
return
new
EvtTauHadnu
;
45
}
46
47
void
EvtTauHadnu::init
()
48
{
49
// check that there are 0 arguments
50
51
checkSpinParent
(
EvtSpinType::DIRAC
);
52
53
//the last daughter should be a neutrino
54
checkSpinDaughter
(
getNDaug
() - 1,
EvtSpinType::NEUTRINO
);
55
56
int
i;
57
for
( i = 0; i < (
getNDaug
() - 1 ); i++ ) {
58
checkSpinDaughter
( i,
EvtSpinType::SCALAR
);
59
}
60
61
bool
validndaug =
false
;
62
63
if
(
getNDaug
() == 4 ) {
64
//pipinu
65
validndaug =
true
;
66
checkNArg
( 7 );
67
m_beta
=
getArg
( 0 );
68
m_mRho
=
getArg
( 1 );
69
m_gammaRho
=
getArg
( 2 );
70
m_mRhopr
=
getArg
( 3 );
71
m_gammaRhopr
=
getArg
( 4 );
72
m_mA1
=
getArg
( 5 );
73
m_gammaA1
=
getArg
( 6 );
74
}
75
if
(
getNDaug
() == 3 ) {
76
//pipinu
77
validndaug =
true
;
78
checkNArg
( 5 );
79
m_beta
=
getArg
( 0 );
80
m_mRho
=
getArg
( 1 );
81
m_gammaRho
=
getArg
( 2 );
82
m_mRhopr
=
getArg
( 3 );
83
m_gammaRhopr
=
getArg
( 4 );
84
}
85
if
(
getNDaug
() == 2 ) {
86
//pipinu
87
validndaug =
true
;
88
checkNArg
( 0 );
89
}
90
91
if
( !validndaug ) {
92
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
93
<<
"Have not yet implemented this final state in TAUHADNUKS model"
94
<< endl;
95
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
) <<
"Ndaug="
<<
getNDaug
() << endl;
96
int
id;
97
for
(
id
= 0;
id
< (
getNDaug
() - 1 );
id
++ )
98
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
99
<<
"Daug "
<<
id
<<
" "
<<
EvtPDL::name
(
getDaug
(
id
) ).c_str()
100
<< endl;
101
}
102
}
103
104
void
EvtTauHadnu::initProbMax
()
105
{
106
if
(
getNDaug
() == 2 )
107
setProbMax
( 90.0 );
108
if
(
getNDaug
() == 3 )
109
setProbMax
( 2500.0 );
110
if
(
getNDaug
() == 4 )
111
setProbMax
( 30000.0 );
112
}
113
114
void
EvtTauHadnu::decay
(
EvtParticle
* p )
115
{
116
static
const
EvtId
TAUM =
EvtPDL::getId
(
"tau-"
);
117
118
EvtIdSet
thePis{
"pi+"
,
"pi-"
,
"pi0"
};
119
EvtIdSet
theKs{
"K+"
,
"K-"
};
120
121
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
122
123
EvtParticle
* nut;
124
nut = p->
getDaug
(
getNDaug
() - 1 );
125
p->
getDaug
( 0 )->
getP4
();
126
127
//get the leptonic current
128
EvtVector4C
tau1, tau2;
129
130
if
( p->
getId
() == TAUM ) {
131
tau1 =
EvtLeptonVACurrent
( nut->
spParentNeutrino
(), p->
sp
( 0 ) );
132
tau2 =
EvtLeptonVACurrent
( nut->
spParentNeutrino
(), p->
sp
( 1 ) );
133
}
else
{
134
tau1 =
EvtLeptonVACurrent
( p->
sp
( 0 ), nut->
spParentNeutrino
() );
135
tau2 =
EvtLeptonVACurrent
( p->
sp
( 1 ), nut->
spParentNeutrino
() );
136
}
137
138
EvtVector4C
hadCurr;
139
bool
foundHadCurr =
false
;
140
if
(
getNDaug
() == 2 ) {
141
hadCurr = p->
getDaug
( 0 )->
getP4
();
142
foundHadCurr =
true
;
143
}
144
if
(
getNDaug
() == 3 ) {
145
//pi pi0 nu with rho and rhopr resonance
146
if
( thePis.
contains
(
getDaug
( 0 ) ) && thePis.
contains
(
getDaug
( 1 ) ) ) {
147
EvtVector4R
q1 = p->
getDaug
( 0 )->
getP4
();
148
EvtVector4R
q2 = p->
getDaug
( 1 )->
getP4
();
149
double
m1 = q1.
mass
();
150
double
m2 = q2.
mass
();
151
152
hadCurr =
Fpi
( ( q1 + q2 ).mass2(), m1, m2 ) * ( q1 - q2 );
153
154
foundHadCurr =
true
;
155
}
156
}
157
if
(
getNDaug
() == 4 ) {
158
if
( thePis.
contains
(
getDaug
( 0 ) ) && thePis.
contains
(
getDaug
( 1 ) ) &&
159
thePis.
contains
(
getDaug
( 2 ) ) ) {
160
//figure out which is the different charged pi
161
//want it to be q3
162
163
int
diffPi( 0 ), samePi1( 0 ), samePi2( 0 );
164
if
(
getDaug
( 0 ) ==
getDaug
( 1 ) ) {
165
diffPi = 2;
166
samePi1 = 0;
167
samePi2 = 1;
168
}
169
if
(
getDaug
( 0 ) ==
getDaug
( 2 ) ) {
170
diffPi = 1;
171
samePi1 = 0;
172
samePi2 = 2;
173
}
174
if
(
getDaug
( 1 ) ==
getDaug
( 2 ) ) {
175
diffPi = 0;
176
samePi1 = 1;
177
samePi2 = 2;
178
}
179
180
EvtVector4R
q1 = p->
getDaug
( samePi1 )->
getP4
();
181
EvtVector4R
q2 = p->
getDaug
( samePi2 )->
getP4
();
182
EvtVector4R
q3 = p->
getDaug
( diffPi )->
getP4
();
183
184
double
m1 = q1.
mass
();
185
double
m2 = q2.
mass
();
186
double
m3 = q3.
mass
();
187
188
EvtVector4R
Q = q1 + q2 + q3;
189
double
Q2 = Q.
mass2
();
190
double
mA12 =
m_mA1
*
m_mA1
;
191
192
double
gammaA1X =
m_gammaA1
*
gFunc
( Q2, samePi1 ) /
193
gFunc
( mA12, samePi1 );
194
195
EvtComplex
denBW_A1( mA12 - Q2, -1. *
m_mA1
* gammaA1X );
196
EvtComplex
BW_A1 = mA12 / denBW_A1;
197
198
hadCurr = BW_A1 *
199
( ( ( q1 - q3 ) - ( Q * ( Q * ( q1 - q3 ) ) / Q2 ) ) *
200
Fpi
( ( q1 + q3 ).mass2(), m1, m3 ) +
201
( ( q2 - q3 ) - ( Q * ( Q * ( q2 - q3 ) ) / Q2 ) ) *
202
Fpi
( ( q2 + q3 ).mass2(), m2, m3 ) );
203
204
foundHadCurr =
true
;
205
}
206
}
207
208
if
( !foundHadCurr ) {
209
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
210
<<
"Have not yet implemented this final state in TAUHADNUKS model"
211
<< endl;
212
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
) <<
"Ndaug="
<<
getNDaug
() << endl;
213
int
id;
214
for
(
id
= 0;
id
< (
getNDaug
() - 1 );
id
++ )
215
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
216
<<
"Daug "
<<
id
<<
" "
<<
EvtPDL::name
(
getDaug
(
id
) ).c_str()
217
<< endl;
218
}
219
220
vertex
( 0, tau1 * hadCurr );
221
vertex
( 1, tau2 * hadCurr );
222
223
return
;
224
}
225
226
double
EvtTauHadnu::gFunc
(
double
Q2,
int
dupD )
227
{
228
double
mpi =
EvtPDL::getMeanMass
(
getDaug
( dupD ) );
229
double
mpi2 = pow( mpi, 2. );
230
if
( Q2 < pow(
m_mRho
+ mpi, 2. ) ) {
231
double
arg
= Q2 - 9. * mpi2;
232
return
4.1 * pow(
arg
, 3. ) * ( 1. - 3.3 *
arg
+ 5.8 * pow(
arg
, 2. ) );
233
}
else
234
return
Q2 * ( 1.623 + 10.38 / Q2 - 9.32 / pow( Q2, 2. ) +
235
0.65 / pow( Q2, 3. ) );
236
}
237
238
EvtComplex
EvtTauHadnu::Fpi
(
double
s,
double
xm1,
double
xm2 )
239
{
240
EvtComplex
BW_rho =
BW
( s,
m_mRho
,
m_gammaRho
, xm1, xm2 );
241
EvtComplex
BW_rhopr =
BW
( s,
m_mRhopr
,
m_gammaRhopr
, xm1, xm2 );
242
243
return
( BW_rho +
m_beta
* BW_rhopr ) / ( 1. +
m_beta
);
244
}
245
246
EvtComplex
EvtTauHadnu::BW
(
double
s,
double
m,
double
gamma,
double
xm1,
247
double
xm2 )
248
{
249
double
m2 = pow( m, 2. );
250
251
if
( s > pow( xm1 + xm2, 2. ) ) {
252
double
qs = sqrt( fabs( ( s - pow( xm1 + xm2, 2. ) ) *
253
( s - pow( xm1 - xm2, 2. ) ) ) ) /
254
sqrt( s );
255
double
qm = sqrt( fabs( ( m2 - pow( xm1 + xm2, 2. ) ) *
256
( m2 - pow( xm1 - xm2, 2. ) ) ) ) /
257
m;
258
259
gamma *= m2 / s * pow( qs / qm, 3. );
260
}
else
261
gamma = 0.;
262
263
EvtComplex
denBW( m2 - s, -1. * sqrt( s ) * gamma );
264
265
return
m2 / denBW;
266
}
arg
double arg(const EvtComplex &c)
Definition
EvtComplex.hh:216
EvtLeptonVACurrent
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
Definition
EvtDiracSpinor.cpp:178
EvtDiracSpinor.hh
EvtGenKine.hh
EvtIdSet.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtTauHadnu.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::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
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
EvtIdSet
Definition
EvtIdSet.hh:30
EvtIdSet::contains
bool contains(const EvtId &id) const
Definition
EvtIdSet.cpp:46
EvtId
Definition
EvtId.hh:27
EvtPDL::name
static std::string name(EvtId i)
Definition
EvtPDL.cpp:376
EvtPDL::getMeanMass
static double getMeanMass(EvtId i)
Definition
EvtPDL.cpp:306
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
EvtParticle::spParentNeutrino
virtual EvtDiracSpinor spParentNeutrino() const
Definition
EvtParticle.cpp:684
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::sp
virtual EvtDiracSpinor sp(int) const
Definition
EvtParticle.cpp:672
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition
EvtSpinType.hh:35
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
EvtTauHadnu::m_beta
double m_beta
Definition
EvtTauHadnu.hh:40
EvtTauHadnu::EvtTauHadnu
EvtTauHadnu()
Definition
EvtTauHadnu.hh:30
EvtTauHadnu::decay
void decay(EvtParticle *p) override
Definition
EvtTauHadnu.cpp:114
EvtTauHadnu::m_mA1
double m_mA1
Definition
EvtTauHadnu.hh:45
EvtTauHadnu::BW
EvtComplex BW(double s, double m, double gamma, double xm1, double xm2)
Definition
EvtTauHadnu.cpp:246
EvtTauHadnu::Fpi
EvtComplex Fpi(double s, double xm1, double xm2)
Definition
EvtTauHadnu.cpp:238
EvtTauHadnu::getName
std::string getName() const override
Definition
EvtTauHadnu.cpp:37
EvtTauHadnu::init
void init() override
Definition
EvtTauHadnu.cpp:47
EvtTauHadnu::m_gammaA1
double m_gammaA1
Definition
EvtTauHadnu.hh:46
EvtTauHadnu::m_gammaRho
double m_gammaRho
Definition
EvtTauHadnu.hh:42
EvtTauHadnu::clone
EvtDecayBase * clone() const override
Definition
EvtTauHadnu.cpp:42
EvtTauHadnu::m_gammaRhopr
double m_gammaRhopr
Definition
EvtTauHadnu.hh:44
EvtTauHadnu::gFunc
double gFunc(double m2, int dupD)
Definition
EvtTauHadnu.cpp:226
EvtTauHadnu::m_mRho
double m_mRho
Definition
EvtTauHadnu.hh:41
EvtTauHadnu::initProbMax
void initProbMax() override
Definition
EvtTauHadnu.cpp:104
EvtTauHadnu::m_mRhopr
double m_mRhopr
Definition
EvtTauHadnu.hh:43
EvtVector4C
Definition
EvtVector4C.hh:30
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cpp:48
EvtVector4R::mass2
double mass2() const
Definition
EvtVector4R.hh:100
Generated by
1.17.0