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