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