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
EvtGenBase
EvtFlatte.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/EvtFlatte.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
31
//operator
32
33
EvtFlatte
&
EvtFlatte::operator=
(
const
EvtFlatte
& n )
34
{
35
if
( &n ==
this
)
36
return
*
this
;
37
m_p4_p
= n.
m_p4_p
;
38
m_p4_d1
= n.
m_p4_d1
;
39
m_p4_d2
= n.
m_p4_d2
;
40
m_ampl
= n.
m_ampl
;
41
m_theta
= n.
m_theta
;
42
m_mass
= n.
m_mass
;
43
m_params
= n.
m_params
;
44
return
*
this
;
45
}
46
47
//constructor
48
49
EvtFlatte::EvtFlatte
(
const
EvtVector4R
&
p4_p
,
const
EvtVector4R
&
p4_d1
,
50
const
EvtVector4R
&
p4_d2
,
double
ampl,
double
theta
,
51
double
mass
, vector<EvtFlatteParam>& params ) :
52
m_p4_p
(
p4_p
),
53
m_p4_d1
(
p4_d1
),
54
m_p4_d2
(
p4_d2
),
55
m_ampl
( ampl ),
56
m_theta
(
theta
),
57
m_mass
(
mass
),
58
m_params
( params )
59
{
60
}
61
62
//amplitude function
63
64
EvtComplex
EvtFlatte::resAmpl
()
65
{
66
double
pi180inv = 1.0 /
EvtConst::radToDegrees
;
67
68
// SCALARS ONLY
69
double
mR = (
m_p4_d1
+
m_p4_d2
).
mass
();
70
71
EvtComplex
w;
72
73
for
( vector<EvtFlatteParam>::const_iterator param =
m_params
.begin();
74
param !=
m_params
.end(); ++param ) {
75
double
m1 = ( *param ).m1();
76
double
m2 = ( *param ).m2();
77
double
g = ( *param ).g();
78
w += ( g * g *
79
sqrtCplx
( ( 1 - ( ( m1 - m2 ) * ( m1 - m2 ) ) / ( mR * mR ) ) *
80
( 1 - ( ( m1 + m2 ) * ( m1 + m2 ) ) / ( mR * mR ) ) ) );
81
}
82
83
EvtComplex
denom =
m_mass
*
m_mass
- mR * mR -
EvtComplex
( 0, 1 ) * w;
84
EvtComplex
ampl =
m_ampl
*
85
EvtComplex
( cos(
m_theta
* pi180inv ),
86
sin(
m_theta
* pi180inv ) ) /
87
denom;
88
return
ampl;
89
}
EvtComplex.hh
EvtConst.hh
EvtFlatte.hh
EvtKine.hh
EvtReport.hh
EvtVector4R.hh
EvtComplex
Definition
EvtComplex.hh:29
EvtConst::radToDegrees
static const double radToDegrees
Definition
EvtConst.hh:28
EvtFlatte::resAmpl
EvtComplex resAmpl()
Definition
EvtFlatte.cpp:64
EvtFlatte::m_theta
double m_theta
Definition
EvtFlatte.hh:88
EvtFlatte::m_params
vector< EvtFlatteParam > m_params
Definition
EvtFlatte.hh:89
EvtFlatte::m_p4_d2
EvtVector4R m_p4_d2
Definition
EvtFlatte.hh:87
EvtFlatte::EvtFlatte
EvtFlatte(const EvtVector4R &p4_p, const EvtVector4R &p4_d1, const EvtVector4R &p4_d2, double ampl, double theta, double mass, vector< EvtFlatteParam > ¶ms)
Definition
EvtFlatte.cpp:49
EvtFlatte::m_ampl
double m_ampl
Definition
EvtFlatte.hh:88
EvtFlatte::operator=
EvtFlatte & operator=(const EvtFlatte &)
Definition
EvtFlatte.cpp:33
EvtFlatte::m_p4_d1
EvtVector4R m_p4_d1
Definition
EvtFlatte.hh:87
EvtFlatte::p4_d2
const EvtVector4R & p4_d2()
Definition
EvtFlatte.hh:64
EvtFlatte::p4_d1
const EvtVector4R & p4_d1()
Definition
EvtFlatte.hh:63
EvtFlatte::m_mass
double m_mass
Definition
EvtFlatte.hh:88
EvtFlatte::sqrtCplx
EvtComplex sqrtCplx(double in)
Definition
EvtFlatte.hh:81
EvtFlatte::p4_p
const EvtVector4R & p4_p()
Definition
EvtFlatte.hh:62
EvtFlatte::mass
double mass()
Definition
EvtFlatte.hh:73
EvtFlatte::theta
double theta()
Definition
EvtFlatte.hh:70
EvtFlatte::m_p4_p
EvtVector4R m_p4_p
Definition
EvtFlatte.hh:87
EvtVector4R
Definition
EvtVector4R.hh:29
Generated by
1.16.1