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
EvtBToXElNu.cpp
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2021 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/EvtBToXElNu.hh
"
22
23
#include "
EvtGenBase/EvtGenKine.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
#include "
EvtGenBase/EvtReport.hh
"
27
#include "
EvtGenBase/EvtSemiLeptonicScalarAmp.hh
"
28
#include "
EvtGenBase/EvtSemiLeptonicVectorAmp.hh
"
29
30
#include "
EvtGenModels/EvtBCLFF.hh
"
31
#include "
EvtGenModels/EvtBGLFF.hh
"
32
33
#include <cstdlib>
34
#include <string>
35
36
using
std::endl;
37
38
std::string
EvtBToXElNu::getName
()
const
39
{
40
return
"BTOXELNU"
;
41
}
42
43
EvtDecayBase
*
EvtBToXElNu::clone
()
const
44
{
45
return
new
EvtBToXElNu
;
46
}
47
48
void
EvtBToXElNu::decay
(
EvtParticle
* p )
49
{
50
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
51
m_calcamp
->CalcAmp( p,
m_amp2
,
m_ffmodel
.get() );
52
}
53
54
void
EvtBToXElNu::initProbMax
()
55
{
56
EvtId
parnum, mesnum, lnum, nunum;
57
58
parnum =
getParentId
();
59
mesnum =
getDaug
( 0 );
60
lnum =
getDaug
( 1 );
61
nunum =
getDaug
( 2 );
62
63
const
double
mymaxprob =
m_calcamp
->CalcMaxProb( parnum, mesnum, lnum,
64
nunum,
m_ffmodel
.get() );
65
66
setProbMax
( mymaxprob );
67
}
68
69
void
EvtBToXElNu::init
()
70
{
71
checkNDaug
( 3 );
72
73
// We expect the parent to be a scalar
74
// and the daughters to be X lepton neutrino
75
checkSpinParent
(
EvtSpinType::SCALAR
);
76
77
checkSpinDaughter
( 1,
EvtSpinType::DIRAC
);
78
checkSpinDaughter
( 2,
EvtSpinType::NEUTRINO
);
79
80
EvtSpinType::spintype
d1type =
EvtPDL::getSpinType
(
getDaug
( 0 ) );
81
const
std::string model =
getArgStr
( 0 );
82
EvtGenReport
(
EVTGEN_INFO
,
"EvtGen"
)
83
<<
"Using "
<< model <<
" EvtGen FF model"
<< endl;
84
85
// -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL -- BGL
86
if
( model ==
"BGL"
) {
87
const
EvtId
lnum =
getDaug
( 1 );
88
if
( lnum ==
EvtPDL::getId
(
"tau-"
) || lnum ==
EvtPDL::getId
(
"tau+"
) ) {
89
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
90
<<
"The current BGL model should not be used for taus"
<< endl;
91
::abort();
92
}
93
94
if
( d1type ==
EvtSpinType::SCALAR
) {
95
if
(
getNArg
() == 9 ) {
96
m_ffmodel
= std::make_unique<EvtBGLFF>(
97
getArg
( 1 ),
getArg
( 2 ),
getArg
( 3 ),
getArg
( 4 ),
98
getArg
( 5 ),
getArg
( 6 ),
getArg
( 7 ),
getArg
( 8 ) );
99
m_calcamp
= std::make_unique<EvtSemiLeptonicScalarAmp>();
100
}
else
{
101
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
102
<<
"BGL (N=3) model for scalar meson daughters needs 8 arguments. Sorry."
103
<< endl;
104
::abort();
105
}
106
}
else
if
( d1type ==
EvtSpinType::VECTOR
) {
107
if
(
getNArg
() == 7 ) {
108
m_ffmodel
= std::make_unique<EvtBGLFF>(
getArg
( 1 ),
109
getArg
( 2 ),
getArg
( 3 ),
110
getArg
( 4 ),
getArg
( 5 ),
111
getArg
( 6 ) );
112
m_calcamp
= std::make_unique<EvtSemiLeptonicVectorAmp>();
113
}
else
{
114
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
115
<<
"BGL (N=3) model for vector meson daughters needs 6 arguments. Sorry."
116
<< endl;
117
::abort();
118
}
119
}
else
{
120
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
121
<<
"Only Scalar and Vector models implemented. Sorry."
<< endl;
122
::abort();
123
}
124
// -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL -- BCL
125
}
else
if
( model ==
"BCL"
) {
126
// -- Need to subtract 1 as the first argument is the model name (BCL)
127
const
int
numArgs =
getNArg
() - 1;
128
double
* args =
getArgs
();
129
args = &args[1];
130
131
m_ffmodel
= std::make_unique<EvtBCLFF>( numArgs, args );
132
if
( d1type ==
EvtSpinType::SCALAR
) {
133
m_calcamp
= std::make_unique<EvtSemiLeptonicScalarAmp>();
134
}
else
if
( d1type ==
EvtSpinType::VECTOR
) {
135
m_calcamp
= std::make_unique<EvtSemiLeptonicVectorAmp>();
136
}
else
{
137
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
138
<<
"BCL model handles currently only scalar and vector meson daughters. Sorry."
139
<< endl;
140
::abort();
141
}
142
}
else
{
143
EvtGenReport
(
EVTGEN_INFO
,
"EvtGen"
)
144
<<
" Unknown form-factor model, valid options are BGL, BCL"
145
<< std::endl;
146
::abort();
147
}
148
}
EvtBCLFF.hh
EvtBGLFF.hh
EvtBToXElNu.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_INFO
@ EVTGEN_INFO
Definition
EvtReport.hh:52
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtSemiLeptonicScalarAmp.hh
EvtSemiLeptonicVectorAmp.hh
EvtBToXElNu::initProbMax
void initProbMax() override
Definition
EvtBToXElNu.cpp:54
EvtBToXElNu::EvtBToXElNu
EvtBToXElNu()=default
EvtBToXElNu::m_calcamp
std::unique_ptr< EvtSemiLeptonicAmp > m_calcamp
Definition
EvtBToXElNu.hh:59
EvtBToXElNu::m_ffmodel
std::unique_ptr< EvtSemiLeptonicFF > m_ffmodel
Definition
EvtBToXElNu.hh:56
EvtBToXElNu::decay
void decay(EvtParticle *p) override
Definition
EvtBToXElNu.cpp:48
EvtBToXElNu::init
void init() override
Definition
EvtBToXElNu.cpp:69
EvtBToXElNu::clone
EvtDecayBase * clone() const override
Definition
EvtBToXElNu.cpp:43
EvtBToXElNu::getName
std::string getName() const override
Definition
EvtBToXElNu.cpp:38
EvtDecayAmp::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
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::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
EvtDecayBase::getArgStr
std::string getArgStr(int j) const
Definition
EvtDecayBase.hh:77
EvtDecayBase::getParentId
EvtId getParentId() const
Definition
EvtDecayBase.hh:60
EvtDecayBase::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
EvtDecayBase::getArgs
double * getArgs()
Definition
EvtDecayBase.cpp:561
EvtDecayBase::checkNDaug
void checkNDaug(int d1, int d2=-1)
Definition
EvtDecayBase.cpp:516
EvtDecayBase::getDaugs
const EvtId * getDaugs() const
Definition
EvtDecayBase.hh:65
EvtId
Definition
EvtId.hh:27
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition
EvtPDL.cpp:371
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
EvtSpinType::spintype
spintype
Definition
EvtSpinType.hh:29
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition
EvtSpinType.hh:35
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
Generated by
1.17.0