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
EvtSTSCP.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/EvtSTSCP.hh
"
22
23
#include "
EvtGenBase/EvtCPUtil.hh
"
24
#include "
EvtGenBase/EvtConst.hh
"
25
#include "
EvtGenBase/EvtGenKine.hh
"
26
#include "
EvtGenBase/EvtId.hh
"
27
#include "
EvtGenBase/EvtPDL.hh
"
28
#include "
EvtGenBase/EvtParticle.hh
"
29
#include "
EvtGenBase/EvtReport.hh
"
30
#include "
EvtGenBase/EvtTensor4C.hh
"
31
#include "
EvtGenBase/EvtVector4C.hh
"
32
33
#include <stdlib.h>
34
#include <string>
35
36
std::string
EvtSTSCP::getName
()
const
37
{
38
return
"STS_CP"
;
39
}
40
41
void
EvtSTSCP::initProbMax
()
42
{
43
//This is probably not quite right, but it should do as a start...
44
//Anders
45
46
setProbMax
( 20 * (
getArg
( 3 ) *
getArg
( 3 ) +
getArg
( 5 ) *
getArg
( 5 ) ) );
47
}
48
49
EvtDecayBase
*
EvtSTSCP::clone
()
const
50
{
51
return
new
EvtSTSCP
;
52
}
53
54
void
EvtSTSCP::init
()
55
{
56
// check that there are 7 arguments
57
checkNArg
( 7 );
58
checkNDaug
( 2 );
59
60
checkSpinParent
(
EvtSpinType::SCALAR
);
61
62
checkSpinDaughter
( 0,
EvtSpinType::TENSOR
);
63
checkSpinDaughter
( 1,
EvtSpinType::SCALAR
);
64
}
65
66
void
EvtSTSCP::decay
(
EvtParticle
* p )
67
{
68
//added by Lange Jan4,2000
69
static
const
EvtId
B0 =
EvtPDL::getId
(
"B0"
);
70
static
const
EvtId
B0B =
EvtPDL::getId
(
"anti-B0"
);
71
72
double
t;
73
EvtId
other_b;
74
75
EvtParticle
* t1;
76
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
77
t1 = p->
getDaug
( 0 );
78
EvtVector4R
momt = t1->
getP4
();
79
EvtVector4R
moms = p->
getDaug
( 1 )->
getP4
();
80
double
masst = t1->
mass
();
81
82
EvtCPUtil::getInstance
()->
OtherB
( p, t, other_b, 0.5 );
83
84
EvtComplex
amp;
85
86
EvtComplex
A, Abar;
87
88
A =
EvtComplex
(
getArg
( 3 ) * cos(
getArg
( 4 ) ),
89
getArg
( 3 ) * sin(
getArg
( 4 ) ) );
90
Abar =
EvtComplex
(
getArg
( 5 ) * cos(
getArg
( 6 ) ),
91
getArg
( 5 ) * sin(
getArg
( 6 ) ) );
92
93
if
( other_b == B0B ) {
94
amp = A * cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
95
EvtComplex
( cos( -2.0 *
getArg
( 0 ) ), sin( -2.0 *
getArg
( 0 ) ) ) *
96
getArg
( 2 ) *
EvtComplex
( 0.0, 1.0 ) * Abar *
97
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
98
}
99
if
( other_b == B0 ) {
100
amp = A *
EvtComplex
( cos( 2.0 *
getArg
( 0 ) ), sin( 2.0 *
getArg
( 0 ) ) ) *
101
EvtComplex
( 0.0, 1.0 ) *
102
sin(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) ) +
103
getArg
( 2 ) * Abar * cos(
getArg
( 1 ) * t / ( 2 *
EvtConst::c
) );
104
}
105
106
EvtVector4R
p4_parent;
107
108
p4_parent = momt + moms;
109
110
double
norm = masst * masst / ( p->
mass
() * momt.
d3mag
() * momt.
d3mag
() );
111
112
vertex
( 0, amp * norm * t1->
epsTensorParent
( 0 ).
cont1
( p4_parent ) *
113
p4_parent );
114
vertex
( 1, amp * norm * t1->
epsTensorParent
( 1 ).
cont1
( p4_parent ) *
115
p4_parent );
116
vertex
( 2, amp * norm * t1->
epsTensorParent
( 2 ).
cont1
( p4_parent ) *
117
p4_parent );
118
vertex
( 3, amp * norm * t1->
epsTensorParent
( 3 ).
cont1
( p4_parent ) *
119
p4_parent );
120
vertex
( 4, amp * norm * t1->
epsTensorParent
( 4 ).
cont1
( p4_parent ) *
121
p4_parent );
122
123
return
;
124
}
125
126
std::string
EvtSTSCP::getParamName
(
int
i )
127
{
128
switch
( i ) {
129
case
0:
130
return
"weakPhase"
;
131
case
1:
132
return
"deltaM"
;
133
case
2:
134
return
"finalStateCP"
;
135
case
3:
136
return
"Af"
;
137
case
4:
138
return
"AfPhase"
;
139
case
5:
140
return
"Abarf"
;
141
case
6:
142
return
"AbarfPhase"
;
143
default
:
144
return
""
;
145
}
146
}
147
148
std::string
EvtSTSCP::getParamDefault
(
int
i )
149
{
150
switch
( i ) {
151
case
3:
152
return
"1.0"
;
153
case
4:
154
return
"0.0"
;
155
case
5:
156
return
"1.0"
;
157
case
6:
158
return
"0.0"
;
159
default
:
160
return
""
;
161
}
162
}
EvtCPUtil.hh
EvtConst.hh
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtSTSCP.hh
EvtTensor4C.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::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::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::epsTensorParent
virtual EvtTensor4C epsTensorParent(int i) const
Definition
EvtParticle.cpp:708
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
EvtSTSCP
Definition
EvtSTSCP.hh:28
EvtSTSCP::getParamName
std::string getParamName(int i) override
Definition
EvtSTSCP.cpp:126
EvtSTSCP::clone
EvtDecayBase * clone() const override
Definition
EvtSTSCP.cpp:49
EvtSTSCP::initProbMax
void initProbMax() override
Definition
EvtSTSCP.cpp:41
EvtSTSCP::getParamDefault
std::string getParamDefault(int i) override
Definition
EvtSTSCP.cpp:148
EvtSTSCP::getName
std::string getName() const override
Definition
EvtSTSCP.cpp:36
EvtSTSCP::init
void init() override
Definition
EvtSTSCP.cpp:54
EvtSTSCP::decay
void decay(EvtParticle *p) override
Definition
EvtSTSCP.cpp:66
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::TENSOR
@ TENSOR
Definition
EvtSpinType.hh:32
EvtTensor4C::cont1
EvtVector4C cont1(const EvtVector4C &v4) const
Definition
EvtTensor4C.cpp:446
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::d3mag
double d3mag() const
Definition
EvtVector4R.cpp:192
Generated by
1.16.1