]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtFlatte.hh
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtFlatte.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 //      This software is part of the EvtGen package developed jointly
5 //      for the BaBar and CLEO collaborations.  If you use all or part
6 //      of it, please give an appropriate acknowledgement.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 //      Copyright (C) 1998      Caltech, UCSB
10 //
11 // Module: EvtGen/EvtFlatte.hh
12 //
13 // Description:resonance-defining class
14 //
15 // Modification history:
16 //
17 //    ponyisi  18 Feb 2008  created
18 //
19 //------------------------------------------------------------------------
20
21 #ifndef EVTFLATTE_HH
22 #define EVTFLATTE_HH
23
24 #include "EvtGenBase/EvtVector4R.hh"
25 #include <vector>
26
27 using std::vector;
28
29 class EvtComplex;
30
31 // Helper class
32
33 class EvtFlatteParam {
34 public:
35   EvtFlatteParam(double m1, double m2, double g):
36     _m1(m1), _m2(m2), _g(g) {}
37       
38   inline double m1() const { return _m1; }
39   inline double m2() const { return _m2; }
40   inline double g() const { return _g; }
41
42 private:
43   double _m1, _m2, _g;
44 };
45
46 //class declaration
47
48 class EvtFlatte {
49 public:
50
51   //operator
52   EvtFlatte& operator = (const EvtFlatte &);
53
54   //constructor with all information about the resonance
55   EvtFlatte(const EvtVector4R& p4_p, const EvtVector4R& p4_d1, 
56             const EvtVector4R& p4_d2, 
57             double ampl, double theta,
58             double mass, 
59              vector<EvtFlatteParam>& params
60             //           double m1a = 0.0, double m1b = 0.0, double g1 = 0.0,
61             //           double m2a = 0.0, double m2b = 0.0, double g2 = 0.0
62             );
63
64   //destructor
65   virtual ~EvtFlatte();
66
67   //accessors
68   //return 4-momenta of the particles involved
69   inline const EvtVector4R& p4_p() { return _p4_p; }
70   inline const EvtVector4R& p4_d1() { return _p4_d1; }
71   inline const EvtVector4R& p4_d2() { return _p4_d2; }  
72     
73
74   //return amplitude
75   inline double amplitude() { return _ampl; }  
76
77   //return theta
78   inline double theta() { return _theta; } 
79
80   //return bwm
81   inline double mass() { return _mass; } 
82
83   //functions
84
85   //calculate amplitude for this resonance
86   EvtComplex resAmpl();
87    
88 private:
89
90   inline EvtComplex sqrtCplx(double in) { return (in > 0) ? EvtComplex(sqrt(in), 0) : EvtComplex
91                                             (0, sqrt(-in)); }
92
93   EvtVector4R _p4_p, _p4_d1, _p4_d2;
94   double _ampl, _theta, _mass;
95   vector<EvtFlatteParam> _params;
96   //      double _m1a, _m1b, _g1;
97   //      double _m2a, _m2b, _g2;
98 }; 
99
100 #endif
101