18 #include "StFlowConstants.h"
19 #include "StTrackTopologyMap.h"
20 #include "StThreeVectorD.hh"
29 Float_t PidPiPlus()
const;
30 Float_t PidPiMinus()
const;
31 Float_t PidProton()
const;
32 Float_t PidKaonMinus()
const;
33 Float_t PidKaonPlus()
const;
34 Float_t PidAntiProton()
const;
35 Float_t PidDeuteron()
const;
36 Float_t PidAntiDeuteron()
const;
37 Float_t PidElectron()
const;
38 Float_t PidPositron()
const;
44 const Char_t* Pid()
const;
46 Float_t PhiGlobal()
const;
48 Float_t EtaGlobal()
const;
49 Float_t ZFirstPoint()
const;
50 Float_t ZLastPoint()
const;
53 Float_t PtGlobal()
const;
55 Float_t PGlobal()
const;
57 Short_t Charge()
const;
59 Float_t DcaSigned()
const;
60 Float_t DcaGlobal()
const;
65 Int_t NdedxPts()
const;
66 Float_t TrackLength()
const;
67 Int_t Select(Int_t harmonic, Int_t selection, Int_t subevent= -1)
const;
68 Int_t MostLikelihoodPID()
const;
69 Float_t MostLikelihoodProb()
const;
70 Int_t ExtrapTag()
const;
71 Float_t ElectronPositronProb()
const;
72 Float_t PionPlusMinusProb()
const;
73 Float_t KaonPlusMinusProb()
const;
74 Float_t ProtonPbarProb()
const;
78 void SetPidPiPlus(Float_t);
79 void SetPidPiMinus(Float_t);
80 void SetPidProton(Float_t);
81 void SetPidKaonMinus(Float_t);
82 void SetPidKaonPlus(Float_t);
83 void SetPidAntiProton(Float_t);
84 void SetPidDeuteron(Float_t);
85 void SetPidAntiDeuteron(Float_t);
86 void SetPidElectron(Float_t);
87 void SetPidPositron(Float_t);
88 void SetPid(
const Char_t*);
90 void SetPhiGlobal(Float_t);
92 void SetEtaGlobal(Float_t);
93 void SetZFirstPoint(Float_t);
94 void SetZLastPoint(Float_t);
95 void SetDedx(Float_t);
97 void SetPtGlobal(Float_t);
98 void SetCharge(Short_t);
100 void SetDcaSigned(Float_t);
101 void SetDcaGlobal(Float_t);
102 void SetChi2(Float_t);
103 void SetFitPts(Int_t);
104 void SetMaxPts(Int_t);
105 void SetNhits(Int_t);
106 void SetNdedxPts(Int_t);
107 void SetTrackLength(Float_t);
108 void SetSelect(Int_t harmonic, Int_t selection);
109 void SetSubevent(Int_t harmonic, Int_t selection, Int_t subevent);
110 void SetMostLikelihoodPID(Int_t);
111 void SetMostLikelihoodProb(Float_t);
112 void SetExtrapTag(Int_t);
113 void SetElectronPositronProb(Float_t);
114 void SetPionPlusMinusProb(Float_t);
115 void SetKaonPlusMinusProb(Float_t);
116 void SetProtonPbarProb(Float_t);
120 void SetMass(Float_t);
131 Int_t mPidAntiProton;
133 Int_t mPidAntiDeuteron;
141 Float_t mZFirstPoint;
155 Float_t mTrackLength;
157 Short_t mSubevent[Flow::nHars][Flow::nSels];
158 static Float_t maxInt;
159 Int_t mMostLikelihoodPID;
160 Float_t mMostLikelihoodProb;
162 Float_t mElectronPositronProb;
163 Float_t mPionPlusMinusProb;
164 Float_t mKaonPlusMinusProb;
165 Float_t mProtonPbarProb;
176 inline Float_t StFlowTrack::PidPiPlus()
const {
return mPidPiPlus/1000.; }
177 inline Float_t StFlowTrack::PidPiMinus()
const {
return mPidPiMinus/1000.; }
178 inline Float_t StFlowTrack::PidProton()
const {
return mPidProton/1000.; }
179 inline Float_t StFlowTrack::PidKaonMinus()
const {
return mPidKaonMinus/1000.; }
180 inline Float_t StFlowTrack::PidKaonPlus()
const {
return mPidKaonPlus/1000.; }
181 inline Float_t StFlowTrack::PidAntiProton()
const {
return mPidAntiProton/1000.; }
182 inline Float_t StFlowTrack::PidDeuteron()
const {
return mPidDeuteron/1000.; }
183 inline Float_t StFlowTrack::PidAntiDeuteron()
const {
return mPidAntiDeuteron/1000.; }
184 inline Float_t StFlowTrack::PidElectron()
const {
return mPidElectron/1000.; }
185 inline Float_t StFlowTrack::PidPositron()
const {
return mPidPositron/1000.; }
186 inline const Char_t* StFlowTrack::Pid()
const {
return mPid; }
187 inline Float_t StFlowTrack::Phi()
const {
return mPhi; }
188 inline Float_t StFlowTrack::PhiGlobal()
const {
return mPhiGlobal; }
189 inline Float_t StFlowTrack::Eta()
const {
return mEta; }
190 inline Float_t StFlowTrack::EtaGlobal()
const {
return mEtaGlobal; }
191 inline Float_t StFlowTrack::ZFirstPoint()
const {
return mZFirstPoint; }
192 inline Float_t StFlowTrack::ZLastPoint()
const {
return mZLastPoint; }
193 inline Float_t StFlowTrack::Dedx()
const {
return mDedx; }
194 inline Float_t StFlowTrack::Pt()
const {
return mPt; }
195 inline Float_t StFlowTrack::PtGlobal()
const {
return mPtGlobal; }
196 inline Short_t StFlowTrack::Charge()
const {
return mCharge; }
197 inline Float_t StFlowTrack::Dca()
const {
return mDca; }
198 inline Float_t StFlowTrack::DcaSigned()
const {
return mDcaSigned; }
199 inline Float_t StFlowTrack::DcaGlobal()
const {
return mDcaGlobal; }
200 inline Float_t StFlowTrack::Chi2()
const {
return mChi2; }
201 inline Int_t StFlowTrack::FitPts()
const {
return mFitPts; }
202 inline Int_t StFlowTrack::MaxPts()
const {
return mMaxPts; }
203 inline Int_t StFlowTrack::Nhits()
const {
return mNhits; }
204 inline Int_t StFlowTrack::NdedxPts()
const {
return mNdedxPts; }
205 inline Float_t StFlowTrack::TrackLength()
const {
return mTrackLength; }
206 inline Int_t StFlowTrack::MostLikelihoodPID()
const
207 {
return mMostLikelihoodPID; }
208 inline Float_t StFlowTrack::MostLikelihoodProb()
const
209 {
return mMostLikelihoodProb; }
210 inline Int_t StFlowTrack::ExtrapTag()
const {
return mExtrapTag; }
211 inline Float_t StFlowTrack::ElectronPositronProb()
const {
return mElectronPositronProb; }
212 inline Float_t StFlowTrack::PionPlusMinusProb()
const {
return mPionPlusMinusProb; }
213 inline Float_t StFlowTrack::KaonPlusMinusProb()
const {
return mKaonPlusMinusProb; }
214 inline Float_t StFlowTrack::ProtonPbarProb()
const {
return mProtonPbarProb; }
215 inline StThreeVectorD StFlowTrack::DcaGlobal3()
const {
return mDcaGlobal3; }
216 inline const StTrackTopologyMap& StFlowTrack::TopologyMap()
const {
return mTopology; }
218 inline Float_t StFlowTrack::Mass()
const {
return mMass; }
219 inline Int_t StFlowTrack::id()
const {
return mId; }
220 inline Int_t StFlowTrack::Flag()
const {
return mFlag; }
222 inline Float_t StFlowTrack::P()
const {
223 float momentum = mPt/::sqrt(1-(tanh(mEta)*tanh(mEta)));
226 inline Float_t StFlowTrack::PGlobal()
const {
227 float momentum = mPtGlobal/::sqrt(1-(tanh(mEtaGlobal)*tanh(mEtaGlobal)));
230 inline Float_t StFlowTrack::Y()
const {
232 if (strcmp(mPid,
"none") == 0) { M = 0.139; }
233 else if (strcmp(mPid,
"pi+") == 0) { M = 0.139; }
234 else if (strcmp(mPid,
"pi-") == 0) { M = 0.139; }
235 else if (strcmp(mPid,
"pr+") == 0) { M = 0.938; }
236 else if (strcmp(mPid,
"pr-") == 0) { M = 0.938; }
237 else if (strcmp(mPid,
"k+") == 0) { M = 0.494; }
238 else if (strcmp(mPid,
"k-") == 0) { M = 0.494; }
239 else if (strcmp(mPid,
"d+") == 0) { M = 1.876; }
240 else if (strcmp(mPid,
"d-") == 0) { M = 1.876; }
241 else if (strcmp(mPid,
"e-") == 0) { M = 0.0005; }
242 else if (strcmp(mPid,
"e+") == 0) { M = 0.0005; }
243 double Pz = ::sqrt(this->P()*this->P() - mPt*mPt);
244 if (mEta < 0) { Pz = -Pz; }
245 double E = ::sqrt(this->P()*this->P() + M*M);
246 float rapidity = 0.5*::log((E + Pz)/(E - Pz));
250 inline Int_t StFlowTrack::Select(Int_t harmonic, Int_t selection,
251 Int_t subevent)
const {
252 if (subevent == -1 || subevent == mSubevent[harmonic][selection]) {
253 int bitShift = harmonic + Flow::nHars * selection;
254 return (mSelection & (1 << bitShift)) ? kTRUE : kFALSE;
259 inline void StFlowTrack::SetMostLikelihoodPID(Int_t val) {
260 mMostLikelihoodPID=val; }
262 inline void StFlowTrack::SetMostLikelihoodProb(Float_t val) {
263 mMostLikelihoodProb=val; }
265 inline void StFlowTrack::SetExtrapTag(Int_t val) {
268 inline void StFlowTrack::SetElectronPositronProb(Float_t val) {
269 mElectronPositronProb = val; }
271 inline void StFlowTrack::SetPionPlusMinusProb(Float_t val) {
272 mPionPlusMinusProb = val; }
274 inline void StFlowTrack::SetKaonPlusMinusProb(Float_t val) {
275 mKaonPlusMinusProb = val; }
277 inline void StFlowTrack::SetProtonPbarProb(Float_t val) {
278 mProtonPbarProb = val; }
280 inline void StFlowTrack::SetPidPiPlus(Float_t pid) {
281 if (fabs(pid) > maxInt) pid = maxInt; mPidPiPlus = (Int_t)(pid*1000.); }
283 inline void StFlowTrack::SetPidPiMinus(Float_t pid) {
284 if (fabs(pid) > maxInt) pid = maxInt; mPidPiMinus = (Int_t)(pid*1000.); }
286 inline void StFlowTrack::SetPidProton(Float_t pid) {
287 if (fabs(pid) > maxInt) pid = maxInt; mPidProton = (Int_t)(pid*1000.); }
289 inline void StFlowTrack::SetPidKaonMinus(Float_t pid) {
290 if (fabs(pid) > maxInt) pid = maxInt; mPidKaonMinus = (Int_t)(pid*1000.); }
292 inline void StFlowTrack::SetPidKaonPlus(Float_t pid) {
293 if (fabs(pid) > maxInt) pid = maxInt; mPidKaonPlus = (Int_t)(pid*1000.); }
295 inline void StFlowTrack::SetPidAntiProton(Float_t pid) {
296 if (fabs(pid) > maxInt) pid = maxInt; mPidAntiProton = (Int_t)(pid*1000.); }
298 inline void StFlowTrack::SetPidDeuteron(Float_t pid) {
299 if (fabs(pid) > maxInt) pid = maxInt; mPidDeuteron = (Int_t)(pid*1000.); }
301 inline void StFlowTrack::SetPidAntiDeuteron(Float_t pid) {
302 if (fabs(pid) > maxInt) pid = maxInt; mPidAntiDeuteron = (Int_t)(pid*1000.); }
304 inline void StFlowTrack::SetPidElectron(Float_t pid) {
305 if (fabs(pid) > maxInt) pid = maxInt; mPidElectron = (Int_t)(pid*1000.); }
307 inline void StFlowTrack::SetPidPositron(Float_t pid) {
308 if (fabs(pid) > maxInt) pid = maxInt; mPidPositron = (Int_t)(pid*1000.); }
310 inline void StFlowTrack::SetPid(
const Char_t* pid) { strncpy(mPid, pid, 9);
312 inline void StFlowTrack::SetPhi(Float_t phi) { mPhi = phi; }
314 inline void StFlowTrack::SetPhiGlobal(Float_t gphi) { mPhiGlobal = gphi; }
316 inline void StFlowTrack::SetEta(Float_t eta) { mEta = eta; }
318 inline void StFlowTrack::SetEtaGlobal(Float_t geta) { mEtaGlobal = geta; }
320 inline void StFlowTrack::SetZFirstPoint(Float_t zFirst) { mZFirstPoint = zFirst; }
322 inline void StFlowTrack::SetZLastPoint(Float_t zLast) { mZLastPoint = zLast; }
324 inline void StFlowTrack::SetDedx(Float_t dedx) { mDedx = dedx; }
326 inline void StFlowTrack::SetPt(Float_t pt) { mPt = pt; }
328 inline void StFlowTrack::SetPtGlobal(Float_t gpt) { mPtGlobal = gpt; }
330 inline void StFlowTrack::SetCharge(Short_t charge) { mCharge = charge; }
332 inline void StFlowTrack::SetDca(Float_t dca) { mDca = dca; }
334 inline void StFlowTrack::SetDcaSigned(Float_t sdca) { mDcaSigned = sdca; }
336 inline void StFlowTrack::SetDcaGlobal(Float_t gdca) { mDcaGlobal = gdca; }
338 inline void StFlowTrack::SetChi2(Float_t chi2) { mChi2 = chi2; }
340 inline void StFlowTrack::SetFitPts(Int_t fitPts) { mFitPts = fitPts; }
342 inline void StFlowTrack::SetMaxPts(Int_t maxPts) { mMaxPts = maxPts; }
344 inline void StFlowTrack::SetNhits(Int_t nhits) { mNhits = nhits; }
346 inline void StFlowTrack::SetNdedxPts(Int_t ndedxPts) { mNdedxPts = ndedxPts; }
348 inline void StFlowTrack::SetTrackLength(Float_t tl) { mTrackLength = tl; }
350 inline void StFlowTrack::SetSelect(Int_t harmonic, Int_t selection) {
351 int bitShift = harmonic + Flow::nHars * selection;
352 mSelection |= 1 << bitShift; }
354 inline void StFlowTrack::SetSubevent(Int_t harmonic, Int_t selection,
355 Int_t subevent) { mSubevent[harmonic][selection] = subevent; }
357 inline void StFlowTrack::SetDcaGlobal3(
StThreeVectorD gdca3) { mDcaGlobal3 = gdca3; }
361 inline void StFlowTrack::SetMass(Float_t mass) { mMass = mass; }
363 inline void StFlowTrack::Setid(Int_t
id) {mId = id;}
365 inline void StFlowTrack::SetFlag(Int_t flag) {mFlag = flag;}
Number of hits in diffent zones of the TPC for a given track.