DataProcessing.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #ifndef DataProcessing_h
  2. #define DataProcessing_h
  3. #include <TFile.h>
  4. #include <TSystem.h>
  5. #include <TH1.h>
  6. #include <TString.h>
  7. #include <TAttMarker.h>
  8. #include <TGraphErrors.h>
  9. #include <iostream>
  10. #include <vector>
  11. using namespace std;
  12. //_________________
  13. class DataProcessing {
  14. public:
  15. DataProcessing();
  16. ~DataProcessing();
  17. void SetExpFile(const Char_t *name) { mExpFileName = name; }
  18. void SetOutFile(const Char_t *name) { mOutFileName = name; }
  19. void DoProcessing();
  20. void SetQinvBins(Int_t qInvBins,
  21. Double_t qInvLow,
  22. Double_t qInvHi) {
  23. mQinvBins = qInvBins;
  24. mQinvLow = qInvLow;
  25. mQinvHi = qInvHi;
  26. }
  27. void SetDetectorSelection(Int_t sel) { mDetSelection = sel; }
  28. void SetMultiplicityBins(Int_t bins) { mMultBins = bins; }
  29. void SetCorrFctnStyle(Int_t color, Int_t width, Int_t style, Double_t size);
  30. void SetParticleType(Int_t type) { mPartType = type; } // 3-pion, 4-kaon
  31. void SetSourceFunction(Int_t source) { mSourceFunc = source; }
  32. void SetNonFemtoFunction(Int_t func) { mNonFemtoFunc = func; }
  33. void SetDrawLegend(Bool_t draw) { mDrawLegend = draw; }
  34. private:
  35. //
  36. // Functions
  37. //
  38. void OpenFiles();
  39. void ReadHistos();
  40. void ProcessHistos();
  41. void ProcessMultHistos();
  42. void ProcessMultKtHistos();
  43. void FitHistos();
  44. void MakeTGraphs();
  45. TH1F *BuildMultCF(Int_t charge, Int_t BinLo, Int_t BinHi);
  46. TH1F *BuildMultKtCF(Int_t charge, Int_t MultBinLo, Int_t MultBinHi,
  47. Int_t KtBinLo, Int_t KtBinHi);
  48. void SetHistoStyle(TH1* h);
  49. void Finish();
  50. //
  51. // Variables
  52. //
  53. const Char_t *mExpFileName;
  54. const Char_t *mOutFileName;
  55. Int_t mQinvBins;
  56. Double_t mQinvLow;
  57. Double_t mQinvHi;
  58. Int_t mPartType;
  59. Int_t mDetSelection; // 0-TPC, 1-TOF, 2-TPC+TOF, 3-TOF||TPC, 4-TPC+TOC(p>pthresh)||TPC(p<pthresh)
  60. Int_t mMultBins;
  61. Int_t mKtBins;
  62. Int_t mKtRanges;
  63. Int_t mCorrFctnColor;
  64. Int_t mCorrFctnLineWidth;
  65. Int_t mCorrFctnMarkerStyle;
  66. Double_t mCorrFctnMarkerSize;
  67. Double_t mYaxisLo;
  68. Double_t mYaxisHi;
  69. //
  70. // Fits
  71. //
  72. Int_t mSourceFunc;
  73. Int_t mNonFemtoFunc;
  74. Bool_t mDrawLegend;
  75. //
  76. // Files
  77. //
  78. TFile *mExpFile;
  79. TFile *mOutFile;
  80. //
  81. // Input histos
  82. //
  83. std::vector<TH1F *> hQinvMixNum;
  84. std::vector<TH1F *> hQinvMixDen;
  85. //
  86. // Multiplicity dependece
  87. //
  88. std::vector<TH1F *> hMultMixCF;
  89. //
  90. // Mulitplicity and kT dependence
  91. //
  92. std::vector<TH1F *> hMultKtMixCF;
  93. //
  94. // Fitted values
  95. // Multiplicity dependence
  96. //
  97. std::vector<double> mMultMixRadii;
  98. std::vector<double> mMultMixRadiiErr;
  99. std::vector<double> mMultMixLambda;
  100. std::vector<double> mMultMixLambdaErr;
  101. //
  102. // Multiplicity and kT
  103. //
  104. std::vector<double> mMultKtMixRadii;
  105. std::vector<double> mMultKtMixRadiiErr;
  106. std::vector<double> mMultKtMixLambda;
  107. std::vector<double> mMultKtMixLambdaErr;
  108. //
  109. // TGraphErrors
  110. //
  111. TGraphErrors *gMultDepRadiiGrErr[3];
  112. TGraphErrors *gMultKtDepRadiiGrErr[3][9];
  113. TGraphErrors *gMultKtDepRadiiMtGrErr[3][9];
  114. };
  115. #endif