AliPhysics  608b256 (608b256)
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 #include "AliDalitzData.h"
19 #include "AliDalitzAODESD.h"
20 #include "AliDalitzEventMC.h"
21 #include "AliDalitzAODESDMC.h"
22 
23 class AliESDEvent;
24 class AliAODEvent;
26 class AliKFVertex;
27 class AliKFParticle;
28 class TH1F;
29 class TH2F;
30 class AliPIDResponse;
31 class AliAnalysisCuts;
32 class iostream;
33 class TList;
34 class AliAnalysisManager;
35 
36 
37 using namespace std;
38 
39 class AliDalitzElectronCuts : public AliAnalysisCuts {
40 
41  public:
42 
43 
44  enum cutIds {
65  kNCuts
66  };
67 
68 
69  enum electronCuts {
70  kElectronIn=0,
74  kElectronOut
75  };
76 
77 
78  Bool_t SetCutIds(TString cutString);
79  Int_t fCuts[kNCuts];
80  Bool_t SetCut(cutIds cutID, Int_t cut);
81  Bool_t UpdateCutString();
82  static const char * fgkCutNames[kNCuts];
83 
84 
85  Bool_t InitializeCutsFromCutString(const TString analysisCutSelection);
86 
87 
88  AliDalitzElectronCuts(const char *name="ElectronCuts", const char * title="Electron Cuts");
89  virtual ~AliDalitzElectronCuts(); //virtual destructor
90 
91  virtual Bool_t IsSelected(TObject* /*obj*/){return kTRUE;}
92  virtual Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
93 
94  TString GetCutNumber();
95 
96  // Cut Selection
97  Bool_t ElectronIsSelectedMC(Int_t labelParticle,AliMCEvent *mcEvent);
98  Bool_t ElectronIsSelectedMC(Int_t labelParticle,AliMCEvent *mcEvent, AliDalitzEventMC *mcAODESDEvent);
99  Bool_t TrackIsSelected(AliDalitzAODESD* lTrack);
100  Bool_t ElectronIsSelected(AliESDtrack* lTrack);
101  Bool_t ElectronIsSelected(AliDalitzAODESD* lTrack);
102  void InitAODpidUtil(Int_t type);
103  static AliDalitzElectronCuts * GetStandardCuts2010PbPb();
104  static AliDalitzElectronCuts * GetStandardCuts2010pp();
105  Bool_t InitPIDResponse();
106 
107  void SetPIDResponse(AliPIDResponse * pidResponse) {fPIDResponse = pidResponse;}
108  AliPIDResponse * GetPIDResponse() { return fPIDResponse;}
109 
110  void PrintCuts();
111  Bool_t AcceptedAODESDTrack(AliDalitzAODESD* aliaodtrack);
112  void InitCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName="");
113  void SetFillCutHistograms(TString name="",Bool_t preCut = kTRUE,TString cutName=""){if(!fHistograms){InitCutHistograms(name,preCut,cutName);};}
114  TList *GetCutHistograms(){return fHistograms;}
115 
116  static AliVTrack * GetTrack(AliVEvent * event, Int_t label);
117 
118 
119 
121  Bool_t dEdxCuts(AliVTrack * track);
122  Bool_t PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event);
123  Bool_t RejectSharedElecGamma(TList *photons, Int_t indexEle);
124  Bool_t IsFromGammaConversion( Double_t psiPair, Double_t deltaPhi );
125  Bool_t MassCut(Double_t pi0CandidatePt,Double_t vphotonCandidateMass);
126 
127  // Event Cuts
128 
129  //Double_t GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg );
130  Bool_t SetMaxChi2TPCConstrainedGlobal(Int_t maxChi2);
131  Bool_t SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut);
132  Bool_t SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut);
133  Bool_t SetITSdEdxCutElectronLine(Int_t ededxSigmaCut);
134  Bool_t SetMinMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut);
135  Bool_t SetMaxMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut);
136  Bool_t SetITSClusterCut(Int_t clsITSCut);
137  Bool_t SetTPCClusterCut(Int_t clsTPCCut);
138  Bool_t SetEtaCut(Int_t etaCut);
139  Bool_t SetPtCut(Int_t ptCut);
140  Bool_t SetDCACut(Int_t dcaCut);
141  Bool_t SetMinMomPiondEdxCut(Int_t piMinMomdedxSigmaCut);
142  Bool_t SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut);
143  Bool_t SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut);
144  Bool_t SetTOFElectronPIDCut(Int_t TOFelectronPID);
145  Bool_t SetPsiPairCut(Int_t psiCut);
146  Bool_t SetRejectSharedElecGamma(Int_t RCut);
147  Bool_t SetMaxChi2PerClusterTPC(Int_t maxChi2);
148  Bool_t SetMaxChi2PerClusterITS(Int_t maxChi2);
149  Bool_t SetMassCut(Int_t massCut);
150  Bool_t SetDoWeights(Int_t opc);
151  Bool_t SetUseVPhotonMCPmearing(Int_t useMCPSmearing);
152  void SetUseCrossedRows(Bool_t opc){fUseCrossedRows = opc;};
153 
154  // Request Flags
155 
156  Double_t GetEtaCut(){ return fEtaCut;}
157  Double_t GetPsiPairCut(){ return fPsiPairCut; }
158  Double_t DoRejectSharedElecGamma(){ return fDoRejectSharedElecGamma;}
159  Double_t DoPsiPairCut(){return fDoPsiPairCut;}
160  Double_t GetNFindableClustersTPC(AliDalitzAODESD* lTrack);
161  Bool_t DoMassCut(){return fDoMassCut;}
162  Bool_t DoMassMinCut(){return fDoMassMinCut;}
163  Double_t GetMassCutLowPt(){return fMassCutLowPt;}
164  Double_t GetMassCutHighPt(){return fMassCutHighPt;}
165  Double_t GetPtMinMassCut(){return fMassCutPtMin;}
166  Double_t GetMassMinCut(){return fMassMinCut;}
167  Bool_t DoWeights(){return fDoWeights;}
168  Bool_t GetUseVPhotonMCPmearing(){return fUseVPhotonMCPSmearing; }
169  Bool_t GetUseElectronMCSmearing(){ return fUseElectronMCPSmearing;}
170 
171 
172 
173  protected:
174 
176  AliPIDResponse *fPIDResponse;
177  AliESDtrackCuts *fesdTrackCuts;
178 
179  Double_t fEtaCut; //eta cutç
183  Double_t fRadiusCut; // radius cut
189  TString fDCAVertexPt;//Conversion from coordenates to momentum.
190  Double_t fMinClsTPC; // minimum clusters in the TPC
191  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
192  Bool_t fDodEdxSigmaITSCut; // flag to use the dEdxCut ITS based on sigmas
193  Bool_t fDodEdxSigmaTPCCut; // flag to use the dEdxCut TPC based on sigmas
194  Bool_t fDoTOFsigmaCut; // flag to use TOF pid cut RRnewTOF
195  Bool_t fDoRejectSharedElecGamma; //Reject electrons from the gammas with Radius < RadiusCut
196  Bool_t fDoPsiPairCut; // PsiPair Cut
207  Double_t fDoKaonRejectionLowP; // Kaon rejection at low p
208  Double_t fDoProtonRejectionLowP; // Proton rejection at low p
209  Double_t fDoPionRejectionLowP; // Pion rejection at low p
213  Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
214  Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
215  Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
216 
217  Bool_t fUseCorrectedTPCClsInfo; // flag to use corrected tpc cl info
218  Bool_t fUseCrossedRows; //UseCrossedRows 2011
220  Bool_t fUseTOFpid; // flag to use tof pid
221  Bool_t fRequireTOF; //flg to analyze only tracks with TOF signal
231 
232 
233  // Histograms
234  TObjString *fCutString; // cut number used for analysis
236  TH1F *hCutIndex; // bookkeeping for cuts
237  TH1F *hdEdxCuts; // bookkeeping for dEdx cuts
238  TH2F *hITSdEdxbefore; // ITS dEdx before cuts
240  TH2F *hTPCdEdxbefore; // TPC dEdx before cuts
241  TH2F *hTPCdEdxafter; // TPC dEdx after cuts
242  TH2F *hTPCdEdxSignalbefore; //TPC dEdx signal before
243  TH2F *hTPCdEdxSignalafter; //TPC dEdx signal after
244  TH2F *hTOFbefore; // TOF after cuts
245  TH2F *hTOFafter; // TOF after cuts
256 
257 
258 
259 private:
260 
261  AliDalitzElectronCuts(const AliDalitzElectronCuts&); // not implemented
262  AliDalitzElectronCuts& operator=(const AliDalitzElectronCuts&); // not implemented
263 
264 
265  ClassDef(AliDalitzElectronCuts,3)
266 };
267 
268 
270  if (!fPIDResponse) fPIDResponse = new AliAODpidUtil();
271  Double_t alephParameters[5];
272  // simulation
273  alephParameters[0] = 2.15898e+00/50.;
274  alephParameters[1] = 1.75295e+01;
275  alephParameters[2] = 3.40030e-09;
276  alephParameters[3] = 1.96178e+00;
277  alephParameters[4] = 3.91720e+00;
278  fPIDResponse->GetTOFResponse().SetTimeResolution(80.);
279 
280  // data
281  if (type==1){
282  alephParameters[0] = 0.0283086/0.97;
283  alephParameters[1] = 2.63394e+01;
284  alephParameters[2] = 5.04114e-11;
285  alephParameters[3] = 2.12543e+00;
286  alephParameters[4] = 4.88663e+00;
287  fPIDResponse->GetTOFResponse().SetTimeResolution(130.);
288  fPIDResponse->GetTPCResponse().SetMip(50.);
289  }
290 
291  fPIDResponse->GetTPCResponse().SetBetheBlochParameters(
292  alephParameters[0],alephParameters[1],alephParameters[2],
293  alephParameters[3],alephParameters[4]);
294 
295  fPIDResponse->GetTPCResponse().SetSigma(3.79301e-03, 2.21280e+04);
296 }
297 
298 
299 #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