randomRotateEventCut.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /***************************************************************************
  2. *
  3. * $Id: randomRotateEventCut.h,v 1.1 2000/05/25 21:47:28 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: randomRotateEventCut.h,v $
  15. * Revision 1.1 2000/05/25 21:47:28 laue
  16. * new event cut which can be used to rotate an event around the z-axis
  17. *
  18. *
  19. **************************************************************************/
  20. #ifndef randomRotateEventCut_hh
  21. #define randomRotateEventCut_hh
  22. // do I need these lines ?
  23. //#ifndef StMaker_H
  24. //#include "StMaker.h"
  25. //#endif
  26. #include "StHbtMaker/Base/StHbtEventCut.h"
  27. class HepRandom;
  28. class randomRotateEventCut : public StHbtEventCut {
  29. public:
  30. randomRotateEventCut();
  31. randomRotateEventCut(randomRotateEventCut&);
  32. //~randomRotateEventCut();
  33. void SetEventMult(const int& lo,const int& hi);
  34. void SetVertZPos(const float& lo, const float& hi);
  35. void RotationOn();
  36. void RotationOff();
  37. long NEventsPassed();
  38. long NEventsFailed();
  39. virtual StHbtString Report();
  40. virtual bool Pass(const StHbtEvent*);
  41. randomRotateEventCut* Clone();
  42. private: // here are the quantities I want to cut on...
  43. bool mRotation;
  44. int mEventMult[2]; // range of multiplicity
  45. float mVertZPos[2]; // range of z-position of vertex
  46. long mNEventsPassed;
  47. long mNEventsFailed;
  48. HepRandom* engine; //!
  49. #ifdef __ROOT__
  50. ClassDef(randomRotateEventCut, 1)
  51. #endif
  52. };
  53. inline void randomRotateEventCut::SetEventMult(const int& lo, const int& hi){mEventMult[0]=lo; mEventMult[1]=hi;}
  54. inline void randomRotateEventCut::SetVertZPos(const float& lo, const float& hi){mVertZPos[0]=lo; mVertZPos[1]=hi;}
  55. inline void randomRotateEventCut::RotationOn() { mRotation = true; }
  56. inline void randomRotateEventCut::RotationOff() { mRotation = false; }
  57. inline long randomRotateEventCut::NEventsPassed() {return mNEventsPassed;}
  58. inline long randomRotateEventCut::NEventsFailed() {return mNEventsFailed;}
  59. inline randomRotateEventCut* randomRotateEventCut::Clone() { randomRotateEventCut* c = new randomRotateEventCut(*this); return c;}
  60. inline randomRotateEventCut::randomRotateEventCut(randomRotateEventCut& c) : StHbtEventCut(c) {
  61. mRotation = c.mRotation;
  62. mEventMult[0] = c.mEventMult[0];
  63. mEventMult[1] = c.mEventMult[1];
  64. mVertZPos[0] = c.mVertZPos[0];
  65. mVertZPos[1] = c.mVertZPos[1];
  66. mNEventsPassed = 0;
  67. mNEventsFailed = 0;
  68. }
  69. #endif