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