20 #include "StMuEvent.h"
21 #include "StMuHelix.h"
22 #include "StMuUtilities.h"
23 #include "StMuProbPidTraits.h"
24 #include "StMuBTofPidTraits.h"
25 #include "StMuETofPidTraits.h"
26 #include "StMuMtdPidTraits.h"
27 #include "StMuPrimaryTrackCovariance.h"
30 #include "StEvent/StTrackTopologyMap.h"
31 #include "StEvent/StRunInfo.h"
32 #include "StEvent/StDcaGeometry.h"
33 #include "StarClassLibrary/StPhysicalHelixD.hh"
34 #include "StarClassLibrary/StThreeVectorD.hh"
35 #include "StarClassLibrary/StThreeVectorF.hh"
36 #include "StarClassLibrary/SystemOfUnits.h"
41 #define __PROB_SCALE__ 1000.
42 #define __SIGMA_SCALE__ 1000.
43 #define __NOVALUE__ -999
57 StMuTrack(): mVertexIndex(0), mNHitsPossInner(0), mNHitsFitInner(0), mNHitsPossTpc(255), mNHitsFitTpc(255),
mIndex2Cov(-1),
58 mIdTruth(0), mQuality(0), mIdParentVx(0) {};
63 UInt_t flagExtension()
const {
return mFlagExtension; }
67 Int_t index2Cov()
const;
69 Int_t index2BTofHit()
const;
71 Int_t index2MtdHit()
const;
80 UShort_t
nHits()
const;
85 UShort_t
nHitsFit(StDetectorId)
const;
94 Double_t dEdxPull(Double_t mass, Bool_t fit = kFALSE, Int_t
charge=1)
const;
95 Double_t dEdxPullElectronI70()
const {
return dEdxPull(0.51099907e-3);}
96 Double_t dEdxPullPionI70()
const {
return dEdxPull(0.13956995);}
97 Double_t dEdxPullKaonI70()
const {
return dEdxPull(0.493677);}
98 Double_t dEdxPullProtonI70()
const {
return dEdxPull(0.93827231);}
99 Double_t dEdxPullElectronFit()
const {
return dEdxPull(0.51099907e-3,kTRUE);}
100 Double_t dEdxPullPionFit()
const {
return dEdxPull(0.13956995,kTRUE);}
101 Double_t dEdxPullKaonFit()
const {
return dEdxPull(0.493677,kTRUE);}
102 Double_t dEdxPullProtonFit()
const {
return dEdxPull(0.93827231,kTRUE);}
103 Double_t nSigmaElectron70()
const {
return dEdxPullElectronI70() ;}
104 Double_t nSigmaPion70()
const {
return dEdxPullPionI70() ;}
105 Double_t nSigmaKaon70()
const {
return dEdxPullKaonI70() ;}
106 Double_t nSigmaProton70()
const {
return dEdxPullProtonI70() ;}
107 Double_t nSigmaElectronFit()
const {
return dEdxPullElectronFit() ;}
108 Double_t nSigmaPionFit()
const {
return dEdxPullPionFit() ;}
109 Double_t nSigmaKaonFit()
const {
return dEdxPullKaonFit() ;}
110 Double_t nSigmaProtonFit()
const {
return dEdxPullProtonFit() ;}
111 Double_t
dEdx()
const;
112 Double_t
chi2()
const;
115 Double_t
chi2z()
const;
117 Double_t
phi()
const;
118 Double_t
eta()
const;
127 Float_t
dcaD(Int_t vtx_id=-1)
const;
128 Float_t
dcaZ(Int_t vtx_id=-1)
const;
144 virtual void Print(Option_t* option =
"")
const;
145 void setIndex2BTofHit(Int_t i) {mIndex2BTofHit=i;}
147 void setIndex2MtdHit(Int_t i) {mIndex2MtdHit=i;}
151 TArrayI getTower(Bool_t useExitRadius=
false, Int_t det=1)
const;
152 Double_t energyBEMC()
const;
153 Bool_t matchBEMC()
const;
154 Int_t idTruth()
const {
return mIdTruth;}
155 Int_t qaTruth()
const {
return mQuality; }
156 Int_t idParentVx()
const {
return mIdParentVx;}
157 void setType(
short type) { mType =
type;}
158 void setIdTruth(Int_t idtru,Int_t qatru=0) {mIdTruth = (UShort_t) idtru; mQuality = (UShort_t) qatru;}
159 void setIdParentVx(Int_t Id) {mIdParentVx = Id;}
165 UInt_t mFlagExtension;
167 Int_t mIndex2RichSpectra;
168 Int_t mIndex2BTofHit;
175 UChar_t mNHitsPossInner;
176 UChar_t mNHitsFitInner;
177 UChar_t mNHitsPossTpc;
178 UChar_t mNHitsFitTpc;
179 UShort_t mPidProbElectron;
180 UShort_t mPidProbPion;
181 UShort_t mPidProbKaon;
182 UShort_t mPidProbProton;
183 Int_t mNSigmaElectron;
205 Int_t mIndex2ETofHit;
217 void fillMuBTofPidTraits(
const StTrack*);
219 void fillMuMtdPidTraits(
const StTrack*);
232 inline Int_t StMuTrack::index2Cov()
const {
return mIndex2Cov;}
234 inline Int_t StMuTrack::index2BTofHit()
const {
return mIndex2BTofHit;}
236 inline Int_t StMuTrack::index2MtdHit()
const {
return mIndex2MtdHit;}
264 inline const StMuBTofPidTraits &StMuTrack::btofPidTraits()
const {
return mBTofPidTraits;}
269 inline void StMuTrack::setBTofPidTraits(
const StMuBTofPidTraits& pid) { mBTofPidTraits = pid; }
277 ostream& operator<<(ostream& os,
StMuTrack const & v);
Double_t lengthMeasured() const
Returns length of track (cm) from first to last measured point.
Double_t pidProbKaon() const
Returns Aihong's probability of being a kaon.
const StMuHelix & muHelix() const
Returns inner helix (first measured point)
short type() const
Returns the track type: 0=global, 1=primary, etc (see StEvent manual for type information) ...
Double_t chi2prob() const
Returns probability of fit.
Double_t pidProbElectron() const
Returns Aihong's probability of being an electron.
Int_t vertexIndex() const
Returns index of associated primary vertex.
Int_t index2Global() const
Returns index of associated global track. If not in order can be set with StMuDst::fixTrackIndeces() ...
void fillMuProbPidTraits(const StEvent *, const StTrack *)
Helper function to fill all the different pid values.
Double_t pt() const
Returns pT at point of dca to primary vertex.
short id() const
Returns the track id(or key), is unique for a track node, i.e. global and primary tracks have the sam...
UShort_t nHitsDedx() const
Return number of hits used for dEdx.
Double_t length() const
Returns length of track (cm) from primary vertex to last measured point.
Float_t dcaZ(Int_t vtx_id=-1) const
Z component of global DCA.
Double_t chi2() const
Returns chi2 of fit.
const StRichSpectra * richSpectra() const
Returns pointer to associated rich spectra. Null pointer if no global track available.
const StMuETofPidTraits & etofPidTraits() const
dongx
static TClonesArray * btofArray(int type)
returns pointer to the n-th TClonesArray from the btof arrays // dongx
void setVertexIndex(Int_t i)
Set index of primary vertex for which dca is stored.
void setIndex2Global(Int_t i)
Set index of associated global track.
StMuMtdPidTraits mMtdPidTraits
dongx
void fillMuETofPidTraits(const StTrack *)
dongx
static StuProbabilityPidAlgorithm * mProbabilityPidAlgorithm
Bingchu.
static TClonesArray * mtdArray(int type)
returns pointer to the n-th TClonesArray from the mtd arrays
StPhysicalHelixD helix() const
Returns inner helix (first measured point)
void setIndex2RichSpectra(Int_t i)
Set index of associated rich spectra.
UShort_t nHitsFit() const
Return total number of hits used in fit.
short flag() const
Returns flag, (see StEvent manual for type information)
Short_t charge() const
Returns charge.
const StThreeVectorF & p() const
Returns 3-momentum at dca to primary vertex.
const StMuHelix & muOuterHelix() const
Returns outer helix (last measured point)
Int_t index2ETofHit() const
dongx
Double_t nSigmaPion() const
Returns Craig's distance to the calculated dE/dx band for pions in units of sigma.
Double_t eta() const
Returns pseudo rapidity at point of dca to primary vertex.
Double_t pidProbProton() const
Returns Aihong's probability of being a proton.
const StThreeVectorF & firstPoint() const
Returns positions of first measured point.
const StMuProbPidTraits & probPidTraits() const
Returns Yuri Fisyak new pid probabilities.
virtual void Print(Option_t *option="") const
Print track info.
StThreeVectorD momentumAtPrimaryVertex(const StEvent *event, const StTrack *track, const StVertex *vertex) const
Helper function: Calculates the momentum at dca a given StTrack and the primary vertex taken from StE...
static TClonesArray * etofArray(int type)
returns pointer to the n-th TClonesArray from the etof arrays // FS
Double_t chi2z() const
Returns probability of fit. ATTENTIONS: does not return z chi2 (historic)
Double_t nSigmaElectron() const
Returns Craig's distance to the calculated dE/dx band for electrons in units of sigma.
UShort_t nHitsPoss() const
Return number of possible hits on track.
static Double_t mProbabilityPidCentrality
Centrality for Aihong's pid prob calculations. Will set when new StMuEvent is made from StEvent...
const StThreeVectorF & momentum() const
Returns 3-momentum at dca to primary vertex.
UShort_t nHits() const
Bingchu.
Double_t chi2xy() const
Returns chi2 of fit. ATTENTIONS: does not return xy chi2 (historic)
static void setProbabilityPidCentrality(Double_t cent)
Sets the centrality for calculating Aihong's pid.
StThreeVectorF dca(Int_t vtx_id=-1) const
Returns 3D distance of closest approach to primary vertex.
StMuProbPidTraits mProbPidTraits
Class holding the new Yuri Fisyak pid probabilities.
const StThreeVectorF & lastPoint() const
Returns positions of last measured point.
Double_t dEdx() const
Returns measured dE/dx value.
static void setProbabilityPidAlgorithm(StuProbabilityPidAlgorithm *)
Sets the StuProbabilityPidAlgorithm. Important in order to calculate Aihong's pids.
static TClonesArray * array(int type)
returns pointer to the n-th TClonesArray
Double_t phi() const
Returns phi at point of dca to primary vertex.
const StMuTrack * primaryTrack() const
Returns pointer to associated primary track. Null pointer if no global track available.
Double_t nSigmaProton() const
Returns Craig's distance to the calculated dE/dx band for protons in units of sigma.
Int_t index2RichSpectra() const
Returns index of associated rich spectra.
Float_t dcaD(Int_t vtx_id=-1) const
Signed radial component of global DCA (projected)
const StMuTrack * globalTrack() const
Returns pointer to associated global track. Null pointer if no global track available.
StThreeVectorF dcaGlobal(Int_t vtx_id=-1) const
Returns 3D distance of closest approach to primary vertex of associated global track.
Double_t nSigmaKaon() const
Returns Craig's distance to the calculated dE/dx band for kaons in units of sigma.
void setIndex2Cov(Int_t i)
Bingchu.
void setETofPidTraits(const StMuETofPidTraits &pid)
dongx
StPhysicalHelixD outerHelix() const
Returns outer helix (last measured point)
Double_t pidProbPion() const
Returns Aihong's probability of being a pion.
const StMuETofHit * etofHit() const
dongx
StTrackTopologyMap topologyMap() const
Returns topology map.
void setIndex2ETofHit(Int_t i)
dongx