StFemtoDstQAMaker.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #ifndef STFEMTODSTQAMAKER_HH
  2. #define STFEMTODSTQAMAKER_HH
  3. #include <iostream>
  4. #include "StMaker.h"
  5. #include "StChain.h"
  6. #include "TChain.h"
  7. #include "TSystem.h"
  8. #include "TH1.h"
  9. #include "TH2.h"
  10. #include "TProfile.h"
  11. #include "StFemtoEvent.h"
  12. #include <string>
  13. #include <stdlib.h>
  14. //_________________
  15. class StFemtoDstQAMaker : public StMaker {
  16. public:
  17. StFemtoDstQAMaker(const char *aDirName,
  18. const char *aFileName,
  19. const char *aFilter = ".",
  20. int aMaxFiles = 10000);
  21. void AddTrigId(unsigned int aTrigId);
  22. int GetNEvents();
  23. Int_t Init();
  24. Int_t Make();
  25. Int_t Finish();
  26. void SetOutFileName(const char *oFileName) {outFileName = oFileName;}
  27. //Should be set for each year and run period. The values can be found in: online.star.bnl.gov->RunLog Browser
  28. void SetRunIdParameters(unsigned int nbins, double lo, double hi) { mRunIdBins=nbins; mRunIdVal[0]=lo; mRunIdVal[1]=hi; }
  29. void SetTrigger(unsigned int trig, char mode);
  30. private:
  31. string dir;
  32. string fileName;
  33. string filter;
  34. unsigned int eventId;
  35. unsigned int nEvents;
  36. TFile *outFile;
  37. TChain *chain;
  38. TTree *tree;
  39. StFemtoEvent *femtoEvent;
  40. const char *outFileName;
  41. unsigned int mRunIdBins;
  42. double mRunIdVal[2];
  43. //Event histograms
  44. TH1F *hRefMultCorr;
  45. TH1F *hRefMult;
  46. TH1F *hRefMult2;
  47. TH1F *hRefMultWeight;
  48. TH1F *hTofMult;
  49. TH1F *hTofRefDiff;
  50. TH1F *hTofRef2Diff;
  51. TH1F *hRefRef2Diff;
  52. TH2F *hTofVsRef;
  53. TH2F *hTofVsRef2;
  54. TH2F *hRefVsRef2;
  55. TH1F *hPrimVertZ;
  56. TH1F *hPrimVertR;
  57. TH2F *hPrimVertXvsY;
  58. TH1F *hPrimVertVpdVzDiff;
  59. TH1I *hTriggerId;
  60. TH1F *hRPeast;
  61. TH1F *hRPwest;
  62. TH1F *hRPdiff;
  63. //Here is the way of how to look on the quantities over the run
  64. TProfile *hRefMultVsRunNumber;
  65. TProfile *hPrimTrackNumVsRunNumber;
  66. TProfile *hGlobTrackNumVsRunNumber;
  67. TProfile *hTofMultVsRunNumber;
  68. TProfile *hRefMult2VsRunNumber;
  69. //Track histograms
  70. TH2F *hNSigmaPionVsMom;
  71. TH2F *hNSigmaKaonVsMom;
  72. TH2F *hNSigmaProtonVsMom;
  73. TH2F *hNSigmaElectronVsMom;
  74. TH1F *hP;
  75. TH1F *hPt;
  76. TH1F *hGlobPx;
  77. TH1F *hGlobPy;
  78. TH1F *hGlobPz;
  79. TH1F *hGlobX;
  80. TH1F *hGlobY;
  81. TH1F *hGlobZ;
  82. TH1F *hdEdx;
  83. TH2F *hdEdx_p;
  84. TH1F *hDCAxy;
  85. TH1F *hDCAz;
  86. TH1F *hDCAxyGlob;
  87. TH1F *hDCAzGlob;
  88. TH2F *hMSqr_P;
  89. TH2F *hInvBeta_P;
  90. TH2F *hBeta_P;
  91. TH1F *hEta;
  92. TH1F *hSphericity;
  93. std::vector<unsigned int> mTrigIdCol;
  94. unsigned int mTrig;
  95. int maxFiles;
  96. int InitRead(string aDir, string aFileName,
  97. string aFilter, int aMaxFiles);
  98. int FillChain(TChain *aChain, const char *aFileName,
  99. int aMaxFiles);
  100. int FillChain(TChain *aChain, char *aDir,
  101. const char *aFilter, int aMaxFiles);
  102. void UninitRead();
  103. ClassDef(StFemtoDstQAMaker, 3)
  104. };
  105. #endif