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
EvtGenBase
EvtResonance.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 "
EvtGenBase/EvtResonance.hh
"
22
23
#include "
EvtGenBase/EvtComplex.hh
"
24
#include "
EvtGenBase/EvtConst.hh
"
25
#include "
EvtGenBase/EvtKine.hh
"
26
#include "
EvtGenBase/EvtReport.hh
"
27
#include "
EvtGenBase/EvtVector4R.hh
"
28
29
#include <math.h>
30
using
std::endl;
31
32
EvtResonance
&
EvtResonance::operator=
(
const
EvtResonance
& n )
33
{
34
if
( &n ==
this
)
35
return
*
this
;
36
m_p4_p
= n.
m_p4_p
;
37
m_p4_d1
= n.
m_p4_d1
;
38
m_p4_d2
= n.
m_p4_d2
;
39
m_ampl
= n.
m_ampl
;
40
m_theta
= n.
m_theta
;
41
m_gamma
= n.
m_gamma
;
42
m_spin
= n.
m_spin
;
43
m_bwm
= n.
m_bwm
;
44
return
*
this
;
45
}
46
47
EvtResonance::EvtResonance
(
const
EvtVector4R
&
p4_p
,
const
EvtVector4R
&
p4_d1
,
48
const
EvtVector4R
&
p4_d2
,
double
ampl,
double
theta
,
49
double
gamma
,
double
bwm
,
int
spin
) :
50
m_p4_p
(
p4_p
),
51
m_p4_d1
(
p4_d1
),
52
m_p4_d2
(
p4_d2
),
53
m_ampl
( ampl ),
54
m_theta
(
theta
),
55
m_gamma
(
gamma
),
56
m_bwm
(
bwm
),
57
m_spin
(
spin
)
58
{
59
}
60
61
EvtComplex
EvtResonance::resAmpl
()
62
{
63
double
pi180inv = 1.0 /
EvtConst::radToDegrees
;
64
65
EvtComplex
ampl;
66
//EvtVector4R _p4_d3 = m_p4_p-m_p4_d1-m_p4_d2;
67
68
//get cos of the angle between the daughters from their 4-momenta
69
//and the 4-momentum of the parent
70
71
//in general, EvtDecayAngle(parent, part1+part2, part1) gives the angle
72
//the missing particle (not listed in the arguments) makes
73
//with part2 in the rest frame of both
74
//listed particles (12)
75
76
//angle 3 makes with 2 in rest frame of 12 (CS3)
77
double
cos_phi_0 =
EvtDecayAngle
(
m_p4_p
,
m_p4_d1
+
m_p4_d2
,
m_p4_d1
);
78
//angle 3 makes with 1 in 12 is, of course, -cos_phi_0
79
80
switch
(
m_spin
) {
81
case
0:
82
ampl = (
m_ampl
*
83
EvtComplex
( cos(
m_theta
* pi180inv ),
84
sin(
m_theta
* pi180inv ) ) *
85
sqrt(
m_gamma
/
EvtConst::twoPi
) *
86
( 1.0 / ( (
m_p4_d1
+
m_p4_d2
).mass() -
m_bwm
-
87
EvtComplex
( 0.0, 0.5 *
m_gamma
) ) ) );
88
break
;
89
90
case
1:
91
ampl = (
m_ampl
*
92
EvtComplex
( cos(
m_theta
* pi180inv ),
93
sin(
m_theta
* pi180inv ) ) *
94
sqrt(
m_gamma
/
EvtConst::twoPi
) *
95
( cos_phi_0 / ( (
m_p4_d1
+
m_p4_d2
).mass() -
m_bwm
-
96
EvtComplex
( 0.0, 0.5 *
m_gamma
) ) ) );
97
break
;
98
99
case
2:
100
ampl = (
m_ampl
*
101
EvtComplex
( cos(
m_theta
* pi180inv ),
102
sin(
m_theta
* pi180inv ) ) *
103
sqrt(
m_gamma
/
EvtConst::twoPi
) *
104
( ( 1.5 * cos_phi_0 * cos_phi_0 - 0.5 ) /
105
( (
m_p4_d1
+
m_p4_d2
).mass() -
m_bwm
-
106
EvtComplex
( 0.0, 0.5 *
m_gamma
) ) ) );
107
break
;
108
109
case
3:
110
ampl = (
m_ampl
*
111
EvtComplex
( cos(
m_theta
* pi180inv ),
112
sin(
m_theta
* pi180inv ) ) *
113
sqrt(
m_gamma
/
EvtConst::twoPi
) *
114
( ( 2.5 * cos_phi_0 * cos_phi_0 * cos_phi_0 -
115
1.5 * cos_phi_0 ) /
116
( (
m_p4_d1
+
m_p4_d2
).mass() -
m_bwm
-
117
EvtComplex
( 0.0, 0.5 *
m_gamma
) ) ) );
118
break
;
119
120
default
:
121
EvtGenReport
(
EVTGEN_DEBUG
,
"EvtGen"
)
122
<<
"EvtGen: wrong spin in EvtResonance"
<< endl;
123
ampl =
EvtComplex
( 0.0 );
124
break
;
125
}
126
127
return
ampl;
128
}
129
130
EvtComplex
EvtResonance::relBrWig
(
int
i )
131
{
132
//this function returns relativistic Breit-Wigner amplitude
133
//for a given resonance (for P-wave decays of scalars only at the moment!)
134
135
EvtComplex
BW;
136
EvtVector4R
_p4_d3 =
m_p4_p
-
m_p4_d1
-
m_p4_d2
;
137
EvtVector4R
_p4_12 =
m_p4_d1
+
m_p4_d2
;
138
139
double
msq13 = (
m_p4_d1
+ _p4_d3 ).mass2();
140
double
msq23 = (
m_p4_d2
+ _p4_d3 ).mass2();
141
double
msqParent =
m_p4_p
.mass2();
142
double
msq1 =
m_p4_d1
.mass2();
143
double
msq2 =
m_p4_d2
.mass2();
144
double
msq3 = _p4_d3.
mass2
();
145
146
double
M;
147
148
double
p2 =
149
sqrt( ( _p4_12.
mass2
() - (
m_p4_d1
.mass() +
m_p4_d2
.mass() ) *
150
(
m_p4_d1
.mass() +
m_p4_d2
.mass() ) ) *
151
( _p4_12.
mass2
() - (
m_p4_d1
.mass() -
m_p4_d2
.mass() ) *
152
(
m_p4_d1
.mass() -
m_p4_d2
.mass() ) ) ) /
153
( 2.0 * _p4_12.
mass
() );
154
155
double
p2R =
156
sqrt( (
m_bwm
*
m_bwm
- (
m_p4_d1
.mass() +
m_p4_d2
.mass() ) *
157
(
m_p4_d1
.mass() +
m_p4_d2
.mass() ) ) *
158
(
m_bwm
*
m_bwm
- (
m_p4_d1
.mass() -
m_p4_d2
.mass() ) *
159
(
m_p4_d1
.mass() -
m_p4_d2
.mass() ) ) ) /
160
( 2.0 *
m_bwm
);
161
162
double
gam, R;
163
164
if
( i == 1 ) {
165
R = 2.0 / ( 0.197 );
166
167
}
else
168
R = 5.0 / ( 0.197 );
169
170
gam =
m_gamma
* (
m_bwm
/ _p4_12.
mass
() ) * ( p2 / p2R ) * ( p2 / p2R ) *
171
( p2 / p2R ) * ( ( 1 + R * R * p2R * p2R ) / ( 1 + R * R * p2 * p2 ) );
172
M = ( msq13 - msq23 -
173
( msqParent - msq3 ) * ( msq1 - msq2 ) / (
m_bwm
*
m_bwm
) ) *
174
sqrt( ( 1 + R * R * p2R * p2R ) / ( 1 + R * R * p2 * p2 ) );
175
176
BW = sqrt(
m_gamma
) * M /
177
( (
m_bwm
*
m_bwm
- _p4_12.
mass2
() ) -
178
EvtComplex
( 0.0, 1.0 ) * gam *
m_bwm
);
179
180
return
BW;
181
}
EvtComplex.hh
EvtConst.hh
EvtKine.hh
EvtDecayAngle
double EvtDecayAngle(const EvtVector4R &, const EvtVector4R &, const EvtVector4R &)
Definition
EvtKine.cpp:32
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_DEBUG
@ EVTGEN_DEBUG
Definition
EvtReport.hh:53
EvtResonance.hh
EvtVector4R.hh
EvtComplex
Definition
EvtComplex.hh:29
EvtConst::radToDegrees
static const double radToDegrees
Definition
EvtConst.hh:28
EvtConst::twoPi
static const double twoPi
Definition
EvtConst.hh:27
EvtResonance::m_ampl
double m_ampl
Definition
EvtResonance.hh:66
EvtResonance::spin
int spin()
Definition
EvtResonance.hh:56
EvtResonance::m_gamma
double m_gamma
Definition
EvtResonance.hh:66
EvtResonance::p4_d2
const EvtVector4R & p4_d2()
Definition
EvtResonance.hh:41
EvtResonance::p4_d1
const EvtVector4R & p4_d1()
Definition
EvtResonance.hh:40
EvtResonance::operator=
EvtResonance & operator=(const EvtResonance &)
Definition
EvtResonance.cpp:32
EvtResonance::m_p4_d2
EvtVector4R m_p4_d2
Definition
EvtResonance.hh:65
EvtResonance::m_p4_p
EvtVector4R m_p4_p
Definition
EvtResonance.hh:65
EvtResonance::m_theta
double m_theta
Definition
EvtResonance.hh:66
EvtResonance::bwm
double bwm()
Definition
EvtResonance.hh:53
EvtResonance::m_spin
int m_spin
Definition
EvtResonance.hh:67
EvtResonance::relBrWig
EvtComplex relBrWig(int i)
Definition
EvtResonance.cpp:130
EvtResonance::gamma
double gamma()
Definition
EvtResonance.hh:50
EvtResonance::m_p4_d1
EvtVector4R m_p4_d1
Definition
EvtResonance.hh:65
EvtResonance::resAmpl
EvtComplex resAmpl()
Definition
EvtResonance.cpp:61
EvtResonance::m_bwm
double m_bwm
Definition
EvtResonance.hh:66
EvtResonance::EvtResonance
EvtResonance(const EvtVector4R &p4_p, const EvtVector4R &p4_d1, const EvtVector4R &p4_d2, double ampl=0.0, double theta=0.0, double gamma=0.0, double bwm=0.0, int spin=0)
Definition
EvtResonance.cpp:47
EvtResonance::p4_p
const EvtVector4R & p4_p()
Definition
EvtResonance.hh:39
EvtResonance::theta
double theta()
Definition
EvtResonance.hh:47
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::mass
double mass() const
Definition
EvtVector4R.cpp:48
EvtVector4R::mass2
double mass2() const
Definition
EvtVector4R.hh:100
Generated by
1.17.0