StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTinyRcTrack.h
Go to the documentation of this file.
1 
16 #ifndef StTinyRcTrack_H
17 #define StTinyRcTrack_H
18 
19 #include "TObject.h"
20 #include <cmath>
21 
23  public:
24  StTinyRcTrack();
25  virtual ~StTinyRcTrack() {}
26  void setValidGl() {mIsValidGl = 1;}
27  void setValidPr() {mIsValidPr = 1;}
28  void setPtPr(Float_t val){ mPtPr=val; }
29  void setPzPr(Float_t val){ mPzPr=val; }
30  void setEtaPr(Float_t val) { mEtaPr=val; }
31  void setPhiPr(Float_t val) { mPhiPr=val; }
32  void setDca(int idca) { mIsDca=idca; }
33  void setDcaPr(Float_t val) { mDcaPr=val; }
34 //vp void setDca00(Float_t val) { mDca00=val; }
35  void setDcaXYPr(Float_t val) { mDcaXYPr=val; }
36  void setDcaZPr(Float_t val) { mDcaZPrMcV=val; }
37  void setDcaXYPrMcV(Float_t val) { mDcaXYPrMcV=val; }
38  void setDcaZPrMcV(Float_t val) { mDcaZPr=val; }
39  void setCurvPr(Float_t val) {mCurvPr=val; }
40  void setTanLPr(Float_t val) {mTanLPr=val; }
41  void setErrPr(Float_t val[5]) { for (short j=0; j<5; ++j) mErrP[j] = val[j]; }
42 
43  void setChi2Pr(Float_t val) { mChi2Pr=val; }
44  void setFlag(Short_t val) { mFlag=val; }
45  void setDedx(Float_t val) { mDedx=val; }
46 
47  void setPtGl(Float_t val){ mPtGl=val; }
48  void setPzGl(Float_t val){ mPzGl=val; }
49  void setEtaGl(Float_t val) { mEtaGl=val; }
50  void setPhiGl(Float_t val) { mPhiGl=val; }
51  void setDca00(Float_t val) { mDca00=val; }
52  void setDcaGl(Float_t val) { mDcaGl=val; }
53  void setDcaXYGl(Float_t val) { mDcaXYGl=val; }
54  void setDcaZGl(Float_t val) { mDcaZGl=val; }
55  void setDcaXYGlMcV(Float_t val) { mDcaXYGlMcV=val; }
56  void setDcaZGlMcV(Float_t val) { mDcaZGlMcV=val; }
57  void setCurvGl(Float_t val) { mCurvGl=val; }
58  void setTanLGl(Float_t val) { mTanLGl=val; }
59  void setErrGl(Float_t val[5]) { for (short j=0; j<5; ++j) mErrG[j] = val[j]; }
60 
61  void setPidPion(Float_t val) { mPidPion=val; }
62  void setPidProton(Float_t val) { mPidProton=val; }
63  void setPidKaon(Float_t val) { mPidKaon=val; }
64  void setPidElectron(Float_t val) { mPidElectron=val; }
65 
66  void setFirstZ(Float_t val) { mFirstZ=val; }
67  void setLastZ(Float_t val) { mLastZ=val; }
68  void setFirstPadrow(Short_t val) { mFirstPadrow=val; }
69  void setLastPadrow(Short_t val) { mLastPadrow=val; }
70  void setFirstFitPadrow(Short_t val){ mFirstFitPadrow=val; }
71  void setLastFitPadrow(Short_t val) { mLastFitPadrow=val; }
72 
73  void setRecoKey(Int_t val) { mRecoKey=val; }
74  void setFirstSector(Short_t val) { mFirstSector=val; }
75  void setLastSector(Short_t val) { mLastSector=val; }
76  void setFitPts(Short_t val) { mFitPts=val; }
77  void setFitFtpc(Short_t val) { mFitFtpc=val; }
78  void setFitSvt(Short_t val) { mFitSvt=val; }
79  void setFitSsd(Short_t val) { mFitSsd=val; }
80  void setDedxPts(Short_t val) { mDedxPts=val; }
81  void setAllPts(Short_t val) { mAllPts=val; }
82  void setCharge(Short_t val) { mCharge=val; }
83  void setNAssocMc(Short_t val) { mNAssocMc=val; }
84  void setNPossible(Short_t val) { mNPossible=val; }
85 
86  void setEmcTowerAdc(Short_t val, size_t index) { if (index<3) mEmcTowerAdc[index]=val; }
87  void setEmcEnergyRcHit(Float_t val, size_t index) { if (index<3) mEmcEnergyRcHit[index]=val; }
88  void setEmcSoftIdHiTowerRc(Short_t val, size_t index) { if (index<3) mEmcSoftIdHiTowerRc[index]=val; }
89  void setSeedQuality(UShort_t qa) {mSeedQA = qa;}
90  float ptPr()const { return mPtPr; }
91  float pxPr()const { return mPtPr*cos(mPhiPr); }
92  float pyPr()const { return mPtPr*sin(mPhiPr); }
93  float pzPr()const { return mPzPr; }
94  float pPr()const { return ::sqrt((mPtPr*mPtPr) + (mPzPr*mPzPr)); }
95  float etaPr() const { return mEtaPr; }
96  float phiPr() const { return mPhiPr; }
97  float dcaPr() const { return mDcaPr; }
98  float dcaXYPr() const { return mDcaXYPr; }
99  float dcaZPr() const { return mDcaZPr; }
100  float curvPr() const { return mCurvPr; }
101  float tanLPr() const { return mTanLPr; }
102  float errPr(size_t i) const { return (i<5) ? mErrP[i] : 0; }
103 
104  float chi2Pr() const { return mChi2Pr; }
105  short flag() const { return mFlag; }
106  float dedx() const { return mDedx; }
107 
108  float ptGl()const { return mPtGl; }
109  float pxGl()const { return mPtGl*cos(mPhiGl); }
110  float pyGl()const { return mPtGl*sin(mPhiGl); }
111  float pzGl()const { return mPzGl; }
112  float pGl()const { return ::sqrt((mPtGl*mPtGl) + (mPzGl*mPzGl)); }
113  float etaGl() const { return mEtaGl; }
114  float phiGl() const { return mPhiGl; }
115  float dcaGl() const { return mDcaGl; }
116  float dcaXYGl() const { return mDcaXYGl; }
117  float dcaZGl() const { return mDcaZGl; }
118  float curvGl() const { return mCurvGl; }
119  float tanLGl() const { return mTanLGl; }
120  float errGl(size_t i) const { return (i<5) ? mErrG[i] : 0; }
121 
122  float pidPion() const { return mPidPion; }
123  float pidProton() const { return mPidProton; }
124  float pidKaon() const { return mPidKaon; }
125  float pidElectron() const { return mPidElectron; }
126 
127  float firstZ() const { return mFirstZ; }
128  float lastZ() const { return mLastZ; }
129  short firstPadrow() const { return mFirstPadrow; }
130  short lastPadrow() const { return mLastPadrow; }
131  short firstFitPadrow()const { return mFirstFitPadrow; }
132  short fastFitPadrow() const { return mLastFitPadrow; }
133 
134  int recoKey() const { return mRecoKey; }
135  short firstSector() const { return mFirstSector; }
136  short lastSector() const { return mLastSector; }
137  short fitPts() const { return mFitPts; }
138  short fitPtsFtpc() const { return mFitFtpc; }
139  short fitPtsSvt() const { return mFitSvt; }
140  short fitPtsSsd() const { return mFitSsd; }
141  short dedxPts() const { return mDedxPts; }
142  short allPts() const { return mAllPts; }
143  short charge() const { return mCharge; }
144  short nAssocMc() const { return mNAssocMc; }
145  short nPossiblePts() const { return mNPossible; }
146 
147  short emcTowerAdc(size_t index) const { if (index<3) return mEmcTowerAdc[index]; else return -999;}
148  float emcEnergyRcHit(size_t index) const {if (index<3) return mEmcEnergyRcHit[index]; else return -999;}
149  short emcSoftIdHiTowerRc(size_t index) const { if (index<3) return mEmcSoftIdHiTowerRc[index]; else return -999;}
150  UShort_t seedQuality() {return mSeedQA;}
151 
152  virtual void Print(Option_t *option="") const;
153 private:
154  // primary stuff
155  Char_t mIsValidGl;
156  Char_t mIsDca;
157  Float_t mPtPr;
158  Float_t mPzPr;
159  Float_t mEtaPr;
160  Float_t mPhiPr;
161  Float_t mDcaPr; // 3D distance to primary vertex from primary track
162  Float_t mDcaXYPr; // 2D dca with respect to primary vertex
163  Float_t mDcaZPr; // Z distance to -"-
164 //vp Float_t mDca00; // 2D dca with respect to x=0,y=0
165  Float_t mDcaXYPrMcV;// 2D dca with respect to MC vertex
166  Float_t mDcaZPrMcV; // Z distance -"-
167  Float_t mCurvPr;
168  Float_t mTanLPr;
169 
170  // the indices of the error matrix correspond to
171  // 0 - error on y (track position along pad row direction)
172  // 1 - error on z (track position along drift direction)
173  // 2 - error on C*x0 where C is the track curvature and x0 is the helix center position along x
174  // 3 - error on C, the curvature
175  // 4 - error on tan(dipAngle)
176  Float_t mErrP[5];
177 
178  Float_t mChi2Pr;
179  Short_t mFlag;
180  Float_t mDedx;
181  // global stuff
182  Float_t mPtGl;
183  Float_t mPzGl;
184  Float_t mEtaGl;
185  Float_t mPhiGl;
186  Float_t mDca00; // 2D DCA to x=y=0
187  Float_t mDcaGl; // 3D distance to primary vertex from global trazck
188  Float_t mDcaXYGl; // 2D dca with respect to primary vertex
189  Float_t mDcaZGl; // Z distance to -"-
190  Float_t mDcaXYGlMcV; // 2D dca with respect to MC vertex
191  Float_t mDcaZGlMcV; // Z distance -"-
192  Float_t mCurvGl;
193  Float_t mTanLGl;
194  Float_t mErrG[5];
195  UShort_t mSeedQA;
196 
197 
198  // pid stuff from FlowMaker
199  Float_t mPidPion;
200  Float_t mPidProton;
201  Float_t mPidKaon;
202  Float_t mPidElectron;
203 
204 
205  //Short_t mMostLikelihoodPID;
206  //Float_t mMostLikelihoodProb;
207  //Short_t mExtrapTag; //merging area tag.
208 
209 
210  // common stuff
211  Float_t mFirstZ;
212  Float_t mLastZ;
213  Short_t mFirstPadrow;
214  Short_t mLastPadrow;
215  Short_t mFirstFitPadrow;
216  Short_t mLastFitPadrow;
217  Short_t mFirstSector;
218  Short_t mLastSector;
219  Int_t mRecoKey;
220 
221  Short_t mFitPts;
222  Short_t mFitSvt;
223  Short_t mFitSsd;
224  Short_t mFitFtpc;
225  Short_t mDedxPts;
226  Short_t mAllPts;
227  Short_t mCharge;
228 
229  Short_t mNAssocMc;
230  Short_t mNPossible;
231  Char_t mIsValidPr;
232 
233  Short_t mEmcTowerAdc[3];
234  Float_t mEmcEnergyRcHit[3];
235  Short_t mEmcSoftIdHiTowerRc[3];
236  ClassDef(StTinyRcTrack,6)
237 };
238 
239 #endif
240 //
241 // $Log: StTinyRcTrack.h,v $
242 // Revision 1.11 2018/01/03 18:18:09 genevb
243 // idTruths and keys moved from short to int
244 //
245 // Revision 1.10 2011/07/19 19:16:33 perev
246 // mDca00 added
247 //
248 // Revision 1.9 2010/08/31 20:16:48 fisyak
249 // Add track seedQuality
250 //
251 // Revision 1.8 2007/12/22 20:37:53 calderon
252 // Added EMC information to tracks. MC info obtained from StMcTrack, Rec Info
253 // obtained from track extrapolation to BEMC of rec track.
254 //
255 // Revision 1.7 2007/02/23 17:07:01 fisyak
256 // Add Ssd and DCA
257 //
258 // Revision 1.6 2006/07/24 19:03:16 calderon
259 // Added parent key data member to StTinyMcTrack.
260 // Added reco key data member to StTinyRcTrack.
261 //
262 // Revision 1.5 2003/09/02 17:58:43 perev
263 // gcc 3.2 updates + WarnOff
264 //
265 // Revision 1.4 2003/05/14 00:07:40 calderon
266 // Added members so that curvature and tan(lambda) pull plots can be made.
267 // Curvature and tan(lambda) are now stored. The 5 diagonal elements of the
268 // error matrix are also stored. The last two, for ittf tracks, are the error
269 // on curvature and error on tan(lambda). This is done from both the global
270 // and the primary track.
271 //
272 // Revision 1.3 2003/05/08 02:09:20 calderon
273 // Added data members for svt and ftpc fit points for StTinyRcTrack.
274 // Added data members for svt and ftpc hits for StTinyMcTrack.
275 // Added methods to calculate px, py, and p from the available pt, phi and pz, for
276 // global and primary momenta and also for monte carlo momentum.
277 // Cleaned up includes in StMiniMcEvent.
278 //
279 // Revision 1.2 2002/06/06 18:58:30 calderon
280 // Added $Log: StTinyRcTrack.h,v $
281 // Added Revision 1.11 2018/01/03 18:18:09 genevb
282 // Added idTruths and keys moved from short to int
283 // Added
284 // Added Revision 1.10 2011/07/19 19:16:33 perev
285 // Added mDca00 added
286 // Added
287 // Added Revision 1.9 2010/08/31 20:16:48 fisyak
288 // Added Add track seedQuality
289 // Added
290 // Added Revision 1.8 2007/12/22 20:37:53 calderon
291 // Added Added EMC information to tracks. MC info obtained from StMcTrack, Rec Info
292 // Added obtained from track extrapolation to BEMC of rec track.
293 // Added
294 // Added Revision 1.7 2007/02/23 17:07:01 fisyak
295 // Added Add Ssd and DCA
296 // Added
297 // Added Revision 1.6 2006/07/24 19:03:16 calderon
298 // Added Added parent key data member to StTinyMcTrack.
299 // Added Added reco key data member to StTinyRcTrack.
300 // Added
301 // Added Revision 1.5 2003/09/02 17:58:43 perev
302 // Added gcc 3.2 updates + WarnOff
303 // Added
304 // Added Revision 1.4 2003/05/14 00:07:40 calderon
305 // Added Added members so that curvature and tan(lambda) pull plots can be made.
306 // Added Curvature and tan(lambda) are now stored. The 5 diagonal elements of the
307 // Added error matrix are also stored. The last two, for ittf tracks, are the error
308 // Added on curvature and error on tan(lambda). This is done from both the global
309 // Added and the primary track.
310 // Added
311 // Added Revision 1.3 2003/05/08 02:09:20 calderon
312 // Added Added data members for svt and ftpc fit points for StTinyRcTrack.
313 // Added Added data members for svt and ftpc hits for StTinyMcTrack.
314 // Added Added methods to calculate px, py, and p from the available pt, phi and pz, for
315 // Added global and primary momenta and also for monte carlo momentum.
316 // Added Cleaned up includes in StMiniMcEvent.
317 // Added
318 // Added mDedxPts data member, get and set methods, and updated ClassDef(StTinyRcTrack,1)
319 // to ClassDef(StTinyRcTrack,2) because of this change for schema evolution
320 //
321 // Revision 1.1 2002/05/30 01:20:58 calderon
322 // Classes for use in a general framework for extracting efficiencies
323 // from both embedding and full simulations
324 // (after GSTAR+TRS+StEvent+StMcEvent+StAssociationMaker)
325 // so that the information of the track matches gets stored persistently.
326 //
327 //