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.hh
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#ifndef EVTFLATTE_HH
22#define EVTFLATTE_HH
23
26
27#include <vector>
28
29using std::vector;
30
31// Helper class
32
34 public:
35 EvtFlatteParam( double m1, double m2, double g ) :
36 m_m1( m1 ), m_m2( m2 ), m_g( g )
37 {
38 }
39
40 inline double m1() const { return m_m1; }
41 inline double m2() const { return m_m2; }
42 inline double g() const { return m_g; }
43
44 private:
45 double m_m1, m_m2, m_g;
46};
47
48//class declaration
49
50class EvtFlatte final {
51 public:
52 //operator
53 EvtFlatte& operator=( const EvtFlatte& );
54
55 //constructor with all information about the resonance
57 const EvtVector4R& p4_d2, double ampl, double theta, double mass,
58 vector<EvtFlatteParam>& params );
59
60 //accessors
61 //return 4-momenta of the particles involved
62 inline const EvtVector4R& p4_p() { return m_p4_p; }
63 inline const EvtVector4R& p4_d1() { return m_p4_d1; }
64 inline const EvtVector4R& p4_d2() { return m_p4_d2; }
65
66 //return amplitude
67 inline double amplitude() { return m_ampl; }
68
69 //return theta
70 inline double theta() { return m_theta; }
71
72 //return bwm
73 inline double mass() { return m_mass; }
74
75 //functions
76
77 //calculate amplitude for this resonance
79
80 private:
81 inline EvtComplex sqrtCplx( double in )
82 {
83 return ( in > 0 ) ? EvtComplex( sqrt( in ), 0 )
84 : EvtComplex( 0, sqrt( -in ) );
85 }
86
89 vector<EvtFlatteParam> m_params;
90};
91
92#endif
double m1() const
Definition EvtFlatte.hh:40
double g() const
Definition EvtFlatte.hh:42
EvtFlatteParam(double m1, double m2, double g)
Definition EvtFlatte.hh:35
double m2() const
Definition EvtFlatte.hh:41
EvtComplex resAmpl()
Definition EvtFlatte.cpp:64
double m_theta
Definition EvtFlatte.hh:88
vector< EvtFlatteParam > m_params
Definition EvtFlatte.hh:89
double amplitude()
Definition EvtFlatte.hh:67
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