]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliESDpidCuts.h
Merge branch 'trackMatcher'
[u/mrichter/AliRoot.git] / ANALYSIS / AliESDpidCuts.h
CommitLineData
7e1f5ba5 1#ifndef ALIESDPIDCUTS_H
2#define ALIESDPIDCUTS_H
3
4#ifndef ALIANALYSISCUTS_H
5#include "AliAnalysisCuts.h"
6#endif
7
8#ifndef ALIPID_H
9#include "AliPID.h"
10#endif
11
12class TCollection;
13class TH1F;
14class TH1I;
15class TH2I;
16class TList;
17class AliESDtrack;
10d100d4 18class AliESDEvent;
19class AliESDpid;
7e1f5ba5 20
21class AliESDpidCuts : public AliAnalysisCuts{
22 enum{
23 kHasHistograms = BIT(17)
24 };
25 public:
26 AliESDpidCuts(const Char_t *name = "AliESDpidCuts", const Char_t *title = "");
27 AliESDpidCuts(const AliESDpidCuts &ref); // Copy constructor
28 AliESDpidCuts &operator=(const AliESDpidCuts &ref);
29 virtual ~AliESDpidCuts();
30
31 virtual void Copy(TObject &c) const;
32 virtual Long64_t Merge(TCollection *coll);
33
34 Bool_t HasHistograms() const { return TestBit(kHasHistograms); }
35 void DefineHistograms(Color_t color = kRed);
36 void DrawHistograms();
37 void SaveHistograms(const Char_t *location = NULL);
95621324 38 virtual Bool_t IsSelected(TObject *);
39 virtual Bool_t IsSelected(TList * /*lst*/) {return kTRUE; }
10d100d4 40 virtual Bool_t AcceptTrack(const AliESDtrack *track, const AliESDEvent *event);
7e1f5ba5 41
42 void SetTPCclusterRatioCut(Float_t clr) { fCutTPCclusterRatio = clr; }
f61ab382 43 inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma);
44 inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma);
45 inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma);
46 inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma);
7e1f5ba5 47 void SetMinMomentumTOF(Float_t mom) { fMinMomentumTOF = mom; }
48
49 protected:
50 static const Int_t kNcuts; // Number of Cuts
10d100d4 51 AliESDpid *fESDpid; //! PID helper (n-sigma-cut)
f61ab382 52 Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species
53 Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species
54 Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line
7e1f5ba5 55 Float_t fCutTOFnSigma[AliPID::kSPECIES]; // Species dependent cut on the distance to the TOF calculated time of flight line
56 Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC
57 Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum
58
59 //------------------------------------------
60 // QA histograms
61 TH1I *fHcutStatistics; // Cut Statistics
62 TH2I *fHcutCorrelation; // Cut Correlation
63 TH1F *fHclusterRatio[2]; // TPC cluster Ratio
64 TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut
65 TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut
66 //------------------------------------------
67
10d100d4 68 ClassDef(AliESDpidCuts, 2)
7e1f5ba5 69};
f61ab382 70
71//_____________________________________________________________________
72void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
73 //
74 // symmetric sigma cut for TPC PID
75 //
76 fCutTPCnSigma[itype * 2] = -nSigma;
77 fCutTPCnSigma[itype * 2 + 1] = nSigma;
78 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
79}
80
81//_____________________________________________________________________
82void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
83 //
84 // assymetric sigma cut for TPC PID
85 //
86 fCutTPCnSigma[itype * 2] = negSigma;
87 fCutTPCnSigma[itype * 2 + 1] = posSigma;
88 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
89}
90
91//_____________________________________________________________________
92void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
93 //
94 // symmetric sigma cut for TOF PID
95 //
96 fCutTOFnSigma[itype * 2] = -nSigma;
97 fCutTOFnSigma[itype * 2 + 1] = nSigma;
98 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
99}
100
101//_____________________________________________________________________
102void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
103 //
104 // assymetric sigma cut for TOF PID
105 //
106 fCutTOFnSigma[itype * 2] = negSigma;
107 fCutTOFnSigma[itype * 2 + 1] = posSigma;
108 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
109}
7e1f5ba5 110#endif