2 // Author: Francesca Bellini (fbellini@cern.ch)
9 #include "AliPIDResponse.h"
10 #include "AliRsnCutSetDaughterParticle.h"
12 class AliRsnCutPIDNSigma;
16 ClassImp(AliRsnCutSetDaughterParticle)
18 //__________________________________________________________________________________________________
19 AliRsnCutSetDaughterParticle::AliRsnCutSetDaughterParticle() :
20 AliRsnCutSet("AliRsnCutSetDaughterParticle", AliRsnTarget::kDaughter),
22 fAppliedCutSetID(AliRsnCutSetDaughterParticle::kNDaughterCuts),
26 fAODTrkCutFilterBit(0),
27 fCheckOnlyFilterBit(kTRUE),
28 fUseCustomQualityCuts(kFALSE),
29 fIsUse2011stdQualityCuts(kFALSE),
30 fIsUse2011stdQualityCutsHighPt(kFALSE)
33 // Default constructor
34 SetPtRange(0.0, 1E20);
35 SetEtaRange(1E20, 1E20);
38 //__________________________________________________________________________________________________
39 AliRsnCutSetDaughterParticle::AliRsnCutSetDaughterParticle(const char *name, AliRsnCutSetDaughterParticle::ERsnDaughterCutSet cutSetID, AliPID::EParticleType pid, Float_t nSigmaFast = -1.0, Int_t AODfilterBit = 0, Bool_t useTPCCrossedRows=kTRUE) :
40 AliRsnCutSet(name, AliRsnTarget::kDaughter),
42 fAppliedCutSetID(cutSetID),
43 fNsigmaTPC(nSigmaFast),
44 fNsigmaTOF(nSigmaFast),
45 fCutQuality(new AliRsnCutTrackQuality("CutQuality")),
46 fAODTrkCutFilterBit(AODfilterBit),
47 fCheckOnlyFilterBit(kTRUE),
48 fUseCustomQualityCuts(kFALSE),
49 fIsUse2011stdQualityCuts(kFALSE),
50 fIsUse2011stdQualityCutsHighPt(kFALSE)
55 //set here pt and eta range
56 SetPtRange(0.15, 20.0);
57 SetEtaRange(-0.8, 0.8);
59 //if nsigma not specified, sets "no-PID" cuts
63 AliWarning("Requested fast n-sigma PID with negative value for n. --> Setting n = 1E20");
66 //initialize quality std and PID cuts
67 InitStdQualityCuts(useTPCCrossedRows);
71 //__________________________________________________________________________________________________
72 AliRsnCutSetDaughterParticle::AliRsnCutSetDaughterParticle(const char *name, AliRsnCutTrackQuality *rsnTrackQualityCut, AliRsnCutSetDaughterParticle::ERsnDaughterCutSet cutSetID, AliPID::EParticleType pid, Float_t nSigmaFast = -1.0) :
73 AliRsnCutSet(name, AliRsnTarget::kDaughter),
75 fAppliedCutSetID(cutSetID),
76 fNsigmaTPC(nSigmaFast),
77 fNsigmaTOF(nSigmaFast),
78 fCutQuality(rsnTrackQualityCut),
79 fAODTrkCutFilterBit(0),
80 fCheckOnlyFilterBit(kFALSE),
81 fUseCustomQualityCuts(kFALSE),
82 fIsUse2011stdQualityCuts(kFALSE),
83 fIsUse2011stdQualityCutsHighPt(kFALSE)
86 // Constructor: uses externally-defined track-quality cut object
88 if (!rsnTrackQualityCut) {
89 //if external track quality cut object not defined,
90 //sets default track quality to be initialised (with cut on TPC crossed rows) +
91 //sets here pt and eta cuts
92 InitStdQualityCuts(kTRUE);
93 SetPtRange(0.15, 20.0);
94 SetEtaRange(-0.8, 0.8);
96 //checks validity of passed quality-cut object
97 //if Ok, inherits all cuts including Pt and Eta cut
98 fCheckOnlyFilterBit=kFALSE;
99 fUseCustomQualityCuts = kTRUE;
100 SetPtRange(rsnTrackQualityCut->GetPtRange(0), rsnTrackQualityCut->GetPtRange(1));
101 SetEtaRange(rsnTrackQualityCut->GetEtaRange(0),rsnTrackQualityCut->GetEtaRange(1));
102 AliInfo("Custom quality cuts applied");
103 rsnTrackQualityCut->Print();
106 //if nsigma not specified, sets "no-PID" cuts
110 AliWarning("Requested fast n-sigma PID with negative value for n. --> Setting n = 1E20");
113 //initialize PID cuts
118 //__________________________________________________________________________________________________
119 AliRsnCutSetDaughterParticle::AliRsnCutSetDaughterParticle(const AliRsnCutSetDaughterParticle ©) :
122 fAppliedCutSetID(copy.fAppliedCutSetID),
123 fNsigmaTPC(copy.fNsigmaTPC),
124 fNsigmaTOF(copy.fNsigmaTOF),
125 fCutQuality(copy.fCutQuality),
126 fAODTrkCutFilterBit(copy.fAODTrkCutFilterBit),
127 fCheckOnlyFilterBit(copy.fCheckOnlyFilterBit),
128 fUseCustomQualityCuts(copy.fUseCustomQualityCuts),
129 fIsUse2011stdQualityCuts(copy.fIsUse2011stdQualityCuts),
130 fIsUse2011stdQualityCutsHighPt(copy.fIsUse2011stdQualityCutsHighPt)
134 SetPtRange(copy.fPtRange[0], copy.fPtRange[1]);
135 SetEtaRange(copy.fEtaRange[0], copy.fEtaRange[1]);
138 //__________________________________________________________________________________________________
139 AliRsnCutSetDaughterParticle &AliRsnCutSetDaughterParticle::operator=(const AliRsnCutSetDaughterParticle ©)
144 AliRsnCutSet::operator=(copy);
148 fAppliedCutSetID=copy.fAppliedCutSetID;
149 fNsigmaTPC=copy.fNsigmaTPC;
150 fNsigmaTOF=copy.fNsigmaTOF;
151 fAODTrkCutFilterBit=copy.fAODTrkCutFilterBit;
152 fCheckOnlyFilterBit=copy.fCheckOnlyFilterBit;
153 fUseCustomQualityCuts=copy.fUseCustomQualityCuts;
154 fIsUse2011stdQualityCuts=copy.fIsUse2011stdQualityCuts;
155 fIsUse2011stdQualityCutsHighPt=copy.fIsUse2011stdQualityCutsHighPt;
156 fCutQuality=copy.fCutQuality;
160 //----------------------------------------------------------------------------
161 AliRsnCutSetDaughterParticle::~AliRsnCutSetDaughterParticle()
170 //----------------------------------------------------------------------------
171 void AliRsnCutSetDaughterParticle::Init()
174 //define TOF match cut
175 AliRsnCutTOFMatch *iCutTOFMatch = new AliRsnCutTOFMatch("CutTOFMatch");
177 AliRsnCutPIDNSigma *iCutTPCNSigma = new AliRsnCutPIDNSigma("CutTPCNSigma", fPID, AliRsnCutPIDNSigma::kTPC);//, AliRsnCutPIDNSigma::kTPCinnerP );
178 AliRsnCutPIDNSigma *iCutTPCTOFNSigma = new AliRsnCutPIDNSigma("CutTPCTOFNSigma", fPID, AliRsnCutPIDNSigma::kTPC);//, AliRsnCutPIDNSigma::kTPCinnerP );
179 AliRsnCutPIDNSigma *iCutTOFNSigma = new AliRsnCutPIDNSigma("CutTOFNSigma", fPID, AliRsnCutPIDNSigma::kTOF);//, AliRsnCutPIDNSigma::kP );
180 //define phi (azimuthal angle) cuts for TRD presence
181 AliRsnCutPhi *iCutPhiTRD2010 = new AliRsnCutPhi("CutPhiTRD2010","InTRD CheckTOF");
182 AliRsnCutPhi *iCutPhiNoTRD2010 = new AliRsnCutPhi("CutPhiNoTRD2010","OutTRD CheckTOF");
185 //defines cut schemes by combining quality cuts and PID cuts
187 switch (fAppliedCutSetID)
189 case AliRsnCutSetDaughterParticle::kNoCuts :
190 AliInfo("No cuts applied to daughter particle");
193 case AliRsnCutSetDaughterParticle::kQualityStd2010 :
195 SetCutScheme(fCutQuality->GetName());
198 case AliRsnCutSetDaughterParticle::kQualityStd2011:
200 SetCutScheme(fCutQuality->GetName());
203 case AliRsnCutSetDaughterParticle::kQualityStd2011HighPt:
205 SetCutScheme(fCutQuality->GetName());
208 case AliRsnCutSetDaughterParticle::kTOFMatch :
210 AddCut(iCutTOFMatch);
211 SetCutScheme( Form("%s&(%s)",fCutQuality->GetName(), iCutTOFMatch->GetName()) );
214 case AliRsnCutSetDaughterParticle::kFastTPCpidNsigma :
215 if (fNsigmaTPC <= 0.0) {
216 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTPCNSigma->GetName()));
217 SetNsigmaForFastTPCpid(10.0);
219 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
221 AddCut(iCutTPCNSigma);
222 SetCutScheme( Form("%s&%s",fCutQuality->GetName(), iCutTPCNSigma->GetName()) );
225 case AliRsnCutSetDaughterParticle::kFastTOFpidNsigma :
226 if (fNsigmaTOF <= 0.0) {
227 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
228 SetNsigmaForFastTOFpid(10.0);
230 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
231 //iCutTOFNSigma->AddPIDRange(3.0, 0.35, 1E20);
233 AddCut(iCutTOFNSigma);
234 SetCutScheme( Form("%s&%s",fCutQuality->GetName(), iCutTOFNSigma->GetName()) );
237 case AliRsnCutSetDaughterParticle::kTPCTOFpidKstarPP2010 :
238 /* Set TPC PID (if no TOF)*/
239 // all below 350 MeV: 5sigma
240 // all between 350 and 500 MeV: 3sigma
241 // pios above 500 MeV: 2sigma
242 // kaons between 500 and 700 MeV: 2sigma
243 // kaons above 700 MeV: rejected
244 iCutTPCNSigma->AddPIDRange(5.0, 0.0, 0.35);
245 iCutTPCNSigma->AddPIDRange(3.0, 0.35, 0.5);
246 if (fPID==AliPID::kPion)
247 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
248 if (fPID==AliPID::kKaon)
249 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 0.7);
252 AddCut(iCutTOFMatch);
253 AddCut(iCutTPCNSigma);
256 iCutTPCTOFNSigma->SinglePIDRange(5.0);
257 iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
258 iCutTOFNSigma->AddPIDRange(2.0, 1.5, 1E20);
260 AddCut(iCutTPCTOFNSigma);
261 AddCut(iCutTOFNSigma);
264 // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
265 SetCutScheme( Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName()) ) ;
268 case AliRsnCutSetDaughterParticle::kTOFpidKstarPbPb2010:
269 if (fNsigmaTOF <= 0.0) {
270 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
271 SetNsigmaForFastTOFpid(10.0);
273 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
274 //iCutTOFNSigma->AddPIDRange(3.0, 0.35, 1E20);
275 iCutTPCTOFNSigma->SinglePIDRange(5.0); //5-sigma veto on tpc signal
278 AddCut(iCutTOFNSigma);
279 AddCut(iCutTPCTOFNSigma);
280 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTOFNSigma->GetName(), iCutTPCTOFNSigma->GetName()) );
283 case AliRsnCutSetDaughterParticle::kTOFTPCmismatchKstarPbPb2010:
284 iCutTPCTOFNSigma->SinglePIDRange(5.0); //5-sigma veto on tpc signal
286 AddCut(iCutTOFMatch);
287 AddCut(iCutTPCTOFNSigma);
288 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTOFMatch->GetName(), iCutTPCTOFNSigma->GetName()) );
291 case AliRsnCutSetDaughterParticle::kTOFMatchTRD2010 :
293 AddCut(iCutTOFMatch);
294 AddCut(iCutPhiTRD2010);
295 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTOFMatch->GetName(), iCutPhiTRD2010->GetName()) );
298 case AliRsnCutSetDaughterParticle::kTOFMatchNoTRD2010 :
300 AddCut(iCutTOFMatch);
301 AddCut(iCutPhiNoTRD2010);
302 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTOFMatch->GetName(), iCutPhiNoTRD2010->GetName()) );
305 case AliRsnCutSetDaughterParticle::kTOFpidKstarPbPbTRD2010:
306 if (fNsigmaTOF <= 0.0) {
307 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
308 SetNsigmaForFastTOFpid(10.0);
310 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
311 //iCutTOFNSigma->AddPIDRange(3.0, 0.35, 1E20);
312 iCutTPCTOFNSigma->SinglePIDRange(5.0); //5-sigma veto on tpc signal
315 AddCut(iCutTOFNSigma);
316 AddCut(iCutTPCTOFNSigma);
317 AddCut(iCutPhiTRD2010);
318 SetCutScheme( Form("%s&%s&%s&%s",fCutQuality->GetName(), iCutTOFNSigma->GetName(), iCutTPCTOFNSigma->GetName(),iCutPhiTRD2010->GetName()) );
321 case AliRsnCutSetDaughterParticle::kTOFpidKstarPbPbNoTRD2010:
322 if (fNsigmaTOF <= 0.0) {
323 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
324 SetNsigmaForFastTOFpid(10.0);
326 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
327 //iCutTOFNSigma->AddPIDRange(3.0, 0.35, 1E20);
328 iCutTPCTOFNSigma->SinglePIDRange(5.0); //5-sigma veto on tpc signal
331 AddCut(iCutTOFNSigma);
332 AddCut(iCutTPCTOFNSigma);
333 AddCut(iCutPhiNoTRD2010);
334 SetCutScheme( Form("%s&%s&%s&%s",fCutQuality->GetName(), iCutTOFNSigma->GetName(), iCutTPCTOFNSigma->GetName(),iCutPhiNoTRD2010->GetName()) );
337 case AliRsnCutSetDaughterParticle::kTOFMatchTPCpidNsigma :
338 if (fNsigmaTPC <= 0.0) {
339 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTPCNSigma->GetName()));
340 SetNsigmaForFastTPCpid(10.0);
342 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
344 AddCut(iCutTPCNSigma);
345 AddCut(iCutTOFMatch);
346 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName()) );
349 case AliRsnCutSetDaughterParticle::kQualityStd2010TRD:
351 AddCut(iCutPhiTRD2010);
352 SetCutScheme( Form("%s&%s",fCutQuality->GetName(),iCutPhiTRD2010->GetName()) );
355 case AliRsnCutSetDaughterParticle::kQualityStd2010NoTRD:
357 AddCut(iCutPhiNoTRD2010);
358 SetCutScheme( Form("%s&%s",fCutQuality->GetName(),iCutPhiNoTRD2010->GetName()) );
361 case AliRsnCutSetDaughterParticle::kTOFMatchPPB2011: //pA analysis
363 AddCut(iCutTOFMatch);
364 SetCutScheme( Form("%s&(%s)",fCutQuality->GetName(), iCutTOFMatch->GetName()) );
367 case AliRsnCutSetDaughterParticle::kTPCpidKstarPPB2011:
368 if (fNsigmaTPC <= 0.0) {
369 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTPCNSigma->GetName()));
370 SetNsigmaForFastTPCpid(10.0);
372 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
374 AddCut(iCutTPCNSigma);
375 SetCutScheme( Form("%s&%s",fCutQuality->GetName(), iCutTPCNSigma->GetName()) );
378 case AliRsnCutSetDaughterParticle::kTOFpidKstarPPB2011:
379 if (fNsigmaTOF <= 0.0) {
380 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
381 SetNsigmaForFastTOFpid(10.0);
383 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
384 //iCutTOFNSigma->AddPIDRange(3.0, 0.35, 1E20);
385 iCutTPCTOFNSigma->SinglePIDRange(5.0); //5-sigma veto on tpc signal
388 AddCut(iCutTOFNSigma);
389 AddCut(iCutTPCTOFNSigma);
390 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTOFNSigma->GetName(), iCutTPCTOFNSigma->GetName()) );
393 case AliRsnCutSetDaughterParticle::kTPCTOFpidKstarPPB2011:
394 /* Set TPC PID (if no TOF)*/
395 // all below 350 MeV: 5sigma
396 // all between 350 and 500 MeV: 3sigma
397 // pios above 500 MeV: 2sigma
398 // kaons between 500 and 700 MeV: 2sigma
399 // kaons above 700 MeV: rejected
400 iCutTPCNSigma->AddPIDRange(5.0, 0.0, 0.35);
401 iCutTPCNSigma->AddPIDRange(3.0, 0.35, 0.5);
402 if (fPID==AliPID::kPion)
403 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
404 if (fPID==AliPID::kKaon)
405 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 0.7);
408 AddCut(iCutTOFMatch);
409 AddCut(iCutTPCNSigma);
412 iCutTPCTOFNSigma->SinglePIDRange(5.0);
413 iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
414 iCutTOFNSigma->AddPIDRange(2.0, 1.5, 1E20);
416 AddCut(iCutTPCTOFNSigma);
417 AddCut(iCutTOFNSigma);
420 // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
421 SetCutScheme( Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName()) ) ;
425 case AliRsnCutSetDaughterParticle::kTPCTOFtightPidKStarPPB2011:
426 if (fNsigmaTPC <= 0.0) {
427 AliWarning(Form("Invalid number of sigmas required for %s. Setting nSigma = 5.0",iCutTPCNSigma->GetName()));
428 SetNsigmaForFastTPCpid(5.0);
430 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
433 iCutTOFNSigma->SinglePIDRange(5.0);
435 iCutTOFNSigma->SinglePIDRange(3.0);
438 AddCut(iCutTPCNSigma);
439 AddCut(iCutTOFNSigma);
442 // quality & [ (TPCsigma & TOFsigma-2) ]
443 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(),iCutTPCNSigma->GetName(),iCutTOFNSigma->GetName()) ) ;
446 case AliRsnCutSetDaughterParticle::kTPCpidMatchPPB2011:
447 if (fNsigmaTPC <= 0.0) {
448 AliWarning(Form("Invalid number of sigmas required for %s. Setting nSigma = 5.0",iCutTPCNSigma->GetName()));
449 SetNsigmaForFastTPCpid(5.0);
451 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
453 AddCut(iCutTPCNSigma);
454 AddCut(iCutTOFMatch);
455 SetCutScheme( Form("%s&%s&%s",fCutQuality->GetName(), iCutTPCNSigma->GetName(),iCutTOFMatch->GetName()) );
458 case AliRsnCutSetDaughterParticle::kTPCpidTOFveto4s:
459 if (fNsigmaTPC <= 0.0) {
460 AliWarning(Form("Invalid number of sigmas required for %s. Setting nSigma = 5.0",iCutTPCNSigma->GetName()));
461 SetNsigmaForFastTPCpid(5.0);
463 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
465 iCutTOFNSigma->SinglePIDRange(4.0);
467 AddCut(iCutTPCNSigma);
468 AddCut(iCutTOFMatch);
469 AddCut(iCutTOFNSigma);
472 // quality & [ (TPCsigma & !TOFmatch) | (TPCsigma & TOFsigma) ]
473 SetCutScheme( Form("%s&((%s&(!%s))|(%s&%s))",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName(),iCutTOFNSigma->GetName(), iCutTPCNSigma->GetName()) ) ;
476 case AliRsnCutSetDaughterParticle::kTPCpidTOFveto3s:
477 if (fNsigmaTPC <= 0.0) {
478 AliWarning(Form("Invalid number of sigmas required for %s. Setting nSigma = 5.0",iCutTPCNSigma->GetName()));
479 SetNsigmaForFastTPCpid(5.0);
481 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
483 iCutTOFNSigma->SinglePIDRange(3.0);
485 AddCut(iCutTPCNSigma);
486 AddCut(iCutTOFMatch);
487 AddCut(iCutTOFNSigma);
490 // quality & [ (TPCsigma & !TOFmatch) | (TPCsigma & TOFsigma) ]
491 SetCutScheme( Form("%s&((%s&(!%s))|(%s&%s))",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName(),iCutTOFNSigma->GetName(), iCutTPCNSigma->GetName()) ) ;
494 case AliRsnCutSetDaughterParticle::kCombinedPidBestPtDep:
495 /* Set TPC PID (if no TOF)*/
496 // all below 500 MeV: 3sigma
497 // all above 500 MeV: 2sigma
498 iCutTPCNSigma->AddPIDRange(3.0, 0.0, 0.5);
499 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
502 AddCut(iCutTOFMatch);
503 AddCut(iCutTPCNSigma);
506 // pions if TOF match: TPC 5 sigma & TOF 3 sigma
507 // kaons if TOF match:
508 // below 1.5GeV/c: TPC 5 sigma & TOF 3 sigma
509 // above 1.5GeV/c: TPC 3 sigma & TOF 3 sigma
511 if (fPID==AliPID::kPion){
512 iCutTPCTOFNSigma->SinglePIDRange(5.0);
515 if (fPID==AliPID::kKaon){
516 iCutTPCTOFNSigma->AddPIDRange(5.0, 0.0, 1.5);
517 iCutTPCTOFNSigma->AddPIDRange(3.0, 1.5, 1E20);
519 iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1E20);
520 AddCut(iCutTPCTOFNSigma);
521 AddCut(iCutTOFNSigma);
524 // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
525 SetCutScheme( Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName()) ) ;
528 case AliRsnCutSetDaughterParticle::kTPCPidPtDep:
529 /* Set TPC PID (if no TOF)*/
530 // all below 500 MeV: 3sigma
531 // all above 500 MeV: 2sigma
532 iCutTPCNSigma->AddPIDRange(3.0, 0.0, 0.5);
533 iCutTPCNSigma->AddPIDRange(2.0, 0.5, 1E20);
536 AddCut(iCutTPCNSigma);
539 SetCutScheme( Form("%s&%s",fCutQuality->GetName(), iCutTPCNSigma->GetName()) ) ;
542 case AliRsnCutSetDaughterParticle::kTOFPidPtDep:
544 // all below 1500 MeV: 3sigma
545 // all above 1500 MeV: 2sigma
546 //TPC 5 sigma always to remove mismatch
547 iCutTPCTOFNSigma->SinglePIDRange(5.0);
548 iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
549 iCutTOFNSigma->AddPIDRange(2.0, 1.5, 1E20);
552 AddCut(iCutTPCTOFNSigma);
553 AddCut(iCutTOFNSigma);
556 SetCutScheme( Form("%s&%s&%s", fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName()) ) ;
559 case AliRsnCutSetDaughterParticle::kTPCRejPtDepTOFNsigma:
561 // TPC mismatch rejection:
562 // below 1.500 GeV: 5sigma
563 // above 1.500 GeV: 3sigma
564 // TOF nsigma PID in full pT
565 iCutTPCTOFNSigma->AddPIDRange(5.0, 0.0, 1.5);
566 iCutTPCTOFNSigma->AddPIDRange(3.0, 1.5, 1E20);
568 if (fNsigmaTOF <= 0.0) {
569 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTOFNSigma->GetName()));
570 SetNsigmaForFastTOFpid(10.0);
572 iCutTOFNSigma->SinglePIDRange(fNsigmaTOF);
575 AddCut(iCutTPCTOFNSigma);
576 AddCut(iCutTOFNSigma);
579 SetCutScheme( Form("%s&%s&%s", fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName()) ) ;
582 case AliRsnCutSetDaughterParticle::kTPCNsigmaTOFVetoPtDep:
585 // below 1.500 GeV: 5sigma
586 // above 1.500 GeV: 3sigma
587 // TPC nsigma PID in full pT
588 if (fNsigmaTPC <= 0.0) {
589 AliWarning(Form("Invalid number of sigmas required for %s. Setting default nSigma = 10",iCutTPCNSigma->GetName()));
590 SetNsigmaForFastTPCpid(10.0);
592 iCutTPCNSigma->SinglePIDRange(fNsigmaTPC);
594 iCutTOFNSigma->AddPIDRange(3.0, 0.0, 1.5);
595 iCutTOFNSigma->AddPIDRange(4.0, 1.5, 1E20);
598 AddCut(iCutTPCNSigma);
599 AddCut(iCutTOFMatch);
600 AddCut(iCutTOFNSigma);
603 // quality & [ (TPCsigma & !TOFmatch) | (TPCsigma & TOFsigma) ]
604 SetCutScheme( Form("%s&((%s&(!%s))|(%s&%s))",fCutQuality->GetName(), iCutTPCNSigma->GetName(), iCutTOFMatch->GetName(),iCutTOFNSigma->GetName(), iCutTPCNSigma->GetName()) ) ;
607 case AliRsnCutSetDaughterParticle::kTPCTOFpidLstar :
608 if (fPID==AliPID::kProton) {
609 iCutTPCNSigma->AddPIDRange(fNsigmaTPC, 0.0, 1.1);
611 if (fPID==AliPID::kKaon) {
612 iCutTPCNSigma->AddPIDRange(fNsigmaTPC, 0.0, 0.6);
616 AddCut(iCutTOFMatch);
617 AddCut(iCutTPCNSigma);
620 iCutTPCTOFNSigma->SinglePIDRange(5.0);
621 iCutTOFNSigma->AddPIDRange(fNsigmaTOF, 0.0, 10);
623 AddCut(iCutTPCTOFNSigma);
624 AddCut(iCutTOFNSigma);
627 // quality & [ (TOF & TPCTOF) || (!TOFmatch & TPConly) ]
628 SetCutScheme( Form("%s&((%s&%s)|((!%s)&%s))",fCutQuality->GetName(), iCutTPCTOFNSigma->GetName(), iCutTOFNSigma->GetName(), iCutTOFMatch->GetName(), iCutTPCNSigma->GetName()) ) ;
638 //-----------------------------------------------
639 void AliRsnCutSetDaughterParticle::PrintTrackQualityCuts()
641 //Prints track quality cuts
642 fCutQuality->Print();
646 //-----------------------------------------------
647 void AliRsnCutSetDaughterParticle::InitStdQualityCuts(Bool_t useTPCCrossedRows)
649 // initialize quality std (if not externally defined) and PID cuts
650 // init cut sets by setting variable params
652 // Bool_t isUse2011stdQualityCutsHighPt = ((fAppliedCutSetID==AliRsnCutSetDaughterParticle::kQualityStd2011HighPt) ||
653 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTOFMatchPPB2011) || //pA analysis
654 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTPCpidKstarPPB2011) ||
655 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTOFpidKstarPPB2011) ||
656 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTPCTOFpidKstarPPB2011) ||
657 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTPCpidTOFvetoKStarPPB2011) ||
658 // (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kTPCpidMatchPPB2011));
660 // Bool_t isUse2011stdQualityCuts = (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kQualityStd2011);
662 if (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kQualityStd2011) {
663 fIsUse2011stdQualityCuts = kTRUE;
664 fIsUse2011stdQualityCutsHighPt = kFALSE;
666 if (fAppliedCutSetID==AliRsnCutSetDaughterParticle::kQualityStd2011HighPt) {
667 fIsUse2011stdQualityCuts = kFALSE;
668 fIsUse2011stdQualityCutsHighPt = kTRUE;
671 if (fIsUse2011stdQualityCuts) {
672 AliInfo(Form("Using 2011 std quality cuts with cut on TPC %s",(useTPCCrossedRows?"crossed rows":"N clusters")));
673 fCutQuality->SetDefaults2011(useTPCCrossedRows, kFALSE);//uses filter bit 5 as default
675 if (fIsUse2011stdQualityCutsHighPt) {
676 AliInfo(Form("Using 2011 std quality cuts with cut on TPC %s for high-pT", (useTPCCrossedRows?"crossed rows":"N clusters")));
677 fCutQuality->SetDefaultsHighPt2011(useTPCCrossedRows, kFALSE);//uses filter bit 10 as default
679 AliInfo(Form("Using 2010 std quality cuts with cut on TPC %s", (useTPCCrossedRows?"crossed rows":"N clusters")));
680 fCutQuality->SetDefaults2010(useTPCCrossedRows, kFALSE);
683 fCutQuality->SetAODTestFilterBit(fAODTrkCutFilterBit); //changes default filter bit to the chosen filter bit
684 AliInfo(Form("Applying cut on AOD filter bit %i", fAODTrkCutFilterBit));
685 //apply pt and eta cuts
686 fCutQuality->SetPtRange(fPtRange[0], fPtRange[1]);
687 fCutQuality->SetEtaRange(fEtaRange[0], fEtaRange[1]);
688 AliInfo(Form("Pt range [%3.2f,%3.2f], Eta range [%3.2f, %3.2f]", fPtRange[0], fPtRange[1], fEtaRange[0], fEtaRange[1]));