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
EvtLb2Baryonlnu.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/EvtLb2Baryonlnu.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/EvtLb2BaryonlnuFF.hh
"
31
32
#include <stdlib.h>
33
#include <string>
34
35
using namespace
std;
36
#ifdef D0
37
#undef D0
38
#endif
39
EvtLb2Baryonlnu::EvtLb2Baryonlnu
() :
m_ffmodel
( nullptr ),
m_calcamp
( nullptr )
40
{
41
}
42
43
EvtLb2Baryonlnu::~EvtLb2Baryonlnu
()
44
{
45
delete
m_ffmodel
;
46
m_ffmodel
=
nullptr
;
47
delete
m_calcamp
;
48
m_calcamp
=
nullptr
;
49
}
50
51
std::string
EvtLb2Baryonlnu::getName
()
const
52
{
53
return
"Lb2Baryonlnu"
;
54
}
55
56
EvtDecayBase
*
EvtLb2Baryonlnu::clone
()
const
57
{
58
return
new
EvtLb2Baryonlnu
;
59
}
60
61
void
EvtLb2Baryonlnu::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
EvtLb2Baryonlnu::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
static
const
EvtId
N1440 =
EvtPDL::getId
(
"N(1440)+"
);
89
static
const
EvtId
N1440B =
EvtPDL::getId
(
"anti-N(1440)-"
);
90
static
const
EvtId
N1535 =
EvtPDL::getId
(
"N(1535)+"
);
91
static
const
EvtId
N1535B =
EvtPDL::getId
(
"anti-N(1535)-"
);
92
static
const
EvtId
N1520 =
EvtPDL::getId
(
"N(1520)+"
);
93
static
const
EvtId
N1520B =
EvtPDL::getId
(
"anti-N(1520)-"
);
94
static
const
EvtId
N1720 =
EvtPDL::getId
(
"N(1720)+"
);
95
static
const
EvtId
N1720B =
EvtPDL::getId
(
"anti-N(1720)-"
);
96
static
const
EvtId
N1650 =
EvtPDL::getId
(
"N(1650)+"
);
97
static
const
EvtId
N1650B =
EvtPDL::getId
(
"anti-N(1650)-"
);
98
static
const
EvtId
N1700 =
EvtPDL::getId
(
"N(1700)+"
);
99
static
const
EvtId
N1700B =
EvtPDL::getId
(
"anti-N(1700)-"
);
100
static
const
EvtId
N1710 =
EvtPDL::getId
(
"N(1710)+"
);
101
static
const
EvtId
N1710B =
EvtPDL::getId
(
"anti-N(1710)-"
);
102
static
const
EvtId
N1875 =
EvtPDL::getId
(
"N(1875)+"
);
103
static
const
EvtId
N1875B =
EvtPDL::getId
(
"anti-N(1875)-"
);
104
static
const
EvtId
N1900 =
EvtPDL::getId
(
"N(1900)+"
);
105
static
const
EvtId
N1900B =
EvtPDL::getId
(
"anti-N(1900)-"
);
106
static
const
EvtId
LAMCP =
EvtPDL::getId
(
"Lambda_c+"
);
107
static
const
EvtId
LAMCM =
EvtPDL::getId
(
"anti-Lambda_c-"
);
108
static
const
EvtId
LAMC1P =
EvtPDL::getId
(
"Lambda_c(2593)+"
);
109
static
const
EvtId
LAMC1M =
EvtPDL::getId
(
"anti-Lambda_c(2593)-"
);
110
static
const
EvtId
LAMC2P =
EvtPDL::getId
(
"Lambda_c(2625)+"
);
111
static
const
EvtId
LAMC2M =
EvtPDL::getId
(
"anti-Lambda_c(2625)-"
);
112
113
EvtId
parnum, barnum;
114
115
parnum =
getParentId
();
116
barnum =
getDaug
( 0 );
117
118
if
( ( parnum == LAMB && barnum == PRO ) ||
119
( parnum == LAMBB && barnum == PROB ) ||
120
( parnum == LAMB && barnum == N1440 ) ||
121
( parnum == LAMBB && barnum == N1440B ) ||
122
( parnum == LAMB && barnum == N1520 ) ||
123
( parnum == LAMBB && barnum == N1520B ) ||
124
( parnum == LAMB && barnum == N1535 ) ||
125
( parnum == LAMBB && barnum == N1535B ) ||
126
( parnum == LAMB && barnum == N1720 ) ||
127
( parnum == LAMBB && barnum == N1720B ) ||
128
( parnum == LAMB && barnum == N1650 ) ||
129
( parnum == LAMBB && barnum == N1650B ) ||
130
( parnum == LAMB && barnum == N1700 ) ||
131
( parnum == LAMBB && barnum == N1700B ) ||
132
( parnum == LAMB && barnum == N1710 ) ||
133
( parnum == LAMBB && barnum == N1710B ) ||
134
( parnum == LAMB && barnum == N1875 ) ||
135
( parnum == LAMBB && barnum == N1875B ) ||
136
( parnum == LAMB && barnum == N1900 ) ||
137
( parnum == LAMBB && barnum == N1900B ) ||
138
( parnum == LAMB && barnum == LAMCP ) ||
139
( parnum == LAMBB && barnum == LAMCM ) ||
140
( parnum == LAMB && barnum == LAMC1P ) ||
141
( parnum == LAMBB && barnum == LAMC1M ) ||
142
( parnum == LAMB && barnum == LAMC2P ) ||
143
( parnum == LAMBB && barnum == LAMC2M ) ) {
144
setProbMax
( 22000.0 );
145
}
else
{
146
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
147
<<
"Decay does not have acceptable final state baryon for this model setting ProbMax = 0 "
148
<< endl;
149
setProbMax
( 0.0 );
150
}
151
}
152
153
void
EvtLb2Baryonlnu::init
()
154
{
155
if
(
getNArg
() != 4 ) {
156
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
157
<<
"EvtLb2Baryonlnu generator expected "
158
<<
" 4 arguments but found:"
<<
getNArg
() << endl;
159
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
160
<<
"Will terminate execution!"
<< endl;
161
::abort();
162
}
163
164
if
(
getNDaug
() != 3 ) {
165
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
166
<<
"Wrong number of daughters in EvtLb2plnu.cc "
167
<<
" 3 daughters expected but found: "
<<
getNDaug
() << endl;
168
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
169
<<
"Will terminate execution!"
<< endl;
170
::abort();
171
}
172
173
//We expect the parent to be a dirac particle
174
//and the daughters to be X lepton neutrino
175
176
EvtSpinType::spintype
parenttype =
EvtPDL::getSpinType
(
getParentId
() );
177
EvtSpinType::spintype
baryontype =
EvtPDL::getSpinType
(
getDaug
( 0 ) );
178
EvtSpinType::spintype
leptontype =
EvtPDL::getSpinType
(
getDaug
( 1 ) );
179
EvtSpinType::spintype
neutrinotype =
EvtPDL::getSpinType
(
getDaug
( 2 ) );
180
181
if
( parenttype !=
EvtSpinType::DIRAC
) {
182
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
183
<<
"EvtLb2Baryonlnu generator expected "
184
<<
" a DIRAC parent, found:"
<<
EvtPDL::name
(
getParentId
() )
185
<< endl;
186
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
187
<<
"Will terminate execution!"
<< endl;
188
::abort();
189
}
190
if
( leptontype !=
EvtSpinType::DIRAC
) {
191
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
192
<<
"EvtLb2Baryonlnu generator expected "
193
<<
" a DIRAC 2nd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 1 ) )
194
<< endl;
195
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
196
<<
"Will terminate execution!"
<< endl;
197
::abort();
198
}
199
if
( neutrinotype !=
EvtSpinType::NEUTRINO
) {
200
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
201
<<
"EvtLb2Baryonlnu generator expected "
202
<<
" a NEUTRINO 3rd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 2 ) )
203
<< endl;
204
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
205
<<
"Will terminate execution!"
<< endl;
206
::abort();
207
}
208
209
//set m_ffmodel
210
m_ffmodel
=
new
EvtLb2BaryonlnuFF
;
211
212
if
( baryontype ==
EvtSpinType::DIRAC
||
213
baryontype ==
EvtSpinType::RARITASCHWINGER
) {
214
m_calcamp
=
new
EvtSLBaryonAmp
;
215
}
else
{
216
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
217
<<
"Wrong baryon spin type in EvtLb2Baryonlnu.cc "
218
<<
"Expected spin type "
<<
EvtSpinType::DIRAC
219
<<
", found spin type "
<< baryontype << endl;
220
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
221
<<
"Will terminate execution!"
<< endl;
222
::abort();
223
}
224
}
EvtConst.hh
EvtGenKine.hh
EvtIdSet.hh
EvtLb2BaryonlnuFF.hh
EvtLb2Baryonlnu.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
EvtLb2BaryonlnuFF
Definition
EvtLb2BaryonlnuFF.hh:30
EvtLb2Baryonlnu::~EvtLb2Baryonlnu
~EvtLb2Baryonlnu()
Definition
EvtLb2Baryonlnu.cpp:43
EvtLb2Baryonlnu::EvtLb2Baryonlnu
EvtLb2Baryonlnu()
Definition
EvtLb2Baryonlnu.cpp:39
EvtLb2Baryonlnu::initProbMax
void initProbMax() override
Definition
EvtLb2Baryonlnu.cpp:82
EvtLb2Baryonlnu::clone
EvtDecayBase * clone() const override
Definition
EvtLb2Baryonlnu.cpp:56
EvtLb2Baryonlnu::init
void init() override
Definition
EvtLb2Baryonlnu.cpp:153
EvtLb2Baryonlnu::getName
std::string getName() const override
Definition
EvtLb2Baryonlnu.cpp:51
EvtLb2Baryonlnu::decay
void decay(EvtParticle *p) override
Definition
EvtLb2Baryonlnu.cpp:61
EvtLb2Baryonlnu::m_calcamp
EvtSLBaryonAmp * m_calcamp
Definition
EvtLb2Baryonlnu.hh:49
EvtLb2Baryonlnu::m_ffmodel
EvtSemiLeptonicFF * m_ffmodel
Definition
EvtLb2Baryonlnu.hh:48
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::RARITASCHWINGER
@ RARITASCHWINGER
Definition
EvtSpinType.hh:37
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:33
Generated by
1.17.0