1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // Interface to the user task
18 // Several strategies for Electron identification implemented.
19 // In addition users can combine different detectors or use
20 // single detector PID
23 // Markus Fasel <M.Fasel@gsi.de>
28 #include <THnSparse.h>
29 #include <TIterator.h>
31 #include <TObjArray.h>
32 #include <TObjString.h>
35 #include "AliESDpid.h"
36 #include "AliESDtrack.h"
40 #include "AliHFEpid.h"
41 #include "AliHFEpidBase.h"
42 #include "AliHFEpidITS.h"
43 #include "AliHFEpidTPC.h"
44 #include "AliHFEpidTRD.h"
45 #include "AliHFEpidTOF.h"
46 #include "AliHFEpidMC.h"
50 //____________________________________________________________
51 AliHFEpid::AliHFEpid():
54 fPIDstrategy(kUndefined),
60 // Default constructor
62 memset(fDetectorPID, 0, sizeof(AliHFEpidBase *) * kNdetectorPID);
65 //____________________________________________________________
66 AliHFEpid::AliHFEpid(const Char_t *name):
69 fPIDstrategy(kUndefined),
75 // Default constructor
76 // Create PID objects for all detectors
78 memset(fDetectorPID, 0, sizeof(AliHFEpidBase *) * kNdetectorPID);
79 fDetectorPID[kMCpid] = new AliHFEpidMC("MCPID");
80 fDetectorPID[kTPCpid] = new AliHFEpidTPC("TRDPID");
81 fDetectorPID[kTRDpid] = new AliHFEpidTRD("TRDPID");
82 fDetectorPID[kTOFpid] = new AliHFEpidTOF("TOFPID");
86 //____________________________________________________________
87 AliHFEpid::AliHFEpid(const AliHFEpid &c):
89 fEnabledDetectors(c.fEnabledDetectors),
90 fPIDstrategy(kUndefined),
92 fDebugLevel(c.fDebugLevel),
98 memset(fDetectorPID, 0, sizeof(AliHFEpidBase *) * kNdetectorPID);
102 //____________________________________________________________
103 AliHFEpid& AliHFEpid::operator=(const AliHFEpid &c){
105 // Assignment operator
107 if(&c != this) c.Copy(*this);
111 //____________________________________________________________
112 AliHFEpid::~AliHFEpid(){
116 for(Int_t idet = 0; idet < kNdetectorPID; idet++)
117 if(fDetectorPID[idet]) delete fDetectorPID[idet];
118 if(fQAlist) delete fQAlist; fQAlist = NULL; // Each detector has to care about its Histograms
119 ClearCommonObjects();
122 //____________________________________________________________
123 void AliHFEpid::Copy(TObject &o) const{
129 AliHFEpid &target = dynamic_cast<AliHFEpid &>(o);
130 target.ClearCommonObjects();
132 target.fEnabledDetectors = fEnabledDetectors;
133 target.fPIDstrategy = fPIDstrategy;
135 delete target.fQAlist; target.fQAlist = NULL;
137 if(fQAlist) target.fQAlist = new TList;
138 target.fQAlist = 0x0;
139 target.fDebugLevel = fDebugLevel;
141 // Copy detector PIDs
142 for(Int_t idet = 0; idet < kNdetectorPID; idet++){
143 //Cleanup pointers in case of assignment
144 if(target.fDetectorPID[idet])
145 delete target.fDetectorPID[idet];
146 if(fDetectorPID[idet])
147 target.fDetectorPID[idet] = dynamic_cast<AliHFEpidBase *>(fDetectorPID[idet]->Clone());
151 //____________________________________________________________
152 void AliHFEpid::AddCommonObject(TObject * const o){
154 // Add common object to the garbage collection
156 if(!fCommonObjects) fCommonObjects = new TObjArray;
157 fCommonObjects->Add(o);
160 //____________________________________________________________
161 void AliHFEpid::ClearCommonObjects(){
163 // empty garbage collection
166 fCommonObjects->Delete();
167 delete fCommonObjects;
168 fCommonObjects = NULL;
172 //____________________________________________________________
173 Bool_t AliHFEpid::InitializePID(TString arg){
175 // Initializes PID Object:
176 // + Defines which detectors to use
177 // + Initializes Detector PID objects
181 Bool_t initFail = kFALSE;
182 if(arg.BeginsWith("Strategy")){
183 // Initialize detector PIDs according to PID Strategies
184 arg.ReplaceAll("Strategy", "");
185 fPIDstrategy = arg.Atoi();
186 AliDebug(1, Form("%s - PID Strategy %d enabled", GetName(), fPIDstrategy));
187 switch(fPIDstrategy){
188 case 0: SwitchOnDetector(kMCpid); break; // Pure MC PID - only valid in MC mode
189 case 1: InitStrategy1(); break;
190 case 2: InitStrategy2(); break;
191 case 3: InitStrategy3(); break;
192 case 4: InitStrategy4(); break;
193 case 5: InitStrategy5(); break;
194 case 6: InitStrategy6(); break;
195 case 7: InitStrategy7(); break;
196 case 8: InitStrategy8(); break;
197 default: initFail = kFALSE;
200 // No Strategy defined, Initialize according to detectors specified
201 AliDebug(1, Form("%s - Doing InitializePID for Detectors %s end", GetName(), arg.Data()));
203 TObjArray *detsEnabled = arg.Tokenize(":");
204 TIterator *detIterator = detsEnabled->MakeIterator();
205 TObjString *det = NULL;
207 TString detectors[kNdetectorPID] = {"MC", "ESD", "ITS", "TPC", "TRD", "TOF"};
208 Int_t nDetectors = 0;
209 while((det = dynamic_cast<TObjString *>(detIterator->Next()))){
210 TString &detstring = det->String();
212 for(Int_t idet = 0; idet < kNdetectorPID; idet++){
213 if(!detstring.CompareTo(detectors[idet])){
219 SwitchOnDetector(detector);
221 } else AliError(Form("Detector %s not implemented (yet)", detstring.Data()));
223 if(!nDetectors) initFail = kTRUE;
226 AliError("Initializaion of the PID Failed");
230 // Initialize PID Objects
231 Bool_t status = kTRUE;
232 for(Int_t idet = 0; idet < kNdetectorPID; idet++){
233 if(!IsDetectorOn(idet)) continue;
234 if(fDetectorPID[idet]){
235 status &= fDetectorPID[idet]->InitializePID();
236 if(IsQAOn() && status) fDetectorPID[idet]->SetQAOn(fQAlist);
237 if(HasMCData() && status) fDetectorPID[idet]->SetHasMCData();
242 AliDebug(1, Form("%s - Done", GetName()));
245 //____________________________________________________________
246 Bool_t AliHFEpid::IsSelected(AliHFEpidObject *track){
248 // Steers PID decision for single detectors respectively combined
251 if(!track->fRecTrack){
253 return (TMath::Abs(fDetectorPID[kMCpid]->IsSelected(track)) == 11);
255 if(fPIDstrategy < 9){
256 AliDebug(1, Form("%s - PID Strategy %d", GetName(), fPIDstrategy));
258 switch(fPIDstrategy){
259 case 0: pid = IdentifyStrategy0(track); break;
260 case 1: pid = IdentifyStrategy1(track); break;
261 case 2: pid = IdentifyStrategy2(track); break;
262 case 3: pid = IdentifyStrategy3(track); break;
263 case 4: pid = IdentifyStrategy4(track); break;
264 case 5: pid = IdentifyStrategy5(track); break;
265 case 6: pid = IdentifyStrategy6(track); break;
266 case 7: pid = IdentifyStrategy7(track); break;
267 case 8: pid = IdentifyStrategy8(track); break;
272 if(TESTBIT(fEnabledDetectors, kTPCpid)){
273 if(IsQAOn() && fDebugLevel > 1){
274 AliInfo("Filling QA plots");
275 MakePlotsItsTpc(track); // First fill the QA histograms
277 if(TESTBIT(fEnabledDetectors, kTOFpid)){
279 return MakePidTpcTof(track);
280 } else if(TESTBIT(fEnabledDetectors, kTRDpid)){
281 // case TPC-TRD with low level detector Signals
282 return MakePidTpcTrd(track);
284 return (TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) ==11);
285 } else if(TESTBIT(fEnabledDetectors, kTRDpid)){
286 return (TMath::Abs(fDetectorPID[kTRDpid]->IsSelected(track)) ==11);
287 } else if(TESTBIT(fEnabledDetectors, kTOFpid)){
288 return (TMath::Abs(fDetectorPID[kTOFpid]->IsSelected(track)) ==11);
294 //____________________________________________________________
295 Bool_t AliHFEpid::MakePidTpcTof(AliHFEpidObject *track){
297 // Combines TPC and TOF PID decision
299 if(track->fAnalysisType != AliHFEpidObject::kESDanalysis) return kFALSE;
301 AliHFEpidTOF *tofPID = dynamic_cast<AliHFEpidTOF*>(fDetectorPID[kTOFpid]);
303 AliWarning("TOF pid object is NULL");
307 AliHFEpidTPC *tpcPID = dynamic_cast<AliHFEpidTPC*>(fDetectorPID[kTPCpid]);
309 AliWarning("TPC pid object is NULL");
313 // Use TOF PID to select particles with a sigma to the electron line > defined in initialize PID
314 if(TMath::Abs(tofPID->IsSelected(track)) != 11) return kFALSE;
315 // request TOF PID information, reject if no TOF information is available or if TOF identified as Proton or Kaon
316 // apply cut only up to certain upper momentum cut
317 /*Int_t pidTOF = tofPID->IsSelected(track);
318 Bool_t isRejected = kFALSE;
319 switch(TMath::Abs(pidTOF)){
320 case 321: if(track->fRecTrack->P() < 1.5) isRejected = kTRUE; break;
321 case 2212: if(track->fRecTrack->P() < 3) isRejected = kTRUE; break;
322 case 0: if(track->fRecTrack->P() < 3) isRejected = kTRUE; break; // No TOF information available
325 if(isRejected) return kFALSE;*/
327 // Particle passed TOF, let TPC decide, no line crossings defined anymore
329 // request the tpc PID information
330 return (TMath::Abs(tpcPID->IsSelected(track)) == 11);
333 //____________________________________________________________
334 Bool_t AliHFEpid::MakePidTpcTrd(AliHFEpidObject *track){
336 // Combination of TPC and TRD PID
337 // Fills Histograms TPC Signal vs. TRD signal for different
340 if(track->fAnalysisType != AliHFEpidObject::kESDanalysis) return kFALSE; //AOD based detector PID combination not yet implemented
341 AliDebug(1, "Analysis Type OK, do PID");
342 AliESDtrack *esdTrack = dynamic_cast<AliESDtrack *>(track->fRecTrack);
343 AliHFEpidTRD *trdPid = dynamic_cast<AliHFEpidTRD *>(fDetectorPID[kTRDpid]);
344 Int_t pdg = TMath::Abs(fDetectorPID[kMCpid]->IsSelected(track));
347 case 11: pid = AliPID::kElectron; break;
348 case 13: pid = AliPID::kMuon; break;
349 case 211: pid = AliPID::kPion; break;
350 case 321: pid = AliPID::kKaon; break;
351 case 2212: pid = AliPID::kProton; break;
354 Double_t content[10];
356 content[1] = esdTrack->P();
357 content[2] = esdTrack->GetTPCsignal();
358 content[3] = trdPid->GetTRDSignalV1(esdTrack, pid);
359 if(IsQAOn() && fDebugLevel > 1){
360 content[4] = trdPid->GetTRDSignalV2(esdTrack, pid);
361 AliDebug(1, Form("Momentum: %f, TRD Signal: Method 1[%f], Method 2[%f]", content[1], content[3], content[4]));
362 (dynamic_cast<THnSparseF *>(fQAlist->At(kTRDSignal)))->Fill(content);
364 if(content[1] > 2){ // perform combined
365 AliDebug(1, "Momentum bigger 2 GeV/c, doing combined PID");
366 if(content[2] > 65 && content[3] > 500) return kTRUE;
370 AliDebug(1, "Momentum smaller 2GeV/c, doing TPC alone PID");
371 return fDetectorPID[kTPCpid]->IsSelected(track) == 11;
375 //____________________________________________________________
376 void AliHFEpid::MakePlotsItsTpc(AliHFEpidObject *track){
378 // Make a plot ITS signal - TPC signal for several momentum bins
380 if(track->fAnalysisType != AliHFEpidObject::kESDanalysis) return; //AOD based detector PID combination not yet implemented
381 AliESDtrack * esdTrack = dynamic_cast<AliESDtrack *>(track->fRecTrack);
382 // Fill My Histograms for MC PID
383 Int_t pdg = TMath::Abs(fDetectorPID[kMCpid]->IsSelected(track));
386 case 11: pid = AliPID::kElectron; break;
387 case 13: pid = AliPID::kMuon; break;
388 case 211: pid = AliPID::kPion; break;
389 case 321: pid = AliPID::kKaon; break;
390 case 2212: pid = AliPID::kProton; break;
393 if(IsQAOn() && fDebugLevel > 0){
394 Double_t content[10];
396 content[1] = esdTrack->GetTPCInnerParam() ? esdTrack->GetTPCInnerParam()->P() : esdTrack->P();
397 content[2] = (dynamic_cast<AliHFEpidITS *>(fDetectorPID[kITSpid]))->GetITSSignalV1(track->fRecTrack, pid);
398 content[3] = esdTrack->GetTPCsignal();
399 AliDebug(1, Form("Momentum %f, TPC Signal %f, ITS Signal %f", content[1], content[2], content[3]));
400 (dynamic_cast<THnSparseF *>(fQAlist->At(kITSSignal)))->Fill(content);
404 //____________________________________________________________
405 void AliHFEpid::SetESDpid(AliESDpid *pid){
407 // Set ESD PID to the Detector PID objects
409 for(Int_t idet = 0; idet < kNdetectorPID; idet++){
410 if(fDetectorPID[idet]) fDetectorPID[idet]->SetESDpid(pid);
414 //____________________________________________________________
415 void AliHFEpid::SetQAOn(){
419 SetBit(kIsQAOn, kTRUE);
420 AliInfo("QA switched on");
423 fQAlist->SetName("PIDqa");
424 THnSparseF *histo = NULL;
426 // Prepare axis for QA histograms
427 const Int_t kMomentumBins = 41;
428 const Double_t kPtMin = 0.1;
429 const Double_t kPtMax = 10.;
430 Double_t momentumBins[kMomentumBins];
431 for(Int_t ibin = 0; ibin < kMomentumBins; ibin++)
432 momentumBins[ibin] = static_cast<Double_t>(TMath::Power(10,TMath::Log10(kPtMin) + (TMath::Log10(kPtMax)-TMath::Log10(kPtMin))/(kMomentumBins-1)*static_cast<Double_t>(ibin)));
434 // Add Histogram for combined TPC-TRD PID
436 AliDebug(1, "Adding histogram for ITS-TPC investigation");
437 const Int_t kDimensionsTRDsig = 5;
438 Int_t kNbinsTRDsig[kDimensionsTRDsig] = {AliPID::kSPECIES + 1, kMomentumBins - 1, 200, 3000, 3000};
439 Double_t binMinTRDsig[kDimensionsTRDsig] = {-1., 0.1, 0, 0, 0};
440 Double_t binMaxTRDsig[kDimensionsTRDsig] = {AliPID::kSPECIES, 10., 200., 3000., 3000.};
441 fQAlist->AddAt((histo = new THnSparseF("fCombTPCTRDpid", "Combined TPC-TRD PID", kDimensionsTRDsig, kNbinsTRDsig, binMinTRDsig, binMaxTRDsig)), kTRDSignal);
442 histo->GetAxis(1)->Set(kMomentumBins - 1, momentumBins);
443 histo->GetAxis(0)->SetTitle("Particle Species");
444 histo->GetAxis(1)->SetTitle("p / GeV/c");
445 histo->GetAxis(2)->SetTitle("TPC Signal / a.u.");
446 histo->GetAxis(3)->SetTitle("TRD Signal / a.u.");
447 histo->GetAxis(4)->SetTitle("TRD Signal / a.u.");
450 // Add Histogram for combined TPC-ITS PID
452 AliDebug(1, "Adding histogram for TPC-TRD investigation");
453 const Int_t kDimensionsITSsig = 4;
454 Int_t kNbinsITSsig[kDimensionsITSsig] = {AliPID::kSPECIES + 1, kMomentumBins - 1, 300, 3000};
455 Double_t binMinITSsig[kDimensionsITSsig] = {-1., 0.1, 0., 0.};
456 Double_t binMaxITSsig[kDimensionsITSsig] = {AliPID::kSPECIES, 10., 300., 300.};
457 fQAlist->AddAt((histo = new THnSparseF("fCombTPCITSpid", "Combined TPC-ITS PID", kDimensionsITSsig, kNbinsITSsig, binMinITSsig, binMaxITSsig)), kITSSignal);
458 histo->GetAxis(1)->Set(kMomentumBins - 1, momentumBins);
459 histo->GetAxis(0)->SetTitle("Particle Species");
460 histo->GetAxis(1)->SetTitle("p / GeV/c");
461 histo->GetAxis(2)->SetTitle("ITS Signal / a.u.");
462 histo->GetAxis(3)->SetTitle("TPC Signal / a.u.");
466 //____________________________________________________________
467 void AliHFEpid::InitStrategy1(){
469 // TPC alone, 3-sigma cut
471 AliHFEpidTPC *pid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
472 pid->SetTPCnSigma(1);
473 SwitchOnDetector(kTPCpid);
476 //____________________________________________________________
477 void AliHFEpid::InitStrategy2(){
479 // TPC alone, symmetric 3 sigma cut and asymmetric sigma cut in the momentum region between 2GeV/c and 10 GeV/c and sigma between -1 and 100
481 AliHFEpidTPC *pid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
482 pid->SetTPCnSigma(3);
483 pid->SetAsymmetricTPCsigmaCut(2., 10., 0., 4.);
484 SwitchOnDetector(kTPCpid);
487 //____________________________________________________________
488 void AliHFEpid::InitStrategy3(){
490 // TPC alone, symmetric 3 sigma cut and 2 - -100 sigma pion rejection
492 AliHFEpidTPC *pid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
493 pid->SetTPCnSigma(3);
494 pid->SetRejectParticle(AliPID::kPion, 0., -100., 10., 1.);
495 SwitchOnDetector(kTPCpid);
498 //____________________________________________________________
499 void AliHFEpid::InitStrategy4(){
501 // TPC and TRD combined, TPC 3 sigma cut and TRD NN 90% el efficiency level above 2 GeV/c
504 AliHFEpidTRD *trdpid = dynamic_cast<AliHFEpidTRD *>(fDetectorPID[kTRDpid]);
505 trdpid->SetPIDMethod(AliHFEpidTRD::kLQ);
506 trdpid->SetElectronEfficiency(0.71);
507 SwitchOnDetector(kTRDpid);
510 //____________________________________________________________
511 void AliHFEpid::InitStrategy5(){
513 // TPC and TRD combined, TPC 3 sigma cut and TRD NN 90% el efficiency level above 2 GeV/c
516 SwitchOnDetector(kTRDpid);
519 //____________________________________________________________
520 void AliHFEpid::InitStrategy6(){
522 // Combined TPC-TOF PID, combination is discribed in the funtion MakePidTpcTof
524 AliHFEpidTPC *tpcpid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
525 AliHFEpidTOF *tofpid = dynamic_cast<AliHFEpidTOF *>(fDetectorPID[kTOFpid]);
526 tpcpid->SetTPCnSigma(2);
527 tofpid->SetTOFnSigma(3);
528 //TF1 *upperCut = new TF1("upperCut", "[0] * TMath::Exp([1]*x)", 0, 20);
529 TF1 *upperCut = new TF1("upperCut", "[0]", 0, 20); // Use constant upper cut
530 TF1 *lowerCut = new TF1("lowerCut", "[0] * TMath::Exp([1]*x) + [2]", 0, 20);
531 upperCut->SetParameter(0, 5.);
532 //upperCut->SetParameter(0, 2.7);
533 //upperCut->SetParameter(1, -0.4357);
534 lowerCut->SetParameter(0, -2.65);
535 lowerCut->SetParameter(1, -0.8757);
536 // lowerCut->SetParameter(2, -1);
537 if(HasMCData()) lowerCut->SetParameter(2, -0.997);
538 else lowerCut->SetParameter(2, -0.9);
539 tpcpid->SetUpperSigmaCut(upperCut);
540 tpcpid->SetLowerSigmaCut(lowerCut);
541 AddCommonObject(upperCut);
542 AddCommonObject(lowerCut);
543 SwitchOnDetector(kTPCpid);
544 SwitchOnDetector(kTOFpid);
547 //____________________________________________________________
548 void AliHFEpid::InitStrategy7(){
550 // TPC alone, symmetric 3 sigma cut and 2 - -100 sigma pion rejection
552 AliHFEpidTPC *pid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
553 pid->SetTPCnSigma(2);
554 pid->SetRejectParticle(AliPID::kProton, 0., -3., 10., 3.);
555 pid->SetRejectParticle(AliPID::kKaon, 0., -3., 10., 3.);
556 SwitchOnDetector(kTPCpid);
559 //____________________________________________________________
560 void AliHFEpid::InitStrategy8(){
562 // TOF, TRD and TPC together
564 AliHFEpidTPC *tpcpid = dynamic_cast<AliHFEpidTPC *>(fDetectorPID[kTPCpid]);
565 AliHFEpidTOF *tofpid = dynamic_cast<AliHFEpidTOF *>(fDetectorPID[kTOFpid]);
566 AliHFEpidTRD *trdpid = dynamic_cast<AliHFEpidTRD *>(fDetectorPID[kTRDpid]);
568 tpcpid->SetTPCnSigma(3);
569 tofpid->SetTOFnSigma(3);
570 trdpid->SetPIDMethod(AliHFEpidTRD::kLQ);
571 trdpid->SetElectronEfficiency(0.71);
572 SwitchOnDetector(kTPCpid);
573 SwitchOnDetector(kTOFpid);
574 SwitchOnDetector(kTRDpid);
578 //____________________________________________________________
579 Bool_t AliHFEpid::IdentifyStrategy0(AliHFEpidObject *track){
580 return TMath::Abs(fDetectorPID[kMCpid]->IsSelected(track)) == 11;
583 //____________________________________________________________
584 Bool_t AliHFEpid::IdentifyStrategy1(AliHFEpidObject *track){
585 return TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11;
588 //____________________________________________________________
589 Bool_t AliHFEpid::IdentifyStrategy2(AliHFEpidObject *track){
590 return TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11;
593 //____________________________________________________________
594 Bool_t AliHFEpid::IdentifyStrategy3(AliHFEpidObject *track){
595 return TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11;
598 //____________________________________________________________
599 Bool_t AliHFEpid::IdentifyStrategy4(AliHFEpidObject *track){
600 Int_t trdpid = TMath::Abs(fDetectorPID[kTRDpid]->IsSelected(track));
601 return (trdpid == 0 || trdpid == 11) && (TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11);
604 //____________________________________________________________
605 Bool_t AliHFEpid::IdentifyStrategy5(AliHFEpidObject *track){
606 return MakePidTpcTrd(track);
609 //____________________________________________________________
610 Bool_t AliHFEpid::IdentifyStrategy6(AliHFEpidObject *track){
611 return MakePidTpcTof(track);
614 //____________________________________________________________
615 Bool_t AliHFEpid::IdentifyStrategy7(AliHFEpidObject *track){
617 // Do PID in strategy 7: Proton and Kaon rejection and
618 // lower cut on TPC Signal
620 if(!(TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11))
625 //____________________________________________________________
626 Bool_t AliHFEpid::IdentifyStrategy8(AliHFEpidObject *track){
628 // Identify TPC, TRD, TOF
630 if(TMath::Abs(fDetectorPID[kTOFpid]->IsSelected(track)) != 11) return kFALSE;
631 Int_t trdpid = TMath::Abs(fDetectorPID[kTRDpid]->IsSelected(track));
632 return (trdpid == 0 || trdpid == 11) && (TMath::Abs(fDetectorPID[kTPCpid]->IsSelected(track)) == 11);
635 //____________________________________________________________
636 void AliHFEpid::PrintStatus() const {
638 // Print the PID configuration
640 printf("\n%s: Printing configuration\n", GetName());
641 printf("===============================================\n");
642 printf("PID Strategy: %d\n", fPIDstrategy);
643 printf("PID Detectors: \n");
645 TString detectors[kNdetectorPID] = {"MC", "ESD", "ITS", "TPC", "TRD", "TOF"};
646 for(Int_t idet = 0; idet < kNdetectorPID; idet++){
647 if(IsDetectorOn(idet)){
648 printf("\t%s\n", detectors[idet].Data());
652 if(!npid) printf("\tNone\n");