StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
helensEventCut.h
1 /***************************************************************************
2  *
3  * $Id: helensEventCut.h,v 1.1 2000/10/09 21:56:15 laue Exp $
4  *
5  * Author: Mike Lisa, Ohio State, lisa@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
11  *
12  ***************************************************************************
13  *
14  * $Log: helensEventCut.h,v $
15  * Revision 1.1 2000/10/09 21:56:15 laue
16  * Helens new cuts
17  *
18  * Revision 1.5 2000/03/23 22:57:28 laue
19  * Clone() function implemented
20  *
21  * Revision 1.4 2000/01/25 17:35:02 laue
22  * I. In order to run the stand alone version of the StHbtMaker the following
23  * changes have been done:
24  * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
25  * b) unnecessary includes of StMaker.h have been removed
26  * c) the subdirectory StHbtMaker/doc/Make has been created including everything
27  * needed for the stand alone version
28  *
29  * II. To reduce the amount of compiler warning
30  * a) some variables have been type casted
31  * b) some destructors have been declared as virtual
32  *
33  * Revision 1.3 1999/10/15 01:57:04 lisa
34  * Important enhancement of StHbtMaker - implement Franks CutMonitors
35  * ----------------------------------------------------------
36  * This means 3 new files in Infrastructure area (CutMonitor),
37  * several specific CutMonitor classes in the Cut area
38  * and a new base class in the Base area (StHbtCutMonitor).
39  * This means also changing all Cut Base class header files from .hh to .h
40  * so we have access to CutMonitor methods from Cint command line.
41  * This last means
42  * 1) files which include these header files are slightly modified
43  * 2) a side benefit: the TrackCuts and V0Cuts no longer need
44  * a SetMass() implementation in each Cut class, which was stupid.
45  * Also:
46  * -----
47  * Include Franks StHbtAssociationReader
48  * ** None of these changes should affect any user **
49  *
50  * Revision 1.2 1999/07/06 22:33:21 lisa
51  * Adjusted all to work in pro and new - dev itself is broken
52  *
53  * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
54  * Installation of StHbtMaker
55  *
56  **************************************************************************/
57 
58 #ifndef helensEventCut_hh
59 #define helensEventCut_hh
60 
61 #include "StHbtMaker/Base/StHbtEventCut.h"
62 #include <list>
63 
64 class StHbtTrkV0Match;
65 
66 #if !defined(ST_NO_NAMESPACES)
67 using std::list;
68 #endif
69 
70 
71 #ifdef ST_NO_TEMPLATE_DEF_ARGS
72 typedef list<StHbtTrkV0Match*, allocator<StHbtTrkV0Match*> > StHbtTrkV0MatchCollection;
73 typedef list<StHbtTrkV0Match*, allocator<StHbTrkV0Match*> >::iterator StHbtTrkV0Iterator;
74 #else
75 typedef list<StHbtTrkV0Match*> StHbtTrkV0MatchCollection;
76 typedef list<StHbtTrkV0Match*>::iterator StHbtTrkV0Iterator;
77 #endif
78 
79 
81 
82  public:
83  StHbtTrkV0Match(){ /* no-op*/};
84  StHbtTrkV0Match( const StHbtTrkV0Match&); //Copy Constructor
85  ~StHbtTrkV0Match(){/* no-op */};
86 
87  int TrkId() {return mTrkId;};
88  int V0Id() {return mV0Id;}
89  float dEdx(){return mdEdx;} ;
90  int Used() {return mUsed;};
91 
92  void SetTrkId( int i) {mTrkId=i;};
93  void SetV0Id( int i) {mV0Id=i;};
94  void SetdEdx( float x) {mdEdx=x;};
95  void SetUsed( int i) {mUsed=i;};
96 
97  protected:
98 
99  int mTrkId;
100  int mV0Id;
101  float mdEdx;
102  int mUsed;
103 };
104 
105 
107 
108 public:
109 
110  helensEventCut();
112 
113  void SetEventMult(const int& lo,const int& hi);
114  void SetVertZPos(const float& lo, const float& hi);
115  void SetV0Mult(const int& lo,const int& hi);
116  int NEventsPassed();
117  int NEventsFailed();
118  StHbtTrkV0MatchCollection* TrkV0MatchCollection();
119 
120  virtual StHbtString Report();
121  virtual bool Pass(const StHbtEvent*);
122 
123  helensEventCut* Clone();
124 
125 private: // here are the quantities I want to cut on...
126 
127  int mEventMult[2]; // range of multiplicity
128  float mVertZPos[2]; // range of z-position of vertex
129  int mV0Mult[2]; // range of v0 multiplicity
130 
131  long mNEventsPassed;
132  long mNEventsFailed;
133 
134  StHbtTrkV0MatchCollection* mTrkV0MatchCollection;
135 
136 #ifdef __ROOT__
137  ClassDef(helensEventCut, 1)
138 #endif
139 
140 };
141 
142 inline void helensEventCut::SetEventMult(const int& lo, const int& hi){mEventMult[0]=lo; mEventMult[1]=hi;}
143 inline void helensEventCut::SetV0Mult(const int& lo, const int& hi){mV0Mult[0]=lo; mV0Mult[1]=hi;}
144 inline void helensEventCut::SetVertZPos(const float& lo, const float& hi){mVertZPos[0]=lo; mVertZPos[1]=hi;}
145 inline int helensEventCut::NEventsPassed() {return mNEventsPassed;}
146 inline int helensEventCut::NEventsFailed() {return mNEventsFailed;}
147 inline helensEventCut* helensEventCut::Clone() { helensEventCut* c = new helensEventCut(*this); return c;}
148 inline StHbtTrkV0MatchCollection* helensEventCut::TrkV0MatchCollection(){return mTrkV0MatchCollection;}
149 inline helensEventCut::helensEventCut(helensEventCut& c) : StHbtEventCut(c) {
150  mEventMult[0] = c.mEventMult[0];
151  mEventMult[1] = c.mEventMult[1];
152  mVertZPos[0] = c.mVertZPos[0];
153  mVertZPos[1] = c.mVertZPos[1];
154  mV0Mult[0] = c.mV0Mult[0];
155  mV0Mult[1] = c.mV0Mult[1];
156  mNEventsPassed = 0;
157  mNEventsFailed = 0;
158 }
159 
160 
161 #endif