]>
Commit | Line | Data |
---|---|---|
97724bd1 | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // ----------------------------------------------------------------------- | |
17 | // Track class for the DiHadronPID analysis. | |
18 | // ----------------------------------------------------------------------- | |
19 | // Author: Misha Veldhoen (misha.veldhoen@cern.ch) | |
6788af99 | 20 | |
a5422983 | 21 | #include "AliTrackDiHadronPID.h" |
6788af99 | 22 | |
6788af99 | 23 | #include "AliAODVertex.h" |
6788af99 | 24 | #include "AliPID.h" |
6788af99 | 25 | #include "AliTPCPIDResponse.h" |
26 | ||
6788af99 | 27 | ClassImp(AliTrackDiHadronPID); |
28 | ||
28161374 | 29 | Double_t AliTrackDiHadronPID::fSigmaTOFStd = 80.; // Should perhaps be replaced with a |
30 | Double_t AliTrackDiHadronPID::fSigmaTPCStd = 3.5; // function later. | |
31 | ||
97724bd1 | 32 | // ----------------------------------------------------------------------- |
6788af99 | 33 | AliTrackDiHadronPID::AliTrackDiHadronPID(): |
34 | TObject(), | |
35 | fAODTrack(0x0), | |
36 | fAODGlobalTrack(0x0), | |
37 | fAODEvent(0x0), | |
38 | fAODMCParticle(0x0), | |
39 | fPIDResponse(0x0), | |
40 | fBasicInfoAvailable(kFALSE), | |
41 | fFlagsAvailable(kFALSE), | |
42 | fDCAInfoAvailable(kFALSE), | |
43 | fITSInfoAvailable(kFALSE), | |
44 | fTPCInfoAvailable(kFALSE), | |
45 | fTOFInfoAvailable(kFALSE), | |
46 | fMCInfoAvailable(kFALSE), | |
47 | fPt(-999.), | |
48 | fEta(-999.), | |
49 | fPhi(-999.), | |
50 | fFlags(0), | |
51 | fFilterMap(0), | |
52 | fID(0), | |
53 | fLabel(0), | |
54 | fCharge(0), | |
6214ec0c | 55 | fNclsTPC(-999), |
6788af99 | 56 | fDCAz(-999.), |
57 | fDCAxy(-999.), | |
58 | fTOFsignal(-999.), | |
a5422983 | 59 | fTOFMatchingStatus(-1), |
6788af99 | 60 | fTPCsignal(-999.), |
61 | fTPCmomentum(-999.), | |
f054df96 | 62 | fITSClusterMap(0), |
6788af99 | 63 | fMCPt(-999.), |
64 | fMCEta(-999.), | |
65 | fMCPhi(-999.), | |
66 | fMCY(-999.), | |
67 | fPdgCode(0), | |
68 | fIsPhysicalPrimary(kFALSE), | |
69 | fIsSecondaryFromWeakDecay(kFALSE), | |
70 | fIsSecondaryFromMaterial(kFALSE), | |
71 | fDebug(0) | |
72 | ||
73 | { | |
74 | ||
75 | // | |
76 | // Default Constructor. | |
77 | // | |
78 | ||
50dfda71 | 79 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 80 | |
81 | for (Int_t iSpecies = 0; iSpecies < 3; iSpecies++) { | |
82 | fTOFsignalMinusExpected[iSpecies] = -999.; | |
83 | fTOFNsigma[iSpecies] = -999.; | |
84 | fTPCsignalMinusExpected[iSpecies] = -999.; | |
85 | fTPCNsigma[iSpecies] = -999.; | |
86 | fY[iSpecies] = -999.; | |
87 | } | |
88 | ||
89 | for (Int_t iITSlayer = 0; iITSlayer < 6; iITSlayer++) { | |
90 | fITSHits[iITSlayer] = kFALSE; | |
91 | } | |
92 | ||
a5422983 | 93 | for (Int_t iN = 0; iN < 3; ++iN) { |
94 | fTOFLabel[iN] = -1; // Same convention as in ESDs | |
95 | } | |
96 | ||
6788af99 | 97 | } |
98 | ||
97724bd1 | 99 | // ----------------------------------------------------------------------- |
6788af99 | 100 | AliTrackDiHadronPID::AliTrackDiHadronPID(AliAODTrack* track, AliAODTrack* globaltrack, AliAODMCParticle* mcparticle, AliPIDResponse* pidresponse): |
101 | TObject(), | |
102 | fAODTrack(0x0), | |
103 | fAODGlobalTrack(0x0), | |
104 | fAODEvent(0x0), | |
105 | fAODMCParticle(0x0), | |
106 | fPIDResponse(0x0), | |
107 | fBasicInfoAvailable(kFALSE), | |
108 | fFlagsAvailable(kFALSE), | |
109 | fDCAInfoAvailable(kFALSE), | |
110 | fITSInfoAvailable(kFALSE), | |
111 | fTPCInfoAvailable(kFALSE), | |
112 | fTOFInfoAvailable(kFALSE), | |
113 | fMCInfoAvailable(kFALSE), | |
114 | fPt(-999.), | |
115 | fEta(-999.), | |
116 | fPhi(-999.), | |
117 | fFlags(0), | |
118 | fFilterMap(0), | |
119 | fID(0), | |
120 | fLabel(0), | |
121 | fCharge(0), | |
6214ec0c | 122 | fNclsTPC(-999), |
6788af99 | 123 | fDCAz(-999.), |
124 | fDCAxy(-999.), | |
125 | fTOFsignal(-999.), | |
a5422983 | 126 | fTOFMatchingStatus(-1), |
6788af99 | 127 | fTPCsignal(-999.), |
128 | fTPCmomentum(-999.), | |
f054df96 | 129 | fITSClusterMap(0), |
6788af99 | 130 | fMCPt(-999.), |
131 | fMCEta(-999.), | |
132 | fMCPhi(-999.), | |
133 | fMCY(-999.), | |
134 | fPdgCode(0), | |
135 | fIsPhysicalPrimary(kFALSE), | |
136 | fIsSecondaryFromWeakDecay(kFALSE), | |
137 | fIsSecondaryFromMaterial(kFALSE), | |
138 | fDebug(0) | |
139 | { | |
140 | ||
141 | // | |
142 | // Constructor. | |
143 | // | |
144 | ||
50dfda71 | 145 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 146 | |
147 | for (Int_t iSpecies = 0; iSpecies < 3; iSpecies++) { | |
148 | fTOFsignalMinusExpected[iSpecies] = -999.; | |
149 | fTOFNsigma[iSpecies] = -999.; | |
150 | fTPCsignalMinusExpected[iSpecies] = -999.; | |
151 | fTPCNsigma[iSpecies] = -999.; | |
152 | fY[iSpecies] = -999.; | |
153 | } | |
154 | ||
155 | for (Int_t iITSlayer = 0; iITSlayer < 6; iITSlayer++) { | |
156 | fITSHits[iITSlayer] = kFALSE; | |
157 | } | |
158 | ||
a5422983 | 159 | for (Int_t iN = 0; iN < 3; ++iN) { |
160 | fTOFLabel[iN] = -1; // Same convention as in ESDs | |
161 | } | |
162 | ||
6788af99 | 163 | if (track) { |
164 | fAODTrack = track; | |
28161374 | 165 | fAODEvent = const_cast<AliAODEvent*>(track->GetAODEvent()); |
6788af99 | 166 | } |
167 | if (globaltrack) fAODGlobalTrack = globaltrack; | |
168 | if (mcparticle) fAODMCParticle = mcparticle; | |
169 | if (pidresponse) fPIDResponse = pidresponse; | |
170 | ||
171 | // Copy AOD Track info. | |
172 | if (fAODTrack) { | |
173 | CopyBasicTrackInfo(); | |
174 | } else { | |
175 | AliError("No Track Supplied."); | |
176 | } | |
177 | ||
07d62e30 | 178 | // Copy the rest of the track parameters if the filtermap is nonzero. |
179 | // If fFiltermap == 0, then propagation to the DCA will result in a floating point error. | |
180 | if (fFilterMap) { | |
181 | ||
182 | // Find the Global Track. | |
183 | if (fID >= 0) fAODGlobalTrack = fAODTrack; | |
184 | ||
185 | // Copy DCA and PID info. | |
186 | if (fAODGlobalTrack) { | |
187 | CopyFlags(); | |
188 | if (fAODEvent) CopyDCAInfo(); | |
189 | else AliError("Couln't find AOD Event."); | |
190 | CopyITSInfo(); | |
191 | if (fPIDResponse) CopyTPCInfo(); | |
192 | CopyTOFInfo(); | |
193 | } else { | |
194 | AliError("Couldn't find Global Track."); | |
195 | } | |
196 | ||
197 | // Copy MC info. | |
198 | if (fAODMCParticle) { | |
199 | CopyMCInfo(); | |
200 | } | |
201 | ||
202 | } | |
6788af99 | 203 | |
204 | // Test | |
205 | /* Double_t sigmaTOFProton = TMath::Abs(fPIDResponse->NumberOfSigmasTOF(fAODTrack, AliPID::kProton)); | |
206 | if ( sigmaTOFProton < 1.0) {cout<<"tofsigmabelowone: "<<sigmaTOFProton<<endl;} | |
207 | ||
208 | Double_t sigmaTPCProton = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(fAODTrack, AliPID::kProton)); | |
209 | if ( sigmaTPCProton < 1.0) {cout<<"tpcsigmabelowone: "<<sigmaTPCProton<<endl;}*/ | |
210 | } | |
211 | ||
97724bd1 | 212 | // ----------------------------------------------------------------------- |
6788af99 | 213 | Bool_t AliTrackDiHadronPID::CopyBasicTrackInfo() { |
214 | ||
215 | // | |
216 | // Copies everything available in every AOD track. | |
217 | // | |
218 | ||
50dfda71 | 219 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 220 | |
221 | fPt = fAODTrack->Pt(); | |
222 | fEta = fAODTrack->Eta(); | |
223 | fPhi = fAODTrack->Phi(); | |
224 | ||
225 | fY[0] = fAODTrack->Y(AliAODTrack::kPion); | |
226 | fY[1] = fAODTrack->Y(AliAODTrack::kKaon); | |
227 | fY[2] = fAODTrack->Y(AliAODTrack::kProton); | |
228 | ||
229 | //fFlags = fAODTrack->GetFlags(); // FLAGS MUST BE TAKEN FROM GLOBAL TRACKS. | |
230 | fFilterMap = fAODTrack->GetFilterMap(); | |
231 | ||
232 | fID = fAODTrack->GetID(); | |
233 | fLabel = fAODTrack->GetLabel(); | |
234 | ||
235 | fCharge = fAODTrack->Charge(); | |
6214ec0c | 236 | fNclsTPC = fAODTrack->GetTPCNcls(); |
6788af99 | 237 | |
238 | fBasicInfoAvailable = kTRUE; | |
239 | return fBasicInfoAvailable; | |
240 | ||
241 | } | |
242 | ||
97724bd1 | 243 | // ----------------------------------------------------------------------- |
6788af99 | 244 | Bool_t AliTrackDiHadronPID::CopyFlags() { |
245 | ||
246 | // | |
247 | // Copies Flags (properly stored in global track) | |
248 | // | |
249 | ||
50dfda71 | 250 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 251 | |
252 | // Copy Flags | |
253 | fFlags = fAODGlobalTrack->GetFlags(); | |
a5422983 | 254 | /* |
6788af99 | 255 | // Is TOF mismatch? |
256 | if (AliAODTrack::kTOFmismatch&fFlags) { | |
a5422983 | 257 | fTOFMatchingStatus = kTRUE; |
6788af99 | 258 | //cout<<"Found TOF mismatch!"<<endl; |
259 | } | |
a5422983 | 260 | else fTOFMatchingStatus = kFALSE; |
261 | */ | |
6788af99 | 262 | fFlagsAvailable = kTRUE; |
263 | return fFlagsAvailable; | |
264 | ||
265 | } | |
266 | ||
97724bd1 | 267 | // ----------------------------------------------------------------------- |
6788af99 | 268 | Bool_t AliTrackDiHadronPID::CopyDCAInfo() { |
269 | ||
270 | // | |
271 | // Copies DCA info. (only stored in a global track) | |
272 | // | |
273 | ||
50dfda71 | 274 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 275 | |
6214ec0c | 276 | if (fAODGlobalTrack->IsMuonTrack()) return kFALSE; |
277 | ||
6788af99 | 278 | // Propagate track to DCA. |
279 | Double_t PosAtDCA[2] = {-999,-999}; | |
280 | Double_t covar[3] = {-999,-999,-999}; | |
281 | //cout<<fAODTrack<<" "<<fAODGlobalTrack<<endl; | |
282 | Bool_t propagate = fAODGlobalTrack->PropagateToDCA(fAODEvent->GetPrimaryVertex(),fAODEvent->GetMagneticField(),100.,PosAtDCA,covar); | |
283 | ||
284 | if (propagate) { | |
285 | fDCAxy = PosAtDCA[0]; | |
286 | fDCAz = PosAtDCA[1]; | |
287 | } else { | |
288 | //AliError("Could not propagate track to DCA."); | |
289 | } | |
290 | ||
291 | if (propagate) fDCAInfoAvailable = kTRUE; | |
292 | return fDCAInfoAvailable; | |
293 | ||
294 | } | |
295 | ||
97724bd1 | 296 | // ----------------------------------------------------------------------- |
6788af99 | 297 | Bool_t AliTrackDiHadronPID::CopyITSInfo() { |
298 | ||
299 | // | |
300 | // Copies ITS info. | |
301 | // | |
302 | ||
50dfda71 | 303 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 304 | |
305 | // Get the ITS clustermap | |
306 | fITSClusterMap = fAODGlobalTrack->GetITSClusterMap(); | |
307 | ||
308 | // Copy the ITS hits. | |
309 | for (Int_t iITSlayer = 0; iITSlayer < 6; iITSlayer++) { | |
310 | fITSHits[iITSlayer] = fAODGlobalTrack->HasPointOnITSLayer(iITSlayer); | |
311 | } | |
312 | ||
313 | fITSInfoAvailable = kTRUE; | |
314 | return fITSInfoAvailable; | |
315 | ||
316 | } | |
317 | ||
97724bd1 | 318 | // ----------------------------------------------------------------------- |
6788af99 | 319 | Bool_t AliTrackDiHadronPID::CopyTPCInfo() { |
320 | ||
321 | // | |
01f5c9f4 LM |
322 | // Copies TPC info. (needs global track and pid response). |
323 | // See https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PIDInAnalysis#Signal_Deltas | |
324 | // for more info! | |
6788af99 | 325 | // |
326 | ||
50dfda71 | 327 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 328 | |
01f5c9f4 LM |
329 | // Get TPC signal and momentum. |
330 | fTPCsignal = fAODGlobalTrack->GetTPCsignal(); | |
331 | fTPCmomentum = fAODGlobalTrack->GetTPCmomentum(); | |
6788af99 | 332 | |
01f5c9f4 LM |
333 | // Obtaining (signal - expected). |
334 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTPC, fAODGlobalTrack, AliPID::kPion, fTPCsignalMinusExpected[0], kFALSE); | |
335 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTPC, fAODGlobalTrack, AliPID::kKaon, fTPCsignalMinusExpected[1], kFALSE); | |
336 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTPC, fAODGlobalTrack, AliPID::kProton, fTPCsignalMinusExpected[2], kFALSE); | |
6788af99 | 337 | |
01f5c9f4 | 338 | // Obtaining nSigma. |
6788af99 | 339 | fTPCNsigma[0] = fPIDResponse->NumberOfSigmasTPC(fAODGlobalTrack, AliPID::kPion); |
340 | fTPCNsigma[1] = fPIDResponse->NumberOfSigmasTPC(fAODGlobalTrack, AliPID::kKaon); | |
341 | fTPCNsigma[2] = fPIDResponse->NumberOfSigmasTPC(fAODGlobalTrack, AliPID::kProton); | |
342 | ||
343 | fTPCInfoAvailable = kTRUE; | |
344 | return fTPCInfoAvailable; | |
345 | ||
346 | } | |
347 | ||
97724bd1 | 348 | // ----------------------------------------------------------------------- |
6788af99 | 349 | Bool_t AliTrackDiHadronPID::CopyTOFInfo() { |
350 | ||
351 | // | |
352 | // Copies TOF info. (needs global track) | |
01f5c9f4 LM |
353 | // See https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PIDInAnalysis#Signal_Deltas |
354 | // for more info! | |
6788af99 | 355 | // |
356 | ||
50dfda71 | 357 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 358 | |
01f5c9f4 LM |
359 | // Get TOF signal minus the start time. |
360 | fTOFsignal = fAODGlobalTrack->GetTOFsignal(); | |
6788af99 | 361 | |
01f5c9f4 LM |
362 | // Get the expected times. |
363 | Double_t expectedTimes[AliPID::kSPECIES]; | |
364 | fAODGlobalTrack->GetIntegratedTimes(expectedTimes); | |
365 | /* | |
366 | // Get the exptected TOF resolution. | |
367 | AliTOFHeader* tofH = (AliTOFHeader*)ev->GetTOFHeader(); | |
368 | Double_t TOFpidRes[AliPID::kSPECIES]; | |
369 | tr->GetDetPid()->GetTOFpidResolution(TOFpidRes); | |
370 | */ | |
371 | // Obtaining (signal - expected). | |
372 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTOF, fAODGlobalTrack, AliPID::kPion, fTOFsignalMinusExpected[0], kFALSE); | |
373 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTOF, fAODGlobalTrack, AliPID::kKaon, fTOFsignalMinusExpected[1], kFALSE); | |
374 | fPIDResponse->GetSignalDelta(AliPIDResponse::kTOF, fAODGlobalTrack, AliPID::kProton, fTOFsignalMinusExpected[2], kFALSE); | |
6788af99 | 375 | |
01f5c9f4 | 376 | // Obtaining nSigma. |
6788af99 | 377 | fTOFNsigma[0] = fPIDResponse->NumberOfSigmasTOF(fAODGlobalTrack, AliPID::kPion); |
378 | fTOFNsigma[1] = fPIDResponse->NumberOfSigmasTOF(fAODGlobalTrack, AliPID::kKaon); | |
379 | fTOFNsigma[2] = fPIDResponse->NumberOfSigmasTOF(fAODGlobalTrack, AliPID::kProton); | |
380 | ||
a5422983 | 381 | // Q: what do the different TOF labels mean? |
382 | // It seems that in AOD090 the TOF labels aren't copied properly. | |
383 | //Int_t TOFlabeltmp[3] = {0}; | |
384 | fAODGlobalTrack->GetTOFLabel(fTOFLabel); | |
385 | //for (Int_t iN = 0; iN < 3; ++iN) {fTOFLabel[iN] = TOFlabeltmp[iN];} | |
bb2a7c0b | 386 | /* |
a5422983 | 387 | if (fTOFLabel[1] == fLabel || fTOFLabel[2] == fLabel) { |
388 | cout<<"fLabel = " << fLabel << " fTOFLabel = {" << fTOFLabel[0] << "," << fTOFLabel[1] << "," << fTOFLabel[2] <<"}"<<endl; | |
389 | } | |
bb2a7c0b | 390 | */ |
a5422983 | 391 | // The following will only work in an AOD production with the fTOFlabels set. |
392 | // If it wasn't set, then every track will be labeled as no match. | |
393 | if (fTOFLabel[0] == -1) {fTOFMatchingStatus = 2;} // TPC Track was not matched to any TOF hit. | |
394 | else if (fLabel == fTOFLabel[0]) {fTOFMatchingStatus = 0;} // TPC Track was correctly matched to a TOF hit. | |
395 | else {fTOFMatchingStatus = 1;} // TPC Track was mismatched. | |
396 | ||
01f5c9f4 | 397 | fTOFInfoAvailable = kTRUE; |
6788af99 | 398 | return fTOFInfoAvailable; |
399 | ||
400 | } | |
401 | ||
97724bd1 | 402 | // ----------------------------------------------------------------------- |
6788af99 | 403 | Bool_t AliTrackDiHadronPID::CopyMCInfo() { |
404 | ||
405 | // Copies MC info (needs an MC track with the same label) | |
406 | ||
407 | // Check if the label of the current track matches the label of the | |
408 | // generated particle. Note that the label of the AOD track can be | |
409 | // negative. This means that the quality of this track is not awesome, | |
410 | // but that it does correspond to the MC particle. | |
411 | ||
50dfda71 | 412 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} |
6788af99 | 413 | |
414 | /* | |
415 | if (fAODMCParticle->Label() != TMath::Abs(fAODTrack->GetLabel())) { | |
416 | cout<<"Label of supplied MC particle and reconstructed track do not match."<<endl; | |
417 | return kFALSE; | |
418 | } | |
419 | */ | |
420 | // Note: It seems like the Label of the AOD track points to the INDEX of the | |
421 | // MCPArticle, not to the label (See AliAnalysisTaskCompareAODTrackCuts.cxx) | |
422 | ||
423 | fMCPt = fAODMCParticle->Pt(); | |
424 | fMCEta = fAODMCParticle->Eta(); | |
425 | fMCPhi = fAODMCParticle->Phi(); | |
426 | fMCY = fAODMCParticle->Y(); | |
427 | fPdgCode = fAODMCParticle->PdgCode(); | |
428 | ||
429 | TClonesArray* mcArray = 0x0; | |
430 | mcArray = dynamic_cast<TClonesArray*>(fAODEvent->FindListObject(AliAODMCParticle::StdBranchName())); | |
431 | if (!mcArray) { | |
432 | AliFatal("No MC array found in the AOD."); | |
433 | } | |
434 | ||
435 | // Primary particle | |
436 | if ( fAODMCParticle->IsPhysicalPrimary() ){ | |
437 | fIsPhysicalPrimary = kTRUE; | |
438 | } else { | |
439 | // Safety check for mother existence. | |
440 | if (fAODMCParticle->GetMother() >= 0){ | |
441 | ||
442 | Int_t mcMotherPDG = -999; | |
443 | Int_t firstInt = -999; | |
444 | ||
445 | AliAODMCParticle* mcMother = (AliAODMCParticle*) mcArray->At(TMath::Abs(fAODMCParticle->GetMother())); | |
446 | mcMotherPDG = TMath::Abs(mcMother->GetPdgCode()); | |
447 | ||
448 | // Need a way to get the first intiger, for now Marek's method: | |
449 | firstInt = Int_t (mcMotherPDG/ TMath::Power(10, Int_t(TMath::Log10(mcMotherPDG)))); | |
450 | // cout<<"Mother PDG: "<<mcMotherPDG<<"; Firt integer: "<<firstInt<<endl; | |
451 | ||
452 | // Weak decay | |
453 | if( firstInt == 3){ | |
454 | fIsSecondaryFromWeakDecay = kTRUE; | |
455 | // Material decay | |
456 | } else { | |
457 | fIsSecondaryFromMaterial = kTRUE; | |
458 | } | |
459 | } | |
460 | } | |
461 | ||
462 | fMCInfoAvailable = kTRUE; | |
463 | return fMCInfoAvailable; | |
464 | ||
465 | } | |
569349af | 466 | |
467 | // ----------------------------------------------------------------------- | |
468 | Bool_t AliTrackDiHadronPID::UnknownSpecies(Int_t species) const { | |
469 | ||
470 | if (fDebug > 2) {cout << Form("File: %s, Line: %i, Function: %s",__FILE__,__LINE__,__func__) << endl;} | |
471 | if (species < 0 || species > 2) { | |
472 | cout<<"ERROR: Unknown species"<<endl; | |
473 | return kTRUE; | |
474 | } else { | |
475 | return kFALSE; | |
476 | } | |
477 | ||
478 | } |