EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
src
EvtGenModels
EvtLb2plnuLQCD.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/EvtLb2plnuLQCD.hh
"
22
23
#include "
EvtGenBase/EvtConst.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
30
#include "
EvtGenModels/EvtLb2plnuLQCDFF.hh
"
31
32
#include <stdlib.h>
33
#include <string>
34
35
using namespace
std;
36
#ifdef D0
37
#undef D0
38
#endif
39
EvtLb2plnuLQCD::EvtLb2plnuLQCD
() :
m_ffmodel
( nullptr ),
m_calcamp
( nullptr )
40
{
41
}
42
43
EvtLb2plnuLQCD::~EvtLb2plnuLQCD
()
44
{
45
delete
m_ffmodel
;
46
m_ffmodel
=
nullptr
;
47
delete
m_calcamp
;
48
m_calcamp
=
nullptr
;
49
}
50
51
std::string
EvtLb2plnuLQCD::getName
()
const
52
{
53
return
"Lb2plnuLQCD"
;
54
}
55
56
EvtDecayBase
*
EvtLb2plnuLQCD::clone
()
const
57
{
58
return
new
EvtLb2plnuLQCD
;
59
}
60
61
void
EvtLb2plnuLQCD::decay
(
EvtParticle
* p )
62
{
63
//This is a kludge to avoid warnings because the K_2* mass becomes to large.
64
static
const
EvtIdSet
regenerateMasses{
65
"K_2*+"
,
"K_2*-"
,
"K_2*0"
,
"anti-K_2*0"
,
"K_1+"
,
"K_1-"
,
66
"K_10"
,
"anti-K_10"
,
"D'_1+"
,
"D'_1-"
,
"D'_10"
,
"anti-D'_10"
};
67
68
if
( regenerateMasses.
contains
(
getDaug
( 0 ) ) ) {
69
p->
resetFirstOrNot
();
70
}
71
72
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
73
74
EvtComplex
r00(
getArg
( 0 ), 0.0 );
75
EvtComplex
r01(
getArg
( 1 ), 0.0 );
76
EvtComplex
r10(
getArg
( 2 ), 0.0 );
77
EvtComplex
r11(
getArg
( 3 ), 0.0 );
78
79
m_calcamp
->CalcAmp( p,
m_amp2
,
m_ffmodel
, r00, r01, r10, r11 );
80
}
81
82
void
EvtLb2plnuLQCD::initProbMax
()
83
{
84
static
const
EvtId
LAMB =
EvtPDL::getId
(
"Lambda_b0"
);
85
static
const
EvtId
LAMBB =
EvtPDL::getId
(
"anti-Lambda_b0"
);
86
static
const
EvtId
PRO =
EvtPDL::getId
(
"p+"
);
87
static
const
EvtId
PROB =
EvtPDL::getId
(
"anti-p-"
);
88
89
EvtId
parnum, barnum;
90
91
parnum =
getParentId
();
92
barnum =
getDaug
( 0 );
93
94
if
( ( parnum == LAMB && barnum == PRO ) ||
95
( parnum == LAMBB && barnum == PROB ) ) {
96
setProbMax
( 22000.0 );
97
}
else
{
98
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
99
<<
"Decay does not have Lb->p setting ProbMax = 0 "
<< endl;
100
setProbMax
( 0.0 );
101
}
102
}
103
104
void
EvtLb2plnuLQCD::init
()
105
{
106
if
(
getNArg
() != 4 ) {
107
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
108
<<
"EvtLb2plnuLQCD generator expected "
109
<<
" 4 arguments but found:"
<<
getNArg
() << endl;
110
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
111
<<
"Will terminate execution!"
<< endl;
112
::abort();
113
}
114
115
if
(
getNDaug
() != 3 ) {
116
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
117
<<
"Wrong number of daughters in EvtLb2plnu.cc "
118
<<
" 3 daughters expected but found: "
<<
getNDaug
() << endl;
119
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
120
<<
"Will terminate execution!"
<< endl;
121
::abort();
122
}
123
124
//We expect the parent to be a dirac particle
125
//and the daughters to be X lepton neutrino
126
127
EvtSpinType::spintype
parenttype =
EvtPDL::getSpinType
(
getParentId
() );
128
EvtSpinType::spintype
baryontype =
EvtPDL::getSpinType
(
getDaug
( 0 ) );
129
EvtSpinType::spintype
leptontype =
EvtPDL::getSpinType
(
getDaug
( 1 ) );
130
EvtSpinType::spintype
neutrinotype =
EvtPDL::getSpinType
(
getDaug
( 2 ) );
131
132
if
( parenttype !=
EvtSpinType::DIRAC
) {
133
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
134
<<
"EvtLb2plnuLQCD generator expected "
135
<<
" a DIRAC parent, found:"
<<
EvtPDL::name
(
getParentId
() )
136
<< endl;
137
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
138
<<
"Will terminate execution!"
<< endl;
139
::abort();
140
}
141
if
( leptontype !=
EvtSpinType::DIRAC
) {
142
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
143
<<
"EvtLb2plnuLQCD generator expected "
144
<<
" a DIRAC 2nd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 1 ) )
145
<< endl;
146
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
147
<<
"Will terminate execution!"
<< endl;
148
::abort();
149
}
150
if
( neutrinotype !=
EvtSpinType::NEUTRINO
) {
151
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
152
<<
"EvtLb2plnuLQCD generator expected "
153
<<
" a NEUTRINO 3rd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 2 ) )
154
<< endl;
155
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
156
<<
"Will terminate execution!"
<< endl;
157
::abort();
158
}
159
160
//set m_ffmodel
161
m_ffmodel
=
new
EvtLb2plnuLQCDFF
;
162
163
if
( baryontype ==
EvtSpinType::DIRAC
) {
164
m_calcamp
=
new
EvtSLBaryonAmp
;
165
}
else
{
166
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
167
<<
"Wrong baryon spin type in EvtLb2plnuLQCD.cc "
168
<<
"Expected spin type "
<<
EvtSpinType::DIRAC
169
<<
", found spin type "
<< baryontype << endl;
170
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
171
<<
"Will terminate execution!"
<< endl;
172
::abort();
173
}
174
}
EvtConst.hh
EvtGenKine.hh
EvtIdSet.hh
EvtLb2plnuLQCDFF.hh
EvtLb2plnuLQCD.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
EvtComplex
Definition
EvtComplex.hh:29
EvtDecayAmp::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
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::getParentId
EvtId getParentId() const
Definition
EvtDecayBase.hh:60
EvtDecayBase::getDaug
EvtId getDaug(int i) const
Definition
EvtDecayBase.hh:66
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
EvtLb2plnuLQCDFF
Definition
EvtLb2plnuLQCDFF.hh:30
EvtLb2plnuLQCD::getName
std::string getName() const override
Definition
EvtLb2plnuLQCD.cpp:51
EvtLb2plnuLQCD::init
void init() override
Definition
EvtLb2plnuLQCD.cpp:104
EvtLb2plnuLQCD::m_calcamp
EvtSLBaryonAmp * m_calcamp
Definition
EvtLb2plnuLQCD.hh:51
EvtLb2plnuLQCD::clone
EvtDecayBase * clone() const override
Definition
EvtLb2plnuLQCD.cpp:56
EvtLb2plnuLQCD::initProbMax
void initProbMax() override
Definition
EvtLb2plnuLQCD.cpp:82
EvtLb2plnuLQCD::m_ffmodel
EvtSemiLeptonicFF * m_ffmodel
Definition
EvtLb2plnuLQCD.hh:50
EvtLb2plnuLQCD::decay
void decay(EvtParticle *p) override
Definition
EvtLb2plnuLQCD.cpp:61
EvtLb2plnuLQCD::EvtLb2plnuLQCD
EvtLb2plnuLQCD()
Definition
EvtLb2plnuLQCD.cpp:39
EvtLb2plnuLQCD::~EvtLb2plnuLQCD
~EvtLb2plnuLQCD()
Definition
EvtLb2plnuLQCD.cpp:43
EvtPDL::getSpinType
static EvtSpinType::spintype getSpinType(EvtId i)
Definition
EvtPDL.cpp:371
EvtPDL::name
static std::string name(EvtId i)
Definition
EvtPDL.cpp:376
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::resetFirstOrNot
void resetFirstOrNot()
Definition
EvtParticle.cpp:80
EvtSLBaryonAmp
Definition
EvtSLBaryonAmp.hh:35
EvtSpinType::spintype
spintype
Definition
EvtSpinType.hh:29
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition
EvtSpinType.hh:35
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
Generated by
1.16.1