HistoCollector1D.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef HistoCollector1D_h
  2. #define HistoCollector1D_h
  3. #include <TFile.h>
  4. #include <TSystem.h>
  5. #include <TH1.h>
  6. #include <TString.h>
  7. #include <TAttMarker.h>
  8. #include <iostream>
  9. #include <vector>
  10. using namespace std;
  11. //_________________
  12. class HistoCollector1D {
  13. public:
  14. HistoCollector1D();
  15. ~HistoCollector1D();
  16. void SetQinvBins(int qInvBins, double qInvLo, double qInvHi) {mQinvBins=qInvBins;mQinvLo=qInvLo;mQinvHi=qInvHi;}
  17. void SetPartType(int type) {mPartType=type;}
  18. void SetCentBins(int bins) {mCentBins=bins;}
  19. void SetKtBins(int bins) {mKtBins=bins;}
  20. void SetFileName(const char *name) {mFileName = name;}
  21. void LoadData();
  22. TH1F *BuildCentCF(int charge, int binLo, int binHi);
  23. TH1F *BuildCentKtCF(int charge, int centBinLo, int centBinHi,
  24. int ktBinLo, int ktBinHi);
  25. TH1F *BuildNumerCentKtCF(int charge, int centBinLo, int centBinHi,
  26. int ktBinLo, int ktBinHi);
  27. TH1F *BuildDenomCentKtCF(int charge, int centBinLo, int centBinHi,
  28. int ktBinLo, int ktBinHi);
  29. private:
  30. void OpenFile();
  31. void ReadHistograms();
  32. void SetHistoStyle(TH1* h, int charge);
  33. void MakeCorrFctn1D(TH1* rat, TH1* num, TH1* den);
  34. void NormalizeQinv(TH1* h);
  35. TFile *mFile;
  36. int mCentBins;
  37. int mKtBins;
  38. const char *mFileName;
  39. int mQinvBins;
  40. double mQinvLo;
  41. double mQinvHi;
  42. int mPartType;
  43. Int_t mCorrFctnColor;
  44. Int_t mCorrFctnLineWidth;
  45. Int_t mCorrFctnMarkerStyle;
  46. Double_t mCorrFctnMarkerSize;
  47. std::vector<TH1F *> hQinvNum;
  48. std::vector<TH1F *> hQinvDen;
  49. };
  50. #endif