StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtEvent.hh
1 /***************************************************************************
2  *
3  * $Id: StHbtEvent.hh,v 1.20 2003/01/17 16:46:22 mercedes 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  * HbtEvent is the "transient microDST" Objects of this class are
10  * generated from the input data by a Reader, and then presented to
11  * the Cuts of the various active Analyses.
12  *
13  ***************************************************************************
14  *
15  * $Log: StHbtEvent.hh,v $
16  * Revision 1.20 2003/01/17 16:46:22 mercedes
17  * StMuEvent::refMult() added
18  *
19  * Revision 1.19 2002/11/19 23:27:25 renault
20  * New event constructor to find V0 daughters informations(helix for average
21  * separation calculation)
22  *
23  * Revision 1.18 2002/03/21 18:49:31 laue
24  * updated for new MuDst reader
25  *
26  * Revision 1.17 2001/12/06 16:47:13 laue
27  * l3 trigger algorithm added
28  *
29  * Revision 1.14 2001/06/21 19:15:45 laue
30  * Modified fiels:
31  * CTH.hh : new constructor added
32  * StHbtEvent, StHbtKink, StHbtTrack : constructors from the persistent
33  * (TTree) classes added
34  * StHbtLikeSignAnalysis : minor changes, for debugging
35  * StHbtTypes: split into different files
36  * Added files: for the new TTree muDst's
37  * StExceptions.cxx StExceptions.hh StHbtEnumeration.hh
38  * StHbtHelix.hh StHbtHisto.hh StHbtString.hh StHbtTFile.hh
39  * StHbtTTreeEvent.cxx StHbtTTreeEvent.h StHbtTTreeKink.cxx
40  * StHbtTTreeKink.h StHbtTTreeTrack.cxx StHbtTTreeTrack.h
41  * StHbtTTreeV0.cxx StHbtTTreeV0.h StHbtVector.hh
42  *
43  * Revision 1.13 2001/06/04 19:09:52 rcwells
44  * Adding B-field, run number, and improved reaction plane functionality
45  *
46  * Revision 1.12 2001/05/25 23:23:59 lisa
47  * Added in StHbtKink stuff
48  *
49  * Revision 1.11 2001/05/15 15:30:16 rcwells
50  * Added magnetic field to StHbtEvent
51  *
52  * Revision 1.10 2000/08/31 22:31:31 laue
53  * StHbtAnalysis: output changed (a little bit less)
54  * StHbtEvent: new version, members for reference mult added
55  * StHbtIOBinary: new IO for new StHbtEvent version
56  * StHbtTypes: TTree typedef to StHbtTTree added
57  * StHbtVertexAnalysis: overflow and underflow added
58  *
59  * Revision 1.9 2000/05/25 21:54:16 laue
60  * RotateZ implemented. Rotates momentum and helix around the z axis
61  *
62  * Revision 1.7 2000/02/18 21:32:23 laue
63  * franksTrackCut changed. If mCharge is set to '0' there will be no cut
64  * on charge. This is important for front-loaded cuts.
65  *
66  * copy constructor implemented for StHbtEvent, StHbtTrack and StHbtV0.
67  *
68  * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h
69  * removed. We can now (CC5 on Solaris) use the versions (no D)
70  *
71  * Revision 1.6 1999/09/16 18:47:59 lisa
72  * replace placeholder HbtV0Track stuff with Helens StHbtV0 classes
73  *
74  * Revision 1.5 1999/09/03 22:39:15 lisa
75  * Readers now MUST have Report() methods and MAY have WriteHbtEvent() methods
76  *
77  * Revision 1.4 1999/07/19 14:24:06 hardtke
78  * modifications to implement uDST
79  *
80  * Revision 1.3 1999/07/06 22:33:22 lisa
81  * Adjusted all to work in pro and new - dev itself is broken
82  *
83  * Revision 1.2 1999/06/29 17:50:27 fisyak
84  * formal changes to account new StEvent, does not complie yet
85  *
86  * Revision 1.1.1.1 1999/06/29 16:02:57 lisa
87  * Installation of StHbtMaker
88  *
89  **************************************************************************/
90 
91 #ifndef StHbtEvent_hh
92 #define StHbtEvent_hh
93 
94 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
95 #include "StHbtMaker/Infrastructure/StHbtTrackCollection.hh"
96 #include "StHbtMaker/Infrastructure/StHbtV0Collection.hh"
97 #include "StHbtMaker/Infrastructure/StHbtXiCollection.hh"
98 #include "StHbtMaker/Infrastructure/StHbtKinkCollection.hh"
99 
100 class StHbtTrackCut;
101 class StHbtV0Cut;
102 class StHbtXiCut;
103 class StHbtKinkCut;
104 #ifdef __ROOT__
105 class StHbtTTreeEvent;
106 class StMuDst;
107 #endif
108 
110 public:
111  StHbtEvent();
112 #ifdef __ROOT__
113  StHbtEvent(const StHbtTTreeEvent* );
114  StHbtEvent(const StMuDst*, int trackType );
115  StHbtEvent(const StMuDst*, int trackType, bool readV0Daughters);
116 #endif
117  StHbtEvent(const StHbtEvent&, StHbtTrackCut* =0, StHbtV0Cut* =0, StHbtXiCut* =0, StHbtKinkCut* =0); // copy constructor with track and v0 cuts
118  ~StHbtEvent();
119  void RotateZ(const double);
120 
121  unsigned short EventNumber() const;
122  int RunNumber() const;
123  unsigned short CtbMult() const;
124  unsigned short ZdcAdcEast() const;
125  unsigned short ZdcAdcWest() const;
126  int NumberOfTpcHits() const;
127  unsigned short NumberOfTracks() const;
128  unsigned short NumberOfGoodTracks() const;
129  unsigned int UncorrectedNumberOfPositivePrimaries() const;
130  unsigned int UncorrectedNumberOfNegativePrimaries() const;
131  unsigned int UncorrectedNumberOfPrimaries() const;
132  float ReactionPlane(const int& wgt=0) const;
133  float ReactionPlaneError(const int& wgt=0) const;
134  float ReactionPlaneSubEventDifference(const int& wgt=0) const;
135  StHbtThreeVector PrimVertPos() const;
136  StHbtV0Collection* V0Collection() const;
137  StHbtXiCollection* XiCollection() const;
138  StHbtKinkCollection* KinkCollection() const;
139  StHbtTrackCollection* TrackCollection() const;
140  double MagneticField() const;
141  unsigned int TriggerWord() const;
142  unsigned int TriggerActionWord() const;
143  unsigned int L3TriggerAlgorithm(const unsigned int& l=0) const;
144 
145  void SetEventNumber(const unsigned short&);
146  void SetRunNumber(const int&);
147  void SetCtbMult(const unsigned short&);
148  void SetZdcAdcEast(const unsigned short&);
149  void SetZdcAdcWest(const unsigned short&);
150  void SetNumberOfTpcHits(const int&);
151  void SetNumberOfTracks(const unsigned short&);
152  void SetNumberOfGoodTracks(const unsigned short&);
153  void SetUncorrectedNumberOfPositivePrimaries(const unsigned int&);
154  void SetUncorrectedNumberOfNegativePrimaries(const unsigned int&);
155  void SetUncorrectedNumberOfPrimaries(const unsigned int&);
156  void SetReactionPlane(const float&,const int& wgt=0);
157  void SetReactionPlaneError(const float&, const int& wgt=0);
158  void SetReactionPlaneSubEventDifference(const float&, const int& wgt=0);
159  void SetPrimVertPos(const StHbtThreeVector&);
160  void SetMagneticField(const double&);
161  void SetTriggerWord(const unsigned int&);
162  void SetTriggerActionWord(const unsigned int&);
163  void SetL3TriggerAlgorithm(const unsigned int&, const unsigned int&);
164 
165  // For I/O of this object -- functions defined in StHbtIO.cc
166  friend ostream& operator<<(ostream& out, StHbtEvent& ev);
167  friend istream& operator>>(istream& in, StHbtEvent& ev);
168 
169 private:
170  unsigned short mEventNumber; //
171  unsigned short mRunNumber;
172  unsigned short mCtbMultiplicity; // Central Trigger Barrel
173  unsigned short mZdcAdc[2]; // Zero-degree calorimeter
174  //values east/west
175  int mTpcNhits; // number of TPC hits
176  unsigned short mNumberOfTracks; // total number of TPC tracks
177  unsigned short mNumberOfGoodTracks; // number of "good" tracks
178  unsigned int mUncorrectedNumberOfPositivePrimaries;
179  unsigned int mUncorrectedNumberOfNegativePrimaries;
180  unsigned int mUncorrectedNumberOfPrimaries;
181  float mReactionPlane[2]; //reaction plane/error //
182  float mReactionPlanePtWgt[2]; //reaction plane/error with pT weight //
183  double mMagneticField; // magnetic field in Z direction
184  unsigned int mTriggerWord;
185  unsigned int mTriggerActionWord;
186  unsigned int mL3TriggerAlgorithm[4];
187 
188  StHbtThreeVector mPrimVertPos;
189  StHbtTrackCollection* mTrackCollection;
190  StHbtV0Collection* mV0Collection;
191  StHbtXiCollection* mXiCollection;
192  StHbtKinkCollection* mKinkCollection;
193 
194  friend class StHbtIOBinary;
195  friend class StHbtTTreeEvent;
196  friend class StHbtTTreeTrack;
197  friend class StHbtTTreeV0;
198  friend class StHbtTTreeXi;
199  friend class StHbtTTreeKink;
200 };
201 
202 
203 
204 #endif