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
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
22
25#include "EvtGenBase/EvtKine.hh"
28
29#include <math.h>
30
31//operator
32
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;
44 return *this;
45}
46
47//constructor
48
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
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}
static const double radToDegrees
Definition EvtConst.hh:28
EvtComplex resAmpl()
Definition EvtFlatte.cpp:64
double m_theta
Definition EvtFlatte.hh:88
vector< EvtFlatteParam > m_params
Definition EvtFlatte.hh:89
EvtVector4R m_p4_d2
Definition EvtFlatte.hh:87
EvtFlatte(const EvtVector4R &p4_p, const EvtVector4R &p4_d1, const EvtVector4R &p4_d2, double ampl, double theta, double mass, vector< EvtFlatteParam > &params)
Definition EvtFlatte.cpp:49
double m_ampl
Definition EvtFlatte.hh:88
EvtFlatte & operator=(const EvtFlatte &)
Definition EvtFlatte.cpp:33
EvtVector4R m_p4_d1
Definition EvtFlatte.hh:87
const EvtVector4R & p4_d2()
Definition EvtFlatte.hh:64
const EvtVector4R & p4_d1()
Definition EvtFlatte.hh:63
double m_mass
Definition EvtFlatte.hh:88
EvtComplex sqrtCplx(double in)
Definition EvtFlatte.hh:81
const EvtVector4R & p4_p()
Definition EvtFlatte.hh:62
double mass()
Definition EvtFlatte.hh:73
double theta()
Definition EvtFlatte.hh:70
EvtVector4R m_p4_p
Definition EvtFlatte.hh:87