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