StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
QinvEbyECorrFctn.h
1 #ifndef QinvEbyECorrFctn_hh
2 #define QinvEbyECorrFctn_hh
3 
4 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
5 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
6 #include "StHbtMaker/Infrastructure/StHbtTagWriter.hh"
7 
8 struct twoFit {
9  float lambda;
10  float lambdaErr;
11  float radius;
12  float radiusErr;
13  float chi2;
14  float ndf;
15 };
16 
17 struct threeFit {
18  float constant;
19  float constantErr;
20  float lambda;
21  float lambdaErr;
22  float radius;
23  float radiusErr;
24  float chi2;
25  float ndf;
26 };
27 
29 public:
30 
31  // Basics
32  QinvEbyECorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi);
33  virtual ~QinvEbyECorrFctn();
34 
35  virtual StHbtString Report();
36  virtual void AddRealPair(const StHbtPair*);
37  virtual void AddMixedPair(const StHbtPair*);
38  virtual void EventEnd(const StHbtEvent*);
39  virtual void EventBegin(const StHbtEvent*);
40  virtual void Finish();
41 
42  StHbt1DHisto* Numerator();
43  StHbt1DHisto* Denominator();
44  StHbt1DHisto* Ratio();
45  StHbt1DHisto* Correction();
46 
47  // 'Integrated over all events' histos
48  StHbt1DHisto* IntNumerator();
49  StHbt1DHisto* IntDenominator();
50  StHbt1DHisto* IntRatio();
51 
52  // EbyE histos
53  StHbt1DHisto* threeFitLambda(); // Histogram Radius out of 3 param fit
54  StHbt1DHisto* threeFitRadius(); // Histogram Lambda out of 3 param fit
55  StHbt1DHisto* twoFitLambda(); // Histogram Lambda out of 2 param fit
56  StHbt1DHisto* twoFitRadius(); // Histogram Radius out of 2 param fit
57  StHbt1DHisto* rmsByHandMeV(); // Histogram width of bump in Mev
58  StHbt1DHisto* rmsByHandFm(); // Histogram width of bump in fm
59 
60  // Extract Parameters
61  void Rms_by_hand(double& Width_MeV, double& Width_fm) ; // Calculate rms of the bump
62  void Three_param_fit(threeFit&,StHbt1DHisto*); // Fit correlation function with 3 params
63  void Two_param_fit(twoFit&) ; // Fit correlation function after normalization with 2 params
64 
65  // Normalization
66  double Norm_by_integral(double,double) ; // Norm correlation function by using integral of background and signal
67  double Norm_by_fit(double,double) ; // Norm correlation function by fitting flat part of the correlation function
68 
69  // Fill histos artificially
70  void Fill_ratio_artificial();
71  void Fill_ratio_artificial_random();
72 
73  // TagDb
74  void SetTagMeans( const char* );
75  void SetTagSigmas( const char* );
76 
77  // Stuff
78  void SetCorrection( const StHbt1DHisto* );
79 
80 private:
81  char* mTagMeans;
82  char* mTagSigmas;
83 
84  // Basics
85  StHbt1DHisto* mNumerator;
86  StHbt1DHisto* mDenominator;
87  StHbt1DHisto* mRatio;
88  StHbt1DHisto* mCorrection;
89 
90  // 'Integrated over all events' histos
91  StHbt1DHisto* mIntNumerator;
92  StHbt1DHisto* mIntDenominator;
93  StHbt1DHisto* mIntRatio;
94 
95  // EbyE histos
96  StHbt1DHisto* mThreeFitLambda;
97  StHbt1DHisto* mThreeFitRadius;
98  StHbt1DHisto* mTwoFitLambda;
99  StHbt1DHisto* mTwoFitRadius;
100  StHbt1DHisto* mRmsByHandMeV;
101  StHbt1DHisto* mRmsByHandFm;
102 
103  // Debug
104  int m_Debug_ebye ; // Set (1) or Unset (0) debug option
105 
106  //StHbtTagWriter* mTagWriter ; //! <-- this is a singleton
107 
108 #ifdef __ROOT__
109  ClassDef(QinvEbyECorrFctn, 0)
110 #endif
111 };
112 
113 // Return all histos by inline
114 inline void QinvEbyECorrFctn::SetTagMeans( const char* c){ mTagMeans=(char*)c;}
115 inline void QinvEbyECorrFctn::SetTagSigmas( const char* c){ mTagSigmas=(char*)c;}
116 // Basics
117 inline StHbt1DHisto* QinvEbyECorrFctn::Numerator(){return mNumerator;}
118 inline StHbt1DHisto* QinvEbyECorrFctn::Denominator(){return mDenominator;}
119 inline StHbt1DHisto* QinvEbyECorrFctn::Ratio(){return mRatio;}
120 inline StHbt1DHisto* QinvEbyECorrFctn::Correction(){return mCorrection;}
121 // 'Integrated over all events' histos
122 inline StHbt1DHisto* QinvEbyECorrFctn::IntNumerator(){return mIntNumerator;}
123 inline StHbt1DHisto* QinvEbyECorrFctn::IntDenominator(){return mIntDenominator;}
124 inline StHbt1DHisto* QinvEbyECorrFctn::IntRatio(){return mIntRatio;}
125 // Ebye Parameters
126 inline StHbt1DHisto* QinvEbyECorrFctn::threeFitLambda(){return mThreeFitLambda;}
127 inline StHbt1DHisto* QinvEbyECorrFctn::threeFitRadius(){return mThreeFitRadius;}
128 inline StHbt1DHisto* QinvEbyECorrFctn::twoFitLambda(){return mTwoFitLambda;}
129 inline StHbt1DHisto* QinvEbyECorrFctn::twoFitRadius(){return mTwoFitRadius;}
130 inline StHbt1DHisto* QinvEbyECorrFctn::rmsByHandMeV(){return mRmsByHandMeV;}
131 inline StHbt1DHisto* QinvEbyECorrFctn::rmsByHandFm(){return mRmsByHandFm;}
132 
133 #endif