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
EvtGenericDalitz.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/EvtGenericDalitz.hh
"
22
23
#include "
EvtGenBase/EvtDalitzPoint.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
27
#include "
EvtGenModels/EvtDalitzTable.hh
"
28
29
std::string
EvtGenericDalitz::getName
()
const
30
{
31
return
"GENERIC_DALITZ"
;
32
}
33
34
EvtDecayBase
*
EvtGenericDalitz::clone
()
const
35
{
36
return
new
EvtGenericDalitz
();
37
}
38
39
void
EvtGenericDalitz::init
()
40
{
41
checkNArg
( 1 );
42
43
EvtId
parnum =
getParentId
();
44
EvtId
d1 =
getDaug
( 0 );
45
EvtId
d2 =
getDaug
( 1 );
46
EvtId
d3 =
getDaug
( 2 );
47
48
std::vector<EvtDalitzDecayInfo> decays =
49
EvtDalitzTable::getInstance
(
getArgStr
( 0 ) ).
getDalitzTable
( parnum );
50
51
std::vector<EvtDalitzDecayInfo>::iterator i = decays.begin();
52
for
( ; i != decays.end(); i++ ) {
53
EvtId
daughter1 = ( *i ).daughter1();
54
EvtId
daughter2 = ( *i ).daughter2();
55
EvtId
daughter3 = ( *i ).daughter3();
56
57
if
( d1 == daughter1 && d2 == daughter2 && d3 == daughter3 ) {
58
m_d1
= 0;
59
m_d2
= 1;
60
m_d3
= 2;
61
}
else
if
( d1 == daughter1 && d2 == daughter3 && d3 == daughter2 ) {
62
m_d1
= 0;
63
m_d2
= 2;
64
m_d3
= 1;
65
}
else
if
( d1 == daughter2 && d2 == daughter1 && d3 == daughter3 ) {
66
m_d1
= 1;
67
m_d2
= 0;
68
m_d3
= 2;
69
}
else
if
( d1 == daughter2 && d2 == daughter3 && d3 == daughter1 ) {
70
m_d1
= 1;
71
m_d2
= 2;
72
m_d3
= 0;
73
}
else
if
( d1 == daughter3 && d2 == daughter1 && d3 == daughter2 ) {
74
m_d1
= 2;
75
m_d2
= 0;
76
m_d3
= 1;
77
}
else
if
( d1 == daughter3 && d2 == daughter2 && d3 == daughter1 ) {
78
m_d1
= 2;
79
m_d2
= 1;
80
m_d3
= 0;
81
}
else
{
82
continue
;
83
}
84
85
m_resonances
= ( *i ).getResonances();
86
setProbMax
( ( *i ).getProbMax() );
87
return
;
88
}
89
}
90
91
void
EvtGenericDalitz::decay
(
EvtParticle
* p )
92
{
93
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
94
95
EvtVector4R
p4_d1 = p->
getDaug
(
m_d1
)->
getP4
();
96
EvtVector4R
p4_d2 = p->
getDaug
(
m_d2
)->
getP4
();
97
EvtVector4R
p4_d3 = p->
getDaug
(
m_d3
)->
getP4
();
98
99
double
mA = p->
getDaug
(
m_d1
)->
mass
();
100
double
mB = p->
getDaug
(
m_d2
)->
mass
();
101
double
mC = p->
getDaug
(
m_d3
)->
mass
();
102
103
double
m2AB = ( p4_d1 + p4_d2 ).mass2();
104
double
m2CA = ( p4_d1 + p4_d3 ).mass2();
105
double
m2BC = ( p4_d2 + p4_d3 ).mass2();
106
107
EvtDalitzPoint
point( mA, mB, mC, m2AB, m2BC, m2CA );
108
109
EvtComplex
amp( 0, 0 );
110
std::vector<std::pair<EvtComplex, EvtDalitzReso>>::iterator i =
111
m_resonances
.begin();
112
for
( ; i !=
m_resonances
.end(); i++ ) {
113
std::pair<EvtComplex, EvtDalitzReso> res = ( *i );
114
amp += res.first * res.second.evaluate( point );
115
}
116
117
vertex
( amp );
118
return
;
119
}
120
121
std::string
EvtGenericDalitz::getParamName
(
int
i )
122
{
123
switch
( i ) {
124
case
0:
125
return
"xmlFile"
;
126
default
:
127
return
""
;
128
}
129
}
EvtDalitzPoint.hh
EvtDalitzTable.hh
EvtGenericDalitz.hh
EvtPDL.hh
EvtParticle.hh
EvtComplex
Definition
EvtComplex.hh:29
EvtDalitzPoint
Definition
EvtDalitzPoint.hh:38
EvtDalitzTable::getDalitzTable
std::vector< EvtDalitzDecayInfo > getDalitzTable(const EvtId &parent) const
Definition
EvtDalitzTable.cpp:486
EvtDalitzTable::getInstance
static const EvtDalitzTable & getInstance(const std::string dec_name="", bool verbose=true)
Definition
EvtDalitzTable.cpp:49
EvtDecayAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtDecayAmp.hh:37
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
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::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
EvtGenericDalitz
Definition
EvtGenericDalitz.hh:35
EvtGenericDalitz::decay
void decay(EvtParticle *p) override
Definition
EvtGenericDalitz.cpp:91
EvtGenericDalitz::m_resonances
std::vector< std::pair< EvtComplex, EvtDalitzReso > > m_resonances
Definition
EvtGenericDalitz.hh:49
EvtGenericDalitz::clone
EvtDecayBase * clone() const override
Definition
EvtGenericDalitz.cpp:34
EvtGenericDalitz::m_d2
int m_d2
Definition
EvtGenericDalitz.hh:48
EvtGenericDalitz::m_d1
int m_d1
Definition
EvtGenericDalitz.hh:48
EvtGenericDalitz::m_d3
int m_d3
Definition
EvtGenericDalitz.hh:48
EvtGenericDalitz::init
void init() override
Definition
EvtGenericDalitz.cpp:39
EvtGenericDalitz::getName
std::string getName() const override
Definition
EvtGenericDalitz.cpp:29
EvtGenericDalitz::getParamName
std::string getParamName(int i) override
Definition
EvtGenericDalitz.cpp:121
EvtId
Definition
EvtId.hh:27
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::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::mass
double mass() const
Definition
EvtParticle.cpp:159
EvtVector4R
Definition
EvtVector4R.hh:29
Generated by
1.17.0