]>
Commit | Line | Data |
---|---|---|
d0e92d9a | 1 | /////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoTrack: main class holding all the necessary information // | |
4 | // about a track (before the identification) that is required during // | |
5 | // femtoscopic analysis. This class is filled with information from the // | |
6 | // input stream by the reader. A particle has a link back to the Track // | |
7 | // it was created from, so we do not copy the information. // | |
8 | // // | |
9 | /////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #include "AliFemtoTrack.h" | |
67427ff7 | 12 | #ifndef __NO_STAR_DEPENDENCE_ALLOWED__ |
13 | #ifdef __ROOT__ | |
14 | #include "StEvent/StEnumerations.h" | |
d0e92d9a | 15 | #include "AliFemtoAihongPid.h" |
67427ff7 | 16 | #include "StEventUtilities/StuProbabilityPidAlgorithm.h" |
17 | #endif | |
18 | #endif | |
19 | ||
d0e92d9a | 20 | #include "SystemOfUnits.h" // has "tesla" in it |
67427ff7 | 21 | //#include "AliFemtoParticleTypes.h" |
d0e92d9a | 22 | //#include "AliFemtoTTreeEvent.h" |
23 | //#include "AliFemtoTTreeTrack.h" | |
67427ff7 | 24 | |
25 | AliFemtoTrack::AliFemtoTrack(): | |
0215f606 | 26 | fCharge(0), |
27 | fPidProbElectron(0), | |
28 | fPidProbPion(0), | |
29 | fPidProbKaon(0), | |
30 | fPidProbProton(0), | |
31 | fPidProbMuon(0), | |
67427ff7 | 32 | fTrackId(0), |
0215f606 | 33 | fP(0,0,0), |
34 | fPt(0), | |
35 | fHelix(), | |
67427ff7 | 36 | fFlags(0), |
37 | fLabel(0), | |
38 | fImpactD(0), | |
39 | fImpactZ(0), | |
40 | fCdd(0), | |
41 | fCdz(0), | |
42 | fCzz(0), | |
43 | fITSchi2(0), | |
44 | fITSncls(0), | |
45 | fTPCchi2(0), | |
46 | fTPCncls(0), | |
47 | fTPCnclsF(0), | |
48 | fTPCsignalN(0), | |
49 | fTPCsignalS(0), | |
0b3bd1ac | 50 | fSigmaToVertex(0), |
67427ff7 | 51 | fClusters(159), |
0215f606 | 52 | fShared(159), |
0b3bd1ac | 53 | fNominalTpcEntrancePoint(0,0,0), |
54 | fNominalTpcExitPoint(0,0,0), | |
0215f606 | 55 | fHiddenInfo(0) |
67427ff7 | 56 | { |
d0e92d9a | 57 | // Default constructor |
67427ff7 | 58 | fHiddenInfo = NULL; |
ea77036b | 59 | fKinkIndexes[0] = 0; |
60 | fKinkIndexes[1] = 0; | |
61 | fKinkIndexes[2] = 0; | |
67427ff7 | 62 | // cout << "Created track " << this << endl; |
63 | } | |
64 | ||
65 | ||
0215f606 | 66 | AliFemtoTrack::AliFemtoTrack(const AliFemtoTrack& t) : |
67 | fCharge(0), | |
68 | fPidProbElectron(0), | |
69 | fPidProbPion(0), | |
70 | fPidProbKaon(0), | |
71 | fPidProbProton(0), | |
72 | fPidProbMuon(0), | |
73 | fTrackId(0), | |
74 | fP(0,0,0), | |
75 | fPt(0), | |
76 | fHelix(), | |
77 | fFlags(0), | |
78 | fLabel(0), | |
79 | fImpactD(0), | |
80 | fImpactZ(0), | |
81 | fCdd(0), | |
82 | fCdz(0), | |
83 | fCzz(0), | |
84 | fITSchi2(0), | |
85 | fITSncls(0), | |
86 | fTPCchi2(0), | |
87 | fTPCncls(0), | |
88 | fTPCnclsF(0), | |
89 | fTPCsignalN(0), | |
90 | fTPCsignalS(0), | |
0b3bd1ac | 91 | fSigmaToVertex(0), |
0215f606 | 92 | fClusters(159), |
93 | fShared(159), | |
0b3bd1ac | 94 | fNominalTpcEntrancePoint(0,0,0), |
95 | fNominalTpcExitPoint(0,0,0), | |
0215f606 | 96 | fHiddenInfo(0) |
d0e92d9a | 97 | { |
98 | // copy constructor | |
67427ff7 | 99 | fCharge = t.fCharge; |
100 | fPidProbElectron = t.fPidProbElectron; | |
101 | fPidProbPion = t.fPidProbPion; | |
102 | fPidProbKaon = t.fPidProbKaon; | |
103 | fPidProbProton = t.fPidProbProton; | |
104 | fPidProbMuon=t.fPidProbMuon; | |
105 | fP = t.fP; | |
106 | fPt = t.fPt; | |
107 | fHelix = t.fHelix; | |
108 | fTrackId = t.fTrackId; | |
109 | fFlags=t.fFlags; | |
110 | fLabel=t.fLabel; | |
111 | fImpactD=t.fImpactD; | |
112 | fImpactZ=t.fImpactZ; | |
113 | fCdd=t.fCdd; | |
114 | fCdz=t.fCdz; | |
115 | fCzz=t.fCzz; | |
116 | fITSchi2=t.fITSchi2; | |
117 | fITSncls=t.fITSncls; | |
118 | fTPCchi2=t.fTPCchi2; | |
119 | fTPCncls=t.fTPCncls; | |
120 | fTPCnclsF=t.fTPCnclsF; | |
121 | fTPCsignalN=t.fTPCsignalN; | |
122 | fTPCsignalS=t.fTPCsignalS; | |
0b3bd1ac | 123 | fSigmaToVertex=t.fSigmaToVertex; |
67427ff7 | 124 | fClusters=t.fClusters; |
125 | fShared=t.fShared; | |
0b3bd1ac | 126 | fNominalTpcEntrancePoint=t.fNominalTpcEntrancePoint; |
127 | fNominalTpcExitPoint=t.fNominalTpcExitPoint; | |
67427ff7 | 128 | if (t.ValidHiddenInfo()) |
d0e92d9a | 129 | fHiddenInfo = t.GetHiddenInfo()->Clone(); |
67427ff7 | 130 | else |
131 | fHiddenInfo = NULL; | |
ea77036b | 132 | fKinkIndexes[0] = t.fKinkIndexes[0]; |
133 | fKinkIndexes[1] = t.fKinkIndexes[1]; | |
134 | fKinkIndexes[2] = t.fKinkIndexes[2]; | |
67427ff7 | 135 | // cout << "Created track " << this << endl; |
ea77036b | 136 | } |
67427ff7 | 137 | |
0215f606 | 138 | AliFemtoTrack& AliFemtoTrack::operator=(const AliFemtoTrack& aTrack) |
139 | { | |
d0e92d9a | 140 | // assignment operator |
0215f606 | 141 | if (this == &aTrack) |
142 | return *this; | |
143 | fCharge = aTrack.fCharge; | |
144 | fPidProbElectron = aTrack.fPidProbElectron; | |
145 | fPidProbPion = aTrack.fPidProbPion; | |
146 | fPidProbKaon = aTrack.fPidProbKaon; | |
147 | fPidProbProton = aTrack.fPidProbProton; | |
148 | fPidProbMuon=aTrack.fPidProbMuon; | |
149 | fP = aTrack.fP; | |
150 | fPt = aTrack.fPt; | |
151 | fHelix = aTrack.fHelix; | |
152 | fTrackId = aTrack.fTrackId; | |
153 | fFlags=aTrack.fFlags; | |
154 | fLabel=aTrack.fLabel; | |
155 | fImpactD=aTrack.fImpactD; | |
156 | fImpactZ=aTrack.fImpactZ; | |
157 | fCdd=aTrack.fCdd; | |
158 | fCdz=aTrack.fCdz; | |
159 | fCzz=aTrack.fCzz; | |
160 | fITSchi2=aTrack.fITSchi2; | |
161 | fITSncls=aTrack.fITSncls; | |
162 | fTPCchi2=aTrack.fTPCchi2; | |
163 | fTPCncls=aTrack.fTPCncls; | |
164 | fTPCnclsF=aTrack.fTPCnclsF; | |
165 | fTPCsignalN=aTrack.fTPCsignalN; | |
166 | fTPCsignalS=aTrack.fTPCsignalS; | |
167 | fClusters=aTrack.fClusters; | |
168 | fShared=aTrack.fShared; | |
0b3bd1ac | 169 | fNominalTpcEntrancePoint=aTrack.fNominalTpcEntrancePoint; |
170 | fNominalTpcExitPoint=aTrack.fNominalTpcExitPoint; | |
ea77036b | 171 | fKinkIndexes[0] = aTrack.fKinkIndexes[0]; |
172 | fKinkIndexes[1] = aTrack.fKinkIndexes[1]; | |
173 | fKinkIndexes[2] = aTrack.fKinkIndexes[2]; | |
0215f606 | 174 | if (ValidHiddenInfo()) |
175 | delete fHiddenInfo; | |
176 | if (aTrack.ValidHiddenInfo()) | |
d0e92d9a | 177 | fHiddenInfo = aTrack.GetHiddenInfo()->Clone(); |
0215f606 | 178 | else |
179 | fHiddenInfo = NULL; | |
180 | ||
181 | return *this; | |
182 | } | |
183 | ||
67427ff7 | 184 | void AliFemtoTrack::SetCharge(const short& ch){fCharge=ch;} |
185 | ||
186 | void AliFemtoTrack::SetPidProbElectron(const float& x){fPidProbElectron = x;} | |
187 | void AliFemtoTrack::SetPidProbPion(const float& x){fPidProbPion = x;} | |
188 | void AliFemtoTrack::SetPidProbKaon(const float& x){fPidProbKaon = x;} | |
189 | void AliFemtoTrack::SetPidProbProton(const float& x){fPidProbProton = x;} | |
190 | void AliFemtoTrack::SetPidProbMuon(const float& x){fPidProbMuon = x;} | |
191 | ||
192 | void AliFemtoTrack::SetP(const AliFemtoThreeVector& p){fP = p;} | |
193 | void AliFemtoTrack::SetPt(const float& pt){fPt = pt;} | |
194 | void AliFemtoTrack::SetHelix(const AliFmPhysicalHelixD& h){fHelix = h;} | |
195 | void AliFemtoTrack::SetTrackId(const short & id) { fTrackId=id;} | |
196 | void AliFemtoTrack::SetFlags(const long int &flags) {fFlags=flags;} | |
197 | void AliFemtoTrack::SetLabel(const int &label) {fLabel=label;} | |
198 | void AliFemtoTrack::SetImpactD(const float& ImpactD){fImpactD=ImpactD;} | |
199 | void AliFemtoTrack::SetImpactZ(const float& ImpactZ){fImpactZ=ImpactZ;} | |
200 | void AliFemtoTrack::SetCdd(const float& Cdd){fCdd=Cdd;} | |
201 | void AliFemtoTrack::SetCdz(const float& Cdz){fCdz=Cdz;} | |
202 | void AliFemtoTrack::SetCzz(const float& Czz){fCzz=Czz;} | |
203 | void AliFemtoTrack::SetITSchi2(const float& ITSchi2){fITSchi2=ITSchi2;} | |
204 | void AliFemtoTrack::SetITSncls(const int& ITSncls){fITSncls=ITSncls;} | |
205 | void AliFemtoTrack::SetTPCchi2(const float& TPCchi2){fTPCchi2=TPCchi2;} | |
206 | void AliFemtoTrack::SetTPCncls(const int& TPCncls){fTPCncls=TPCncls;} | |
207 | void AliFemtoTrack::SetTPCnclsF(const short& TPCnclsF){fTPCnclsF=TPCnclsF;} | |
208 | void AliFemtoTrack::SetTPCsignalN(const short& TPCsignalN){fTPCsignalN=TPCsignalN;} | |
209 | void AliFemtoTrack::SetTPCsignalS(const float& TPCsignalS){fTPCsignalS=TPCsignalS;} | |
0b3bd1ac | 210 | void AliFemtoTrack::SetSigmaToVertex(const float& Sigma){fSigmaToVertex=Sigma;} |
67427ff7 | 211 | |
212 | ||
213 | short AliFemtoTrack::Charge() const {return fCharge;} | |
214 | AliFemtoThreeVector AliFemtoTrack::P() const {return fP;} | |
215 | float AliFemtoTrack::Pt() const {return fPt;} | |
216 | const AliFmPhysicalHelixD& AliFemtoTrack::Helix() const {return fHelix;} | |
217 | short AliFemtoTrack::TrackId() const { return fTrackId; } | |
218 | long int AliFemtoTrack::Flags() const {return fFlags;} | |
219 | int AliFemtoTrack::Label()const {return fLabel;} | |
220 | float AliFemtoTrack::ImpactD()const{return fImpactD;} | |
221 | float AliFemtoTrack::ImpactZ()const{return fImpactZ;} | |
222 | float AliFemtoTrack::Cdd() const{return fCdd;} | |
223 | float AliFemtoTrack::Cdz() const{return fCdz;} | |
224 | float AliFemtoTrack::Czz() const{return fCzz;} | |
225 | float AliFemtoTrack::ITSchi2() const{return fITSchi2;} | |
226 | int AliFemtoTrack::ITSncls() const{return fITSncls;} | |
227 | float AliFemtoTrack::TPCchi2() const{return fTPCchi2;} | |
228 | int AliFemtoTrack::TPCncls() const{return fTPCncls;} | |
229 | short AliFemtoTrack::TPCnclsF() const{return fTPCnclsF;} | |
230 | short AliFemtoTrack::TPCsignalN() const{return fTPCsignalN;} | |
231 | float AliFemtoTrack::TPCsignalS() const{return fTPCsignalS;} | |
0b3bd1ac | 232 | float AliFemtoTrack::SigmaToVertex() const{return fSigmaToVertex;} |
67427ff7 | 233 | |
234 | void AliFemtoTrack::SetHiddenInfo(AliFemtoHiddenInfo* aHiddenInfo) {fHiddenInfo=aHiddenInfo;} | |
235 | bool AliFemtoTrack::ValidHiddenInfo() const { if (fHiddenInfo) return true; else return false; } | |
d0e92d9a | 236 | AliFemtoHiddenInfo* AliFemtoTrack::GetHiddenInfo() const {return fHiddenInfo;} |
67427ff7 | 237 | |
238 | AliFemtoTrack::~AliFemtoTrack() | |
239 | { | |
0b3bd1ac | 240 | // destructor |
67427ff7 | 241 | if (fHiddenInfo) |
242 | delete fHiddenInfo; | |
243 | // cout << "Deleted track " << this << endl; | |
244 | } | |
245 | ||
246 | const TBits& AliFemtoTrack::TPCclusters() const {return fClusters;} | |
247 | const TBits& AliFemtoTrack::TPCsharing() const {return fShared;} | |
248 | ||
249 | void AliFemtoTrack::SetTPCcluster(const short& aNBit, const Bool_t& aValue) | |
250 | { | |
251 | fClusters.SetBitNumber(aNBit, aValue); | |
252 | } | |
253 | ||
254 | void AliFemtoTrack::SetTPCshared(const short& aNBit, const Bool_t& aValue) | |
255 | { | |
256 | fShared.SetBitNumber(aNBit, aValue); | |
257 | } | |
258 | ||
ea77036b | 259 | void AliFemtoTrack::SetTPCClusterMap(const TBits& aBits) |
260 | { | |
261 | fClusters = aBits; | |
262 | } | |
263 | void AliFemtoTrack::SetTPCSharedMap(const TBits& aBits) | |
264 | { | |
265 | fShared = aBits; | |
266 | } | |
267 | ||
268 | void AliFemtoTrack::SetKinkIndexes(int points[3]) | |
269 | { | |
0b3bd1ac | 270 | // Transfer the Kink indices |
ea77036b | 271 | fKinkIndexes[0] = points[0]; |
272 | fKinkIndexes[1] = points[1]; | |
273 | fKinkIndexes[2] = points[2]; | |
274 | } | |
275 | ||
276 | int AliFemtoTrack::KinkIndex(int aIndex) const | |
277 | { | |
0b3bd1ac | 278 | // Return Kink index |
ea77036b | 279 | if ((aIndex <3) && (aIndex>=0)) |
280 | return fKinkIndexes[aIndex]; | |
281 | else | |
282 | return 0; | |
283 | } | |
0b3bd1ac | 284 | |
285 | // void AliFemtoTrack::SetXTPC(const AliFemtoThreeVector& aXTPC) | |
286 | // { | |
287 | // fXTPC = aXTPC; | |
288 | // } | |
289 | ||
290 | // void AliFemtoTrack::SetXTPC(double *aXTPC) | |
291 | // { | |
292 | // fXTPC.setX(aXTPC[0]); | |
293 | // fXTPC.setY(aXTPC[1]); | |
294 | // fXTPC.setZ(aXTPC[2]); | |
295 | // } | |
296 | ||
297 | // AliFemtoThreeVector AliFemtoTrack::XTPC() const | |
298 | // { | |
299 | // return fXTPC; | |
300 | // } | |
301 | ||
302 | const AliFemtoThreeVector& AliFemtoTrack::NominalTpcExitPoint() const | |
303 | { | |
304 | return fNominalTpcExitPoint; | |
305 | } | |
306 | const AliFemtoThreeVector& AliFemtoTrack::NominalTpcEntrancePoint() const | |
307 | { | |
308 | return fNominalTpcEntrancePoint; | |
309 | } | |
310 | ||
311 | void AliFemtoTrack::SetNominalTPCEntrancePoint(const AliFemtoThreeVector& aXTPC) | |
312 | { | |
313 | fNominalTpcEntrancePoint = aXTPC; | |
314 | } | |
315 | void AliFemtoTrack::SetNominalTPCEntrancePoint(double *aXTPC) | |
316 | { | |
317 | // Store the nominal TPC entrance point | |
318 | fNominalTpcEntrancePoint.setX(aXTPC[0]); | |
319 | fNominalTpcEntrancePoint.setY(aXTPC[1]); | |
320 | fNominalTpcEntrancePoint.setZ(aXTPC[2]); | |
321 | } | |
322 | ||
323 | void AliFemtoTrack::SetNominalTPCExitPoint(const AliFemtoThreeVector& aXTPC) | |
324 | { | |
325 | fNominalTpcExitPoint = aXTPC; | |
326 | } | |
327 | void AliFemtoTrack::SetNominalTPCExitPoint(double *aXTPC) | |
328 | { | |
329 | // Store the nominal TPC exit point | |
330 | fNominalTpcExitPoint.setX(aXTPC[0]); | |
331 | fNominalTpcExitPoint.setY(aXTPC[1]); | |
332 | fNominalTpcExitPoint.setZ(aXTPC[2]); | |
333 | } |