AliPhysics  master (3d17d9d)
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;
21 class AliConversionPhotonBase;
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 PionIsSelectedAODMC(Int_t labelParticle, TClonesArray *AODMCTrackArray);
84  Bool_t TrackIsSelected(AliESDtrack* lTrack);
85  Bool_t TrackIsSelectedAOD(AliAODTrack* lTrack);
86  Bool_t PionIsSelected(AliESDtrack* lTrack);
87  Bool_t PionIsSelectedAOD(AliAODTrack* lTrack);
88  static AliPrimaryPionCuts * GetStandardCuts2010PbPb();
89  static AliPrimaryPionCuts * GetStandardCuts2010pp();
90  void SetHybridTrackCutsAODFiltering(Int_t runflag);
91  void SetPtDepDCACuts(Double_t pt);
92  Bool_t IsDCACutAccepted(AliAODTrack* lTrack);
93  Bool_t InitPIDResponse();
94 
95  void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
96  AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
97 
98  void PrintCuts();
99  void PrintCutsWithValues();
100 
101  void SetLightOutput( Bool_t flag ){fDoLightOutput = flag; return;}
102 
103  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
104  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
105  TList *GetCutHistograms(){return fHistograms;}
106 
107  static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
108 
110  Bool_t dEdxCuts(AliVTrack * track);
111 
112  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
113  Bool_t SetITSdEdxCutPionLine(Int_t ededxSigmaCut);
114  Bool_t SetITSClusterCut(Int_t clsITSCut);
115  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
116  Bool_t SetEtaCut(Int_t etaCut);
117  Bool_t SetPtCut(Int_t ptCut);
118  Bool_t SetDCACut(Int_t dcaCut);
119  void SetEtaShift(Double_t etaShift){fEtaShift = etaShift;}
120  Bool_t SetTOFPionPIDCut(Int_t TOFelectronPID);
121  Bool_t SetMassCut(Int_t massCut);
122  void SetPeriodName(TString periodName){fPeriodName = periodName;}
123  Double_t GetMassCut(){return fMassCut;}
124  void SetPrefilterRunFlag(Int_t runflag){fRunFlag = runflag;}
125 
126  // Request Flags
127  Double_t GetEtaCut(){ return fEtaCut;}
128  Double_t GetNFindableClustersTPC(AliVTrack* lTrack);
129  Bool_t DoWeights(){return fDoWeights;}
130  Bool_t DoMassCut(){return fDoMassCut;}
131  Bool_t RequireVertexConstrain(){return fRequireVertexConstrain;}
132  Bool_t Use4VecForMass(){return fUse4VecForMass;}
133 
134  protected:
135 
138  AliPIDResponse *fPIDResponse;
139  AliESDtrackCuts *fEsdTrackCuts;
140  AliESDtrackCuts *fEsdTrackCutsGC;
141 
142  Double_t fEtaCut; //eta cutç
146  Double_t fMinClsTPC; // minimum clusters in the TPC
147  Double_t fChi2PerClsTPC; // maximum Chi2 per cluster in the TPC
148  Bool_t fRequireTPCRefit; // require a refit in the TPC
149  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
150  Double_t fMinClsITS; // minimum clustersin the ITS
151  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
152  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
153  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
160  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
161  Bool_t fUseTOFpid; // flag to use tof pid
162  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
165  Bool_t fUse4VecForMass; // use only momentum 4vector to calculate inv mass
166  Bool_t fRequireVertexConstrain; // require contrain to primary vertex (only for AOD)
173  Int_t fRunFlag; // runflag used to set track prefiltering
174 
175 
176 
177  // Histograms
178  TObjString *fCutString; // cut number used for analysis
180  TH1F *fHistCutIndex; // bookkeeping for cuts
181  TH1F *fHistdEdxCuts; // bookkeeping for dEdx cuts
182  TH2F *fHistITSdEdxbefore; // ITS dEdx before cuts
184  TH2F *fHistTPCdEdxbefore; // TPC dEdx before cuts
185  TH2F *fHistTPCdEdxafter; // TPC dEdx after cuts
186  TH2F *fHistTPCdEdxSignalbefore; //TPC dEdx signal before
187  TH2F *fHistTPCdEdxSignalafter; //TPC dEdx signal after
188  TH2F *fHistTOFbefore; // TOF after cuts
189  TH2F *fHistTOFafter; // TOF after cuts
200 
203 
204  private:
205 
206  AliPrimaryPionCuts(const AliPrimaryPionCuts&); // not implemented
207  AliPrimaryPionCuts& operator=(const AliPrimaryPionCuts&); // not implemented
208 
209 
210  ClassDef(AliPrimaryPionCuts,11)
211 };
212 
213 #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 *)
void SetPeriodName(TString periodName)
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
AliESDtrackCuts * fEsdTrackCutsGC
bool Bool_t
Definition: External.C:53
virtual Bool_t IsSelected(TObject *)
AliESDtrackCuts * fEsdTrackCuts
void SetPrefilterRunFlag(Int_t runflag)
Double_t fPIDnSigmaBelowPionLineTPC