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
EvtBaryonPCR.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/EvtBaryonPCR.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/EvtBaryonPCRFF.hh
"
31
32
#include <stdlib.h>
33
#include <string>
34
35
using namespace
std;
36
#ifdef D0
37
#undef D0
38
#endif
39
40
std::string
EvtBaryonPCR::getName
()
const
41
{
42
return
"BaryonPCR"
;
43
}
44
45
EvtBaryonPCR
*
EvtBaryonPCR::clone
()
const
46
{
47
return
new
EvtBaryonPCR
;
48
}
49
50
void
EvtBaryonPCR::decay
(
EvtParticle
* p )
51
{
52
//This is a kludge to avoid warnings because the K_2* mass becomes to large.
53
static
const
EvtIdSet
regenerateMasses{
54
"K_2*+"
,
"K_2*-"
,
"K_2*0"
,
"anti-K_2*0"
,
"K_1+"
,
"K_1-"
,
55
"K_10"
,
"anti-K_10"
,
"D'_1+"
,
"D'_1-"
,
"D'_10"
,
"anti-D'_10"
};
56
57
if
( regenerateMasses.
contains
(
getDaug
( 0 ) ) ) {
58
p->
resetFirstOrNot
();
59
}
60
61
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
62
63
EvtComplex
r00(
getArg
( 0 ), 0.0 );
64
EvtComplex
r01(
getArg
( 1 ), 0.0 );
65
EvtComplex
r10(
getArg
( 2 ), 0.0 );
66
EvtComplex
r11(
getArg
( 3 ), 0.0 );
67
68
m_calcamp
->CalcAmp( p,
m_amp2
,
m_baryonpcrffmodel
.get(), r00, r01, r10, r11 );
69
}
70
71
void
EvtBaryonPCR::initProbMax
()
72
{
73
// Baryons (partial list 5/28/04)
74
75
static
const
EvtId
SIGC0 =
EvtPDL::getId
(
"Sigma_c0"
);
76
static
const
EvtId
SIGC0B =
EvtPDL::getId
(
"anti-Sigma_c0"
);
77
static
const
EvtId
SIGCP =
EvtPDL::getId
(
"Sigma_c+"
);
78
static
const
EvtId
SIGCM =
EvtPDL::getId
(
"anti-Sigma_c-"
);
79
static
const
EvtId
SIGCPP =
EvtPDL::getId
(
"Sigma_c++"
);
80
static
const
EvtId
SIGCMM =
EvtPDL::getId
(
"anti-Sigma_c--"
);
81
static
const
EvtId
LAMCP =
EvtPDL::getId
(
"Lambda_c+"
);
82
static
const
EvtId
LAMCM =
EvtPDL::getId
(
"anti-Lambda_c-"
);
83
static
const
EvtId
LAMC1P =
EvtPDL::getId
(
"Lambda_c(2593)+"
);
84
static
const
EvtId
LAMC1M =
EvtPDL::getId
(
"anti-Lambda_c(2593)-"
);
85
static
const
EvtId
LAMC2P =
EvtPDL::getId
(
"Lambda_c(2625)+"
);
86
static
const
EvtId
LAMC2M =
EvtPDL::getId
(
"anti-Lambda_c(2625)-"
);
87
static
const
EvtId
LAMB =
EvtPDL::getId
(
"Lambda_b0"
);
88
static
const
EvtId
LAMBB =
EvtPDL::getId
(
"anti-Lambda_b0"
);
89
90
EvtId
parnum, barnum, lnum;
91
92
parnum =
getParentId
();
93
barnum =
getDaug
( 0 );
94
lnum =
getDaug
( 1 );
95
96
if
( parnum == LAMB || parnum == LAMBB ) {
97
if
( barnum == LAMCP || barnum == LAMCM || barnum == LAMC1P ||
98
barnum == LAMC1M || barnum == LAMC2P || barnum == LAMC2M ||
99
barnum == SIGC0 || barnum == SIGC0B || barnum == SIGCP ||
100
barnum == SIGCM || barnum == SIGCPP || barnum == SIGCMM ) {
101
setProbMax
( 22000.0 );
102
return
;
103
}
104
}
105
106
//This is a real cludge.. (ryd)
107
setProbMax
( 0.0 );
108
}
109
110
void
EvtBaryonPCR::init
()
111
{
112
//if (getNArg()!=0) {
113
if
(
getNArg
() != 4 ) {
114
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
115
<<
"EvtBaryonPCR generator expected "
116
<<
" 4 arguments but found:"
<<
getNArg
() << endl;
117
//<< " 0 arguments but found:"<<getNArg()<<endl;
118
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
119
<<
"Will terminate execution!"
<< endl;
120
::abort();
121
}
122
123
if
(
getNDaug
() != 3 ) {
124
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
125
<<
"Wrong number of daughters in EvtBaryonPCR.cc "
126
<<
" 3 daughters expected but found: "
<<
getNDaug
() << endl;
127
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
128
<<
"Will terminate execution!"
<< endl;
129
::abort();
130
}
131
132
//We expect the parent to be a scalar
133
//and the daughters to be X lepton neutrino
134
135
EvtSpinType::spintype
parenttype =
EvtPDL::getSpinType
(
getParentId
() );
136
EvtSpinType::spintype
baryontype =
EvtPDL::getSpinType
(
getDaug
( 0 ) );
137
EvtSpinType::spintype
leptontype =
EvtPDL::getSpinType
(
getDaug
( 1 ) );
138
EvtSpinType::spintype
neutrinotype =
EvtPDL::getSpinType
(
getDaug
( 2 ) );
139
140
if
( parenttype !=
EvtSpinType::DIRAC
) {
141
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
142
<<
"EvtBaryonPCR generator expected "
143
<<
" a DIRAC parent, found:"
<<
EvtPDL::name
(
getParentId
() )
144
<< endl;
145
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
146
<<
"Will terminate execution!"
<< endl;
147
::abort();
148
}
149
if
( leptontype !=
EvtSpinType::DIRAC
) {
150
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
151
<<
"EvtBaryonPCR generator expected "
152
<<
" a DIRAC 2nd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 1 ) )
153
<< endl;
154
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
155
<<
"Will terminate execution!"
<< endl;
156
::abort();
157
}
158
if
( neutrinotype !=
EvtSpinType::NEUTRINO
) {
159
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
160
<<
"EvtBaryonPCR generator expected "
161
<<
" a NEUTRINO 3rd daughter, found:"
<<
EvtPDL::name
(
getDaug
( 2 ) )
162
<< endl;
163
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
164
<<
"Will terminate execution!"
<< endl;
165
::abort();
166
}
167
168
m_baryonpcrffmodel
= std::make_unique<EvtBaryonPCRFF>();
169
170
if
( baryontype ==
EvtSpinType::DIRAC
||
171
baryontype ==
EvtSpinType::RARITASCHWINGER
) {
172
m_calcamp
= std::make_unique<EvtSemiLeptonicBaryonAmp>();
173
}
else
{
174
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
175
<<
"Wrong baryon spin type in EvtBaryonPCR.cc "
176
<<
"Expected spin type "
<<
EvtSpinType::DIRAC
177
<<
", found spin type "
<< baryontype << endl;
178
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
179
<<
"Will terminate execution!"
<< endl;
180
::abort();
181
}
182
}
EvtBaryonPCRFF.hh
EvtBaryonPCR.hh
EvtConst.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
EvtBaryonPCR
Definition
EvtBaryonPCR.hh:36
EvtBaryonPCR::initProbMax
void initProbMax() override
Definition
EvtBaryonPCR.cpp:71
EvtBaryonPCR::decay
void decay(EvtParticle *p) override
Definition
EvtBaryonPCR.cpp:50
EvtBaryonPCR::m_calcamp
std::unique_ptr< EvtSemiLeptonicBaryonAmp > m_calcamp
Definition
EvtBaryonPCR.hh:47
EvtBaryonPCR::clone
EvtBaryonPCR * clone() const override
Definition
EvtBaryonPCR.cpp:45
EvtBaryonPCR::init
void init() override
Definition
EvtBaryonPCR.cpp:110
EvtBaryonPCR::m_baryonpcrffmodel
std::unique_ptr< EvtSemiLeptonicFF > m_baryonpcrffmodel
Definition
EvtBaryonPCR.hh:46
EvtBaryonPCR::getName
std::string getName() const override
Definition
EvtBaryonPCR.cpp:40
EvtComplex
Definition
EvtComplex.hh:29
EvtDecayAmp::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
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
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
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.16.1