1 #ifndef ALIESDPIDCUTS_H
2 #define ALIESDPIDCUTS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 // Cuts the track based on numbers of sigmas in the detectors TPC and TOF
8 // The sigma cuts can be applied symmetrically or assymetrically
11 #ifndef ALIANALYSISCUTS_H
12 #include "AliAnalysisCuts.h"
28 class AliESDpidCuts : public AliAnalysisCuts{
30 kHasHistograms = BIT(17)
33 AliESDpidCuts(const Char_t *name = "AliESDpidCuts", const Char_t *title = "");
34 AliESDpidCuts(const AliESDpidCuts &ref); // Copy constructor
35 AliESDpidCuts &operator=(const AliESDpidCuts &ref);
36 virtual ~AliESDpidCuts();
39 virtual void Copy(TObject &c) const;
40 virtual Long64_t Merge(TCollection *coll);
42 Bool_t HasHistograms() const { return TestBit(kHasHistograms); }
43 void DefineHistograms(Color_t color = kRed);
44 void DrawHistograms();
45 void SaveHistograms(const Char_t *location = NULL);
46 virtual Bool_t IsSelected(TObject *);
47 virtual Bool_t IsSelected(TList * /*lst*/) {return kTRUE; }
48 virtual Bool_t AcceptTrack(const AliESDtrack *track, const AliESDEvent *event);
50 void SetPIDResponse(AliPIDResponse * pidresponse) { fPIDresponse = pidresponse; }
51 AliPIDResponse *GetPIDresponse() { return fPIDresponse; };
53 void SetTPCclusterRatioCut(Float_t clr) { fCutTPCclusterRatio = clr; }
54 inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma);
55 inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma);
56 inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma);
57 inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma);
58 void SetMinMomentumTOF(Float_t mom) { fMinMomentumTOF = mom; }
61 static const Int_t kNcuts; // Number of Cuts
62 AliPIDResponse *fPIDresponse; //! PID helper (n-sigma-cut)
63 Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species
64 Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species
65 Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line
66 Float_t fCutTOFnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TOF calculated time of flight line
67 Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC
68 Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum
70 //------------------------------------------
72 TH1I *fHcutStatistics; // Cut Statistics
73 TH2I *fHcutCorrelation; // Cut Correlation
74 TH1F *fHclusterRatio[2]; // TPC cluster Ratio
75 TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut
76 TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut
77 //------------------------------------------
79 ClassDef(AliESDpidCuts, 3)
82 //_____________________________________________________________________
83 void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
85 // symmetric sigma cut for TPC PID
87 fCutTPCnSigma[itype * 2] = -nSigma;
88 fCutTPCnSigma[itype * 2 + 1] = nSigma;
89 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
92 //_____________________________________________________________________
93 void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
95 // assymetric sigma cut for TPC PID
97 fCutTPCnSigma[itype * 2] = negSigma;
98 fCutTPCnSigma[itype * 2 + 1] = posSigma;
99 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
102 //_____________________________________________________________________
103 void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
105 // symmetric sigma cut for TOF PID
107 fCutTOFnSigma[itype * 2] = -nSigma;
108 fCutTOFnSigma[itype * 2 + 1] = nSigma;
109 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
112 //_____________________________________________________________________
113 void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
115 // assymetric sigma cut for TOF PID
117 fCutTOFnSigma[itype * 2] = negSigma;
118 fCutTOFnSigma[itype * 2 + 1] = posSigma;
119 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);