TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliPrimaryPionCuts.h
CommitLineData
209b710e 1#ifndef ALIPRIMARYPIONCUTS_H
2#define ALIPRIMARYPIONCUTS_H
3
4// Class handling all kinds of selection cuts for primary
5
6// Authors: Svein Lindal, Daniel Lohner *
7
8
9#include "AliAODpidUtil.h"
10#include "AliAODTrack.h"
11#include "AliESDtrack.h"
12#include "AliVTrack.h"
13#include "AliAODTrack.h"
14#include "AliStack.h"
15#include "AliAnalysisCuts.h"
16#include "AliESDtrackCuts.h"
17#include "TH1F.h"
18
19class AliESDEvent;
20class AliAODEvent;
21class AliConversionPhotonBase;
22class AliKFVertex;
23class AliKFParticle;
24class TH1F;
25class TH2F;
26class AliPIDResponse;
27class AliAnalysisCuts;
28class iostream;
29class TList;
30class AliAnalysisManager;
31
32
33using namespace std;
34
35class AliPrimaryPionCuts : public AliAnalysisCuts {
36
37 public:
38
39
40 enum cutIds {
41 kEtaCut,
42 kClsITSCut,
43 kClsTPCCut,
44 kDCACut,
45 kPtCut,
46 kPidedxSigmaITSCut,
47 kPidedxSigmaTPCCut,
48 kPiTOFSigmaPID,
d9d6352b 49 kMassCut,
209b710e 50 kNCuts
51 };
52
53
54 enum pionCuts {
55 kPionIn=0,
56 kNoTracks,
57 kTrackCuts,
58 kdEdxCuts,
59 kPionOut
60 };
61
62
63 Bool_t SetCutIds(TString cutString);
64 Int_t fCuts[kNCuts];
65 Bool_t SetCut(cutIds cutID, Int_t cut);
66 Bool_t UpdateCutString();
67 static const char * fgkCutNames[kNCuts];
68
69
70 Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
71
72
73 AliPrimaryPionCuts(const char *name="PionCuts", const char * title="Pion Cuts");
74 virtual ~AliPrimaryPionCuts(); //virtual destructor
75
76 virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
77 virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
78
79 TString GetCutNumber();
80
81 // Cut Selection
82 Bool_t PionIsSelectedMC(Int_t labelParticle,AliStack *fMCStack);
83 Bool_t TrackIsSelected(AliESDtrack* lTrack);
84 Bool_t PionIsSelected(AliESDtrack* lTrack);
85 static AliPrimaryPionCuts * GetStandardCuts2010PbPb();
86 static AliPrimaryPionCuts * GetStandardCuts2010pp();
87 Bool_t InitPIDResponse();
88
89 void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
90 AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
91
92 void PrintCuts();
2c75809c 93 void PrintCutsWithValues();
94
209b710e 95 void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
96 void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
97 TList *GetCutHistograms(){return fHistograms;}
98
99 static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
100
101 ///Cut functions
102 Bool_t dEdxCuts(AliVTrack * track);
103
104 Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
105 Bool_t SetITSdEdxCutPionLine(Int_t ededxSigmaCut);
106 Bool_t SetITSClusterCut(Int_t clsITSCut);
107 Bool_t SetTPCClusterCut(Int_t clsTPCCut);
108 Bool_t SetEtaCut(Int_t etaCut);
109 Bool_t SetPtCut(Int_t ptCut);
110 Bool_t SetDCACut(Int_t dcaCut);
111 void SetEtaShift(Double_t etaShift){fEtaShift = etaShift;}
112 Bool_t SetTOFPionPIDCut(Int_t TOFelectronPID);
d9d6352b 113 Bool_t SetMassCut(Int_t massCut);
114 Double_t GetMassCut(){return fMassCut;}
209b710e 115
116 // Request Flags
117 Double_t GetEtaCut(){ return fEtaCut;}
118 Double_t GetNFindableClustersTPC(AliESDtrack* lTrack);
119 Bool_t DoWeights(){return fDoWeights;}
d9d6352b 120 Bool_t DoMassCut(){return fDoMassCut;}
209b710e 121
122 protected:
123
124 TList *fHistograms;
125 AliPIDResponse *fPIDResponse;
126 AliESDtrackCuts *fEsdTrackCuts;
127
128 Double_t fEtaCut; //eta cutç
129 Double_t fEtaShift;
130 Bool_t fDoEtaCut;
131 Double_t fPtCut;
132 Double_t fMinClsTPC; // minimum clusters in the TPC
133 Double_t fMinClsTPCToF; // minimum clusters to findable clusters
134 Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
135 Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
136 Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
137 Double_t fPIDnSigmaAbovePionLineITS; // sigma cut ITS
138 Double_t fPIDnSigmaBelowPionLineITS; // sigma cut ITS
139 Double_t fPIDnSigmaAbovePionLineTPC; // sigma cut TPC
140 Double_t fPIDnSigmaBelowPionLineTPC; // sigma cut TPC
141 Double_t fPIDnSigmaAbovePionLineTOF; // sigma cut TOF
142 Double_t fPIDnSigmaBelowPionLineTOF; // sigma cut TOF
143 Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
144 Bool_t fUseTOFpid; // flag to use tof pid
145 Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
d9d6352b 146 Bool_t fDoMassCut;
147 Double_t fMassCut;
209b710e 148 Bool_t fDoWeights;
d9d6352b 149
209b710e 150
151
152 // Histograms
153 TObjString *fCutString; // cut number used for analysis
154 TH1F *fHistCutIndex; // bookkeeping for cuts
155 TH1F *fHistdEdxCuts; // bookkeeping for dEdx cuts
156 TH2F *fHistITSdEdxbefore; // ITS dEdx before cuts
157 TH2F *fHistITSdEdxafter;
158 TH2F *fHistTPCdEdxbefore; // TPC dEdx before cuts
159 TH2F *fHistTPCdEdxafter; // TPC dEdx after cuts
160 TH2F *fHistTPCdEdxSignalbefore; //TPC dEdx signal before
161 TH2F *fHistTPCdEdxSignalafter; //TPC dEdx signal after
162 TH2F *fHistTOFbefore; // TOF after cuts
163 TH2F *fHistTOFafter; // TOF after cuts
164 TH2F *fHistTrackDCAxyPtbefore;
165 TH2F *fHistTrackDCAxyPtafter;
166 TH2F *fHistTrackDCAzPtbefore;
167 TH2F *fHistTrackDCAzPtafter;
168 TH2F *fHistTrackNFindClsPtTPCbefore;
169 TH2F *fHistTrackNFindClsPtTPCafter;
170
2c75809c 171 TString fStringITSClusterCut;
172
209b710e 173 private:
174
175 AliPrimaryPionCuts(const AliPrimaryPionCuts&); // not implemented
176 AliPrimaryPionCuts& operator=(const AliPrimaryPionCuts&); // not implemented
177
178
d9d6352b 179 ClassDef(AliPrimaryPionCuts,3)
209b710e 180};
181
182#endif