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