Fixing bugs in FMD reconstruction. Everything should work now
[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;
18class AliTPCpidESD;
19class AliTOFpidESD;
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);
38 virtual Bool_t IsSelected(TObject *o);
39 virtual Bool_t IsSelected(TList *) { return kTRUE; }
40 virtual Bool_t AcceptTrack(const AliESDtrack *track);
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
51 AliTPCpidESD *fTPCpid; //! TPC PID (n-sigma cut)
52 AliTOFpidESD *fTOFpid; //! TOF PID (n-sigma-cut)
f61ab382 53 Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species
54 Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species
55 Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line
7e1f5ba5 56 Float_t fCutTOFnSigma[AliPID::kSPECIES]; // Species dependent cut on the distance to the TOF calculated time of flight line
57 Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC
58 Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum
59
60 //------------------------------------------
61 // QA histograms
62 TH1I *fHcutStatistics; // Cut Statistics
63 TH2I *fHcutCorrelation; // Cut Correlation
64 TH1F *fHclusterRatio[2]; // TPC cluster Ratio
65 TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut
66 TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut
67 //------------------------------------------
68
69 ClassDef(AliESDpidCuts, 1)
70};
f61ab382 71
72//_____________________________________________________________________
73void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
74 //
75 // symmetric sigma cut for TPC PID
76 //
77 fCutTPCnSigma[itype * 2] = -nSigma;
78 fCutTPCnSigma[itype * 2 + 1] = nSigma;
79 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
80}
81
82//_____________________________________________________________________
83void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
84 //
85 // assymetric sigma cut for TPC PID
86 //
87 fCutTPCnSigma[itype * 2] = negSigma;
88 fCutTPCnSigma[itype * 2 + 1] = posSigma;
89 fTPCsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
90}
91
92//_____________________________________________________________________
93void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){
94 //
95 // symmetric sigma cut for TOF PID
96 //
97 fCutTOFnSigma[itype * 2] = -nSigma;
98 fCutTOFnSigma[itype * 2 + 1] = nSigma;
99 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
100}
101
102//_____________________________________________________________________
103void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){
104 //
105 // assymetric sigma cut for TOF PID
106 //
107 fCutTOFnSigma[itype * 2] = negSigma;
108 fCutTOFnSigma[itype * 2 + 1] = posSigma;
109 fTOFsigmaCutRequired |= 1 << static_cast<Int_t >(itype);
110}
7e1f5ba5 111#endif