StCosmicMuDstQAMaker.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /****************************************/
  2. /*** ***/
  3. /*** StCosmicMuDstQAMaker ***/
  4. /*** VERSION: 1.0 ***/
  5. /*** AUTHOR: Nikita Ermakov ***/
  6. /*** Eugenia Khiznyak ***/
  7. /*** DATE: UNKNOWN ***/
  8. /*** E-MAIL: coffe92@gmail.com ***/
  9. /*** ***/
  10. /****************************************/
  11. #ifndef STCOSMICMUDSTQAMAKER_HH
  12. #define STCOSMICMUDSTQAMAKER_HH
  13. #include "StMaker.h"
  14. #include "StThreeVector.hh"
  15. #include "StThreeVectorF.hh"
  16. #include "StPhysicalHelixD.hh"
  17. #include "StRefMultCorr/StRefMultCorr.h"
  18. #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
  19. #include "StMuDSTMaker/COMMON/StMuDst.h"
  20. #include "StMuDSTMaker/COMMON/StMuEvent.h"
  21. #include "StMuDSTMaker/COMMON/StMuTrack.h"
  22. #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h"
  23. #include "StMuDSTMaker/COMMON/StMuBTofPidTraits.h"
  24. #include "StMuDSTMaker/COMMON/StMuBTofHit.h"
  25. #include <TString.h>
  26. #include <TFile.h>
  27. #include <TLorentzVector.h>
  28. #include <TTree.h>
  29. #include <TH1.h>
  30. #include <TH2.h>
  31. #include <vector>
  32. #include <iostream>
  33. #ifndef St_NO_NAMESPACES
  34. using namespace std;
  35. #endif
  36. class StMuDst;
  37. class StMuDstMaker;
  38. class StMuEvent;
  39. class StMuTrack;
  40. //_________________
  41. class StCosmicMuDstQAMaker : public StMaker {
  42. public:
  43. StCosmicMuDstQAMaker(StMuDstMaker *muMaker,
  44. const Char_t *oFileName);
  45. ~StCosmicMuDstQAMaker();
  46. //
  47. // Chain methods
  48. //
  49. void Clear(Option_t *option = "");
  50. Int_t Init();
  51. Int_t Make();
  52. Int_t Finish();
  53. void CleanVariables();
  54. void SetMuDstMaker(StMuDstMaker *maker);
  55. //
  56. // Setup event
  57. //
  58. void SetTriggerId(unsigned int id);
  59. void SetVtxZCut(float lo, float hi);
  60. void SetVtxRCut(float lo, float hi);
  61. void SetVtxShift(float xShift, float yShift);
  62. void SetVtxVpdVzDiffCut(float lo, float hi);
  63. //
  64. // Setup track
  65. //
  66. void SetP(float lo, float hi);
  67. //////////////////////////////////////////////////////////
  68. void SetPhi(float phi);
  69. void SetTheta(float teta);
  70. //////////////////////////////////////////////////////////
  71. void SetPt(float lo, float hi);
  72. void SetTrackNHits(int lo, int hi);
  73. void SetTrackNHitsFit(int lo, int hi);
  74. void SetTrackEta(float lo, float hi);
  75. void SetTrackFlag(short lo, short hi);
  76. void SetTrackDCA(float lo, float hi);
  77. //
  78. // TPC PID
  79. //
  80. // Pion
  81. void SetPionPionNSigma(float lo, float hi);
  82. void SetPionKaonNSigma(float lo, float hi);
  83. void SetPionProtonNSigma(float lo, float hi);
  84. // Kaon
  85. void SetKaonPionNSigma(float lo, float hi);
  86. void SetKaonKaonNSigma(float lo, float hi);
  87. void SetKaonProtonNSigma(float lo, float hi);
  88. // Proton
  89. void SetProtonPionNSigma(float lo, float hi);
  90. void SetProtonKaonNSigma(float lo, float hi);
  91. void SetProtonProtonNSigma(float lo, float hi);
  92. //
  93. // TOF PID
  94. //
  95. void SetPionMassSqr(float lo, float hi);
  96. void SetKaonMassSqr(float lo, float hi);
  97. void SetProtonMassSqr(float lo, float hi);
  98. //
  99. // TOF and TPC momentum threshold
  100. //
  101. void SetTTTPThreshold(float pThresh);
  102. //
  103. // Cut methods
  104. //
  105. Bool_t AcceptTrigger(StMuEvent *muEvent);
  106. Bool_t AcceptPrimVtx(StThreeVectorF vtxPos, Float_t vpdVz);
  107. Bool_t AcceptTrack(StMuTrack *trk, UShort_t vtxInd);
  108. Bool_t IsTofTrack(StMuTrack *trk);
  109. private:
  110. const char *mFileName;
  111. TFile *mOutFile;
  112. vector<UInt_t> mTriggerIdCollection;
  113. //
  114. // Global counters
  115. //
  116. bool mEventIsGood;
  117. int mNEventsIn;
  118. int mNEventsPassed;
  119. bool mIsGoodTrack;
  120. float mTTTPThreshold;
  121. //
  122. // Event cuts
  123. //
  124. float mPrimVtxZ[2];
  125. float mPrimVtxR[2];
  126. float mPrimVtxVpdVzDiff[2];
  127. float mPrimVtxXShift;
  128. float mPrimVtxYShift;
  129. //
  130. // Single-particle cuts
  131. //
  132. float mTrackP[2];
  133. //////////////////////////////////////////////////////////
  134. float mPhi;
  135. float mTheta;
  136. //////////////////////////////////////////////////////////
  137. float mTrackPt[2];
  138. float mTrackDca[2];
  139. float mTrackDcaGlobal[2];
  140. unsigned short mTrackNHits[2];
  141. unsigned short mTrackNHitsFit[2];
  142. float mTrackEta[2];
  143. short mTrackFlag[2];
  144. //
  145. // TPC NSigma
  146. //
  147. // Pion
  148. float mPionPionNSigma[2];
  149. float mPionKaonNSigma[2];
  150. float mPionProtonNSigma[2];
  151. // Kaon
  152. float mKaonPionNSigma[2];
  153. float mKaonKaonNSigma[2];
  154. float mKaonProtonNSigma[2];
  155. // Proton
  156. float mProtonPionNSigma[2];
  157. float mProtonKaonNSigma[2];
  158. float mProtonProtonNSigma[2];
  159. //
  160. // TOF Mass
  161. //
  162. float mPionMass[2];
  163. float mKaonMass[2];
  164. float mProtonMass[2];
  165. //
  166. // Pointers to classes
  167. //
  168. StMuPrimaryVertex *mPrimVertex;
  169. StMuTrack *mPrimTrack;
  170. StMuTrack *mGlobTrack;
  171. StMuDstMaker *mMuDstMaker;
  172. StMuEvent *mMuEvent;
  173. StMuDst *mMuDst;
  174. //
  175. // Histograms
  176. //
  177. //
  178. // General event distributions
  179. //
  180. TH1F *hR;
  181. TH1F *hVx;
  182. TH1F *hVy;
  183. TH1F *hVz;
  184. TH2F *hVxVsVy;
  185. TH2F *hVxVsVz;
  186. TH2F *hVyVsVz;
  187. TH1S *hNPrimTr;
  188. TH1S *hNGlobTr;
  189. TH1S *hTofRefMult;
  190. TH2S *hTofRefMultVsRefMult;
  191. TH1F *hRefMult;
  192. TH1F *hVpd;
  193. TH1F *hVpdVz;
  194. TH1C *hNPrimVtx;
  195. //
  196. // General track distributions
  197. //
  198. TH1F *hP;
  199. //////////////////////////////////////////////////////////
  200. TH1F *hTheta;
  201. TH1F *hPhi;
  202. TH2F *hThetaPhi;
  203. TH2F *hEtaPhi;
  204. //////////////////////////////////////////////////////////
  205. TH1F *hPt;
  206. TH1F *hPx;
  207. TH1F *hPy;
  208. TH1F *hPz;
  209. TH1F *hEta;
  210. TH2F *hMassSqrVsPt;
  211. TH2F *hDedxVsPt;
  212. TH2F *hInvBetaExpVsPt;
  213. TH2F *hInvBetaThVsPt;
  214. TH1F *hTOF;
  215. //
  216. // Trigger
  217. //
  218. unsigned int mCurrentTrigger;
  219. ClassDef(StCosmicMuDstQAMaker, 1)
  220. };
  221. #endif