AliPhysics  59e0e03 (59e0e03)
AliDalitzElectronCuts.h
Go to the documentation of this file.
1 #ifndef ALIDALITZELECTRONCUTS_H
2 #define ALIDALITZELECTRONCUTS_H
3 
4 // Class handling all kinds of selection cuts for electrons
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 AliDalitzElectronCuts : public AliAnalysisCuts {
36 
37  public:
38 
39 
40  enum cutIds {
61  kNCuts
62  };
63 
64 
65  enum electronCuts {
66  kElectronIn=0,
70  kElectronOut
71  };
72 
73 
74  Bool_t SetCutIds(TString cutString);
75  Int_t fCuts[kNCuts];
76  Bool_t SetCut(cutIds cutID, Int_t cut);
77  Bool_t UpdateCutString();
78  static const char * fgkCutNames[kNCuts];
79 
80 
81  Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
82 
83 
84  AliDalitzElectronCuts(const char *name="ElectronCuts", const char * title="Electron Cuts");
85  virtual ~AliDalitzElectronCuts(); //virtual destructor
86 
87  virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
88  virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
89 
90  TString GetCutNumber();
91 
92  // Cut Selection
93  Bool_t ElectronIsSelectedMC(Int_t labelParticle,AliMCEvent *mcEvent);
94  Bool_t TrackIsSelected(AliESDtrack* lTrack);
95  Bool_t ElectronIsSelected(AliESDtrack* lTrack);
96  void InitAODpidUtil(Int_t type);
97  static AliDalitzElectronCuts * GetStandardCuts2010PbPb();
98  static AliDalitzElectronCuts * GetStandardCuts2010pp();
99  Bool_t InitPIDResponse();
100 
101  void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
102  AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
103 
104  void PrintCuts();
105 
106  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
107  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
108  TList *GetCutHistograms(){return fHistograms;}
109 
110  static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
111 
112 
113 
115  Bool_t dEdxCuts(AliVTrack * track);
116  Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event);
117  Bool_t RejectSharedElecGamma(TList *photons, Int_t indexEle);
118  Bool_t IsFromGammaConversion( Double_t psiPair, Double_t deltaPhi );
119  Bool_t MassCut(Double_t pi0CandidatePt,Double_t vphotonCandidateMass);
120 
121  // Event Cuts
122 
123  //Double_t GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg );
124  Bool_t SetMaxChi2TPCConstrainedGlobal(Int_t maxChi2);
125  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
126  Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut);
127  Bool_t SetITSdEdxCutElectronLine(Int_t ededxSigmaCut);
128  Bool_t SetMinMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut);
129  Bool_t SetMaxMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut);
130  Bool_t SetITSClusterCut(Int_t clsITSCut);
131  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
132  Bool_t SetEtaCut(Int_t etaCut);
133  Bool_t SetPtCut(Int_t ptCut);
134  Bool_t SetDCACut(Int_t dcaCut);
135  Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut);
136  Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut);
137  Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut);
138  Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID);
139  Bool_t SetPsiPairCut(Int_t psiCut);
140  Bool_t SetRejectSharedElecGamma(Int_t RCut);
141  Bool_t SetMaxChi2PerClusterTPC(Int_t maxChi2);
142  Bool_t SetMaxChi2PerClusterITS(Int_t maxChi2);
143  Bool_t SetMassCut(Int_t massCut);
144  Bool_t SetDoWeights(Int_t opc);
145  Bool_t SetUseVPhotonMCPmearing(Int_t useMCPSmearing);
146  void SetUseCrossedRows(Bool_t opc){fUseCrossedRows = opc;};
147 
148  // Request Flags
149 
150  Double_t GetEtaCut(){ return fEtaCut;}
151  Double_t GetPsiPairCut(){ return fPsiPairCut; }
152  Double_t DoRejectSharedElecGamma(){ return fDoRejectSharedElecGamma;}
153  Double_t DoPsiPairCut(){return fDoPsiPairCut;}
154  Double_t GetNFindableClustersTPC(AliESDtrack* lTrack);
155  Bool_t DoMassCut(){return fDoMassCut;}
156  Bool_t DoMassMinCut(){return fDoMassMinCut;}
157  Double_t GetMassCutLowPt(){return fMassCutLowPt;}
158  Double_t GetMassCutHighPt(){return fMassCutHighPt;}
159  Double_t GetPtMinMassCut(){return fMassCutPtMin;}
160  Double_t GetMassMinCut(){return fMassMinCut;}
161  Bool_t DoWeights(){return fDoWeights;}
162  Bool_t GetUseVPhotonMCPmearing(){return fUseVPhotonMCPSmearing; }
163  Bool_t GetUseElectronMCSmearing(){ return fUseElectronMCPSmearing;}
164 
165 
166 
167  protected:
168 
170  AliPIDResponse *fPIDResponse;
171  AliESDtrackCuts *fesdTrackCuts;
172 
173  Double_t fEtaCut; //eta cutç
177  Double_t fRadiusCut; // radius cut
181  Double_t fMinClsTPC; // minimum clusters in the TPC
182  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
183  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
184  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
185  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
186  Bool_t fDoRejectSharedElecGamma; //Reject electrons from the gammas with Radius < RadiusCut
187  Bool_t fDoPsiPairCut; // PsiPair Cut
198  Double_t fDoKaonRejectionLowP; // Kaon rejection at low p
199  Double_t fDoProtonRejectionLowP; // Proton rejection at low p
200  Double_t fDoPionRejectionLowP; // Pion rejection at low p
204  Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
205  Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
206  Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
207 
208  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
209  Bool_t fUseCrossedRows; //UseCrossedRows 2011
210  Bool_t fUseTOFpid; // flag to use tof pid
211  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
221 
222 
223  // Histograms
224  TObjString *fCutString; // cut number used for analysis
226  TH1F *hCutIndex; // bookkeeping for cuts
227  TH1F *hdEdxCuts; // bookkeeping for dEdx cuts
228  TH2F *hITSdEdxbefore; // ITS dEdx before cuts
230  TH2F *hTPCdEdxbefore; // TPC dEdx before cuts
231  TH2F *hTPCdEdxafter; // TPC dEdx after cuts
232  TH2F *hTPCdEdxSignalbefore; //TPC dEdx signal before
233  TH2F *hTPCdEdxSignalafter; //TPC dEdx signal after
234  TH2F *hTOFbefore; // TOF after cuts
235  TH2F *hTOFafter; // TOF after cuts
246 
247 
248 
249 private:
250 
251  AliDalitzElectronCuts(const AliDalitzElectronCuts&); // not implemented
252  AliDalitzElectronCuts& operator=(const AliDalitzElectronCuts&); // not implemented
253 
254 
255  ClassDef(AliDalitzElectronCuts,3)
256 };
257 
258 
260  if (!fPIDResponse) fPIDResponse = new AliAODpidUtil();
261  Double_t alephParameters[5];
262  // simulation
263  alephParameters[0] = 2.15898e+00/50.;
264  alephParameters[1] = 1.75295e+01;
265  alephParameters[2] = 3.40030e-09;
266  alephParameters[3] = 1.96178e+00;
267  alephParameters[4] = 3.91720e+00;
268  fPIDResponse->GetTOFResponse().SetTimeResolution(80.);
269 
270  // data
271  if (type==1){
272  alephParameters[0] = 0.0283086/0.97;
273  alephParameters[1] = 2.63394e+01;
274  alephParameters[2] = 5.04114e-11;
275  alephParameters[3] = 2.12543e+00;
276  alephParameters[4] = 4.88663e+00;
277  fPIDResponse->GetTOFResponse().SetTimeResolution(130.);
278  fPIDResponse->GetTPCResponse().SetMip(50.);
279  }
280 
281  fPIDResponse->GetTPCResponse().SetBetheBlochParameters(
282  alephParameters[0],alephParameters[1],alephParameters[2],
283  alephParameters[3],alephParameters[4]);
284 
285  fPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
286 }
287 
288 
289 #endif
double Double_t
Definition: External.C:58
Definition: External.C:236
const char * title
Definition: MakeQAPdf.C:27
virtual Bool_t IsSelected(TList *)
AliESDtrackCuts * fesdTrackCuts
virtual Bool_t IsSelected(TObject *)
void InitAODpidUtil(Int_t type)
void SetFillCutHistograms(TString name="", Bool_t preCut=kTRUE, TString cutName="")
int Int_t
Definition: External.C:63
void SetUseCrossedRows(Bool_t opc)
void SetPIDResponse(AliPIDResponse *pidResponse)
AliPIDResponse * GetPIDResponse()
bool Bool_t
Definition: External.C:53