StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructEvent.h
1 /**********************************************************************
2  *
3  * $Id: StEStructEvent.h,v 1.11 2012/11/16 21:24:37 prindle Exp $
4  *
5  * Author: Jeff Porter as rewrite of Ebye code by Jeff Reid
6  *
7  **********************************************************************
8  *
9  * Description: Event quantities + list of (primary) tracks
10  * Depending on option may use global tracks
11  *
12  **********************************************************************/
13 
14 #ifndef _StEStructEvent
15 #define _StEStructEvent
16 
17 #include "Stiostream.h"
18 #include "TObject.h"
19 #include "TClonesArray.h"
20 #include "StEStructTrackCollection.h"
21 #include "TVector2.h"
22 
23 class TH1F;
24 
25 class StEStructEvent : public TObject {
26 
27  private:
28 
29  Int_t mNtrack; // track number
30 
31  Int_t mEventID; // event ID
32  Int_t mRunID; // run ID
33  Int_t mEventTime; // event (unix) timestamp
34  Float_t mVx; // primary vertex position
35  Float_t mVy;
36  Float_t mVz;
37  Float_t mBField; // magnetic field (kilogauss as MuDst)
38 
39  // Int_t mCTBarray[32]; // coarse CTB array
40 
41  Float_t mZDCe; // ZDC East
42  Float_t mZDCw; // ZDC West
43  Float_t mZDCCoincidence; // ZDC Coincidence rate
44 
45  unsigned short mRefMult; // not used for determining centrality, stored for comparison
46  double mctbMult;
47  int mNumPrim; // from StEventSummary::numberOfGoodPrimaryTracks()
48 
49  TClonesArray *fTracks; //->
50 
51  // non-persistent data to merge old event and 2ptevent classes
52 
53  Double_t mCentrality; // centrality measure (depends on analysis)
54  StEStructTrackCollection *mTrackCollectionM;
55  StEStructTrackCollection *mTrackCollectionP;
56 
57  Float_t mPsi;
58  TH1F* mPhiWgt;
59 
60  public:
63  virtual ~StEStructEvent();
64 
65 
66  void Clear(Option_t *option ="");
67 
68  Int_t EventID() const { return mEventID; };
69  Int_t RunID() const { return mRunID; };
70  Int_t EventTime() const { return mEventTime; }
71 
72  Double_t Centrality() const { return mCentrality; };
73 
74  Float_t Vx() const { return mVx; }
75  Float_t Vy() const { return mVy; }
76  Float_t Vz() const { return mVz; }
77  Float_t VertexZ() const { return mVz; }
78  Float_t BField() const { return mBField; };
79 
80  Float_t ZDCe() const { return mZDCe; }
81  Float_t ZDCw() const { return mZDCw; }
82  Float_t ZDCCoincidence() const { return mZDCCoincidence; }
83 
84  unsigned short RefMult() const { return mRefMult; }
85  double ctbMult() const { return mctbMult; }
86  int NumPrim() const { return mNumPrim; }
87 
88  // Reaction-plane related functions
89  TVector2 Q(); // Calculates Q and returns it
90  void CalculatePsi(); // Calculates Psi and stores it in mPsi
91  Float_t Psi(); // Returns mPsi
92  void ShiftPhi(); // Loops over tracks, modifies Phi values by Psi
93  void SetPhiWgt(const char* weightFile); // Sets the phi weights
94 
95  void AddTrack(StEStructTrack* pEStructTrack);
96 
97  void SetEventID(const Int_t id) { mEventID = id; }
98  void SetRunID(const Int_t id) { mRunID = id; }
99 
100  void SetVx(const Float_t vx) { mVx = vx; }
101  void SetVy(const Float_t vy) { mVy = vy; }
102  void SetVz(const Float_t vz) { mVz = vz; }
103 
104  void SetVertex(const Float_t vx, const Float_t vy, const Float_t vz) {
105  mVx = vx; mVy = vy; mVz = vz; }
106  void SetBField(const float bfield){ mBField=bfield; };
107 
108  void SetZDCe(const Float_t zdce) { mZDCe = zdce; }
109  void SetZDCw(const Float_t zdcw) { mZDCw = zdcw; }
110  void SetZDCCoincidence(const Float_t zdccoincidence) { mZDCCoincidence = zdccoincidence; }
111 
112  void SetRefMult(const unsigned short mult) { mRefMult = mult; }
113  void SetctbMult(const double mult) { mctbMult = mult; }
114  void SetNumPrim(const int mult) { mNumPrim = mult; }
115 
116  Int_t Ntrack() { return mNtrack; }
117  Int_t Npos() { return (Int_t)mTrackCollectionP->size(); }
118  Int_t Nneg() { return (Int_t)mTrackCollectionM->size(); }
119 
120  TClonesArray *Tracks() { return fTracks; }
121 
122  virtual StEStructTrackCollection * TrackCollectionM() const;
123  virtual StEStructTrackCollection * TrackCollectionP() const;
124  void SetCentrality(const Double_t N) { mCentrality = N; }
125 
126  virtual void FillChargeCollections();
127 
128  ClassDef(StEStructEvent,1)
129 };
130 
131 
132 
133 #endif
134 
135 
136 /**********************************************************************
137  *
138  * $Log: StEStructEvent.h,v $
139  * Revision 1.11 2012/11/16 21:24:37 prindle
140  * Changes to support reading/writing of EStructEvent. Fill helix as transient and
141  * get BField from file (?).
142  *
143  * Revision 1.10 2011/08/02 20:36:57 prindle
144  * Event: modifications for ZDCCoincidence
145  * Track: big changes in evalPID. These should be superseded when TOF-dEdx
146  * space is understood better.
147  *
148  * Revision 1.9 2008/05/01 23:41:45 prindle
149  * Just different comments.
150  *
151  * Revision 1.8 2007/05/27 22:45:18 msd
152  * Added Npos() and Nneg().
153  *
154  * Revision 1.7 2006/04/26 18:49:56 dkettler
155  *
156  * Added reaction plane determination for the analysis
157  *
158  * Added reaction plane angle calculation
159  *
160  * Revision 1.6 2006/04/06 01:06:20 prindle
161  *
162  * Rationalization of centrality binning, as described in AnalysisMaker checkin.
163  *
164  * Revision 1.5 2006/04/04 22:12:30 porter
165  * Set up StEtructCentrality for use in event cut selection - includes impact para for generators
166  *
167  * Revision 1.4 2006/02/22 22:06:06 prindle
168  * Removed all references to multRef (?)
169  *
170  * Revision 1.3 2004/06/09 22:39:10 prindle
171  * Expanded centrality class.
172  * Call to set centrality from event reader.
173  *
174  *
175  * CVS :nded ----------------------------------------------------------------------
176  *
177  * Revision 1.2 2004/02/27 02:28:04 prindle
178  *
179  * Small modification to StEStructCentrality in EventMaker branch.
180  * Many modifications to Fluctuations branch, although that branch is not
181  * stable yet.
182  *
183  * Revision 1.1 2003/10/15 18:20:51 porter
184  * initial check in of Estruct Analysis maker codes.
185  *
186  *
187  *********************************************************************/
StEStructEvent()
Phi weights.