AliPhysics  608b256 (608b256)
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 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  Bool_t InitPIDResponse();
91 
92  void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
93  AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
94 
95  void PrintCuts();
96  void PrintCutsWithValues();
97 
98  void SetLightOutput( Bool_t flag ){fDoLightOutput = flag; return;}
99 
100  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
101  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
102  TList *GetCutHistograms(){return fHistograms;}
103 
104  static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
105 
107  Bool_t dEdxCuts(AliVTrack * track);
108 
109  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
110  Bool_t SetITSdEdxCutPionLine(Int_t ededxSigmaCut);
111  Bool_t SetITSClusterCut(Int_t clsITSCut);
112  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
113  Bool_t SetEtaCut(Int_t etaCut);
114  Bool_t SetPtCut(Int_t ptCut);
115  Bool_t SetDCACut(Int_t dcaCut);
116  void SetEtaShift(Double_t etaShift){fEtaShift = etaShift;}
117  Bool_t SetTOFPionPIDCut(Int_t TOFelectronPID);
118  Bool_t SetMassCut(Int_t massCut);
119  Double_t GetMassCut(){return fMassCut;}
120 
121  // Request Flags
122  Double_t GetEtaCut(){ return fEtaCut;}
123  Double_t GetNFindableClustersTPC(AliVTrack* lTrack);
124  Bool_t DoWeights(){return fDoWeights;}
125  Bool_t DoMassCut(){return fDoMassCut;}
126 
127  protected:
128 
131  AliPIDResponse *fPIDResponse;
132  AliESDtrackCuts *fEsdTrackCuts;
133 
134  Double_t fEtaCut; //eta cutç
138  Double_t fMinClsTPC; // minimum clusters in the TPC
139  Double_t fChi2PerClsTPC; // maximum Chi2 per cluster in the TPC
140  Bool_t fRequireTPCRefit; // require a refit in the TPC
141  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
142  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
143  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
144  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
151  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
152  Bool_t fUseTOFpid; // flag to use tof pid
153  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
158 
159 
160 
161  // Histograms
162  TObjString *fCutString; // cut number used for analysis
164  TH1F *fHistCutIndex; // bookkeeping for cuts
165  TH1F *fHistdEdxCuts; // bookkeeping for dEdx cuts
166  TH2F *fHistITSdEdxbefore; // ITS dEdx before cuts
168  TH2F *fHistTPCdEdxbefore; // TPC dEdx before cuts
169  TH2F *fHistTPCdEdxafter; // TPC dEdx after cuts
170  TH2F *fHistTPCdEdxSignalbefore; //TPC dEdx signal before
171  TH2F *fHistTPCdEdxSignalafter; //TPC dEdx signal after
172  TH2F *fHistTOFbefore; // TOF after cuts
173  TH2F *fHistTOFafter; // TOF after cuts
180 
182 
183  private:
184 
185  AliPrimaryPionCuts(const AliPrimaryPionCuts&); // not implemented
186  AliPrimaryPionCuts& operator=(const AliPrimaryPionCuts&); // not implemented
187 
188 
189  ClassDef(AliPrimaryPionCuts,7)
190 };
191 
192 #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