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
EvtSVSNONCPEIGEN.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/EvtSVSNONCPEIGEN.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtConst.hh
"
25
#include "
EvtGenBase/EvtGenKine.hh
"
26
#include "
EvtGenBase/EvtPDL.hh
"
27
#include "
EvtGenBase/EvtParticle.hh
"
28
#include "
EvtGenBase/EvtRandom.hh
"
29
#include "
EvtGenBase/EvtReport.hh
"
30
#include "
EvtGenBase/EvtVector4C.hh
"
31
32
#include <stdlib.h>
33
#include <string>
34
35
std::string
EvtSVSNONCPEIGEN::getName
()
const
36
{
37
return
"SVS_NONCPEIGEN"
;
38
}
39
40
EvtDecayBase
*
EvtSVSNONCPEIGEN::clone
()
const
41
{
42
return
new
EvtSVSNONCPEIGEN
;
43
}
44
45
void
EvtSVSNONCPEIGEN::init
()
46
{
47
// check that there are 11 arguments
48
checkNArg
( 11, 7 );
49
checkNDaug
( 2 );
50
51
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
52
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
53
54
m_dm
=
getArg
( 1 );
55
m_phickm
= 2 *
getArg
( 0 ) +
getArg
( 2 );
56
57
m_A_f
=
EvtComplex
(
getArg
( 3 ) * cos(
getArg
( 4 ) ),
58
getArg
( 3 ) * sin(
getArg
( 4 ) ) );
59
m_Abar_f
=
EvtComplex
(
getArg
( 5 ) * cos(
getArg
( 6 ) ),
60
getArg
( 5 ) * sin(
getArg
( 6 ) ) );
61
62
m_A_fbar
=
m_Abar_f
;
63
m_Abar_fbar
=
m_A_f
;
64
65
if
(
getNArg
() == 11 ) {
66
m_A_fbar
=
EvtComplex
(
getArg
( 7 ) * cos(
getArg
( 8 ) ),
67
getArg
( 7 ) * sin(
getArg
( 8 ) ) );
68
m_Abar_fbar
=
EvtComplex
(
getArg
( 9 ) * cos(
getArg
( 10 ) ),
69
getArg
( 9 ) * sin(
getArg
( 10 ) ) );
70
}
71
}
72
73
void
EvtSVSNONCPEIGEN::initProbMax
()
74
{
75
double
theProbMax =
abs
(
m_A_f
) *
abs
(
m_A_f
) +
76
abs
(
m_Abar_f
) *
abs
(
m_Abar_f
) +
77
abs
(
m_A_fbar
) *
abs
(
m_A_fbar
) +
78
abs
(
m_Abar_fbar
) *
abs
(
m_Abar_fbar
);
79
80
setProbMax
( theProbMax );
81
}
82
83
void
EvtSVSNONCPEIGEN::decay
(
EvtParticle
* p )
84
{
85
//added by Lange Jan4,2000
86
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
87
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
88
89
double
t;
90
EvtId
other_b;
91
EvtId
daugs[2];
92
93
// MB: flip selects the final of the decay
94
int
flip = ( ( p->
getId
() == B0 ) ? 0 : 1 );
95
daugs[0] =
getDaug
( 0 );
96
daugs[1] =
getDaug
( 1 );
97
p->
initializePhaseSpace
( 2, daugs );
98
99
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.5 );
100
101
EvtComplex
amp;
102
double
dmt2 = (
m_dm
* t ) / ( 2 *
EvtConst::c
);
103
EvtComplex
ePlusIPhi( cos(
m_phickm
), sin(
m_phickm
) );
104
EvtComplex
eMinusIPhi( cos( -
m_phickm
), -sin(
m_phickm
) );
105
106
// flip == 0 : D-rho+
107
// flip == 1 : D+rho-
108
109
if
( !flip ) {
110
if
( other_b == B0B ) {
111
// At t=0 we have a B0
112
amp = cos( dmt2 ) *
m_A_f
+
113
eMinusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
m_Abar_f
;
114
}
115
if
( other_b == B0 ) {
116
// At t=0 we have a B0bar
117
amp = ePlusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
m_A_f
+
118
cos( dmt2 ) *
m_Abar_f
;
119
}
120
}
else
{
121
if
( other_b == B0B ) {
122
// At t=0 we have a B0
123
amp = cos( dmt2 ) *
m_A_fbar
+
124
eMinusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
m_Abar_fbar
;
125
}
126
if
( other_b == B0 ) {
127
// At t=0 we have a B0bar
128
amp = ePlusIPhi *
EvtComplex
( 0.0, sin( dmt2 ) ) *
m_A_fbar
+
129
cos( dmt2 ) *
m_Abar_fbar
;
130
}
131
}
132
133
EvtParticle
* v;
134
v = p->
getDaug
( 0 );
135
136
EvtVector4R
momv = p->
getDaug
( 0 )->
getP4
();
137
EvtVector4R
moms = p->
getDaug
( 1 )->
getP4
();
138
EvtVector4R
p4_parent = momv + moms;
139
140
double
norm = momv.
mass
() / ( momv.
d3mag
() * p->
mass
() );
141
142
vertex
( 0, amp * norm * p4_parent * ( v->
epsParent
( 0 ) ) );
143
vertex
( 1, amp * norm * p4_parent * ( v->
epsParent
( 1 ) ) );
144
vertex
( 2, amp * norm * p4_parent * ( v->
epsParent
( 2 ) ) );
145
146
return
;
147
}
EvtCPUtil.hh
abs
double abs(const EvtComplex &c)
Definition
EvtComplex.hh:203
EvtConst.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtRandom.hh
EvtReport.hh
EvtSVSNONCPEIGEN.hh
EvtVector4C.hh
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::EvtDecayBase
EvtDecayBase()=default
EvtDecayBase::getNArg
int getNArg() const
Definition
EvtDecayBase.hh:67
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
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::getId
EvtId getId() const
Definition
EvtParticle.cpp:124
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
EvtSVSNONCPEIGEN
Definition
EvtSVSNONCPEIGEN.hh:28
EvtSVSNONCPEIGEN::clone
EvtDecayBase * clone() const override
Definition
EvtSVSNONCPEIGEN.cpp:40
EvtSVSNONCPEIGEN::m_A_fbar
EvtComplex m_A_fbar
Definition
EvtSVSNONCPEIGEN.hh:42
EvtSVSNONCPEIGEN::m_phickm
double m_phickm
Definition
EvtSVSNONCPEIGEN.hh:46
EvtSVSNONCPEIGEN::initProbMax
void initProbMax() override
Definition
EvtSVSNONCPEIGEN.cpp:73
EvtSVSNONCPEIGEN::getName
std::string getName() const override
Definition
EvtSVSNONCPEIGEN.cpp:35
EvtSVSNONCPEIGEN::init
void init() override
Definition
EvtSVSNONCPEIGEN.cpp:45
EvtSVSNONCPEIGEN::m_A_f
EvtComplex m_A_f
Definition
EvtSVSNONCPEIGEN.hh:39
EvtSVSNONCPEIGEN::decay
void decay(EvtParticle *p) override
Definition
EvtSVSNONCPEIGEN.cpp:83
EvtSVSNONCPEIGEN::m_Abar_f
EvtComplex m_Abar_f
Definition
EvtSVSNONCPEIGEN.hh:40
EvtSVSNONCPEIGEN::m_dm
double m_dm
Definition
EvtSVSNONCPEIGEN.hh:45
EvtSVSNONCPEIGEN::m_Abar_fbar
EvtComplex m_Abar_fbar
Definition
EvtSVSNONCPEIGEN.hh:43
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cpp:48
EvtVector4R::d3mag
double d3mag() const
Definition
EvtVector4R.cpp:192
Generated by
1.16.1