rotationEventCut.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /***************************************************************************
  2. *
  3. * $Id: rotationEventCut.h,v 1.3 2001/12/05 15:13:22 laue Exp $
  4. *
  5. * Author: Frank Laue, Ohio State, laue@mps.ohio-state.edu
  6. ***************************************************************************
  7. *
  8. * Description: part of STAR HBT Framework: StHbtMaker package
  9. * A simple event-wise cut that selects on multiplicity and z-position
  10. * of primary vertex and rotates the event around the z-axis
  11. *
  12. ***************************************************************************
  13. *
  14. * $Log: rotationEventCut.h,v $
  15. * Revision 1.3 2001/12/05 15:13:22 laue
  16. * rotationEventCut.h: cut on l3 trigger algorithm
  17. * franksXiCut.cxx: updates
  18. *
  19. * Revision 1.2 2001/06/21 19:09:44 laue
  20. * updated to match changed base classes
  21. *
  22. * Revision 1.1 2000/06/14 18:22:33 laue
  23. * New event cut
  24. *
  25. * Revision 1.1 2000/05/25 21:47:28 laue
  26. * new event cut which can be used to rotate an event around the z-axis
  27. *
  28. *
  29. **************************************************************************/
  30. #ifndef rotationEventCut_hh
  31. #define rotationEventCut_hh
  32. #include "StHbtMaker/Base/StHbtEventCut.h"
  33. class HepRandom;
  34. class HepJamesRandom;
  35. class RandGauss;
  36. class rotationEventCut : public StHbtEventCut {
  37. public:
  38. rotationEventCut();
  39. rotationEventCut(rotationEventCut&);
  40. //~rotationEventCut();
  41. void SetEventRefMult(const int& lo,const int& hi);
  42. void SetEventMult(const int& lo,const int& hi);
  43. void SetEventMultGood(const int& lo,const int& hi);
  44. void SetNumberOfTracks(const int& lo,const int& hi);
  45. void SetNumberOfV0s(const int& lo,const int& hi);
  46. void SetVertZPos(const float& lo, const float& hi);
  47. void SetReactionPlaneError(const float& lo, const float& hi);
  48. void SetL3TriggerAlgorithm(const unsigned int&);
  49. void SetSmear(const float& s=0);
  50. void RotationOn();
  51. void RotationOff();
  52. void RandomOn();
  53. void RandomOff();
  54. long NEventsPassed();
  55. long NEventsFailed();
  56. virtual StHbtString Report();
  57. virtual bool Pass(const StHbtEvent*);
  58. rotationEventCut* Clone();
  59. private: // here are the quantities I want to cut on...
  60. StHbtTrackCollection* ChargeList(StHbtTrackCollection*, const unsigned short);
  61. StHbtTrackCollection* RemoveList(StHbtTrackCollection*, const float, const float);
  62. bool mRotation;
  63. bool mRandom;
  64. float mSmear;
  65. int mEventRefMult[2]; // range of multiplicity
  66. int mEventMult[2]; // range of multiplicity
  67. int mEventMultGood[2]; // range of multiplicity
  68. float mVertZPos[2]; // range of z-position of vertex
  69. int mNumberOfTracks[2];
  70. int mNumberOfV0s[2];
  71. float mReactionPlaneError[2];
  72. unsigned int mL3TriggerAlgorithm;
  73. long mNEventsPassed;
  74. long mNEventsFailed;
  75. HepJamesRandom* engine; //!
  76. RandGauss* gauss; //!
  77. #ifdef __ROOT__
  78. ClassDef(rotationEventCut, 1)
  79. #endif
  80. };
  81. inline void rotationEventCut::SetEventRefMult(const int& lo, const int& hi){mEventRefMult[0]=lo; mEventRefMult[1]=hi;}
  82. inline void rotationEventCut::SetEventMult(const int& lo, const int& hi){mEventMult[0]=lo; mEventMult[1]=hi;}
  83. inline void rotationEventCut::SetEventMultGood(const int& lo, const int& hi){mEventMultGood[0]=lo; mEventMultGood[1]=hi;}
  84. inline void rotationEventCut::SetNumberOfTracks(const int& lo, const int& hi){mNumberOfTracks[0]=lo; mNumberOfTracks[1]=hi;}
  85. inline void rotationEventCut::SetNumberOfV0s(const int& lo, const int& hi){mNumberOfV0s[0]=lo; mNumberOfV0s[1]=hi;}
  86. inline void rotationEventCut::SetVertZPos(const float& lo, const float& hi){mVertZPos[0]=lo; mVertZPos[1]=hi;}
  87. inline void rotationEventCut::SetReactionPlaneError(const float& lo, const float& hi){mReactionPlaneError[0]=lo; mReactionPlaneError[1]=hi;}
  88. inline void rotationEventCut::SetL3TriggerAlgorithm(const unsigned int& l3) {mL3TriggerAlgorithm=l3;}
  89. inline void rotationEventCut::SetSmear(const float& s){ mSmear = s;}
  90. inline void rotationEventCut::RotationOn() { mRotation = true; }
  91. inline void rotationEventCut::RotationOff() { mRotation = false; }
  92. inline void rotationEventCut::RandomOn() { mRandom = true; }
  93. inline void rotationEventCut::RandomOff() { mRandom = false; }
  94. inline long rotationEventCut::NEventsPassed() {return mNEventsPassed;}
  95. inline long rotationEventCut::NEventsFailed() {return mNEventsFailed;}
  96. inline rotationEventCut* rotationEventCut::Clone() { rotationEventCut* c = new rotationEventCut(*this); return c;}
  97. inline rotationEventCut::rotationEventCut(rotationEventCut& c) : StHbtEventCut(c) {
  98. mRotation = c.mRotation;
  99. mRandom = c.mRandom;
  100. mSmear = c.mSmear;
  101. mEventMult[0] = c.mEventMult[0];
  102. mEventMult[1] = c.mEventMult[1];
  103. mEventRefMult[0] = c.mEventRefMult[0];
  104. mEventRefMult[1] = c.mEventRefMult[1];
  105. mEventMultGood[0] = c.mEventMultGood[0];
  106. mEventMultGood[1] = c.mEventMultGood[1];
  107. mVertZPos[0] = c.mVertZPos[0];
  108. mVertZPos[1] = c.mVertZPos[1];
  109. mNumberOfTracks[0] = c.mNumberOfTracks[0];
  110. mNumberOfTracks[1] = c.mNumberOfTracks[1];
  111. mNumberOfV0s[0] = c.mNumberOfV0s[0];
  112. mNumberOfV0s[1] = c.mNumberOfV0s[1];
  113. mReactionPlaneError[0] = c.mReactionPlaneError[0];
  114. mReactionPlaneError[1] = c.mReactionPlaneError[1];
  115. mL3TriggerAlgorithm = c.mL3TriggerAlgorithm;
  116. mNEventsPassed = 0;
  117. mNEventsFailed = 0;
  118. }
  119. #endif