StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
YKPLongitudinal.h
1 /***************************************************************************
2  *
3  * Author: Dominik Flierl, flierl@bnl.gov
4  ***************************************************************************
5  *
6  * Description:
7  * Do YKP parametrization in longitudinal direction in kt-Y-bins
8  *
9  *
10  **************************************************************************/
11 
12 #ifndef YKPLongitudinal_hh
13 #define YKPLongitudinal_hh
14 
15 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
16 #include "StHbtMaker/Infrastructure/StHbtCoulomb.h"
17 #include "StHbtMaker/Base/StHbtPairCut.h"
18 
20 
21  public:
22  // constructors
23  YKPLongitudinal(TString ctype, TString frame, const int& nbins, const float& QLo, const float& QHi,
24  const int& nKtbins, const double& ktMin, const double& ktMax,
25  const int& nYbins, const double& YMin, const double& YMax,
26  const int& nbinsQINV = 100, const float& QLoQINV = 0.0, const float& QHiQINV = 0.2 ) ;
27  virtual ~YKPLongitudinal() ;
28  // mandatory report
29  virtual StHbtString Report() ;
30  // mandatory : filling histos
31  virtual void AddRealPair(const StHbtPair*) ;
32  virtual void AddMixedPair(const StHbtPair*) ;
33  // mandatory : called at end
34  virtual void Finish() ;
35 
36  // get histos
37  StHbt3DHisto* Numerator(const int ktBin, const int yBin ) ;
38  StHbt3DHisto* Denominator(const int ktBin, const int yBin ) ;
39  StHbt3DHisto* Ratio(const int ktBin, const int yBin ) ;
40  StHbt1DHisto* QinvNumerator(const int ktBin, const int yBin ) ;
41  StHbt1DHisto* QinvDenominator(const int ktBin, const int yBin ) ;
42  StHbt1DHisto* QinvRatio(const int ktBin, const int yBin ) ;
43 
44  // here are get and set for the range over which the correlation function
45  // is normalized (in Qinv). The range is set to 0.15..0.18 in the constuctor
46  // by default, but the Set's below override this
47  // note : there are other ways to get the normalization
48  void SetNormRangeLo(float qLo) ;
49  void SetNormRangeHi(float qHi) ;
50  float GetNormRangeLo() ;
51  float GetNormRangeHi() ;
52  double GetNorm(const int ktBin, const int yBin ) ;
53 
54  // connect to the coulomb correction object
55  void SetCoulombCorrection(StHbtCoulomb* Correction) ;
56 
57 
58  private:
59  // the histo arrays
60  StHbt3DHisto* mNumerator ;
61  StHbt3DHisto* mDenominator ;
62  StHbt3DHisto* mRatio ;
63  StHbt1DHisto* mQinvNumerator ;
64  StHbt1DHisto* mQinvDenominator ;
65  StHbt1DHisto* mQinvRatio ;
66  // the kt Y ranges
67  int mNumberKtBins ;
68  int mNumberYBins ;
69  int mNumberBins ;
70  double* mktBinsMin ;
71  double* mktBinsMax ;
72  double* mYBinsMin ;
73  double* mYBinsMax ;
74 
75  // the frame we calculate the correlationfuntion in
76  TString mFrame ;
77  TString mCtype ;
78 
79  // upper and lower bounds of Qinv region where to do normalization
80  float mQinvNormLo ;
81  float mQinvNormHi ;
82 
83  // and here are the number of pairs in that region...
84  unsigned long int* mNumRealsNorm ;
85  unsigned long int* mNumMixedNorm ;
86 
87  // coulomb correction
88  StHbtCoulomb* mCorrection;
89 
90 
91 #ifdef __ROOT__
92  ClassDef(YKPLongitudinal, 1)
93 #endif
94 };
95 
96 // histos
97 inline StHbt3DHisto* YKPLongitudinal::Numerator(const int ktBin, const int yBin) {return &mNumerator[(ktBin-1)+(yBin-1)*mNumberKtBins];}
98 inline StHbt3DHisto* YKPLongitudinal::Denominator(const int ktBin, const int yBin) {return &mDenominator[(ktBin-1)+(yBin-1)*mNumberKtBins];}
99 inline StHbt3DHisto* YKPLongitudinal::Ratio(const int ktBin, const int yBin) {return &mRatio[(ktBin-1)+(yBin-1)*mNumberKtBins];}
100 inline StHbt1DHisto* YKPLongitudinal::QinvNumerator(const int ktBin, const int yBin) {return &mQinvNumerator[(ktBin-1)+(yBin-1)*mNumberKtBins];}
101 inline StHbt1DHisto* YKPLongitudinal::QinvDenominator(const int ktBin, const int yBin){return &mQinvDenominator[(ktBin-1)+(yBin-1)*mNumberKtBins];}
102 inline StHbt1DHisto* YKPLongitudinal::QinvRatio(const int ktBin, const int yBin) {return &mQinvRatio[(ktBin-1)+(yBin-1)*mNumberKtBins];}
103 
104 // ranges
105 inline void YKPLongitudinal::SetNormRangeLo(float qLo){mQinvNormLo = qLo;}
106 inline void YKPLongitudinal::SetNormRangeHi(float qHi){mQinvNormHi = qHi;}
107 inline float YKPLongitudinal::GetNormRangeLo(){return mQinvNormLo;}
108 inline float YKPLongitudinal::GetNormRangeHi(){return mQinvNormHi;}
109 inline double YKPLongitudinal::GetNorm(const int ktBin, const int yBin){return (double)mNumRealsNorm[ktBin+yBin*mNumberKtBins]/(double)mNumMixedNorm[ktBin+yBin*mNumberKtBins];}
110 inline void YKPLongitudinal::SetCoulombCorrection(StHbtCoulomb* Correction){mCorrection = Correction;}
111 #endif