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
EvtBToKpipiCP.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/EvtBToKpipiCP.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtGenKine.hh
"
25
#include "
EvtGenBase/EvtId.hh
"
26
#include "
EvtGenBase/EvtPDL.hh
"
27
#include "
EvtGenBase/EvtParticle.hh
"
28
#include "
EvtGenBase/EvtReport.hh
"
29
#include "
EvtGenBase/EvtVector4R.hh
"
30
31
#include <stdlib.h>
32
#include <string>
33
34
std::string
EvtBToKpipiCP::getName
()
const
35
{
36
return
"BTOKPIPI_CP"
;
37
}
38
39
EvtBToKpipiCP
*
EvtBToKpipiCP::clone
()
const
40
{
41
return
new
EvtBToKpipiCP
;
42
}
43
44
void
EvtBToKpipiCP::init
()
45
{
46
// check that there are 3 arguments
47
checkNArg
( 3 );
48
checkNDaug
( 3 );
49
50
checkSpinParent
(
EvtSpinType::SCALAR
);
51
52
checkSpinDaughter
( 0,
EvtSpinType::SCALAR
);
53
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
54
checkSpinDaughter
( 2,
EvtSpinType::SCALAR
);
55
56
double
alpha =
getArg
( 1 );
57
double
beta =
getArg
( 2 );
58
int
iset;
59
iset = 10000;
60
61
EvtVector4R
p4Kplus, p4piminus, p4gamm1, p4gamm2;
62
63
double
realA, imgA, realbarA, imgbarA;
64
65
m_generator
.EvtKpipi( alpha, beta, iset, p4Kplus, p4piminus, p4gamm1,
66
p4gamm2, realA, imgA, realbarA, imgbarA );
67
}
68
69
void
EvtBToKpipiCP::initProbMax
()
70
{
71
setProbMax
( 1.2 );
72
}
73
74
void
EvtBToKpipiCP::decay
(
EvtParticle
* p )
75
{
76
//added by Lange Jan4,2000
77
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
78
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
79
80
double
t;
81
EvtId
other_b;
82
83
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.5 );
84
85
EvtParticle
*Kp, *pim, *pi0;
86
87
p->
makeDaughters
(
getNDaug
(),
getDaugs
() );
88
Kp = p->
getDaug
( 0 );
89
pim = p->
getDaug
( 1 );
90
pi0 = p->
getDaug
( 2 );
91
92
EvtVector4R
p4[3];
93
94
//double dm=getArg(0);
95
double
alpha =
getArg
( 1 );
96
double
beta =
getArg
( 2 );
97
int
iset;
98
99
iset = 0;
100
101
EvtVector4R
p4Kplus, p4piminus, p4gamm1, p4gamm2;
102
103
double
realA, imgA, realbarA, imgbarA;
104
105
m_generator
.EvtKpipi( alpha, beta, iset, p4[0], p4[1], p4gamm1, p4gamm2,
106
realA, imgA, realbarA, imgbarA );
107
108
p4[2] = p4gamm1 + p4gamm2;
109
110
Kp->
init
(
getDaug
( 0 ), p4[0] );
111
pim->
init
(
getDaug
( 1 ), p4[1] );
112
pi0->
init
(
getDaug
( 2 ), p4[2] );
113
114
EvtComplex
amp;
115
116
EvtComplex
A( realA, imgA );
117
EvtComplex
Abar( realbarA, imgbarA );
118
119
if
( other_b == B0B ) {
120
amp = Abar;
121
}
122
if
( other_b == B0 ) {
123
amp = A;
124
}
125
126
vertex
( amp );
127
128
return
;
129
}
EvtBToKpipiCP.hh
EvtCPUtil.hh
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtVector4R.hh
EvtBToKpipiCP::m_generator
EvtBTo3hCP m_generator
Definition
EvtBToKpipiCP.hh:54
EvtBToKpipiCP::clone
EvtBToKpipiCP * clone() const override
Definition
EvtBToKpipiCP.cpp:39
EvtBToKpipiCP::init
void init() override
Definition
EvtBToKpipiCP.cpp:44
EvtBToKpipiCP::getName
std::string getName() const override
Definition
EvtBToKpipiCP.cpp:34
EvtBToKpipiCP::EvtBToKpipiCP
EvtBToKpipiCP()
Definition
EvtBToKpipiCP.hh:44
EvtBToKpipiCP::initProbMax
void initProbMax() override
Definition
EvtBToKpipiCP.cpp:69
EvtBToKpipiCP::decay
void decay(EvtParticle *p) override
Definition
EvtBToKpipiCP.cpp:74
EvtCPUtil::getInstance
static EvtCPUtil * getInstance()
Definition
EvtCPUtil.cpp:42
EvtCPUtil::OtherB
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition
EvtCPUtil.cpp:372
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::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::init
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::makeDaughters
void makeDaughters(size_t ndaug, const EvtId *id)
Definition
EvtParticle.cpp:1235
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtVector4R
Definition
EvtVector4R.hh:29
Generated by
1.17.0