StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rotationEventCut.h
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 
33 
34 #include "StHbtMaker/Base/StHbtEventCut.h"
35 class HepRandom;
36 class HepJamesRandom;
37 class RandGauss;
38 
40 public:
41 
44  //~rotationEventCut();
45 
46  void SetEventRefMult(const int& lo,const int& hi);
47  void SetEventMult(const int& lo,const int& hi);
48  void SetEventMultGood(const int& lo,const int& hi);
49  void SetNumberOfTracks(const int& lo,const int& hi);
50  void SetNumberOfV0s(const int& lo,const int& hi);
51  void SetVertZPos(const float& lo, const float& hi);
52  void SetReactionPlaneError(const float& lo, const float& hi);
53  void SetL3TriggerAlgorithm(const unsigned int&);
54  void SetSmear(const float& s=0);
55  void RotationOn();
56  void RotationOff();
57  void RandomOn();
58  void RandomOff();
59  long NEventsPassed();
60  long NEventsFailed();
61 
62 
63  virtual StHbtString Report();
64  virtual bool Pass(const StHbtEvent*);
65 
66  rotationEventCut* Clone();
67 
68 private: // here are the quantities I want to cut on...
69  StHbtTrackCollection* ChargeList(StHbtTrackCollection*, const unsigned short);
70  StHbtTrackCollection* RemoveList(StHbtTrackCollection*, const float, const float);
71 
72  bool mRotation;
73  bool mRandom;
74  float mSmear;
75  int mEventRefMult[2]; // range of multiplicity
76  int mEventMult[2]; // range of multiplicity
77  int mEventMultGood[2]; // range of multiplicity
78  float mVertZPos[2]; // range of z-position of vertex
79  int mNumberOfTracks[2];
80  int mNumberOfV0s[2];
81  float mReactionPlaneError[2];
82  unsigned int mL3TriggerAlgorithm;
83 
84  long mNEventsPassed;
85  long mNEventsFailed;
86  HepJamesRandom* engine;
87  RandGauss* gauss;
88 
89 #ifdef __ROOT__
90  ClassDef(rotationEventCut, 1)
91 #endif
92 
93 };
94 
95 inline void rotationEventCut::SetEventRefMult(const int& lo, const int& hi){mEventRefMult[0]=lo; mEventRefMult[1]=hi;}
96 inline void rotationEventCut::SetEventMult(const int& lo, const int& hi){mEventMult[0]=lo; mEventMult[1]=hi;}
97 inline void rotationEventCut::SetEventMultGood(const int& lo, const int& hi){mEventMultGood[0]=lo; mEventMultGood[1]=hi;}
98 inline void rotationEventCut::SetNumberOfTracks(const int& lo, const int& hi){mNumberOfTracks[0]=lo; mNumberOfTracks[1]=hi;}
99 inline void rotationEventCut::SetNumberOfV0s(const int& lo, const int& hi){mNumberOfV0s[0]=lo; mNumberOfV0s[1]=hi;}
100 inline void rotationEventCut::SetVertZPos(const float& lo, const float& hi){mVertZPos[0]=lo; mVertZPos[1]=hi;}
101 inline void rotationEventCut::SetReactionPlaneError(const float& lo, const float& hi){mReactionPlaneError[0]=lo; mReactionPlaneError[1]=hi;}
102 inline void rotationEventCut::SetL3TriggerAlgorithm(const unsigned int& l3) {mL3TriggerAlgorithm=l3;}
103 inline void rotationEventCut::SetSmear(const float& s){ mSmear = s;}
104 inline void rotationEventCut::RotationOn() { mRotation = true; }
105 inline void rotationEventCut::RotationOff() { mRotation = false; }
106 inline void rotationEventCut::RandomOn() { mRandom = true; }
107 inline void rotationEventCut::RandomOff() { mRandom = false; }
108 inline long rotationEventCut::NEventsPassed() {return mNEventsPassed;}
109 inline long rotationEventCut::NEventsFailed() {return mNEventsFailed;}
110 inline rotationEventCut* rotationEventCut::Clone() { rotationEventCut* c = new rotationEventCut(*this); return c;}
111 inline rotationEventCut::rotationEventCut(rotationEventCut& c) : StHbtEventCut(c) {
112  mRotation = c.mRotation;
113  mRandom = c.mRandom;
114  mSmear = c.mSmear;
115  mEventMult[0] = c.mEventMult[0];
116  mEventMult[1] = c.mEventMult[1];
117  mEventRefMult[0] = c.mEventRefMult[0];
118  mEventRefMult[1] = c.mEventRefMult[1];
119  mEventMultGood[0] = c.mEventMultGood[0];
120  mEventMultGood[1] = c.mEventMultGood[1];
121  mVertZPos[0] = c.mVertZPos[0];
122  mVertZPos[1] = c.mVertZPos[1];
123  mNumberOfTracks[0] = c.mNumberOfTracks[0];
124  mNumberOfTracks[1] = c.mNumberOfTracks[1];
125  mNumberOfV0s[0] = c.mNumberOfV0s[0];
126  mNumberOfV0s[1] = c.mNumberOfV0s[1];
127  mReactionPlaneError[0] = c.mReactionPlaneError[0];
128  mReactionPlaneError[1] = c.mReactionPlaneError[1];
129  mL3TriggerAlgorithm = c.mL3TriggerAlgorithm;
130  mNEventsPassed = 0;
131  mNEventsFailed = 0;
132 }
133 
134 
135 #endif