StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMiniMcEvent.h
Go to the documentation of this file.
1 
16 #ifndef StMiniMcEvent_H
17 #define StMiniMcEvent_H
18 
19 #include "TObject.h"
20 #include "TClonesArray.h"
21 #include "StMiniMcPair.h"
22 #include "StContamPair.h"
23 
24 enum Category { MC,MATCHED,MERGED,SPLIT,CONTAM,GHOST,MATGLOB};
25 
26 class StMiniMcEvent : public TObject {
27  public:
28  StMiniMcEvent();
29  virtual ~StMiniMcEvent();
30  void Clear(Option_t *option=""); // clear the tracks
31 
32  StTinyMcTrack* addMcTrack(StTinyMcTrack* mc=0);
33  StMiniMcPair* addTrackPair(StMiniMcPair* pair=0, Category K=MATCHED);
34  StContamPair* addContamPair(StContamPair* pair=0);
35 
36  // TClonesArray* tracks(Category);
37  TClonesArray* tracks(Category) const;
38 
39  Int_t eventId() const { return mEventId; }
40  Int_t runId() const { return mRunId; }
41  Int_t originMult() const { return mOriginMult; }
42  Int_t centralMult() const { return mCentralMult; }
43  Int_t centrality() const { return mCentrality; }
44  Int_t nUncorrectedNegativePrimaries() const { return mNUncorrectedNegativePrimaries; }
45  Int_t nUncorrectedPrimaries() const { return mNUncorrectedPrimaries; }
46  Int_t nUncorrectedGlobals() const { return mNUncorrectedGlobals; }
47  Int_t nFtpcWUncorrectedPrimaries() const { return mNFtpcWUncorrectedPrimaries; }
48  Int_t nFtpcEUncorrectedPrimaries() const { return mNFtpcEUncorrectedPrimaries; }
49  Int_t mcMult() const { return mMcMult; }
50  Int_t nMcNch() const { return mNMcNch; }
51  Int_t nMcFtpcWNch() const { return mNMcFtpcWNch; }
52  Int_t nMcFtpcENch() const { return mNMcFtpcENch; }
53  Int_t nMcHminus() const { return mNMcHminus; }
54  Int_t nMcGlobal() const { return mNMcGlobal; }
55  Int_t nMcGoodGlobal20() const { return mNMcGoodGlobal20; }
56  Int_t nRcGlobal() const { return mNRcGlobal; }
57  Int_t nRcGoodGlobal20() const { return mNRcGoodGlobal20; }
58  Float_t vertexX() const { return mVertexX; }
59  Float_t vertexY() const { return mVertexY; }
60  Float_t vertexZ() const { return mVertexZ; }
61  const Float_t*vertexCovMatrix() const { return &mVertexCovMatrix[0];}
62  Float_t mcVertexX() const { return mMcVertexX ; }
63  Float_t mcVertexY() const { return mMcVertexY ; }
64  Float_t mcVertexZ() const { return mMcVertexZ ; }
65  Float_t centerOfMassEnergy() const { return mCenterOfMassEnergy; }
66  Float_t magneticField() const { return mMagField ; }
67  Float_t backgroundRate() const { return mBackgroundRate ; }
68  Short_t beamMassNumberEast() const { return mBeamMassNumberEast; }
69  Short_t beamMassNumberWest() const { return mBeamMassNumberWest; }
70  Float_t ctb() const { return mCtb ; }
71  Float_t zdcE() const { return mZdcE ; }
72  Float_t zdcW() const { return mZdcW ; }
73  Int_t nMcTrack() const { return mNMcTrack ; }
74  Int_t nMatchedPair() const { return mNMatchedPair ; }
75  Int_t nMergedPair() const { return mNMergedPair ; }
76  Int_t nSplitPair() const { return mNSplitPair ; }
77  Int_t nGhostPair() const { return mNGhostPair ; }
78  Int_t nContamPair() const { return mNContamPair ; }
79 
80  float impact() const { return mImpact ; }
81  float impactPhi() const { return mImpactPhi ; }
82  float timeOffset() const { return mTimeOffset ; }
83 
84  void setEventId(Int_t val) { mEventId=val; }
85  void setRunId(Int_t val) { mRunId=val; }
86  void setOriginMult(Int_t val) { mOriginMult=val; }
87  void setCentralMult(Int_t val) { mCentralMult=val; }
88  void setCentrality(Int_t val) { mCentrality=val; }
89  void setNUncorrectedNegativePrimaries(Int_t val) { mNUncorrectedNegativePrimaries=val; }
90  void setNUncorrectedPrimaries(Int_t val) { mNUncorrectedPrimaries=val; }
91  void setNUncorrectedGlobals(Int_t val) { mNUncorrectedGlobals=val; }
92  void setNFtpcWUncorrectedPrimaries(Int_t val) { mNFtpcWUncorrectedPrimaries=val; }
93  void setNFtpcEUncorrectedPrimaries(Int_t val) { mNFtpcEUncorrectedPrimaries=val; }
94  void setMcMult(Int_t val) { mMcMult=val; }
95  void setNMcNch(Int_t val) { mNMcNch=val; }
96  void setNMcFtpcWNch(Int_t val) { mNMcFtpcWNch=val; }
97  void setNMcFtpcENch(Int_t val) { mNMcFtpcENch=val; }
98  void setNMcHminus(Int_t val) { mNMcHminus=val; }
99  void setNMcGlobal(Int_t val) { mNMcGlobal=val; }
100  void setNMcGoodGlobal20(Int_t val) { mNMcGoodGlobal20=val; }
101  void setNRcGlobal(Int_t val) { mNRcGlobal=val; }
102  void setNRcGoodGlobal20(Int_t val) { mNRcGoodGlobal20=val; }
103  void setVertexX(Float_t val) { mVertexX=val; }
104  void setVertexY(Float_t val) { mVertexY=val; }
105  void setVertexZ(Float_t val) { mVertexZ=val; }
106  void setVertexCovMatrix(Float_t *cov) {for (Int_t i = 0; i < 6; i++) mVertexCovMatrix[i] = cov[i];}
107  void setMcVertexX(Float_t val) { mMcVertexX=val; }
108  void setMcVertexY(Float_t val) { mMcVertexY=val; }
109  void setMcVertexZ(Float_t val) { mMcVertexZ=val; }
110  void setCenterOfMassEnergy(Float_t val) { mCenterOfMassEnergy=val; }
111  void setMagField(Float_t val) { mMagField=val; }
112  void setBackgroundRate(Float_t val) { mBackgroundRate=val; }
113  void setBeamMassNumberEast(Short_t val) { mBeamMassNumberEast=val; }
114  void setBeamMassNumberWest(Short_t val) { mBeamMassNumberWest=val; }
115  void setCtb(Float_t val) { mCtb=val; }
116  void setZdcE(Float_t val) { mZdcE=val; }
117  void setZdcW(Float_t val) { mZdcW=val; }
118  void setNMcTrack(Int_t val) { mNMcTrack =val; }
119  void setNMatchedPair(Int_t val) { mNMatchedPair =val; }
120  void setNMergedPair(Int_t val) { mNMergedPair =val; }
121  void setNSplitPair(Int_t val) { mNSplitPair =val; }
122  void setNGhostPair(Int_t val) { mNGhostPair =val; }
123  void setNContamPair(Int_t val) { mNContamPair =val; }
124 
125  void setImpact(float imp) { mImpact =imp ;}
126  void setImpactPhi(float imphi) { mImpactPhi =imphi;}
127  void setTimeOffset(float time) { mTimeOffset =time ;}
128 
129 
130  virtual void Print(Option_t *option="") const;
131 private:
132  //
133  // data members
134  //
135  Int_t mEventId;
136  Int_t mRunId; // set to 0 for simulations
137  Int_t mOriginMult; // StEvent::primaryVertex(0)->numberOfDaughters()
138  Int_t mCentralMult; // reco, primary trk, flag>0, |eta|<0.75
139  Int_t mCentrality; // centrality bin, Nch cuts, P02gd, 2k2
140  Int_t mNUncorrectedNegativePrimaries; // from StuRefMult
141  Int_t mNUncorrectedPrimaries; // from StuRefMult
142  Int_t mNUncorrectedGlobals; // reco, globals, glTrk->helix->dist(vtx)<3, gl.fitPts>=10, -0.5 < eta < 0.5
143  Int_t mNFtpcWUncorrectedPrimaries; // reco, primaries, flag>0, glTrk->helix->dist(vtx)<3, prim.pt<3, gl.fitPts>=5, 2.8 < eta < 3.8
144  Int_t mNFtpcEUncorrectedPrimaries; // reco, primaries, flag>0, glTrk->helix->dist(vtx)<3, prim.pt<3, gl.fitPts>=5,-2.8 > eta >-3.8
145  Int_t mMcMult; // embedding: n mc tracks; (StMcEvent::numberOfPrimaryTracks()
146  // simulation: same as mOriginMult
147  Int_t mNMcNch; // mc, primary, charge!=0, |eta|<0.5
148  Int_t mNMcFtpcWNch; // mc, primary, charge!=0, 2.8 < eta < 3.8
149  Int_t mNMcFtpcENch; // mc, primary, charge!=0,-2.8 > eta >-3.8
150  Int_t mNMcHminus; // mc, primary, charg <0, |eta|<0.5
151 
152  Int_t mNMcGlobal; // mc, primary, |eta|<4
153  Int_t mNMcGoodGlobal20; // mc, primary, |eta|<4, MC TPC hits >=20
154  Int_t mNRcGlobal; // reco, primaries flag > 0
155  Int_t mNRcGoodGlobal20; // reco, primaries flag > 0, 20 fit hits
156 
157  Float_t mImpact; // Impact parameter
158  Float_t mImpactPhi; // Phi Impact parameter, azimuth of reaction plane
159  Float_t mTimeOffset; // time offset in seconds wrt trigger event
160 
161  Float_t mVertexX;
162  Float_t mVertexY; //
163  Float_t mVertexZ;
164  Float_t mVertexCovMatrix[6];
165  Float_t mMcVertexX;
166  Float_t mMcVertexY;
167  Float_t mMcVertexZ;
168 
169  Float_t mMagField; // in kGauss
170 
171  Float_t mCenterOfMassEnergy;
172  Float_t mBackgroundRate;
173  Short_t mBeamMassNumberEast;
174  Short_t mBeamMassNumberWest;
175 
176  Float_t mCtb;
177  Float_t mZdcE;
178  Float_t mZdcW;
179 
180  //
181  // for root reasons, even though ghosts are just the rc tracks,
182  // save it as a StMiniMcPair ...
183 
184  Int_t mNMcTrack;
185  Int_t mNMatchedPair;
186  Int_t mNMergedPair;
187  Int_t mNSplitPair;
188  Int_t mNGhostPair;
189  Int_t mNContamPair;
190  Int_t mNMatGlobPair;
191 
192  TClonesArray* mMcTracks;
193  TClonesArray* mMatchedPairs;
194  TClonesArray* mMergedPairs;
195  TClonesArray* mSplitPairs;
196  TClonesArray* mGhostPairs;
197  TClonesArray* mContamPairs;
198  TClonesArray* mMatGlobPairs;
199  static Int_t mSFirst;
200 
201  ClassDef(StMiniMcEvent,5)
202 };
203 
204 #endif
205 
206 
207 //
208 // $Log: StMiniMcEvent.h,v $
209 // Revision 1.9 2012/03/15 23:37:20 perev
210 // Uncorrected globals added(Chris)
211 //
212 // Revision 1.8 2011/03/22 00:31:48 perev
213 // Added impact,phi impact & trigger time
214 //
215 // Revision 1.7 2007/05/21 16:17:16 fisyak
216 // Increament ClassDef, thanks to Adam Kocoloski
217 //
218 // Revision 1.6 2007/02/23 17:07:00 fisyak
219 // Add Ssd and DCA
220 //
221 // Revision 1.5 2004/01/26 13:58:18 calderon
222 // Introduction of global matched branch.
223 //
224 // Revision 1.4 2003/07/09 01:05:51 calderon
225 // Added the FTPC reference multiplicity, East and West
226 // Added various other multiplicity definitions, good globals reco and MC,
227 // and MC Nch and Nh-.
228 // Keep data members private and provide setters and getters
229 //
230 // Revision 1.3 2003/05/08 02:09:20 calderon
231 // Added data members for svt and ftpc fit points for StTinyRcTrack.
232 // Added data members for svt and ftpc hits for StTinyMcTrack.
233 // Added methods to calculate px, py, and p from the available pt, phi and pz, for
234 // global and primary momenta and also for monte carlo momentum.
235 // Cleaned up includes in StMiniMcEvent.
236 //
237 // Revision 1.2 2002/06/06 15:14:13 calderon
238 // the comment about the magnetic field said it is in tesla, but it is actually
239 // in kGauss, so I modified the comment to reflect this
240 //
241 // Revision 1.1 2002/05/30 01:20:57 calderon
242 // Classes for use in a general framework for extracting efficiencies
243 // from both embedding and full simulations
244 // (after GSTAR+TRS+StEvent+StMcEvent+StAssociationMaker)
245 // so that the information of the track matches gets stored persistently.
246 //
247 //
for simplicity, this contains both the rc and mc track information.
Definition of Pair for Contamination tracks (secondary tracks, weak decay tracks) ...