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
EvtBtoKpiCPiso.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/EvtBtoKpiCPiso.hh
"
22
23
#include "
EvtGenBase/EvtGenKine.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
#include "
EvtGenBase/EvtReport.hh
"
27
28
#include <stdlib.h>
29
#include <string>
30
31
std::string
EvtBtoKpiCPiso::getName
()
const
32
{
33
return
"BTOKPI_CP_ISO"
;
34
}
35
36
EvtDecayBase
*
EvtBtoKpiCPiso::clone
()
const
37
{
38
return
new
EvtBtoKpiCPiso
;
39
}
40
41
void
EvtBtoKpiCPiso::init
()
42
{
43
// check that there are 14 arguments
44
checkNArg
( 14 );
45
checkNDaug
( 2 );
46
47
checkSpinParent
(
EvtSpinType::SCALAR
);
48
49
checkSpinDaughter
( 0,
EvtSpinType::SCALAR
);
50
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
51
}
52
53
void
EvtBtoKpiCPiso::initProbMax
()
54
{
55
//this might need to be revised
56
57
//added by Lange Jan4,2000
58
static
const
EvtId
PI0 =
EvtPDL::getId
(
"pi0"
);
59
static
const
EvtId
PIP =
EvtPDL::getId
(
"pi+"
);
60
static
const
EvtId
PIM =
EvtPDL::getId
(
"pi-"
);
61
static
const
EvtId
K0 =
EvtPDL::getId
(
"K0"
);
62
static
const
EvtId
KB =
EvtPDL::getId
(
"anti-K0"
);
63
static
const
EvtId
KP =
EvtPDL::getId
(
"K+"
);
64
static
const
EvtId
KM =
EvtPDL::getId
(
"K-"
);
65
66
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KP ) ) ||
67
( (
getDaug
( 0 ) == KP ) && (
getDaug
( 1 ) == PI0 ) ) ) {
68
setProbMax
(
69
2.0 * (
getArg
( 2 ) *
getArg
( 2 ) +
getArg
( 10 ) *
getArg
( 10 ) ) );
70
}
71
72
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KM ) ) ||
73
( (
getDaug
( 0 ) == KM ) && (
getDaug
( 1 ) == PI0 ) ) ) {
74
setProbMax
(
75
2.0 * (
getArg
( 4 ) *
getArg
( 4 ) +
getArg
( 12 ) *
getArg
( 12 ) ) );
76
}
77
78
if
( ( (
getDaug
( 0 ) == PIP ) && (
getDaug
( 1 ) == K0 ) ) ||
79
( (
getDaug
( 0 ) == K0 ) && (
getDaug
( 1 ) == PIP ) ) ) {
80
setProbMax
(
81
4.0 * (
getArg
( 6 ) *
getArg
( 6 ) +
getArg
( 10 ) *
getArg
( 10 ) ) );
82
}
83
84
if
( ( (
getDaug
( 0 ) == PIM ) && (
getDaug
( 1 ) == KB ) ) ||
85
( (
getDaug
( 0 ) == KB ) && (
getDaug
( 1 ) == PIM ) ) ) {
86
setProbMax
(
87
4.0 * (
getArg
( 8 ) *
getArg
( 8 ) +
getArg
( 12 ) *
getArg
( 12 ) ) );
88
}
89
90
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == K0 ) ) ||
91
( (
getDaug
( 0 ) == K0 ) && (
getDaug
( 1 ) == PI0 ) ) ) {
92
setProbMax
(
93
2.0 * (
getArg
( 2 ) *
getArg
( 2 ) +
getArg
( 10 ) *
getArg
( 10 ) ) );
94
}
95
96
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KB ) ) ||
97
( (
getDaug
( 0 ) == KB ) && (
getDaug
( 1 ) == PI0 ) ) ) {
98
setProbMax
(
99
2.0 * (
getArg
( 4 ) *
getArg
( 4 ) +
getArg
( 12 ) *
getArg
( 12 ) ) );
100
}
101
102
if
( ( (
getDaug
( 0 ) == PIM ) && (
getDaug
( 1 ) == KP ) ) ||
103
( (
getDaug
( 0 ) == KP ) && (
getDaug
( 1 ) == PIM ) ) ) {
104
setProbMax
(
105
4.0 * (
getArg
( 6 ) *
getArg
( 6 ) +
getArg
( 10 ) *
getArg
( 10 ) ) );
106
}
107
108
if
( ( (
getDaug
( 0 ) == PIP ) && (
getDaug
( 1 ) == KM ) ) ||
109
( (
getDaug
( 0 ) == KM ) && (
getDaug
( 1 ) == PIP ) ) ) {
110
setProbMax
(
111
4.0 * (
getArg
( 8 ) *
getArg
( 8 ) +
getArg
( 12 ) *
getArg
( 12 ) ) );
112
}
113
}
114
115
void
EvtBtoKpiCPiso::decay
(
EvtParticle
* p )
116
{
117
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
118
//added by Lange Jan4,2000
119
static
const
EvtId
PI0 =
EvtPDL::getId
(
"pi0"
);
120
static
const
EvtId
PIP =
EvtPDL::getId
(
"pi+"
);
121
static
const
EvtId
PIM =
EvtPDL::getId
(
"pi-"
);
122
static
const
EvtId
K0 =
EvtPDL::getId
(
"K0"
);
123
static
const
EvtId
KB =
EvtPDL::getId
(
"anti-K0"
);
124
static
const
EvtId
KP =
EvtPDL::getId
(
"K+"
);
125
static
const
EvtId
KM =
EvtPDL::getId
(
"K-"
);
126
127
EvtComplex
A;
128
EvtComplex
U, Ubar, V, Vbar, W, Wbar;
129
130
U =
EvtComplex
(
getArg
( 2 ) * cos(
getArg
( 3 ) ),
131
getArg
( 2 ) * sin(
getArg
( 3 ) ) );
132
Ubar =
EvtComplex
(
getArg
( 4 ) * cos(
getArg
( 5 ) ),
133
getArg
( 4 ) * sin(
getArg
( 5 ) ) );
134
V =
EvtComplex
(
getArg
( 6 ) * cos(
getArg
( 7 ) ),
135
getArg
( 6 ) * sin(
getArg
( 7 ) ) );
136
Vbar =
EvtComplex
(
getArg
( 8 ) * cos(
getArg
( 9 ) ),
137
getArg
( 8 ) * sin(
getArg
( 9 ) ) );
138
W =
EvtComplex
(
getArg
( 10 ) * cos(
getArg
( 11 ) ),
139
getArg
( 10 ) * sin(
getArg
( 11 ) ) );
140
Wbar =
EvtComplex
(
getArg
( 12 ) * cos(
getArg
( 13 ) ),
141
getArg
( 12 ) * sin(
getArg
( 13 ) ) );
142
143
//depending on what combination of K pi we have, there will be different
144
//A and Abar (only A given in comments!)
145
146
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KP ) ) ||
147
( (
getDaug
( 0 ) == KP ) && (
getDaug
( 1 ) == PI0 ) ) ) {
148
//pi0 K+, so U - W
149
150
A = U - W;
151
}
152
153
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KM ) ) ||
154
( (
getDaug
( 0 ) == KM ) && (
getDaug
( 1 ) == PI0 ) ) ) {
155
//pi0 K-, so Ubar - Wbar
156
157
A = Ubar - Wbar;
158
}
159
160
if
( ( (
getDaug
( 0 ) == PIP ) && (
getDaug
( 1 ) == K0 ) ) ||
161
( (
getDaug
( 0 ) == K0 ) && (
getDaug
( 1 ) == PIP ) ) ) {
162
//pi+ K0, so V + W
163
164
A = sqrt( 2.0 ) * ( V + W );
165
}
166
167
if
( ( (
getDaug
( 0 ) == PIM ) && (
getDaug
( 1 ) == KB ) ) ||
168
( (
getDaug
( 0 ) == KB ) && (
getDaug
( 1 ) == PIM ) ) ) {
169
//pi- K0bar, so Vbar + Wbar
170
A = sqrt( 2.0 ) * ( Vbar + Wbar );
171
}
172
173
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == K0 ) ) ||
174
( (
getDaug
( 0 ) == K0 ) && (
getDaug
( 1 ) == PI0 ) ) ) {
175
//pi0 K0, so U + W
176
177
A = U + W;
178
}
179
180
if
( ( (
getDaug
( 0 ) == PI0 ) && (
getDaug
( 1 ) == KB ) ) ||
181
( (
getDaug
( 0 ) == KB ) && (
getDaug
( 1 ) == PI0 ) ) ) {
182
A = Ubar + Wbar;
183
}
184
185
if
( ( (
getDaug
( 0 ) == PIM ) && (
getDaug
( 1 ) == KP ) ) ||
186
( (
getDaug
( 0 ) == KP ) && (
getDaug
( 1 ) == PIM ) ) ) {
187
//pi- K+, so V - W
188
189
A = sqrt( 2.0 ) * ( V - W );
190
}
191
192
if
( ( (
getDaug
( 0 ) == PIP ) && (
getDaug
( 1 ) == KM ) ) ||
193
( (
getDaug
( 0 ) == KM ) && (
getDaug
( 1 ) == PIP ) ) ) {
194
A = sqrt( 2.0 ) * ( Vbar - Wbar );
195
}
196
197
vertex
( A );
198
199
return
;
200
}
EvtBtoKpiCPiso.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtBtoKpiCPiso
Definition
EvtBtoKpiCPiso.hh:27
EvtBtoKpiCPiso::decay
void decay(EvtParticle *p) override
Definition
EvtBtoKpiCPiso.cpp:115
EvtBtoKpiCPiso::getName
std::string getName() const override
Definition
EvtBtoKpiCPiso.cpp:31
EvtBtoKpiCPiso::clone
EvtDecayBase * clone() const override
Definition
EvtBtoKpiCPiso.cpp:36
EvtBtoKpiCPiso::initProbMax
void initProbMax() override
Definition
EvtBtoKpiCPiso.cpp:53
EvtBtoKpiCPiso::init
void init() override
Definition
EvtBtoKpiCPiso.cpp:41
EvtComplex
Definition
EvtComplex.hh:29
EvtDecayAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtDecayAmp.hh:37
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNDaug
int getNDaug() const
Definition
EvtDecayBase.hh:64
EvtDecayBase::checkSpinParent
void checkSpinParent(EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:534
EvtDecayBase::getArg
double getArg(unsigned int j)
Definition
EvtDecayBase.cpp:578
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cpp:295
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::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
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
Generated by
1.16.1