AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 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 
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);
113  Bool_t SetMassCut(Int_t massCut);
114  Double_t GetMassCut(){return fMassCut;}
115 
116  // Request Flags
117  Double_t GetEtaCut(){ return fEtaCut;}
118  Double_t GetNFindableClustersTPC(AliESDtrack* lTrack);
119  Bool_t DoWeights(){return fDoWeights;}
120  Bool_t DoMassCut(){return fDoMassCut;}
121 
122  protected:
123 
125  AliPIDResponse *fPIDResponse;
126  AliESDtrackCuts *fEsdTrackCuts;
127 
128  Double_t fEtaCut; //eta cutç
132  Double_t fMinClsTPC; // minimum clusters in the TPC
133  Double_t fChi2PerClsTPC; // maximum Chi2 per cluster in the TPC
134  Bool_t fRequireTPCRefit; // require a refit in the TPC
135  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
136  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
137  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
138  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
145  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
146  Bool_t fUseTOFpid; // flag to use tof pid
147  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
152 
153 
154 
155  // Histograms
156  TObjString *fCutString; // cut number used for analysis
158  TH1F *fHistCutIndex; // bookkeeping for cuts
159  TH1F *fHistdEdxCuts; // bookkeeping for dEdx cuts
160  TH2F *fHistITSdEdxbefore; // ITS dEdx before cuts
162  TH2F *fHistTPCdEdxbefore; // TPC dEdx before cuts
163  TH2F *fHistTPCdEdxafter; // TPC dEdx after cuts
164  TH2F *fHistTPCdEdxSignalbefore; //TPC dEdx signal before
165  TH2F *fHistTPCdEdxSignalafter; //TPC dEdx signal after
166  TH2F *fHistTOFbefore; // TOF after cuts
167  TH2F *fHistTOFafter; // TOF after cuts
174 
176 
177  private:
178 
179  AliPrimaryPionCuts(const AliPrimaryPionCuts&); // not implemented
180  AliPrimaryPionCuts& operator=(const AliPrimaryPionCuts&); // not implemented
181 
182 
183  ClassDef(AliPrimaryPionCuts,5)
184 };
185 
186 #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
void SetFillCutHistograms(TString name="", Bool_t preCut=kTRUE, TString cutName="")
void SetEtaShift(Double_t etaShift)
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