AliPhysics  2c6b7ad (2c6b7ad)
AliPrimaryPionCuts.h
Go to the documentation of this file.
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 "AliMCEvent.h"
15 #include "AliAnalysisCuts.h"
16 #include "AliESDtrackCuts.h"
17 #include "TH1F.h"
18 
19 class AliESDEvent;
20 class AliAODEvent;
22 class AliKFVertex;
23 class AliKFParticle;
24 class TH1F;
25 class TH2F;
26 class AliPIDResponse;
27 class AliAnalysisCuts;
28 class iostream;
29 class TList;
30 class AliAnalysisManager;
31 
32 
33 using namespace std;
34 
35 class AliPrimaryPionCuts : public AliAnalysisCuts {
36 
37  public:
38 
39 
40  enum cutIds {
50  kNCuts
51  };
52 
53 
54  enum pionCuts {
55  kPionIn=0,
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,AliMCEvent *mcEvent);
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();
93  void PrintCutsWithValues();
94 
95  void SetLightOutput( Bool_t flag ){fDoLightOutput = flag; return;}
96 
97  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
98  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
99  TList *GetCutHistograms(){return fHistograms;}
100 
101  static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
102 
104  Bool_t dEdxCuts(AliVTrack * track);
105 
106  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
107  Bool_t SetITSdEdxCutPionLine(Int_t ededxSigmaCut);
108  Bool_t SetITSClusterCut(Int_t clsITSCut);
109  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
110  Bool_t SetEtaCut(Int_t etaCut);
111  Bool_t SetPtCut(Int_t ptCut);
112  Bool_t SetDCACut(Int_t dcaCut);
113  void SetEtaShift(Double_t etaShift){fEtaShift = etaShift;}
114  Bool_t SetTOFPionPIDCut(Int_t TOFelectronPID);
115  Bool_t SetMassCut(Int_t massCut);
116  Double_t GetMassCut(){return fMassCut;}
117 
118  // Request Flags
119  Double_t GetEtaCut(){ return fEtaCut;}
120  Double_t GetNFindableClustersTPC(AliESDtrack* lTrack);
121  Bool_t DoWeights(){return fDoWeights;}
122  Bool_t DoMassCut(){return fDoMassCut;}
123 
124  protected:
125 
128  AliPIDResponse *fPIDResponse;
129  AliESDtrackCuts *fEsdTrackCuts;
130 
131  Double_t fEtaCut; //eta cutç
135  Double_t fMinClsTPC; // minimum clusters in the TPC
136  Double_t fChi2PerClsTPC; // maximum Chi2 per cluster in the TPC
137  Bool_t fRequireTPCRefit; // require a refit in the TPC
138  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
139  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
140  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
141  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
148  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
149  Bool_t fUseTOFpid; // flag to use tof pid
150  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
155 
156 
157 
158  // Histograms
159  TObjString *fCutString; // cut number used for analysis
161  TH1F *fHistCutIndex; // bookkeeping for cuts
162  TH1F *fHistdEdxCuts; // bookkeeping for dEdx cuts
163  TH2F *fHistITSdEdxbefore; // ITS dEdx before cuts
165  TH2F *fHistTPCdEdxbefore; // TPC dEdx before cuts
166  TH2F *fHistTPCdEdxafter; // TPC dEdx after cuts
167  TH2F *fHistTPCdEdxSignalbefore; //TPC dEdx signal before
168  TH2F *fHistTPCdEdxSignalafter; //TPC dEdx signal after
169  TH2F *fHistTOFbefore; // TOF after cuts
170  TH2F *fHistTOFafter; // TOF after cuts
177 
179 
180  private:
181 
182  AliPrimaryPionCuts(const AliPrimaryPionCuts&); // not implemented
183  AliPrimaryPionCuts& operator=(const AliPrimaryPionCuts&); // not implemented
184 
185 
186  ClassDef(AliPrimaryPionCuts,6)
187 };
188 
189 #endif
double Double_t
Definition: External.C:58
Definition: External.C:236
const char * title
Definition: MakeQAPdf.C:27
void SetPIDResponse(AliPIDResponse *pidResponse)
Double_t fPIDnSigmaAbovePionLineITS
Double_t fPIDnSigmaAbovePionLineTPC
virtual Bool_t IsSelected(TList *)
Double_t fPIDnSigmaBelowPionLineTOF
AliPIDResponse * GetPIDResponse()
int Int_t
Definition: External.C:63
Bool_t fDoLightOutput
switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
void SetFillCutHistograms(TString name="", Bool_t preCut=kTRUE, TString cutName="")
void SetEtaShift(Double_t etaShift)
void SetLightOutput(Bool_t flag)
Double_t fPIDnSigmaAbovePionLineTOF
Double_t fPIDnSigmaBelowPionLineITS
AliPIDResponse * fPIDResponse
bool Bool_t
Definition: External.C:53
virtual Bool_t IsSelected(TObject *)
AliESDtrackCuts * fEsdTrackCuts
Double_t fPIDnSigmaBelowPionLineTPC