evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
24 #include "EvtGenBase/EvtComplex.hh"
26 
27 #include <vector>
28 
29 using std::vector;
30 
31 // Helper class
32 
34  public:
35  EvtFlatteParam( double m1, double m2, double g ) :
36  _m1( m1 ), _m2( m2 ), _g( g )
37  {
38  }
39 
40  inline double m1() const { return _m1; }
41  inline double m2() const { return _m2; }
42  inline double g() const { return _g; }
43 
44  private:
45  double _m1, _m2, _g;
46 };
47 
48 //class declaration
49 
50 class EvtFlatte final {
51  public:
52  //operator
53  EvtFlatte& operator=( const EvtFlatte& );
54 
55  //constructor with all information about the resonance
56  EvtFlatte( const EvtVector4R& p4_p, const EvtVector4R& p4_d1,
57  const EvtVector4R& p4_d2, double ampl, double theta, double mass,
58  vector<EvtFlatteParam>& params
59  // double m1a = 0.0, double m1b = 0.0, double g1 = 0.0,
60  // double m2a = 0.0, double m2b = 0.0, double g2 = 0.0
61  );
62 
63  //accessors
64  //return 4-momenta of the particles involved
65  inline const EvtVector4R& p4_p() { return _p4_p; }
66  inline const EvtVector4R& p4_d1() { return _p4_d1; }
67  inline const EvtVector4R& p4_d2() { return _p4_d2; }
68 
69  //return amplitude
70  inline double amplitude() { return _ampl; }
71 
72  //return theta
73  inline double theta() { return _theta; }
74 
75  //return bwm
76  inline double mass() { return _mass; }
77 
78  //functions
79 
80  //calculate amplitude for this resonance
82 
83  private:
84  inline EvtComplex sqrtCplx( double in )
85  {
86  return ( in > 0 ) ? EvtComplex( sqrt( in ), 0 )
87  : EvtComplex( 0, sqrt( -in ) );
88  }
89 
91  double _ampl, _theta, _mass;
92  vector<EvtFlatteParam> _params;
93  // double _m1a, _m1b, _g1;
94  // double _m2a, _m2b, _g2;
95 };
96 
97 #endif
double amplitude()
Definition: EvtFlatte.hh:70
const EvtVector4R & p4_p()
Definition: EvtFlatte.hh:65
double _ampl
Definition: EvtFlatte.hh:91
double m2() const
Definition: EvtFlatte.hh:41
double _mass
Definition: EvtFlatte.hh:91
EvtVector4R _p4_p
Definition: EvtFlatte.hh:90
EvtComplex sqrtCplx(double in)
Definition: EvtFlatte.hh:84
double g() const
Definition: EvtFlatte.hh:42
double _theta
Definition: EvtFlatte.hh:91
EvtVector4R _p4_d1
Definition: EvtFlatte.hh:90
EvtVector4R _p4_d2
Definition: EvtFlatte.hh:90
EvtComplex resAmpl()
Definition: EvtFlatte.cpp:76
const EvtVector4R & p4_d2()
Definition: EvtFlatte.hh:67
double mass()
Definition: EvtFlatte.hh:76
EvtFlatteParam(double m1, double m2, double g)
Definition: EvtFlatte.hh:35
const EvtVector4R & p4_d1()
Definition: EvtFlatte.hh:66
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:56
vector< EvtFlatteParam > _params
Definition: EvtFlatte.hh:92
double m1() const
Definition: EvtFlatte.hh:40
EvtFlatte & operator=(const EvtFlatte &)
Definition: EvtFlatte.cpp:34
double theta()
Definition: EvtFlatte.hh:73