StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtTrack.hh
1 /***************************************************************************
2  *
3  * $Id: StHbtTrack.hh,v 1.24 2005/07/15 17:40:57 kopytin 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  * Intermediate format for particle. This is built from the
10  * input particle format (e.g. StTrack of StEvent) and presented to
11  * the Analyses for ParticleCuts.
12  *
13  ***************************************************************************
14  *
15  * $Log: StHbtTrack.hh,v $
16  * Revision 1.24 2005/07/15 17:40:57 kopytin
17  * initialized mHiddenInfo to null in StHbtTrack()
18  *
19  * Revision 1.23 2003/09/02 17:58:32 perev
20  * gcc 3.2 updates + WarnOff
21  *
22  * Revision 1.22 2003/03/18 14:41:48 kisiel
23  * Bugfix update for the theoretical part of the code. Reverts the changes to the Lednicky weight calculator, as the previuos one had problems with strong interaction
24  *
25  * Revision 1.21 2002/03/21 18:49:31 laue
26  * updated for new MuDst reader
27  *
28  * Revision 1.20 2001/12/14 23:11:30 fretiere
29  * Add class HitMergingCut. Add class fabricesPairCut = HitMerginCut + pair purity cuts. Add TpcLocalTransform function which convert to local tpc coord (not pretty). Modify StHbtTrack, StHbtParticle, StHbtHiddenInfo, StHbtPair to handle the hit information and cope with my code
30  *
31  * Revision 1.17 2001/06/21 19:15:48 laue
32  * Modified fiels:
33  * CTH.hh : new constructor added
34  * StHbtEvent, StHbtKink, StHbtTrack : constructors from the persistent
35  * (TTree) classes added
36  * StHbtLikeSignAnalysis : minor changes, for debugging
37  * StHbtTypes: split into different files
38  * Added files: for the new TTree muDst's
39  * StExceptions.cxx StExceptions.hh StHbtEnumeration.hh
40  * StHbtHelix.hh StHbtHisto.hh StHbtString.hh StHbtTFile.hh
41  * StHbtTTreeEvent.cxx StHbtTTreeEvent.h StHbtTTreeKink.cxx
42  * StHbtTTreeKink.h StHbtTTreeTrack.cxx StHbtTTreeTrack.h
43  * StHbtTTreeV0.cxx StHbtTTreeV0.h StHbtVector.hh
44  *
45  * Revision 1.16 2001/05/25 23:23:59 lisa
46  * Added in StHbtKink stuff
47  *
48  * Revision 1.15 2001/04/05 22:25:15 kisiel
49  * Correct the problems detected by Insure++.
50  *
51  * Revision 1.14 2001/04/03 21:04:36 kisiel
52  *
53  *
54  * Changes needed to make the Theoretical code
55  * work. The main code is the ThCorrFctn directory.
56  * The most visible change is the addition of the
57  * HiddenInfo to StHbtPair.
58  *
59  * Revision 1.13 2000/05/03 17:44:43 laue
60  * StHbtEvent, StHbtTrack & StHbtV0 declared friend to StHbtIOBinary
61  * StHbtParticle updated for V0 pos,neg track Id
62  *
63  * Revision 1.12 2000/04/03 16:21:51 laue
64  * some include files changed
65  * Multi track cut added
66  *
67  * Revision 1.11 2000/02/18 21:32:24 laue
68  * franksTrackCut changed. If mCharge is set to '0' there will be no cut
69  * on charge. This is important for front-loaded cuts.
70  *
71  * copy constructor implemented for StHbtEvent, StHbtTrack and StHbtV0.
72  *
73  * franks1HistoD.cxx franks1HistoD.h franks2HistoD.cxx franks2HistoD.h
74  * removed. We can now (CC5 on Solaris) use the versions (no D)
75  *
76  * Revision 1.10 2000/01/25 17:35:17 laue
77  * I. In order to run the stand alone version of the StHbtMaker the following
78  * changes have been done:
79  * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
80  * b) unnecessary includes of StMaker.h have been removed
81  * c) the subdirectory StHbtMaker/doc/Make has been created including everything
82  * needed for the stand alone version
83  *
84  * II. To reduce the amount of compiler warning
85  * a) some variables have been type casted
86  * b) some destructors have been declared as virtual
87  *
88  * Revision 1.9 2000/01/07 22:16:14 laue
89  * missing 'const' in Helix() added
90  *
91  * Revision 1.8 2000/01/06 17:36:38 laue
92  * mNHits changed from 'int' to 'unsigned short'
93  * 'int' is inconsistend with the corresponding getters and setters
94  *
95  * Revision 1.7 1999/09/03 22:39:16 lisa
96  * Readers now MUST have Report() methods and MAY have WriteHbtEvent() methods
97  *
98  * Revision 1.6 1999/09/01 19:04:54 lisa
99  * update Particle class AND add parity cf and Randys Coulomb correction
100  *
101  * Revision 1.5 1999/07/27 20:21:10 lisa
102  * Franks fixes of StTrack and subsequent changes to particleCut and EventReader
103  *
104  * Revision 1.4 1999/07/19 14:24:06 hardtke
105  * modifications to implement uDST
106  *
107  * Revision 1.3 1999/07/06 22:33:23 lisa
108  * Adjusted all to work in pro and new - dev itself is broken
109  *
110  * Revision 1.2 1999/06/29 17:50:27 fisyak
111  * formal changes to account new StEvent, does not complie yet
112  *
113  * Revision 1.1.1.1 1999/06/29 16:02:57 lisa
114  * Installation of StHbtMaker
115  *
116  **************************************************************************/
117 
118 #ifndef StHbtTrack_hh
119 #define StHbtTrack_hh
120 
121 #include "Stiostream.h"
122 
123 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
124 #include "StPhysicalHelixD.hh"
125 /* Th stuff */
126 #include "StHbtMaker/Base/StHbtHiddenInfo.hh"
127 /***/
128 
129 class StEvent;
130 class StTrack;
131 class StHbtTTreeTrack;
132 class StHbtTTreeEvent;
133 class StMuDst;
134 class StMuTrack;
135 
137 public:
138  StHbtTrack();
139  StHbtTrack(const StHbtTrack&);// copy constructor
140 #ifdef __ROOT__
141  StHbtTrack(const StTrack*, StHbtThreeVector); // c-tor from StTrack of STAR DSTs
142  StHbtTrack(const StHbtTTreeEvent* ev, const StHbtTTreeTrack* t);
143  StHbtTrack(const StMuDst* dst, const StMuTrack* t);
144 #endif
145  StHbtTrack(const StEvent*, const StTrack*);
146  ~StHbtTrack();
147 // ~StHbtTrack(){/* no-op*/};
148 
149  short TrackType() const;
150  short Charge() const;
151  short NHits() const;
152  short NHitsPossible() const;
153  short NHitsDedx() const;
154  const float* NSigma() const; // Fab private
155  float NSigmaElectron() const;
156  float NSigmaPion() const;
157  float NSigmaKaon() const;
158  float NSigmaProton() const;
159  float PidProbElectron() const;
160  float PidProbPion() const;
161  float PidProbKaon() const;
162  float PidProbProton() const;
163  float dEdx() const;
164  float DCAz() const;
165  float DCAxy() const;
166  float DCAzGlobal() const;
167  float DCAxyGlobal() const;
168  float ChiSquaredXY() const;
169  float ChiSquaredZ() const;
170  StHbtThreeVector P() const;
171  float Pt() const;
172  StHbtThreeVector PGlobal() const;
173  float PtGlobal() const;
174  const StPhysicalHelixD& Helix() const;
175  const StPhysicalHelixD& HelixGlobal() const;
176  unsigned int TopologyMap(const unsigned int word) const;
177  short TrackId() const;
178 
179  void SetTrackType(const short&);
180  void SetCharge(const short&);
181  void SetNHits(const short&);
182  void SetNHitsPossible(const short&);
183  void SetNHitsDedx(const short&);
184  void SetNSigmaElectron(const float&);
185  void SetNSigmaPion(const float&);
186  void SetNSigmaKaon(const float&);
187  void SetNSigmaProton(const float&);
188  void SetPidProbElectron(const float&);
189  void SetPidProbPion(const float&);
190  void SetPidProbKaon(const float&);
191  void SetPidProbProton(const float&);
192  void SetdEdx(const float&);
193  void SetDCAxy(const float&);
194  void SetDCAz(const float&);
195  void SetDCAxyGlobal(const float&);
196  void SetDCAzGlobal(const float&);
197  void SetChiSquaredXY(const float&);
198  void SetChiSquaredZ(const float&);
199  void SetP(const StHbtThreeVector&);
200  void SetPt(const float&);
201  void SetPGlobal(const StHbtThreeVector&);
202  void SetPtGlobal(const float&);
203  void SetHelix(const StPhysicalHelixD&);
204  void SetHelixGlobal(const StPhysicalHelixD&);
205  void SetTopologyMap(const int word, const unsigned int map);
206  void SetTrackId(const short&);
207 
208  /* Th stuff */
209  void SetHiddenInfo(StHbtHiddenInfo* aHiddenInfo);
210  bool ValidHiddenInfo() const;
211  // Fab private : (official : const StHbtHiddenInfo* HiddenInfo() const;
212  StHbtHiddenInfo* getHiddenInfo() const;
213  /***/
214 
215  // For I/O of this object -- functions defined in StHbtIO.cc
216  friend ostream& operator<<(ostream& out, StHbtTrack& trk);
217  friend istream& operator>>(istream& in, StHbtTrack& trk);
218 
219 private:
220  short mTrackType;
221  char mCharge;
222  unsigned short mNHits;
223  unsigned short mNHitsPoss;
224  unsigned short mNHitsDedx;
225  float mNSigmaElectron;
226  float mNSigmaPion;
227  float mNSigmaKaon;
228  float mNSigmaProton;
229  float mPidProbElectron; // new
230  float mPidProbPion; // new
231  float mPidProbKaon; // new
232  float mPidProbProton; // new
233  float mdEdx;
234  float mDCAxy;
235  float mDCAz;
236  float mDCAxyGlobal;
237  float mDCAzGlobal;
238  float mChiSqXY;
239  float mChiSqZ;
240  unsigned int mMap[2];
241  unsigned int mTrackId;
242 
243 
244  StHbtThreeVector mP;
245  float mPt;
246  StHbtThreeVector mPGlobal;
247  float mPtGlobal;
248  StPhysicalHelixD mHelix;
249  StPhysicalHelixD mHelixGlobal;
250 
251  /* Th stuff */
252  // Fab private : add mutable
253  // mutable
254  StHbtHiddenInfo* mHiddenInfo;
255  /***/
256 
257  friend class StHbtIOBinary;
258  friend class StHbtTTreeEvent;
259  friend class StHbtTTreeTrack;
260 };
261 
262 inline const float* StHbtTrack::NSigma() const
263 {return &mNSigmaElectron;} // Fab private
264 inline float StHbtTrack::PidProbElectron() const {return mPidProbElectron;}
265 inline float StHbtTrack::PidProbPion() const {return mPidProbPion;}
266 inline float StHbtTrack::PidProbKaon() const {return mPidProbKaon;}
267 inline float StHbtTrack::PidProbProton() const {return mPidProbProton;}
268 inline StHbtThreeVector StHbtTrack::PGlobal() const {return mPGlobal;}
269 inline float StHbtTrack::PtGlobal() const {return mPtGlobal;}
270 
271 #endif
Number of hits in diffent zones of the TPC for a given track.
Definition: TopologyMap.hh:29