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
EvtBToDDalitzCPK.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/EvtBToDDalitzCPK.hh
"
22
23
#include "
EvtGenBase/EvtPDL.hh
"
24
#include "
EvtGenBase/EvtParticle.hh
"
25
#include "
EvtGenBase/EvtVector4C.hh
"
26
27
//-----------------------------------------------------------------------------
28
// Implementation file for class : EvtBToDDalitzCPK
29
// Decay Model for B->D0K with D0->Ks pi+ pi-
30
// it is just a way to get the arguments...
31
// Works also for other B->D0K decays...
32
// 2003-12-08 : Patrick Robbe
33
//-----------------------------------------------------------------------------
34
35
//=============================================================================
36
// Name of the model
37
//=============================================================================
38
std::string
EvtBToDDalitzCPK::getName
()
const
39
{
40
return
"BTODDALITZCPK"
;
41
}
42
//=============================================================================
43
// Clone method
44
//=============================================================================
45
EvtBToDDalitzCPK
*
EvtBToDDalitzCPK::clone
()
const
46
{
47
return
new
EvtBToDDalitzCPK
;
48
}
49
//=============================================================================
50
// Initialisation method
51
//=============================================================================
52
void
EvtBToDDalitzCPK::init
()
53
{
54
// Check that there are 3 arguments
55
checkNArg
( 3 );
56
// Check that there are 2 daughters
57
checkNDaug
( 2 );
58
// Check that the particles of the decay are :
59
// B+/- -> D0/bar K+/-
60
// B+/- -> K+/- D0/bar
61
// B0/bar -> K*0/bar D0/bar
62
// and nothing else ...
63
static
const
EvtId
BP =
EvtPDL::getId
(
"B+"
);
64
static
const
EvtId
BM =
EvtPDL::getId
(
"B-"
);
65
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
66
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
67
static
const
EvtId
KP =
EvtPDL::getId
(
"K+"
);
68
static
const
EvtId
KM =
EvtPDL::getId
(
"K-"
);
69
static
const
EvtId
KS =
EvtPDL::getId
(
"K*0"
);
70
static
const
EvtId
KSB =
EvtPDL::getId
(
"anti-K*0"
);
71
static
const
EvtId
D0 =
EvtPDL::getId
(
"D0"
);
72
static
const
EvtId
D0B =
EvtPDL::getId
(
"anti-D0"
);
73
74
m_flag
= 0;
75
76
EvtId
parent =
getParentId
();
77
EvtId
d1 =
getDaug
( 0 );
78
EvtId
d2 =
getDaug
( 1 );
79
80
if
( ( ( parent == BP ) || ( parent == BM ) ) &&
81
( ( d1 == D0 ) || ( d1 == D0B ) ) && ( ( d2 == KP ) || ( d2 == KM ) ) ) {
82
m_flag
= 1;
83
// PHSP Decay
84
}
else
if
( ( ( parent == BP ) || ( parent == BM ) ) &&
85
( ( d1 == KP ) || ( d1 == KM ) ) &&
86
( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
87
m_flag
= 1;
88
// also PHSP decay
89
}
else
if
( ( ( parent == B0 ) || ( parent == B0B ) ) &&
90
( ( d1 == KS ) || ( d1 == KSB ) ) &&
91
( ( d2 == D0 ) || ( d2 == D0B ) ) ) {
92
m_flag
= 2;
93
// SVS Decay
94
}
95
96
if
(
m_flag
== 0 ) {
97
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
98
<<
"EvtBToDDalitzCPK : Invalid mode."
<< std::endl;
99
assert( 0 );
100
}
101
}
102
//=============================================================================
103
// Set prob max
104
//=============================================================================
105
void
EvtBToDDalitzCPK::initProbMax
()
106
{
107
if
(
m_flag
== 1 ) {
108
// PHSP
109
setProbMax
( 0. );
110
}
else
if
(
m_flag
== 2 ) {
111
// SVS
112
setProbMax
( 1.0 );
113
}
114
}
115
//=============================================================================
116
// decay particle
117
//=============================================================================
118
void
EvtBToDDalitzCPK::decay
(
EvtParticle
* p )
119
{
120
if
(
m_flag
== 1 ) {
121
// PHSP
122
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
123
vertex
( 0. );
124
}
else
if
(
m_flag
== 2 ) {
125
// SVS
126
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
127
128
EvtParticle
* v;
129
v = p->
getDaug
( 0 );
130
double
massv = v->
mass
();
131
EvtVector4R
momv = v->
getP4
();
132
EvtVector4R
moms = p->
getDaug
( 1 )->
getP4
();
133
double
parentMass = p->
mass
();
134
EvtVector4R
p4_parent = momv + moms;
135
136
double
norm = massv / ( momv.
d3mag
() * parentMass );
137
p4_parent = norm * p4_parent;
138
vertex
( 0, p4_parent * ( v->
epsParent
( 0 ) ) );
139
vertex
( 1, p4_parent * ( v->
epsParent
( 1 ) ) );
140
vertex
( 2, p4_parent * ( v->
epsParent
( 2 ) ) );
141
}
142
}
EvtBToDDalitzCPK.hh
EvtPDL.hh
EvtParticle.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtVector4C.hh
EvtBToDDalitzCPK
Definition
EvtBToDDalitzCPK.hh:35
EvtBToDDalitzCPK::clone
EvtBToDDalitzCPK * clone() const override
Definition
EvtBToDDalitzCPK.cpp:45
EvtBToDDalitzCPK::initProbMax
void initProbMax() override
Definition
EvtBToDDalitzCPK.cpp:105
EvtBToDDalitzCPK::init
void init() override
Definition
EvtBToDDalitzCPK.cpp:52
EvtBToDDalitzCPK::decay
void decay(EvtParticle *p) override
Definition
EvtBToDDalitzCPK.cpp:118
EvtBToDDalitzCPK::m_flag
int m_flag
Definition
EvtBToDDalitzCPK.hh:46
EvtBToDDalitzCPK::getName
std::string getName() const override
Definition
EvtBToDDalitzCPK.cpp:38
EvtDecayAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtDecayAmp.hh:37
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
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::checkNDaug
void checkNDaug(int d1, int d2=-1)
Definition
EvtDecayBase.cpp:516
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
EvtId
Definition
EvtId.hh:27
EvtPDL::getId
static EvtId getId(const std::string &name)
Definition
EvtPDL.cpp:283
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::epsParent
virtual EvtVector4C epsParent(int i) const
Definition
EvtParticle.cpp:611
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
EvtVector4R::d3mag
double d3mag() const
Definition
EvtVector4R.cpp:192
Generated by
1.17.0