StFlow.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*************************************/
  2. /*** ***/
  3. /*** StFlow ***/
  4. /*** VERSION: 1.0 ***/
  5. /*** AUTHOR: Nikita Ermakov ***/
  6. /*** DATE: ***/
  7. /*** E-MAIL: coffe92@gmail.com ***/
  8. /*** ***/
  9. /*************************************/
  10. #ifndef STFLOW_HH
  11. #define STFLOW_HH
  12. #include "StMaker.h"
  13. #include "StThreeVector.hh"
  14. #include "StThreeVectorF.hh"
  15. #include "StPhysicalHelixD.hh"
  16. #include "StRefMultCorr/StRefMultCorr.h"
  17. #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
  18. #include "StMuDSTMaker/COMMON/StMuDst.h"
  19. #include "StMuDSTMaker/COMMON/StMuEvent.h"
  20. #include "StMuDSTMaker/COMMON/StMuTrack.h"
  21. #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h"
  22. #include "StMuDSTMaker/COMMON/StMuBTofPidTraits.h"
  23. #include "StMuDSTMaker/COMMON/StMuBTofHit.h"
  24. #include <TString.h>
  25. #include <TFile.h>
  26. #include <TLorentzVector.h>
  27. #include <TProfile.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. const float PION_MASS = 0.139569; // GeV/c^2
  41. const float PROTON_MASS = 0.938272; // GeV/c^2
  42. const float KAON_MASS = 0.4936; // GeV/c^2
  43. //_________________
  44. class StFlow : public StMaker
  45. {
  46. public:
  47. StFlow(StMuDstMaker *muMaker, const Char_t *oFileName);
  48. ~StFlow();
  49. //
  50. // Chain methods
  51. //
  52. void Clear(Option_t *option = "");
  53. Int_t Init();
  54. Int_t Make();
  55. Int_t Finish();
  56. void CleanVariables();
  57. void SetMuDstMaker(StMuDstMaker *maker);
  58. //
  59. // Setup event
  60. //
  61. void SetTriggerId(unsigned int id);
  62. void SetVtxZCut(float lo, float hi);
  63. void SetVtxRCut(float lo, float hi);
  64. void SetVtxShift(float xShift, float yShift);
  65. void SetVtxVpdVzDiffCut(float lo, float hi);
  66. //
  67. // Setup track
  68. //
  69. void SetP(float lo, float hi);
  70. void SetPt(float lo, float hi);
  71. void SetTrackNHits(int lo, int hi);
  72. void SetTrackNHitsFit(int lo, int hi);
  73. void SetTrackEta(float lo, float hi);
  74. void SetTrackFlag(short lo, short hi);
  75. void SetTrackDCA(float lo, float hi);
  76. //
  77. // Cut methods
  78. //
  79. Bool_t AcceptTrigger(StMuEvent *muEvent);
  80. Bool_t AcceptPrimVtx(StThreeVectorF vtxPos, Float_t vpdVz);
  81. Bool_t AcceptTrack(StMuTrack *trk, UShort_t vtxInd);
  82. Bool_t IsTofTrack(StMuTrack *trk);
  83. private:
  84. const char *mFileName;
  85. TFile *mOutFile;
  86. vector<UInt_t> mTriggerIdCollection;
  87. //
  88. // Global counters
  89. //
  90. bool mEventIsGood;
  91. int mNEventsIn;
  92. int mNEventsPassed;
  93. bool mIsGoodTrack;
  94. //
  95. // Event cuts
  96. //
  97. float mPrimVtxZ[2];
  98. float mPrimVtxR[2];
  99. float mPrimVtxVpdVzDiff[2];
  100. float mPrimVtxXShift;
  101. float mPrimVtxYShift;
  102. // Single-particle cuts
  103. //
  104. float mTrackP[2];
  105. float mTrackPt[2];
  106. float mTrackDca[2];
  107. float mTrackDcaGlobal[2];
  108. unsigned short mTrackNHits[2];
  109. unsigned short mTrackNHitsFit[2];
  110. float mTrackEta[2];
  111. short mTrackFlag[2];
  112. //
  113. // Pointers to classes
  114. //
  115. StMuPrimaryVertex *mPrimVertex;
  116. StMuTrack *mPrimTrack;
  117. StMuTrack *mGlobTrack;
  118. StMuDstMaker *mMuDstMaker;
  119. StMuEvent *mMuEvent;
  120. StMuDst *mMuDst;
  121. StRefMultCorr *mRefMultCorrUtil;
  122. //
  123. // Histograms
  124. //
  125. TProfile *hdV2vsCent;
  126. TH2F *hV2vsCent;
  127. //
  128. // Trigger
  129. //
  130. unsigned int mCurrentTrigger;
  131. ClassDef(StFlow, 1)
  132. };
  133. #endif