MpdFemtoBasicEventCut.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /**
  2. * \class MpdFemtoBasicEventCut
  3. * \brief The basic cut for events
  4. *
  5. * Cuts on event multiplicity, z-vertex position, trigger and other event variables
  6. *
  7. * \author Grigory Nigmatkulov (NRNU MEPhI)
  8. * \date May 18, 2019
  9. * \email nigmatkulov@gmail.com
  10. */
  11. #ifndef MpdFemtoBasicEventCut_h
  12. #define MpdFemtoBasicEventCut_h
  13. // C++ headers
  14. #include <iostream>
  15. #include <vector>
  16. // MpdFemtoMaker headers
  17. // Base
  18. #include "MpdFemtoBaseEventCut.h"
  19. // Infrastructure
  20. #include "MpdFemtoEvent.h"
  21. #include "MpdFemtoString.h"
  22. // ROOT headers
  23. #include "TList.h"
  24. #include "TString.h"
  25. //_________________
  26. class MpdFemtoBasicEventCut : public MpdFemtoBaseEventCut {
  27. public:
  28. /// Constructor
  29. MpdFemtoBasicEventCut();
  30. /// Copy contructor
  31. MpdFemtoBasicEventCut(const MpdFemtoBasicEventCut& c);
  32. /// Assignment operator
  33. MpdFemtoBasicEventCut& operator=(const MpdFemtoBasicEventCut& c);
  34. /// Destructor
  35. virtual ~MpdFemtoBasicEventCut();
  36. /// Check bad run flag
  37. void setCheckBadRun(bool check) {
  38. mCheckBadRun = check;
  39. }
  40. /// Set min and max acceptable event multiplicity
  41. void setEventMult(const int& lo, const int& hi);
  42. /// Set min and max acceptable vertex z-coordinate
  43. void setVertZPos(const float& lo, const float& hi) {
  44. mVertZPos[0] = lo;
  45. mVertZPos[1] = hi;
  46. }
  47. /// Set min and max acceptable (Vz-VpdVz) values
  48. void setVpdVzDiff(const float& lo, const float& hi) {
  49. mVpdVzDiff[0] = lo;
  50. mVpdVzDiff[1] = hi;
  51. }
  52. /// Set x shift of primary vertex, min and max acceptrable
  53. /// radial position of the vertex
  54. void setVertXShift(const float& shift) {
  55. mVertXShift = shift;
  56. }
  57. /// Set y shift of primary vertex, min and max acceptrable
  58. /// radial position of the vertex
  59. void setVertYShift(const float& shift) {
  60. mVertYShift = shift;
  61. }
  62. /// Set min and max acceptable radial position of primary vertex
  63. void setVertRPos(const float& lo, const float& hi) {
  64. mVertRPos[0] = lo;
  65. mVertRPos[1] = hi;
  66. }
  67. /// Set min and max acceptable values of sphericity
  68. void setSphericity(const float& lo, const float& hi) {
  69. mSphericity[0] = lo;
  70. mSphericity[1] = hi;
  71. }
  72. /// Set min and max acceptable TOF tray multiplicity
  73. void setBTofTrayMult(const int& lo, const int& hi);
  74. /// Set min and max acceptable TOF-matched tracks
  75. void setBTofMatchMult(const int& lo, const int& hi);
  76. /// Number of events passed
  77. int nEventsPassed() const {
  78. return mNEventsPassed;
  79. }
  80. /// Number of events failed
  81. int nEventsFailed() const {
  82. return mNEventsFailed;
  83. }
  84. /// Add trigger to select
  85. void addTriggerId(const unsigned int& id);
  86. /// Add trigger to select
  87. void setTriggerId(const unsigned int& id) {
  88. addTriggerId(id);
  89. }
  90. /// Set the min and max allowed event plane angle
  91. void setEventPlaneAngle(const float& lo, const float& hi) {
  92. mPsiEP[0] = lo;
  93. mPsiEP[1] = hi;
  94. }
  95. /// Set the min and max allowed event plane angle
  96. void setEPAngle(const float& lo, const float& hi) {
  97. setEventPlaneAngle(lo, hi);
  98. }
  99. /// Set impact parameter to select
  100. void setImpactParameter(const float& lo, const float& hi) {
  101. mImpactPar[0] = lo;
  102. mImpactPar[1] = hi;
  103. }
  104. /// Set centrality bins to select (out of 9)
  105. void setCent9(const int& lo, const int& hi);
  106. virtual TList* appendSettings(TList*, const TString& prefix = "") const;
  107. // Construct report
  108. virtual MpdFemtoString report();
  109. /// Event cut
  110. virtual bool pass(const MpdFemtoEvent* event);
  111. /// Clone event cut
  112. virtual MpdFemtoBasicEventCut* clone() const {
  113. MpdFemtoBasicEventCut* c = new MpdFemtoBasicEventCut(*this);
  114. return c;
  115. }
  116. /// Print cut information
  117. void setVerbose(const bool& verbose) {
  118. mVerbose = verbose;
  119. }
  120. private:
  121. /// Check bad run flag. By default it is true (see constructor for more info)
  122. bool mCheckBadRun;
  123. /// Range of multiplicity
  124. short mRefMult[2];
  125. /// Range of z-position of vertex
  126. float mVertZPos[2];
  127. /// Range of (Vz - VpdVz) of vertex
  128. float mVpdVzDiff[2];
  129. /// Shift of the primary vertex in x direction
  130. float mVertXShift;
  131. /// Shift of the primary vertex in y direction
  132. float mVertYShift;
  133. /// Min/max values of the primary vertex radial position
  134. float mVertRPos[2];
  135. /// Range of min and max values of event sphericity
  136. float mSphericity[2];
  137. /// Range of TOF tray multiplicity
  138. short mBTofTrayMult[2];
  139. /// Range of TOF matched tracks (multplicity)
  140. short mBTofMatch[2];
  141. // Range of centralities
  142. short mCent9[2];
  143. /// Range of vzero ep angle
  144. float mPsiEP[2];
  145. /// Number of events checked by this cut that passed
  146. unsigned int mNEventsPassed;
  147. /// Number of events checked by this cut that failed
  148. unsigned int mNEventsFailed;
  149. /// If set, only given trigger will be selected
  150. std::vector<unsigned int> mTriggersToSelect;
  151. /// Impact parameter (for simulation studies only)
  152. float mImpactPar[2];
  153. /// Print cut information
  154. bool mVerbose;
  155. /// Method that looks at the bad run lists
  156. bool isInBadRunList(int runNumber);
  157. /// Bad run list for Au+Au at 7 GeV/n (BES-I)
  158. static const std::vector<unsigned int> bad_run_list_7gev;
  159. /// Bad run list for Au+Au at 11 GeV/n (BES-I)
  160. static const std::vector<unsigned int> bad_run_list_11gev;
  161. /// Bad run list for Au+Au at 14 GeV/n (BES-I)
  162. static const std::vector<unsigned int> bad_run_list_14gev;
  163. /// Bad run list for Au+Au at 19 GeV/n (BES-I)
  164. static const std::vector<unsigned int> bad_run_list_19gev;
  165. /// Bad run list for Au+Au at 27 GeV/n (BES-I)
  166. static const std::vector<unsigned int> bad_run_list_27gev;
  167. /// Bad run list for Au+Au at 39 GeV/n (BES-I)
  168. static const std::vector<unsigned int> bad_run_list_39gev;
  169. /// Bad run list for Au+Au at 62 GeV/n (BES-I)
  170. static const std::vector<unsigned int> bad_run_list_62gev;
  171. /// Bad run list for Au+Au at 200 GeV/n (BES-I)
  172. static const std::vector<unsigned int> bad_run_list_200gev;
  173. /// Bad run list for d+Au at 200 GeV/n (Run16)
  174. static const std::vector<unsigned int> bad_run_list_dau200_2016;
  175. /// Bad run list for 3He+Au at 200 GeV/n (Run14)
  176. static const std::vector<unsigned int> bad_run_list_he3au200_2014;
  177. ClassDef(MpdFemtoBasicEventCut, 1)
  178. };
  179. #endif // MpdFemtoBasicEventCut_h