StHijingQA.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /****************************************/
  2. /*** ***/
  3. /*** StHijingQA ***/
  4. /*** VERSION: 1.0 ***/
  5. /*** AUTHOR: Nikita Ermakov ***/
  6. /*** DATE: ***/
  7. /*** E-MAIL: coffe92@gmail.com ***/
  8. /*** ***/
  9. /****************************************/
  10. #ifndef STHIJINGQA_HH
  11. #define STHIJINGQA_HH
  12. #include "StMaker.h"
  13. #include "StThreeVector.hh"
  14. #include "StThreeVectorF.hh"
  15. #include "StPhysicalHelixD.hh"
  16. #include "TDatabasePDG.h"
  17. #include <StarGenerator/EVENT/StarGenParticle.h>
  18. #include <StarGenerator/EVENT/StarGenEvent.h>
  19. #include <TString.h>
  20. #include <TSystem.h>
  21. #include <TFile.h>
  22. #include <TLorentzVector.h>
  23. #include <TTree.h>
  24. #include <TH1.h>
  25. #include <TH2.h>
  26. #include <TChain.h>
  27. #include <vector>
  28. #include <iostream>
  29. #ifndef St_NO_NAMESPACES
  30. using namespace std;
  31. #endif
  32. class StHijingQA : public StMaker
  33. {
  34. public:
  35. StHijingQA(const char *dir,
  36. const char *fileName,
  37. const char *filter,
  38. int maxFiles,
  39. const char *outFile);
  40. ~StHijingQA();
  41. //
  42. // Chain methods
  43. //
  44. void Clear(Option_t *option = "");
  45. int Init();
  46. int Make();
  47. int Finish();
  48. unsigned int GetNEvents();
  49. void CleanVariables();
  50. //
  51. // Setup track
  52. //
  53. void SetP(float lo, float hi);
  54. void SetTrackEta(float lo, float hi);
  55. private:
  56. int InitChain(string dir, string fileName,
  57. string filter, int maxFiles);
  58. int FillChain(TChain *chain, const char *fileName,
  59. int maxFiles);
  60. int FillChain(TChain *chain, char *dir,
  61. const char *filter, int maxFiles);
  62. const char *mFileName;
  63. TFile *mOutFile;
  64. TChain *mChain;
  65. TDatabasePDG *db;
  66. StarGenEvent *mSGEvent;
  67. //
  68. // Global counters
  69. //
  70. bool mEventIsGood;
  71. unsigned int mNEvents;
  72. unsigned int mEventsPassed;
  73. //
  74. // Histogram parameters
  75. //
  76. int mRefMultMin;
  77. int mRefMultMax;
  78. int mRefMultBins;
  79. int mNTracksMin;
  80. int mNTracksMax;
  81. int mNTracksBins;
  82. int mPBins;
  83. float mPMin;
  84. float mPMax;
  85. int mPtBins;
  86. float mPtMin;
  87. float mPtMax;
  88. int mPxBins;
  89. float mPxMin;
  90. float mPxMax;
  91. int mPyBins;
  92. float mPyMin;
  93. float mPyMax;
  94. int mPzBins;
  95. float mPzMin;
  96. float mPzMax;
  97. int mEtaBins;
  98. float mEtaMin;
  99. float mEtaMax;
  100. //
  101. // Cut flags
  102. //
  103. bool mIsGoodTrack;
  104. //
  105. // Single-particle cuts
  106. //
  107. float mTrackP[2];
  108. float mTrackEta[2];
  109. //
  110. // Histograms
  111. //
  112. //
  113. // General event distributions
  114. //
  115. TH1F *hRefMult;
  116. TH1F *hNTracks;
  117. //
  118. // General track distributions
  119. //
  120. TH1F *hP;
  121. TH1F *hPt;
  122. TH1F *hPx;
  123. TH1F *hPy;
  124. TH1F *hPz;
  125. TH1F *hEtaNoCut;
  126. TH1F *hEta;
  127. TH2F *hVxVy;
  128. TH2F *hVyVz;
  129. TH2F *hVxVz;
  130. TH2F *hEtaVsPt;
  131. TH2F *hMassSqrVsPt;
  132. ClassDef(StHijingQA, 1)
  133. };
  134. #endif