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
EvtSVVHelAmp.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/EvtSVVHelAmp.hh
"
22
23
#include "
EvtGenBase/EvtGenKine.hh
"
24
#include "
EvtGenBase/EvtId.hh
"
25
#include "
EvtGenBase/EvtPDL.hh
"
26
#include "
EvtGenBase/EvtParticle.hh
"
27
#include "
EvtGenBase/EvtReport.hh
"
28
#include "
EvtGenBase/EvtTensor3C.hh
"
29
#include "
EvtGenBase/EvtTensor4C.hh
"
30
#include "
EvtGenBase/EvtVector3C.hh
"
31
#include "
EvtGenBase/EvtVector3R.hh
"
32
#include "
EvtGenBase/EvtVector4C.hh
"
33
34
#include <stdlib.h>
35
#include <string>
36
37
std::string
EvtSVVHelAmp::getName
()
const
38
{
39
return
"SVV_HELAMP"
;
40
}
41
42
EvtDecayBase
*
EvtSVVHelAmp::clone
()
const
43
{
44
return
new
EvtSVVHelAmp
;
45
}
46
47
void
EvtSVVHelAmp::init
()
48
{
49
// check that there are 6 arguments
50
checkNArg
( 6 );
51
checkNDaug
( 2 );
52
53
checkSpinParent
(
EvtSpinType::SCALAR
);
54
55
checkSpinDaughter
( 0,
EvtSpinType::VECTOR
);
56
checkSpinDaughter
( 1,
EvtSpinType::VECTOR
);
57
}
58
59
void
EvtSVVHelAmp::initProbMax
()
60
{
61
setProbMax
(
getArg
( 0 ) *
getArg
( 0 ) +
getArg
( 2 ) *
getArg
( 2 ) +
62
getArg
( 4 ) *
getArg
( 4 ) );
63
}
64
65
void
EvtSVVHelAmp::decay
(
EvtParticle
* p )
66
{
67
SVVHel
( p,
m_amp2
,
getDaug
( 0 ),
getDaug
( 1 ),
68
EvtComplex
(
getArg
( 0 ) * cos(
getArg
( 1 ) ),
69
getArg
( 0 ) * sin(
getArg
( 1 ) ) ),
70
EvtComplex
(
getArg
( 2 ) * cos(
getArg
( 3 ) ),
71
getArg
( 2 ) * sin(
getArg
( 3 ) ) ),
72
EvtComplex
(
getArg
( 4 ) * cos(
getArg
( 5 ) ),
73
getArg
( 4 ) * sin(
getArg
( 5 ) ) ) );
74
75
return
;
76
}
77
78
void
EvtSVVHelAmp::SVVHel
(
EvtParticle
* parent,
EvtAmp
& amp,
EvtId
n_v1,
79
EvtId
n_v2,
const
EvtComplex
& hp,
80
const
EvtComplex
& h0,
const
EvtComplex
& hm )
81
{
82
// Routine to decay a vector into a vector and scalar. Started
83
// by ryd on Oct 17, 1996.
84
85
int
tndaug = 2;
86
EvtId
tdaug[2];
87
tdaug[0] = n_v1;
88
tdaug[1] = n_v2;
89
90
parent->
initializePhaseSpace
( tndaug, tdaug );
91
92
EvtParticle
*v1, *v2;
93
v1 = parent->
getDaug
( 0 );
94
v2 = parent->
getDaug
( 1 );
95
96
EvtVector4R
momv1 = v1->
getP4
();
97
//EvtVector4R momv2 = v2->getP4();
98
99
EvtVector3R
v1dir( momv1.
get
( 1 ), momv1.
get
( 2 ), momv1.
get
( 3 ) );
100
v1dir = v1dir / v1dir.
d3mag
();
101
102
EvtComplex
a = -0.5 * ( hp + hm );
103
EvtComplex
b =
EvtComplex
( 0.0, 0.5 ) * ( hp - hm );
104
EvtComplex
c = h0 + 0.5 * ( hp + hm );
105
106
EvtTensor3C
M = a *
EvtTensor3C::id
() + b *
EvtGenFunctions::eps
( v1dir ) +
107
c *
EvtGenFunctions::directProd
( v1dir, v1dir );
108
109
EvtVector3C
t0 = M.cont1( v1->
eps
( 0 ).
vec
().
conj
() );
110
EvtVector3C
t1 = M.cont1( v1->
eps
( 1 ).
vec
().
conj
() );
111
EvtVector3C
t2 = M.cont1( v1->
eps
( 2 ).
vec
().
conj
() );
112
113
EvtVector3C
eps0 = v2->
eps
( 0 ).
vec
().
conj
();
114
EvtVector3C
eps1 = v2->
eps
( 1 ).
vec
().
conj
();
115
EvtVector3C
eps2 = v2->
eps
( 2 ).
vec
().
conj
();
116
117
amp.
vertex
( 0, 0, t0 * eps0 );
118
amp.
vertex
( 0, 1, t0 * eps1 );
119
amp.
vertex
( 0, 2, t0 * eps2 );
120
121
amp.
vertex
( 1, 0, t1 * eps0 );
122
amp.
vertex
( 1, 1, t1 * eps1 );
123
amp.
vertex
( 1, 2, t1 * eps2 );
124
125
amp.
vertex
( 2, 0, t2 * eps0 );
126
amp.
vertex
( 2, 1, t2 * eps1 );
127
amp.
vertex
( 2, 2, t2 * eps2 );
128
129
return
;
130
}
131
132
std::string
EvtSVVHelAmp::getParamName
(
int
i )
133
{
134
switch
( i ) {
135
case
0:
136
return
"plusHelAmp"
;
137
case
1:
138
return
"plusHelAmpPhase"
;
139
case
2:
140
return
"zeroHelAmp"
;
141
case
3:
142
return
"zeroHelAmpPhase"
;
143
case
4:
144
return
"minusHelAmp"
;
145
case
5:
146
return
"minusHelAmpPhase"
;
147
default
:
148
return
""
;
149
}
150
}
151
152
std::string
EvtSVVHelAmp::getParamDefault
(
int
i )
153
{
154
switch
( i ) {
155
case
0:
156
return
"1.0"
;
157
case
1:
158
return
"0.0"
;
159
case
2:
160
return
"1.0"
;
161
case
3:
162
return
"0.0"
;
163
case
4:
164
return
"1.0"
;
165
case
5:
166
return
"0.0"
;
167
default
:
168
return
""
;
169
}
170
}
EvtGenKine.hh
EvtId.hh
EvtPDL.hh
EvtParticle.hh
EvtReport.hh
EvtSVVHelAmp.hh
EvtTensor3C.hh
EvtTensor4C.hh
EvtVector3C.hh
EvtVector3R.hh
EvtVector4C.hh
EvtAmp
Definition
EvtAmp.hh:29
EvtAmp::vertex
void vertex(const EvtComplex &)
Definition
EvtAmp.cpp:453
EvtComplex
Definition
EvtComplex.hh:29
EvtDecayAmp::m_amp2
EvtAmp m_amp2
Definition
EvtDecayAmp.hh:73
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cpp:547
EvtDecayBase::EvtDecayBase
EvtDecayBase()=default
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
EvtId
Definition
EvtId.hh:27
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
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cpp:144
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::eps
virtual EvtVector4C eps(int i) const
Definition
EvtParticle.cpp:623
EvtSVVHelAmp
Definition
EvtSVVHelAmp.hh:35
EvtSVVHelAmp::SVVHel
static void SVVHel(EvtParticle *parent, EvtAmp &, EvtId n_v1, EvtId n_v2, const EvtComplex &hp, const EvtComplex &h0, const EvtComplex &hm)
Definition
EvtSVVHelAmp.cpp:78
EvtSVVHelAmp::initProbMax
void initProbMax() override
Definition
EvtSVVHelAmp.cpp:59
EvtSVVHelAmp::decay
void decay(EvtParticle *p) override
Definition
EvtSVVHelAmp.cpp:65
EvtSVVHelAmp::clone
EvtDecayBase * clone() const override
Definition
EvtSVVHelAmp.cpp:42
EvtSVVHelAmp::getName
std::string getName() const override
Definition
EvtSVVHelAmp.cpp:37
EvtSVVHelAmp::getParamDefault
std::string getParamDefault(int i) override
Definition
EvtSVVHelAmp.cpp:152
EvtSVVHelAmp::init
void init() override
Definition
EvtSVVHelAmp.cpp:47
EvtSVVHelAmp::getParamName
std::string getParamName(int i) override
Definition
EvtSVVHelAmp.cpp:132
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:30
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:31
EvtTensor3C
Definition
EvtTensor3C.hh:42
EvtTensor3C::id
static const EvtTensor3C & id()
Definition
EvtTensor3C.cpp:322
EvtVector3C
Definition
EvtVector3C.hh:29
EvtVector3C::conj
EvtVector3C conj() const
Definition
EvtVector3C.hh:178
EvtVector3R
Definition
EvtVector3R.hh:26
EvtVector3R::d3mag
double d3mag() const
Definition
EvtVector3R.cpp:87
EvtVector4C::vec
EvtVector3C vec() const
Definition
EvtVector4C.hh:103
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition
EvtVector4R.hh:163
EvtGenFunctions::eps
EvtTensor3C eps(const EvtVector3R &v)
Definition
EvtTensor3C.cpp:302
EvtGenFunctions::directProd
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
Definition
EvtTensor3C.cpp:153
Generated by
1.17.0