]>
Commit | Line | Data |
---|---|---|
c683985a | 1 | |
2 | /************************************************************************** | |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Authors: Svein Lindal, Daniel Lohner * | |
6 | * Version 1.0 * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | //////////////////////////////////////////////// | |
18 | //--------------------------------------------- | |
19 | // Class handling all kinds of selection cuts for | |
20 | // Gamma Conversion analysis | |
21 | //--------------------------------------------- | |
22 | //////////////////////////////////////////////// | |
23 | ||
24 | ||
25 | #include "AliDalitzElectronCuts.h" | |
26 | #include "AliAODConversionPhoton.h" | |
27 | #include "AliKFVertex.h" | |
28 | #include "AliAODTrack.h" | |
29 | #include "AliESDtrack.h" | |
30 | #include "AliAnalysisManager.h" | |
31 | #include "AliInputEventHandler.h" | |
32 | #include "AliMCEventHandler.h" | |
33 | #include "AliAODHandler.h" | |
34 | #include "AliPIDResponse.h" | |
35 | #include "TH1.h" | |
36 | #include "TH2.h" | |
37 | #include "AliStack.h" | |
38 | #include "TObjString.h" | |
39 | #include "AliAODEvent.h" | |
40 | #include "AliESDEvent.h" | |
41 | #include "TList.h" | |
42 | class iostream; | |
43 | ||
44 | using namespace std; | |
45 | ||
46 | ClassImp(AliDalitzElectronCuts) | |
47 | ||
48 | ||
49 | const char* AliDalitzElectronCuts::fgkCutNames[AliDalitzElectronCuts::kNCuts] = { | |
50 | "GoodId", | |
51 | "ededxSigmaITSCut", | |
52 | "ededxSigmaTPCCut", | |
53 | "pidedxSigmaTPCCut", | |
54 | "piMinMomdedxSigmaTPCCut", | |
55 | "piMaxMomdedxSigmaTPCCut", | |
56 | "LowPRejectionSigmaCut", | |
57 | "kTOFelectronPID", | |
58 | "clsITSCut", | |
59 | "clsTPCCut", | |
60 | "EtaCut", | |
61 | "PsiPair", | |
62 | "RejectSharedElecGamma", | |
63 | "BackgroundScheme", | |
64 | "NumberOfRotations", | |
65 | "PtCut", | |
66 | "DCAcut", | |
67 | "MassCut", | |
68 | "kWeights" | |
69 | }; | |
70 | ||
71 | //________________________________________________________________________ | |
72 | AliDalitzElectronCuts::AliDalitzElectronCuts(const char *name,const char *title) : AliAnalysisCuts(name,title), | |
73 | fHistograms(NULL), | |
74 | fPIDResponse(NULL), | |
75 | fesdTrackCuts(NULL), | |
76 | fEtaCut(0.9), | |
77 | fEtaShift(0.0), | |
78 | fDoEtaCut(kFALSE), | |
79 | fPtCut(0.0), | |
80 | fRadiusCut(1000.0), | |
81 | fPsiPairCut(0.45), | |
82 | fDeltaPhiCutMin(0.), | |
83 | fDeltaPhiCutMax(0.12), | |
84 | fMinClsTPC(0), // minimum clusters in the TPC | |
85 | fMinClsTPCToF(0), // minimum clusters to findable clusters | |
86 | fDodEdxSigmaITSCut(kFALSE), | |
87 | fDodEdxSigmaTPCCut(kTRUE), | |
88 | fDoTOFsigmaCut(kFALSE), // RRnewTOF | |
89 | fDoRejectSharedElecGamma(kFALSE), | |
90 | fDoPsiPairCut(kFALSE), | |
91 | fPIDnSigmaAboveElectronLineITS(100), | |
92 | fPIDnSigmaBelowElectronLineITS(-100), | |
93 | fPIDnSigmaAboveElectronLineTPC(100), | |
94 | fPIDnSigmaBelowElectronLineTPC(-100), | |
95 | fPIDnSigmaAbovePionLineTPC(0), | |
96 | fPIDnSigmaAbovePionLineTPCHighPt(-100), | |
97 | fTofPIDnSigmaAboveElectronLine(100), // RRnewTOF | |
98 | fTofPIDnSigmaBelowElectronLine(-100), // RRnewTOF | |
99 | fPIDMinPnSigmaAbovePionLineTPC(0), | |
100 | fPIDMaxPnSigmaAbovePionLineTPC(0), | |
101 | fDoKaonRejectionLowP(kFALSE), | |
102 | fDoProtonRejectionLowP(kFALSE), | |
103 | fDoPionRejectionLowP(kFALSE), | |
104 | fPIDnSigmaAtLowPAroundKaonLine(0), | |
105 | fPIDnSigmaAtLowPAroundProtonLine(0), | |
106 | fPIDnSigmaAtLowPAroundPionLine(0), | |
107 | fPIDMinPKaonRejectionLowP(1.5), | |
108 | fPIDMinPProtonRejectionLowP(2.0), | |
109 | fPIDMinPPionRejectionLowP(0.5), | |
110 | fUseCorrectedTPCClsInfo(kFALSE), | |
209b710e | 111 | fUseCrossedRows(kFALSE), |
c683985a | 112 | fUseTOFpid(kFALSE), |
113 | fRequireTOF(kFALSE), | |
114 | fUseTrackMultiplicityForBG(kFALSE), | |
115 | fBKGMethod(0), | |
116 | fnumberOfRotationEventsForBG(0), | |
117 | fDoMassCut(kFALSE), | |
118 | fMassCutLowPt(999.), | |
119 | fMassCutHighPt(999.), | |
120 | fMassCutPtMin(-100.0), | |
121 | fDoWeights(kFALSE), | |
122 | fCutString(NULL), | |
123 | hCutIndex(NULL), | |
124 | hdEdxCuts(NULL), | |
125 | hITSdEdxbefore(NULL), | |
126 | hITSdEdxafter(NULL), | |
127 | hTPCdEdxbefore(NULL), | |
128 | hTPCdEdxafter(NULL), | |
129 | hTPCdEdxSignalbefore(NULL), | |
130 | hTPCdEdxSignalafter(NULL), | |
131 | hTOFbefore(NULL), | |
132 | hTOFafter(NULL), | |
133 | hTrackDCAxyPtbefore(NULL), | |
134 | hTrackDCAxyPtafter(NULL), | |
135 | hTrackDCAzPtbefore(NULL), | |
136 | hTrackDCAzPtafter(NULL), | |
137 | hTrackNFindClsPtTPCbefore(NULL), | |
138 | hTrackNFindClsPtTPCafter(NULL) | |
139 | { | |
140 | InitPIDResponse(); | |
141 | for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;} | |
142 | fCutString=new TObjString((GetCutNumber()).Data()); | |
143 | ||
144 | //fesdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts"); | |
145 | // Using standard function for setting Cuts | |
146 | Bool_t selectPrimaries=kFALSE; | |
147 | fesdTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(selectPrimaries); | |
148 | } | |
149 | ||
150 | //________________________________________________________________________ | |
151 | AliDalitzElectronCuts::~AliDalitzElectronCuts() { | |
152 | // Destructor | |
153 | //Deleting fHistograms leads to seg fault it it's added to output collection of a task | |
154 | // if(fHistograms) | |
155 | // delete fHistograms; | |
156 | // fHistograms = NULL; | |
157 | ||
158 | if(fCutString != NULL){ | |
159 | delete fCutString; | |
160 | fCutString = NULL; | |
161 | } | |
162 | ||
163 | ||
164 | } | |
165 | ||
166 | //________________________________________________________________________ | |
167 | void AliDalitzElectronCuts::InitCutHistograms(TString name, Bool_t preCut,TString cutNumber){ | |
168 | ||
169 | // Initialize Cut Histograms for QA (only initialized and filled if function is called) | |
170 | ||
171 | TString cutName = ""; | |
172 | ||
173 | if( cutNumber==""){ | |
174 | cutName = GetCutNumber().Data(); | |
175 | } | |
176 | else { | |
177 | cutName = cutNumber.Data(); | |
178 | } | |
179 | ||
180 | if(fHistograms != NULL){ | |
181 | delete fHistograms; | |
182 | fHistograms=NULL; | |
183 | } | |
184 | if(fHistograms==NULL){ | |
185 | fHistograms=new TList(); | |
186 | if(name=="")fHistograms->SetName(Form("ElectronCuts_%s",cutName.Data())); | |
187 | else fHistograms->SetName(Form("%s_%s",name.Data(),cutName.Data())); | |
188 | } | |
d9d6352b | 189 | |
190 | ||
191 | Int_t kDedxSignalbins = 200; | |
192 | ||
193 | const Int_t kDCABins=62; | |
194 | ||
195 | Double_t binsDCADummy[63]={-3.0,-2.7,-2.4,-2.1,-1.8,-1.5,-1.2,-0.9,-0.6,-0.3,-0.25,-0.2,-0.19,-0.18,-0.17,-0.16,-0.15,-0.14,-0.13,-0.12,-0.11,-0.10,-0.09,-0.08,-0.07,-0.06,-0.05,-0.04,-0.03,-0.02,-0.01,0.0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.25,0.3,0.6,0.9,1.2,1.5,1.8,2.1,2.4,2.7,3.0}; | |
196 | ||
197 | const Int_t kPtBins=110; | |
198 | Double_t binsPtDummy[kPtBins+1]; | |
199 | const Int_t kPBins = 109; | |
200 | Double_t binsPDummy[kPBins+1]; | |
201 | binsPtDummy[0]=0.0; | |
202 | binsPDummy[0]=0.05; | |
203 | ||
204 | for(Int_t i=1;i<kPtBins+1;i++) | |
205 | { | |
206 | if(binsPtDummy[i-1]+0.05<1.01) | |
207 | binsPtDummy[i]=binsPtDummy[i-1]+0.05; | |
208 | else | |
209 | binsPtDummy[i]=binsPtDummy[i-1]+0.1; | |
210 | ||
211 | } | |
212 | for(Int_t i=1; i <kPBins+1;i++){ | |
213 | ||
214 | if( binsPDummy[i-1]+0.05<1.01) | |
215 | binsPDummy[i] = binsPDummy[i-1]+0.05; | |
216 | else | |
217 | binsPDummy[i] = binsPDummy[i-1]+0.1; | |
218 | ||
219 | } | |
220 | ||
c683985a | 221 | |
222 | ||
223 | hCutIndex=new TH1F(Form("IsElectronSelected %s",cutName.Data()),"IsElectronSelected",10,-0.5,9.5); | |
224 | hCutIndex->GetXaxis()->SetBinLabel(kElectronIn+1,"in"); | |
225 | hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks"); | |
226 | hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts"); | |
227 | hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx"); | |
228 | hCutIndex->GetXaxis()->SetBinLabel(kElectronOut+1,"out"); | |
229 | fHistograms->Add(hCutIndex); | |
230 | ||
231 | ||
232 | ||
233 | // dEdx Cuts | |
234 | hdEdxCuts=new TH1F(Form("dEdxCuts %s",cutName.Data()),"dEdxCuts",10,-0.5,9.5); | |
235 | hdEdxCuts->GetXaxis()->SetBinLabel(1,"in"); | |
236 | hdEdxCuts->GetXaxis()->SetBinLabel(2,"ITSelectron"); | |
237 | hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCelectron"); | |
238 | hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpion"); | |
239 | hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCpionhighp"); | |
240 | hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCkaonlowprej"); | |
241 | hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCprotonlowprej"); | |
242 | hdEdxCuts->GetXaxis()->SetBinLabel(8,"TPCpionlowprej"); | |
243 | hdEdxCuts->GetXaxis()->SetBinLabel(9,"TOFelectron"); | |
244 | hdEdxCuts->GetXaxis()->SetBinLabel(10,"out"); | |
245 | fHistograms->Add(hdEdxCuts); | |
246 | ||
247 | ||
248 | ||
249 | TAxis *AxisBeforeITS = NULL; | |
250 | TAxis *AxisBeforedEdx = NULL; | |
251 | TAxis *AxisBeforeTOF = NULL; | |
252 | TAxis *AxisBeforedEdxSignal = NULL; | |
253 | ||
254 | if(preCut){ | |
255 | ||
256 | ||
d9d6352b | 257 | hITSdEdxbefore=new TH2F(Form("Electron_ITS_before %s",cutName.Data()),"ITS dEdx electron before" ,kPBins,binsPDummy,200,-10,10); |
c683985a | 258 | fHistograms->Add(hITSdEdxbefore); |
259 | AxisBeforeITS = hITSdEdxbefore->GetXaxis(); | |
260 | ||
d9d6352b | 261 | hTPCdEdxbefore=new TH2F(Form("Electron_dEdx_before %s",cutName.Data()),"dEdx electron before" ,kPBins,binsPDummy,200,-10,10); |
c683985a | 262 | fHistograms->Add(hTPCdEdxbefore); |
263 | AxisBeforedEdx = hTPCdEdxbefore->GetXaxis(); | |
264 | ||
d9d6352b | 265 | hTPCdEdxSignalbefore=new TH2F(Form("Electron_dEdxSignal_before %s",cutName.Data()),"dEdx electron signal before" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200); |
c683985a | 266 | fHistograms->Add(hTPCdEdxSignalbefore); |
267 | AxisBeforedEdxSignal = hTPCdEdxSignalbefore->GetXaxis(); | |
268 | ||
d9d6352b | 269 | hTOFbefore=new TH2F(Form("Electron_TOF_before %s",cutName.Data()),"TOF electron before" ,kPBins,binsPDummy,200,-10,10); |
c683985a | 270 | fHistograms->Add(hTOFbefore); |
271 | AxisBeforeTOF = hTOFbefore->GetXaxis(); | |
272 | ||
d9d6352b | 273 | hTrackDCAxyPtbefore = new TH2F(Form("hTrack_DCAxy_Pt_before %s",cutName.Data()),"DCAxy Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy); |
c683985a | 274 | fHistograms->Add(hTrackDCAxyPtbefore); |
275 | ||
d9d6352b | 276 | hTrackDCAzPtbefore = new TH2F(Form("hTrack_DCAz_Pt_before %s",cutName.Data()), "DCAz Vs Pt of tracks before",kDCABins,binsDCADummy,kPtBins,binsPtDummy); |
c683985a | 277 | fHistograms->Add(hTrackDCAzPtbefore); |
278 | ||
d9d6352b | 279 | hTrackNFindClsPtTPCbefore = new TH2F(Form("hTrack_NFindCls_Pt_TPC_before %s",cutName.Data()),"Track: N Findable Cls TPC Vs Pt before",50,0,1,kPtBins,binsPtDummy); |
c683985a | 280 | fHistograms->Add(hTrackNFindClsPtTPCbefore); |
281 | ||
282 | ||
283 | ||
284 | } | |
285 | ||
286 | ||
d9d6352b | 287 | hITSdEdxafter=new TH2F(Form("Electron_ITS_after %s",cutName.Data()),"ITS dEdx electron after" ,kPBins,binsPDummy,200, -10,10); |
c683985a | 288 | fHistograms->Add(hITSdEdxafter); |
289 | ||
d9d6352b | 290 | hTPCdEdxafter=new TH2F(Form("Electron_dEdx_after %s",cutName.Data()),"dEdx electron after" ,kPBins,binsPDummy,200, -10,10); |
c683985a | 291 | fHistograms->Add(hTPCdEdxafter); |
292 | ||
d9d6352b | 293 | hTPCdEdxSignalafter=new TH2F(Form("Electron_dEdxSignal_after %s",cutName.Data()),"dEdx electron signal after" ,kPBins,binsPDummy,kDedxSignalbins,0.0,200); |
c683985a | 294 | fHistograms->Add(hTPCdEdxSignalafter); |
295 | ||
d9d6352b | 296 | hTOFafter=new TH2F(Form("Electron_TOF_after %s",cutName.Data()),"TOF electron after" ,kPBins,binsPDummy,200,-6,10); |
c683985a | 297 | fHistograms->Add(hTOFafter); |
298 | ||
d9d6352b | 299 | hTrackDCAxyPtafter = new TH2F(Form("hTrack_DCAxy_Pt_after %s",cutName.Data()),"DCAxy Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy); |
c683985a | 300 | fHistograms->Add(hTrackDCAxyPtafter); |
301 | ||
d9d6352b | 302 | hTrackDCAzPtafter = new TH2F(Form("hTrack_DCAz_Pt_after %s",cutName.Data()), "DCAz Vs Pt of tracks after",kDCABins,binsDCADummy,kPtBins,binsPtDummy); |
c683985a | 303 | fHistograms->Add(hTrackDCAzPtafter); |
304 | ||
d9d6352b | 305 | hTrackNFindClsPtTPCafter = new TH2F(Form("hTrack_NFindCls_Pt_TPC_after %s",cutName.Data()),"Track: N Findable Cls TPC Vs Pt after",50,0,1,kPtBins,binsPtDummy); |
c683985a | 306 | fHistograms->Add(hTrackNFindClsPtTPCafter); |
307 | ||
308 | ||
309 | ||
310 | TAxis *AxisAfter = hTPCdEdxafter->GetXaxis(); | |
311 | Int_t bins = AxisAfter->GetNbins(); | |
312 | Double_t from = AxisAfter->GetXmin(); | |
313 | Double_t to = AxisAfter->GetXmax(); | |
314 | Double_t *newBins = new Double_t[bins+1]; | |
315 | newBins[0] = from; | |
316 | Double_t factor = TMath::Power(to/from, 1./bins); | |
317 | for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1]; | |
318 | AxisAfter->Set(bins, newBins); | |
319 | AxisAfter = hTOFafter->GetXaxis(); | |
320 | AxisAfter->Set(bins, newBins); | |
321 | AxisAfter = hITSdEdxafter->GetXaxis(); | |
322 | AxisAfter->Set(bins,newBins); | |
323 | AxisAfter = hTPCdEdxSignalafter->GetXaxis(); | |
324 | AxisAfter->Set(bins,newBins); | |
325 | ||
326 | if(preCut){ | |
327 | AxisBeforeITS->Set(bins, newBins); | |
328 | AxisBeforedEdx->Set(bins, newBins); | |
329 | AxisBeforedEdxSignal->Set(bins,newBins); | |
330 | AxisBeforeTOF->Set(bins, newBins); | |
331 | ||
332 | } | |
333 | delete [] newBins; | |
334 | ||
335 | ||
336 | // Event Cuts and Info | |
337 | } | |
338 | ||
339 | ||
340 | //________________________________________________________________________ | |
341 | Bool_t AliDalitzElectronCuts::InitPIDResponse(){ | |
342 | ||
343 | // Set Pointer to AliPIDResponse | |
344 | ||
345 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
346 | ||
347 | if(man) { | |
348 | ||
349 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
350 | fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse(); | |
351 | if(fPIDResponse)return kTRUE; | |
352 | ||
353 | } | |
354 | ||
355 | return kFALSE; | |
356 | } | |
357 | ///________________________________________________________________________ | |
358 | Bool_t AliDalitzElectronCuts::ElectronIsSelectedMC(Int_t labelParticle,AliStack *fMCStack) | |
359 | { | |
360 | if( labelParticle < 0 || labelParticle >= fMCStack->GetNtrack() ) return kFALSE; | |
361 | if( fMCStack->IsPhysicalPrimary(labelParticle) == kFALSE ) return kFALSE; //Ask Ana | |
362 | ||
363 | TParticle* particle = fMCStack->Particle(labelParticle); | |
364 | ||
365 | if( TMath::Abs( particle->GetPdgCode() ) != 11 ) return kFALSE; | |
366 | ||
367 | if( fDoEtaCut ){ | |
368 | if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) ) | |
369 | return kFALSE; | |
370 | } | |
371 | ||
372 | ||
373 | return kTRUE; | |
374 | } | |
375 | ||
376 | ||
377 | ///________________________________________________________________________ | |
378 | Bool_t AliDalitzElectronCuts::ElectronIsSelected(AliESDtrack* lTrack) | |
379 | { | |
380 | //Selection of Reconstructed electrons | |
381 | ||
382 | ||
383 | Float_t b[2]; | |
384 | Float_t bCov[3]; | |
385 | lTrack->GetImpactParameters(b,bCov); | |
386 | ||
387 | if (bCov[0]<=0 || bCov[2]<=0) { | |
388 | AliDebug(1, "Estimated b resolution lower or equal zero!"); | |
389 | bCov[0]=0; bCov[2]=0; | |
390 | } | |
391 | ||
392 | ||
393 | ||
394 | Float_t dcaToVertexXY = b[0]; | |
395 | Float_t dcaToVertexZ = b[1]; | |
396 | Double_t clsToF = GetNFindableClustersTPC(lTrack); | |
397 | ||
398 | if( hTrackDCAxyPtbefore) hTrackDCAxyPtbefore->Fill(dcaToVertexXY,lTrack->Pt()); | |
399 | if( hTrackDCAzPtbefore ) hTrackDCAzPtbefore->Fill( dcaToVertexZ, lTrack->Pt()); | |
400 | if( hTrackNFindClsPtTPCbefore ) hTrackNFindClsPtTPCbefore->Fill( clsToF, lTrack->Pt()); | |
401 | ||
402 | ||
403 | ||
404 | if(hCutIndex)hCutIndex->Fill(kElectronIn); | |
405 | ||
406 | if (lTrack == NULL){ | |
407 | if(hCutIndex)hCutIndex->Fill(kNoTracks); | |
408 | return kFALSE; | |
409 | } | |
410 | ||
411 | if ( ! lTrack->GetConstrainedParam() ){ | |
412 | return kFALSE; | |
413 | } | |
414 | AliVTrack * track = dynamic_cast<AliVTrack*>(lTrack); | |
415 | ||
416 | ||
417 | // Track Cuts | |
418 | if( !TrackIsSelected(lTrack) ){ | |
419 | if(hCutIndex)hCutIndex->Fill(kTrackCuts); | |
420 | return kFALSE; | |
421 | } | |
422 | ||
423 | ||
424 | // dEdx Cuts | |
425 | if( ! dEdxCuts( track ) ) { | |
426 | if(hCutIndex)hCutIndex->Fill(kdEdxCuts); | |
427 | return kFALSE; | |
428 | ||
429 | } | |
430 | ||
431 | //Electron passed the cuts | |
432 | if(hCutIndex)hCutIndex->Fill(kElectronOut); | |
433 | ||
434 | if( hTrackDCAxyPtafter) hTrackDCAxyPtafter->Fill(dcaToVertexXY,lTrack->Pt()); | |
435 | if( hTrackDCAzPtafter ) hTrackDCAzPtafter->Fill(dcaToVertexZ,lTrack->Pt()); | |
436 | if( hTrackNFindClsPtTPCafter ) hTrackNFindClsPtTPCafter->Fill( clsToF, lTrack->Pt()); | |
437 | ||
438 | ||
439 | return kTRUE; | |
440 | } | |
441 | ||
442 | ///________________________________________________________________________ | |
443 | Bool_t AliDalitzElectronCuts::TrackIsSelected(AliESDtrack* lTrack) { | |
444 | // Track Selection for Photon Reconstruction | |
445 | ||
446 | ||
447 | Double_t clsToF = GetNFindableClustersTPC(lTrack); | |
448 | ||
449 | ||
450 | if( ! fesdTrackCuts->AcceptTrack(lTrack) ){ | |
451 | ||
452 | return kFALSE; | |
453 | } | |
454 | ||
455 | if( fDoEtaCut ) { | |
456 | if( lTrack->Eta() > (fEtaCut + fEtaShift) || lTrack->Eta() < (-fEtaCut + fEtaShift) ) { | |
457 | return kFALSE; | |
458 | } | |
459 | } | |
460 | ||
461 | ||
462 | if( lTrack->Pt() < fPtCut ) { | |
463 | ||
464 | return kFALSE; | |
465 | ||
466 | } | |
467 | ||
468 | ||
469 | ||
470 | if( clsToF < fMinClsTPCToF){ | |
471 | return kFALSE; | |
472 | } | |
473 | ||
474 | ||
475 | ||
476 | return kTRUE; | |
477 | } | |
478 | ///________________________________________________________________________ | |
479 | Bool_t AliDalitzElectronCuts::dEdxCuts(AliVTrack *fCurrentTrack){ | |
480 | ||
481 | // Electron Identification Cuts for Photon reconstruction | |
482 | ||
483 | if(!fPIDResponse){ InitPIDResponse(); }// Try to reinitialize PID Response | |
484 | if(!fPIDResponse){ AliError("No PID Response"); return kFALSE;}// if still missing fatal error | |
485 | ||
486 | ||
487 | ||
488 | //cout<<"dEdxCuts: //////////////////////////////////////////////////////////////////////////"<<endl; | |
489 | ||
490 | ||
491 | ||
492 | Int_t cutIndex=0; | |
493 | ||
494 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
495 | if(hITSdEdxbefore)hITSdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron)); | |
496 | if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); | |
497 | if(hTPCdEdxSignalbefore)hTPCdEdxSignalbefore->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal())); | |
498 | ||
499 | ||
500 | cutIndex++; | |
501 | ||
502 | ||
503 | if( fDodEdxSigmaITSCut == kTRUE ){ | |
504 | ||
505 | ||
506 | if( fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineITS || | |
507 | fPIDResponse->NumberOfSigmasITS(fCurrentTrack,AliPID::kElectron)> fPIDnSigmaAboveElectronLineITS ){ | |
508 | ||
509 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
510 | return kFALSE; | |
511 | } | |
512 | ||
513 | } | |
514 | ||
515 | if(hITSdEdxafter)hITSdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasITS(fCurrentTrack, AliPID::kElectron)); | |
516 | ||
517 | ||
518 | cutIndex++; | |
519 | ||
520 | ||
521 | if(fDodEdxSigmaTPCCut == kTRUE){ | |
522 | ||
523 | ||
524 | // TPC Electron Line | |
525 | if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLineTPC || | |
526 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLineTPC){ | |
527 | ||
528 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
529 | return kFALSE; | |
530 | } | |
531 | cutIndex++; | |
532 | ||
533 | // TPC Pion Line | |
534 | if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLineTPC && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLineTPC ){ | |
535 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC && | |
536 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC && | |
537 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPC){ | |
538 | ||
539 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
540 | return kFALSE; | |
541 | } | |
542 | } | |
543 | cutIndex++; | |
544 | ||
545 | // High Pt Pion rej | |
546 | if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLineTPC ){ | |
547 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLineTPC && | |
548 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLineTPC&& | |
549 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineTPCHighPt){ | |
550 | ||
551 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
552 | return kFALSE; | |
553 | } | |
554 | } | |
555 | ||
556 | cutIndex++; | |
557 | } | |
558 | ||
559 | else{ cutIndex+=3; } | |
560 | ||
561 | ||
562 | if( fDoKaonRejectionLowP == kTRUE ){ | |
563 | ||
564 | if( fCurrentTrack->P() < fPIDMinPKaonRejectionLowP ){ | |
565 | ||
566 | if( TMath::Abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){ | |
567 | ||
568 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
569 | ||
570 | return kFALSE; | |
571 | } | |
572 | } | |
573 | } | |
574 | cutIndex++; | |
575 | ||
576 | if( fDoProtonRejectionLowP == kTRUE ){ | |
577 | ||
578 | if( fCurrentTrack->P() < fPIDMinPProtonRejectionLowP ){ | |
579 | if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){ | |
580 | ||
581 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
582 | return kFALSE; | |
583 | } | |
584 | } | |
585 | } | |
586 | cutIndex++; | |
587 | ||
588 | if(fDoPionRejectionLowP == kTRUE){ | |
589 | if( fCurrentTrack->P() < fPIDMinPPionRejectionLowP ){ | |
590 | if( TMath::Abs( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)) < fPIDnSigmaAtLowPAroundPionLine ){ | |
591 | ||
592 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
593 | return kFALSE; | |
594 | } | |
595 | } | |
596 | } | |
597 | cutIndex++; | |
598 | ||
599 | ||
600 | if( ( fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid ) && ( !( fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch) ) ){ | |
601 | if(hTOFbefore) hTOFbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); | |
602 | if(fUseTOFpid){ | |
603 | if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine || | |
604 | fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){ | |
605 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
606 | return kFALSE; | |
607 | } | |
608 | } | |
609 | if(hTOFafter)hTOFafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); | |
610 | } | |
611 | else if ( fRequireTOF == kTRUE ) { | |
612 | ||
613 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
614 | return kFALSE; | |
615 | } | |
616 | cutIndex++; | |
617 | ||
618 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
619 | if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); | |
620 | if(hTPCdEdxSignalafter)hTPCdEdxSignalafter->Fill(fCurrentTrack->P(),TMath::Abs(fCurrentTrack->GetTPCsignal())); | |
621 | ||
622 | return kTRUE; | |
623 | } | |
624 | ///________________________________________________________________________ | |
625 | ||
626 | ||
627 | AliVTrack *AliDalitzElectronCuts::GetTrack(AliVEvent * event, Int_t label){ | |
628 | //Returns pointer to the track with given ESD label | |
629 | //(Important for AOD implementation, since Track array in AOD data is different | |
630 | //from ESD array, but ESD tracklabels are stored in AOD Tracks) | |
631 | ||
632 | AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event); | |
633 | if(esdEvent) { | |
634 | if(label > event->GetNumberOfTracks() ) return NULL; | |
635 | AliESDtrack * track = esdEvent->GetTrack(label); | |
636 | return track; | |
637 | ||
638 | } else { | |
639 | for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) { | |
640 | AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii)); | |
641 | ||
642 | if(track) { | |
643 | if(track->GetID() == label) { | |
644 | return track; | |
645 | } | |
646 | } | |
647 | } | |
648 | } | |
649 | ||
650 | cout << "track not found " << label << " " << event->GetNumberOfTracks() << endl; | |
651 | return NULL; | |
652 | } | |
653 | ///________________________________________________________________________ | |
654 | Bool_t AliDalitzElectronCuts::RejectSharedElecGamma(TList *photons, Int_t indexEle){ | |
655 | ||
656 | ||
657 | for(Int_t i = 0;i<photons->GetEntries();i++){ | |
658 | ||
659 | AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i); | |
660 | ||
661 | Int_t posLabel = photonComp->GetTrackLabelPositive(); | |
662 | Int_t negLabel = photonComp->GetTrackLabelNegative(); | |
663 | ||
664 | if( (photonComp->GetConversionRadius() < fRadiusCut) && (posLabel == indexEle || negLabel == indexEle) ){ | |
665 | return kFALSE; | |
666 | } | |
667 | } | |
668 | ||
669 | return kTRUE; | |
670 | } | |
671 | Bool_t AliDalitzElectronCuts::MassCut(Double_t pi0CandidatePt , Double_t vphotonCandidateMass){ | |
672 | ||
673 | if( pi0CandidatePt < fMassCutPtMin ){ | |
674 | ||
675 | if( vphotonCandidateMass < fMassCutLowPt ){ | |
676 | return kTRUE; | |
677 | } | |
678 | ||
679 | } | |
680 | else{ | |
681 | ||
682 | if( vphotonCandidateMass < fMassCutHighPt ){ | |
683 | return kTRUE; | |
684 | } | |
685 | ||
686 | } | |
687 | ||
688 | return kFALSE; | |
689 | ||
690 | } | |
691 | ||
692 | Double_t AliDalitzElectronCuts::GetNFindableClustersTPC(AliESDtrack* lTrack){ | |
693 | ||
694 | ||
695 | Double_t clsToF=0; | |
209b710e | 696 | |
697 | if( fUseCrossedRows == kFALSE ) { | |
c683985a | 698 | |
699 | if ( !fUseCorrectedTPCClsInfo ){ | |
700 | if(lTrack->GetTPCNclsF()!=0){ | |
701 | ||
702 | clsToF = (Double_t)lTrack->GetNcls(1)/(Double_t)lTrack->GetTPCNclsF(); | |
703 | }// Ncluster/Nfindablecluster | |
704 | } | |
705 | else { | |
706 | ||
707 | //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius())); | |
708 | clsToF = lTrack->GetTPCClusterInfo(2,0); //NOTE ask friederike | |
709 | ||
710 | } | |
209b710e | 711 | } else { |
712 | ||
713 | Float_t nCrossedRowsTPC = lTrack->GetTPCCrossedRows(); | |
714 | clsToF = 1.0; | |
715 | if ( lTrack->GetTPCNclsF()>0 ) { | |
716 | clsToF = nCrossedRowsTPC / lTrack->GetTPCNclsF(); | |
717 | } | |
718 | } | |
c683985a | 719 | |
720 | return clsToF; | |
721 | ||
722 | } | |
723 | ||
724 | /* | |
725 | Double_t AliDalitzElectronCuts::GetPsiPair( const AliESDtrack *trackPos, const AliESDtrack *trackNeg ) | |
726 | { | |
727 | // | |
728 | // This angle is a measure for the contribution of the opening in polar | |
729 | // direction ??0 to the opening angle ?? Pair | |
730 | // | |
731 | // Ref. Measurement of photons via conversion pairs with the PHENIX experiment at RHIC | |
732 | // Master Thesis. Thorsten Dahms. 2005 | |
733 | // https://twiki.cern.ch/twiki/pub/ALICE/GammaPhysicsPublications/tdahms_thesis.pdf | |
734 | // | |
735 | Double_t momPos[3]; | |
736 | Double_t momNeg[3]; | |
737 | if( trackPos->GetConstrainedPxPyPz(momPos) == 0 ) trackPos->GetPxPyPz( momPos ); | |
738 | if( trackNeg->GetConstrainedPxPyPz(momNeg) == 0 ) trackNeg->GetPxPyPz( momNeg ); | |
739 | ||
740 | TVector3 posDaughter; | |
741 | TVector3 negDaughter; | |
742 | ||
743 | posDaughter.SetXYZ( momPos[0], momPos[1], momPos[2] ); | |
744 | negDaughter.SetXYZ( momNeg[0], momNeg[1], momNeg[2] ); | |
745 | ||
746 | Double_t deltaTheta = negDaughter.Theta() - posDaughter.Theta(); | |
747 | Double_t openingAngle = posDaughter.Angle( negDaughter ); //TMath::ACos( posDaughter.Dot(negDaughter)/(negDaughter.Mag()*posDaughter.Mag()) ); | |
748 | ||
749 | if( openingAngle < 1e-20 ) return 0.; | |
750 | ||
751 | Double_t psiAngle = TMath::ASin( deltaTheta/openingAngle ); | |
752 | ||
753 | return psiAngle; | |
754 | }*/ | |
755 | ||
756 | Bool_t AliDalitzElectronCuts::IsFromGammaConversion( Double_t psiPair, Double_t deltaPhi ) | |
757 | { | |
758 | // | |
759 | // Returns true if it is a gamma conversion according to psi pair value | |
760 | // | |
761 | return ( (deltaPhi > fDeltaPhiCutMin && deltaPhi < fDeltaPhiCutMax) && | |
762 | TMath::Abs(psiPair) < ( fPsiPairCut - fPsiPairCut/fDeltaPhiCutMax * deltaPhi ) ); | |
763 | } | |
764 | ||
765 | ///________________________________________________________________________ | |
766 | Bool_t AliDalitzElectronCuts::UpdateCutString(cutIds cutID, Int_t value) { | |
767 | ///Update the cut string (if it has been created yet) | |
768 | ||
769 | if(fCutString && fCutString->GetString().Length() == kNCuts) { | |
209b710e | 770 | cout << "Updating cut id in spot number " << cutID << " to " << value << endl; |
c683985a | 771 | fCutString->SetString(GetCutNumber()); |
772 | } else { | |
209b710e | 773 | cout << "fCutString not yet initialized, will not be updated" << endl; |
c683985a | 774 | return kFALSE; |
775 | } | |
776 | // cout << fCutString->GetString().Data() << endl; | |
777 | return kTRUE; | |
778 | } | |
779 | ||
780 | ///________________________________________________________________________ | |
781 | Bool_t AliDalitzElectronCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) { | |
782 | // Initialize Cuts from a given Cut string | |
783 | ||
784 | // out<<"Set Cut Number: "<<analysisCutSelection.Data()<<endl; | |
785 | AliInfo(Form("Set ElectronCuts Number: %s",analysisCutSelection.Data())); | |
786 | ||
787 | if(analysisCutSelection.Length()!=kNCuts) { | |
788 | AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts)); | |
789 | return kFALSE; | |
790 | } | |
791 | if(!analysisCutSelection.IsDigit()){ | |
792 | AliError("Cut selection contains characters"); | |
793 | return kFALSE; | |
794 | } | |
795 | ||
796 | const char *cutSelection = analysisCutSelection.Data(); | |
797 | #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0' | |
798 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
799 | ASSIGNARRAY(ii); | |
800 | } | |
801 | ||
802 | // TestFlag | |
803 | if(fCuts[0] !=9){ | |
804 | AliError("Analysis Cut Selection does not start with 9"); | |
805 | PrintCuts(); | |
806 | return kFALSE; | |
807 | } | |
808 | ||
809 | // Set Individual Cuts | |
810 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
811 | if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE; | |
812 | } | |
813 | ||
814 | //PrintCuts(); | |
815 | ||
816 | return kTRUE; | |
817 | } | |
818 | ///________________________________________________________________________ | |
819 | Bool_t AliDalitzElectronCuts::SetCut(cutIds cutID, const Int_t value) { | |
820 | ///Set individual cut ID | |
821 | ||
822 | //cout << "Updating cut " << fgkCutNames[cutID] << " (" << cutID << ") to " << value << endl; | |
823 | ||
824 | switch (cutID) { | |
825 | case kgoodId: | |
826 | fCuts[kgoodId] = value; | |
827 | if(value != 9) { | |
828 | cout << "Error:: First value of cut string is wrong, aborting!!" << endl; | |
829 | return kFALSE; | |
830 | } else { | |
831 | return kTRUE; | |
832 | } | |
833 | ||
834 | case kededxSigmaITSCut: | |
835 | if( SetITSdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented | |
836 | fCuts[kededxSigmaITSCut] = value; | |
837 | UpdateCutString(cutID, value); | |
838 | return kTRUE; | |
839 | } else return kFALSE; | |
840 | ||
841 | case kededxSigmaTPCCut: | |
842 | if( SetTPCdEdxCutElectronLine(value)) { //NOTE SetITSdEdxCutElectronLine: To be implemented | |
843 | fCuts[kededxSigmaTPCCut] = value; | |
844 | UpdateCutString(cutID, value); | |
845 | return kTRUE; | |
846 | } else return kFALSE; | |
847 | ||
848 | case kpidedxSigmaTPCCut: | |
849 | if( SetTPCdEdxCutPionLine(value)) { //NOTE SetITSdEdxCutPionLine: To be implemented | |
850 | fCuts[kpidedxSigmaTPCCut] = value; | |
851 | UpdateCutString(cutID, value); | |
852 | return kTRUE; | |
853 | } else return kFALSE; | |
854 | ||
855 | case kpiMinMomdedxSigmaTPCCut: | |
856 | if( SetMinMomPiondEdxTPCCut(value)) { | |
857 | fCuts[kpiMinMomdedxSigmaTPCCut] = value; | |
858 | UpdateCutString(cutID, value); | |
859 | return kTRUE; | |
860 | } else return kFALSE; | |
861 | ||
862 | case kpiMaxMomdedxSigmaTPCCut: | |
863 | if( SetMaxMomPiondEdxTPCCut(value)) { | |
864 | fCuts[kpiMaxMomdedxSigmaTPCCut] = value; | |
865 | UpdateCutString(cutID, value); | |
866 | return kTRUE; | |
867 | } else return kFALSE; | |
868 | ||
869 | case kLowPRejectionSigmaCut: | |
870 | if( SetLowPRejectionCuts(value) ) { | |
871 | fCuts[kLowPRejectionSigmaCut] = value; | |
872 | UpdateCutString(cutID, value); | |
873 | return kTRUE; | |
874 | } else return kFALSE; | |
875 | ||
876 | ||
877 | case kTOFelectronPID: | |
878 | if( SetTOFElectronPIDCut(value)) { | |
879 | fCuts[kTOFelectronPID] = value; | |
880 | UpdateCutString(cutID, value); | |
881 | return kTRUE; | |
882 | } else return kFALSE; | |
883 | case kclsITSCut: | |
884 | if( SetITSClusterCut(value) ) { | |
885 | fCuts[kclsITSCut] = value; | |
886 | UpdateCutString(cutID, value); | |
887 | return kTRUE; | |
888 | } else return kFALSE; | |
889 | case kclsTPCCut: | |
890 | if( SetTPCClusterCut(value)) { | |
891 | fCuts[kclsTPCCut] = value; | |
892 | UpdateCutString(cutID, value); | |
893 | return kTRUE; | |
894 | } else return kFALSE; | |
895 | ||
896 | case ketaCut: | |
897 | if( SetEtaCut(value)) { | |
898 | fCuts[ketaCut] = value; | |
899 | UpdateCutString(cutID, value); | |
900 | return kTRUE; | |
901 | } else return kFALSE; | |
902 | case kptCut: | |
903 | if( SetPtCut(value)) { | |
904 | fCuts[kptCut] = value; | |
905 | UpdateCutString(cutID, value); | |
906 | return kTRUE; | |
907 | } else return kFALSE; | |
908 | ||
909 | case kDCACut: | |
910 | if( SetDCACut(value)) { | |
911 | fCuts[kDCACut] = value; | |
912 | UpdateCutString(cutID, value); | |
913 | return kTRUE; | |
914 | } else return kFALSE; | |
915 | ||
916 | ||
917 | case kPsiPair: | |
918 | if( SetPsiPairCut(value)) { | |
919 | fCuts[kPsiPair] = value; | |
920 | UpdateCutString(cutID, value); | |
921 | return kTRUE; | |
922 | } else return kFALSE; | |
923 | ||
924 | case kRejectSharedElecGamma: | |
925 | if( SetRejectSharedElecGamma(value)) { | |
926 | fCuts[kRejectSharedElecGamma] = value; | |
927 | UpdateCutString(cutID, value); | |
928 | return kTRUE; | |
929 | } else return kFALSE; | |
930 | ||
931 | case kBackgroundScheme: | |
932 | if( SetBackgroundScheme(value)) { | |
933 | fCuts[kBackgroundScheme] = value; | |
934 | UpdateCutString(cutID, value); | |
935 | return kTRUE; | |
936 | } else return kFALSE; | |
937 | ||
938 | case kNumberOfRotations: | |
939 | if( SetNumberOfRotations(value)) { | |
940 | fCuts[kNumberOfRotations] = value; | |
941 | UpdateCutString(cutID, value); | |
942 | return kTRUE; | |
943 | } else return kFALSE; | |
944 | ||
945 | case kmassCut: | |
946 | if( SetMassCut(value)) { | |
947 | fCuts[kmassCut] = value; | |
948 | UpdateCutString(cutID, value); | |
949 | return kTRUE; | |
950 | } else return kFALSE; | |
951 | case kWeights: | |
952 | if( SetDoWeights(value)) { | |
953 | fCuts[kWeights] = value; | |
954 | UpdateCutString(cutID, value); | |
955 | return kTRUE; | |
956 | } else return kFALSE; | |
957 | ||
958 | ||
959 | case kNCuts: | |
960 | cout << "Error:: Cut id out of range"<< endl; | |
961 | return kFALSE; | |
962 | } | |
963 | ||
964 | cout << "Error:: Cut id " << cutID << " not recognized "<< endl; | |
965 | return kFALSE; | |
966 | ||
967 | //PrintCuts(); | |
968 | ||
969 | } | |
970 | ||
971 | ///________________________________________________________________________ | |
972 | ||
973 | void AliDalitzElectronCuts::PrintCuts() { | |
974 | // Print out current Cut Selection | |
975 | for(Int_t ic = 0; ic < kNCuts; ic++) { | |
976 | printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]); | |
977 | } | |
978 | ||
979 | } | |
980 | ||
981 | ///________________________________________________________________________ | |
982 | Bool_t AliDalitzElectronCuts::SetITSdEdxCutElectronLine(Int_t ededxSigmaCut) | |
983 | { // Set Cut | |
984 | ||
985 | switch(ededxSigmaCut){ | |
986 | ||
987 | case 0: | |
988 | fDodEdxSigmaITSCut = kFALSE; | |
989 | fPIDnSigmaBelowElectronLineITS=-100; | |
990 | fPIDnSigmaAboveElectronLineITS= 100; | |
991 | break; | |
992 | case 1: // -10,10 | |
993 | fDodEdxSigmaITSCut = kTRUE; | |
994 | fPIDnSigmaBelowElectronLineITS=-10; | |
995 | fPIDnSigmaAboveElectronLineITS=10; | |
996 | break; | |
997 | case 2: // -6,7 | |
998 | fDodEdxSigmaITSCut = kTRUE; | |
999 | fPIDnSigmaBelowElectronLineITS=-6; | |
1000 | fPIDnSigmaAboveElectronLineITS=7; | |
1001 | break; | |
1002 | case 3: // -5,5 | |
1003 | fDodEdxSigmaITSCut = kTRUE; | |
1004 | fPIDnSigmaBelowElectronLineITS=-5; | |
1005 | fPIDnSigmaAboveElectronLineITS=5; | |
1006 | break; | |
1007 | case 4: // -4,5 | |
1008 | fDodEdxSigmaITSCut = kTRUE; | |
1009 | fPIDnSigmaBelowElectronLineITS=-4; | |
1010 | fPIDnSigmaAboveElectronLineITS=5; | |
1011 | break; | |
1012 | case 5: // -3,5 | |
1013 | fDodEdxSigmaITSCut = kTRUE; | |
1014 | fPIDnSigmaBelowElectronLineITS=-3; | |
1015 | fPIDnSigmaAboveElectronLineITS=5; | |
1016 | break; | |
1017 | case 6: // -4,4 | |
1018 | fDodEdxSigmaITSCut = kTRUE; | |
1019 | fPIDnSigmaBelowElectronLineITS=-4; | |
1020 | fPIDnSigmaAboveElectronLineITS=4; | |
1021 | break; | |
1022 | case 7: // -2.5,4 | |
1023 | fDodEdxSigmaITSCut = kTRUE; | |
1024 | fPIDnSigmaBelowElectronLineITS=-2.5; | |
1025 | fPIDnSigmaAboveElectronLineITS=4; | |
1026 | break; | |
1027 | case 8: // -2,3.5 | |
1028 | fDodEdxSigmaITSCut = kTRUE; | |
1029 | fPIDnSigmaBelowElectronLineITS=-2; | |
1030 | fPIDnSigmaAboveElectronLineITS=3.5; | |
1031 | break; | |
1032 | default: | |
1033 | cout<<"Warning: ITSdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl; | |
1034 | return kFALSE; | |
1035 | ||
1036 | } | |
1037 | return kTRUE; | |
1038 | } | |
1039 | ||
1040 | ///________________________________________________________________________ | |
1041 | Bool_t AliDalitzElectronCuts::SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut) | |
1042 | { // Set Cut | |
1043 | switch(ededxSigmaCut){ | |
1044 | ||
1045 | case 0: fDodEdxSigmaTPCCut = kFALSE; | |
1046 | fPIDnSigmaBelowElectronLineTPC=-10; | |
1047 | fPIDnSigmaAboveElectronLineTPC=10; | |
1048 | break; | |
1049 | case 1: // -10,10 | |
1050 | fDodEdxSigmaTPCCut = kTRUE; | |
1051 | fPIDnSigmaBelowElectronLineTPC=-10; | |
1052 | fPIDnSigmaAboveElectronLineTPC=10; | |
1053 | break; | |
1054 | case 2: // -6,7 | |
1055 | fDodEdxSigmaTPCCut = kTRUE; | |
1056 | fPIDnSigmaBelowElectronLineTPC=-6; | |
1057 | fPIDnSigmaAboveElectronLineTPC=7; | |
1058 | break; | |
1059 | case 3: // -5,5 | |
1060 | fDodEdxSigmaTPCCut = kTRUE; | |
1061 | fPIDnSigmaBelowElectronLineTPC=-5; | |
1062 | fPIDnSigmaAboveElectronLineTPC=5; | |
1063 | break; | |
1064 | case 4: // -4,5 | |
1065 | fDodEdxSigmaTPCCut = kTRUE; | |
1066 | fPIDnSigmaBelowElectronLineTPC=-4; | |
1067 | fPIDnSigmaAboveElectronLineTPC=5; | |
1068 | break; | |
1069 | case 5: // -3,5 | |
1070 | fDodEdxSigmaTPCCut = kTRUE; | |
1071 | fPIDnSigmaBelowElectronLineTPC=-3; | |
1072 | fPIDnSigmaAboveElectronLineTPC=5; | |
1073 | break; | |
1074 | case 6: // -4,4 | |
1075 | fDodEdxSigmaTPCCut = kTRUE; | |
1076 | fPIDnSigmaBelowElectronLineTPC=-4; | |
1077 | fPIDnSigmaAboveElectronLineTPC=4; | |
1078 | break; | |
1079 | case 7: // -2.5,4 | |
1080 | fDodEdxSigmaTPCCut = kTRUE; | |
1081 | fPIDnSigmaBelowElectronLineTPC=-2.5; | |
1082 | fPIDnSigmaAboveElectronLineTPC=4; | |
1083 | break; | |
1084 | case 8: // -2,3.5 | |
1085 | fDodEdxSigmaTPCCut = kTRUE; | |
1086 | fPIDnSigmaBelowElectronLineTPC=-2; | |
1087 | fPIDnSigmaAboveElectronLineTPC=3.5; | |
1088 | break; | |
1089 | default: | |
1090 | cout<<"Warning: TPCdEdxCutElectronLine not defined"<<ededxSigmaCut<<endl; | |
1091 | return kFALSE; | |
1092 | ||
1093 | } | |
1094 | return kTRUE; | |
1095 | } | |
1096 | ||
1097 | ///________________________________________________________________________ | |
1098 | Bool_t AliDalitzElectronCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut) | |
1099 | { // Set Cut | |
1100 | ||
1101 | switch(pidedxSigmaCut){ | |
1102 | ||
1103 | case 0: fPIDnSigmaAbovePionLineTPC= 0; | |
1104 | fPIDnSigmaAbovePionLineTPCHighPt=-100; | |
1105 | break; | |
1106 | case 1: // -10 | |
1107 | fPIDnSigmaAbovePionLineTPC=3.0; //Update Sep-05-2013 from -10 to 3 | |
1108 | fPIDnSigmaAbovePionLineTPCHighPt=-10; | |
1109 | break; | |
1110 | case 2: // 1 | |
1111 | fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from -1 to 2 | |
1112 | fPIDnSigmaAbovePionLineTPCHighPt=-1; //Update Sep-09-2013 from -10 to -1 | |
1113 | break; | |
1114 | case 3: // 0 | |
1115 | fPIDnSigmaAbovePionLineTPC=2; //Update Sep-09-2013 from 0 to 2 | |
1116 | fPIDnSigmaAbovePionLineTPCHighPt=0; //Update Sep-09-2013 from -10 to 0 | |
1117 | break; | |
1118 | case 4: // 1 | |
1119 | fPIDnSigmaAbovePionLineTPC=1; | |
1120 | fPIDnSigmaAbovePionLineTPCHighPt=-10; | |
1121 | break; | |
1122 | case 5: // 1 | |
1123 | fPIDnSigmaAbovePionLineTPC=2.; | |
1124 | fPIDnSigmaAbovePionLineTPCHighPt=-10; | |
1125 | break; | |
1126 | case 6: // 1 | |
1127 | fPIDnSigmaAbovePionLineTPC=2.5; | |
1128 | fPIDnSigmaAbovePionLineTPCHighPt=-10; | |
1129 | break; | |
1130 | case 7: | |
1131 | fPIDnSigmaAbovePionLineTPC = 2.0; // We need a bit less tight cut on dE/dx //Updated from 3.0 and -10 to +2.0 , +2.0 | |
1132 | fPIDnSigmaAbovePionLineTPCHighPt = 2.0; | |
1133 | break; | |
1134 | case 8: // 1 | |
1135 | fPIDnSigmaAbovePionLineTPC = 1.5; // Updated May-16-2013 from 3.5 and -10 to +1.5, +1 | |
1136 | fPIDnSigmaAbovePionLineTPCHighPt = 1.0; | |
1137 | break; | |
1138 | case 9: // 1 | |
1139 | fPIDnSigmaAbovePionLineTPC=1.5; | |
1140 | fPIDnSigmaAbovePionLineTPCHighPt=-1.0; | |
1141 | break; | |
1142 | default: | |
1143 | cout<<"Warning: pidedxSigmaCut not defined "<<pidedxSigmaCut<<endl; | |
1144 | return kFALSE; | |
1145 | } | |
1146 | return kTRUE; | |
1147 | } | |
1148 | ||
1149 | ///________________________________________________________________________ | |
1150 | Bool_t AliDalitzElectronCuts::SetMinMomPiondEdxTPCCut(Int_t piMomdedxSigmaCut) | |
1151 | { // Set Cut | |
1152 | switch(piMomdedxSigmaCut){ | |
1153 | ||
1154 | case 0: fPIDMinPnSigmaAbovePionLineTPC=0.; | |
1155 | break; | |
1156 | case 1: // 50.0 GeV | |
1157 | fPIDMinPnSigmaAbovePionLineTPC=50.; | |
1158 | break; | |
1159 | case 2: // 20.0 GeV | |
1160 | fPIDMinPnSigmaAbovePionLineTPC=20.; | |
1161 | break; | |
1162 | case 3: // 1.5 GeV | |
1163 | fPIDMinPnSigmaAbovePionLineTPC=1.5; | |
1164 | break; | |
1165 | case 4: // 1. GeV | |
1166 | fPIDMinPnSigmaAbovePionLineTPC=1.; | |
1167 | break; | |
1168 | case 5: // 0.5 GeV | |
1169 | fPIDMinPnSigmaAbovePionLineTPC=0.5; | |
1170 | break; | |
1171 | case 6: // 0.4 GeV | |
1172 | fPIDMinPnSigmaAbovePionLineTPC=0.4; | |
1173 | break; | |
1174 | case 7: // 0.3 GeV | |
1175 | fPIDMinPnSigmaAbovePionLineTPC=0.3; | |
1176 | break; | |
1177 | case 8: // 0.25 GeV | |
1178 | fPIDMinPnSigmaAbovePionLineTPC=0.25; | |
1179 | break; | |
1180 | default: | |
1181 | cout<<"Warning: piMomdedxSigmaCut not defined "<<piMomdedxSigmaCut<<endl; | |
1182 | return kFALSE; | |
1183 | } | |
1184 | return kTRUE; | |
1185 | } | |
1186 | ///________________________________________________________________________ | |
1187 | Bool_t AliDalitzElectronCuts::SetITSClusterCut(Int_t clsITSCut){ | |
1188 | ||
1189 | ||
1190 | if( !fesdTrackCuts ) { | |
1191 | ||
1192 | cout<<"Warning: AliESDtrackCut is not initialized "<<endl; | |
1193 | return kFALSE; | |
1194 | } | |
1195 | ||
1196 | switch(clsITSCut){ | |
1197 | ||
1198 | case 0: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff); | |
1199 | break; | |
1200 | case 1: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst); | |
1201 | break; //1 hit first layer of SPD | |
1202 | case 2: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | |
1203 | break; //1 hit in any layer of SPD | |
1204 | case 3: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kFirst); | |
1205 | fesdTrackCuts->SetMinNClustersITS(4); | |
1206 | // 4 hits in total in the ITS. At least 1 hit in the first layer of SPD | |
1207 | break; | |
1208 | case 4: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | |
1209 | fesdTrackCuts->SetMinNClustersITS(3); | |
1210 | // 3 hits in total in the ITS. At least 1 hit in any layer of SPD | |
1211 | break; | |
1212 | case 5: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | |
1213 | fesdTrackCuts->SetMinNClustersITS(4); | |
1214 | // 4 hits in total in the ITS. At least 1 hit in any layer of SPD | |
1215 | break; | |
1216 | case 6: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | |
1217 | fesdTrackCuts->SetMinNClustersITS(5); | |
1218 | // 5 hits in total in the ITS. At least 1 hit in any layer of SPD | |
1219 | break; | |
1220 | default: | |
1221 | cout<<"Warning: clsITSCut not defined "<<clsITSCut<<endl; | |
1222 | return kFALSE; | |
1223 | } | |
1224 | ||
1225 | return kTRUE; | |
1226 | } | |
1227 | ||
1228 | ///________________________________________________________________________ | |
1229 | Bool_t AliDalitzElectronCuts::SetTPCClusterCut(Int_t clsTPCCut) | |
1230 | { // Set Cut | |
1231 | switch(clsTPCCut){ | |
1232 | case 0: // 0 | |
1233 | fMinClsTPC= 0.; | |
1234 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1235 | break; | |
1236 | case 1: // 70 | |
1237 | fMinClsTPC= 70.; | |
1238 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1239 | break; | |
1240 | case 2: // 80 | |
1241 | fMinClsTPC= 80.; | |
1242 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1243 | break; | |
209b710e | 1244 | case 3: // Changed 2014-02-04 before fMinClsTPC = 50.; |
1245 | fMinClsTPCToF = 0.8; | |
1246 | fesdTrackCuts->SetMinNCrossedRowsTPC(70); | |
1247 | fesdTrackCuts->SetMinNClustersTPC(0); | |
1248 | fUseCrossedRows = kTRUE; | |
c683985a | 1249 | break; |
1250 | case 4: // 0% of findable clusters | |
1251 | fMinClsTPC= 70.; | |
1252 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1253 | fMinClsTPCToF= 0.0; | |
1254 | fUseCorrectedTPCClsInfo=0; | |
1255 | break; | |
1256 | case 5: // 35% of findable clusters | |
1257 | fMinClsTPC = 70.; | |
1258 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1259 | fMinClsTPCToF= 0.35; | |
1260 | fUseCorrectedTPCClsInfo=0; | |
1261 | break; | |
1262 | case 6: // 60% of findable clusters | |
1263 | fMinClsTPC= 70.; | |
1264 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1265 | fMinClsTPCToF= 0.6; | |
1266 | fUseCorrectedTPCClsInfo=0; | |
1267 | break; | |
899d014b | 1268 | case 7: // 60% Changed 2014-02-04 before fMinClsTPC = 0.7 fUseCorrectedTPCClsInfo = 0 |
1269 | // Changed 2014-02-04 before fMinClsTPC = 50.; | |
1270 | fMinClsTPCToF = 0.6; | |
1271 | fesdTrackCuts->SetMinNCrossedRowsTPC(70); | |
1272 | fesdTrackCuts->SetMinNClustersTPC(0); | |
1273 | fUseCrossedRows = kTRUE; | |
c683985a | 1274 | break; |
1275 | case 8: fMinClsTPC = 0.; | |
1276 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1277 | fMinClsTPCToF= 0.35; | |
1278 | fUseCorrectedTPCClsInfo=0; | |
1279 | break; | |
1280 | case 9: // 35% of findable clusters | |
1281 | fMinClsTPC = 70.; | |
1282 | fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC); | |
1283 | fMinClsTPCToF= 0.35; | |
1284 | fUseCorrectedTPCClsInfo=1; | |
1285 | break; | |
1286 | ||
1287 | default: | |
1288 | cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl; | |
1289 | return kFALSE; | |
1290 | } | |
1291 | return kTRUE; | |
1292 | } | |
1293 | ||
1294 | ///________________________________________________________________________ | |
1295 | Bool_t AliDalitzElectronCuts::SetEtaCut(Int_t etaCut) | |
1296 | { | |
1297 | // Set eta Cut | |
1298 | switch(etaCut){ | |
1299 | case 0: | |
1300 | fEtaCut = 100.; | |
1301 | fDoEtaCut = kFALSE; | |
1302 | break; | |
1303 | case 1: // 1.4 | |
1304 | fEtaCut = 1.4; | |
1305 | fDoEtaCut = kTRUE; | |
1306 | break; | |
1307 | case 2: // 1.2 | |
1308 | fEtaCut = 1.2; | |
1309 | fDoEtaCut = kTRUE; | |
1310 | break; | |
1311 | case 3: // 0.9 | |
1312 | fEtaCut = 0.9; | |
1313 | fDoEtaCut = kTRUE; | |
1314 | break; | |
1315 | case 4: // 0.8 | |
1316 | fEtaCut = 0.8; | |
1317 | fDoEtaCut = kTRUE; | |
1318 | break; | |
1319 | case 5: // 0.75 | |
1320 | fEtaCut = 0.75; | |
1321 | fDoEtaCut = kTRUE; | |
1322 | break; | |
1323 | case 6: //0.6 | |
1324 | fEtaCut = 0.6; //changed from 0.4 to 0.6 2013.06.10 | |
1325 | fDoEtaCut = kTRUE; | |
1326 | break; | |
1327 | case 7: //0.5 | |
1328 | fEtaCut = 0.5; //changed from 0.3 to 0.5 2013.06.10 | |
1329 | fDoEtaCut = kTRUE; | |
1330 | break; | |
1331 | case 8: fEtaCut = 0.4; | |
1332 | fDoEtaCut = kTRUE; | |
1333 | break; | |
899d014b | 1334 | case 9: fEtaCut = 0.65; |
1335 | fDoEtaCut = kTRUE; | |
1336 | break; | |
c683985a | 1337 | default: |
1338 | cout<<"Warning: EtaCut not defined "<<etaCut<<endl; | |
1339 | return kFALSE; | |
1340 | } | |
1341 | return kTRUE; | |
1342 | } | |
1343 | ||
1344 | ///________________________________________________________________________ | |
1345 | Bool_t AliDalitzElectronCuts::SetPtCut(Int_t ptCut) | |
1346 | { | |
1347 | // Set Pt Cut | |
1348 | //0.1GeV, 0.125 GeV, 0.15 GeV | |
1349 | ||
1350 | switch(ptCut){ | |
1351 | ||
1352 | case 0: fPtCut = 0.075; | |
1353 | break; | |
1354 | case 1: // 0.1 | |
1355 | fPtCut = 0.1; | |
1356 | break; | |
1357 | case 2: // 0.125 GeV | |
1358 | fPtCut = 0.125; | |
1359 | break; | |
1360 | case 3: // 0.15 GeV | |
1361 | fPtCut = 0.15; | |
1362 | break; | |
1363 | default: | |
1364 | cout<<"Warning: PtCut not defined "<<ptCut<<endl; | |
1365 | return kFALSE; | |
1366 | } | |
1367 | return kTRUE; | |
1368 | } | |
1369 | ||
1370 | ||
1371 | ///________________________________________________________________________ | |
1372 | Bool_t AliDalitzElectronCuts::SetDCACut(Int_t dcaCut) | |
1373 | { | |
1374 | // Set DCA Cut | |
1375 | ||
1376 | if( !fesdTrackCuts ) { | |
1377 | ||
1378 | cout<<"Warning: AliESDtrackCut is not initialized "<<endl; | |
1379 | return kFALSE; | |
1380 | } | |
1381 | ||
1382 | switch(dcaCut){ | |
1383 | ||
1384 | case 0: | |
1385 | //Open cuts// | |
1386 | fesdTrackCuts->SetMaxDCAToVertexZ(1000); | |
1387 | fesdTrackCuts->SetMaxDCAToVertexXY(1000); | |
1388 | fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36); | |
1389 | break; | |
1390 | ||
1391 | case 1: | |
1392 | fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01"); | |
1393 | fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36); | |
1394 | ||
1395 | break; | |
1396 | case 2: fesdTrackCuts->SetMaxDCAToVertexZ(2); | |
1397 | fesdTrackCuts->SetMaxDCAToVertexXY(1); | |
1398 | fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36); | |
1399 | break; | |
1400 | ||
209b710e | 1401 | case 3: fesdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0105+0.0350/pt^1.1"); |
1402 | fesdTrackCuts->SetMaxChi2TPCConstrainedGlobal(36); | |
1403 | break; | |
1404 | ||
c683985a | 1405 | default: |
1406 | cout<<"Warning: dcaCut not defined "<<dcaCut<<endl; | |
1407 | return kFALSE; | |
1408 | } | |
1409 | return kTRUE; | |
1410 | } | |
1411 | ||
1412 | ||
1413 | ||
1414 | ||
1415 | ///________________________________________________________________________ | |
1416 | Bool_t AliDalitzElectronCuts::SetMaxMomPiondEdxTPCCut(Int_t piMaxMomdedxSigmaCut) | |
1417 | { // Set Cut | |
1418 | switch(piMaxMomdedxSigmaCut){ | |
1419 | ||
1420 | case 0: | |
1421 | fPIDMaxPnSigmaAbovePionLineTPC=0.; | |
1422 | break; | |
1423 | case 1: // 100. GeV | |
1424 | fPIDMaxPnSigmaAbovePionLineTPC=100.; | |
1425 | break; | |
1426 | case 2: // 5. GeV | |
1427 | fPIDMaxPnSigmaAbovePionLineTPC=5.; | |
1428 | break; | |
1429 | case 3: // 4. GeV | |
1430 | fPIDMaxPnSigmaAbovePionLineTPC=4.; | |
1431 | break; | |
1432 | case 4: // 3.5 GeV | |
1433 | fPIDMaxPnSigmaAbovePionLineTPC=3.5; | |
1434 | break; | |
1435 | case 5: // 3. GeV | |
1436 | fPIDMaxPnSigmaAbovePionLineTPC=3.; | |
1437 | break; | |
1438 | default: | |
1439 | cout<<"Warning: piMaxMomdedxSigmaCut not defined "<<piMaxMomdedxSigmaCut<<endl; | |
1440 | return kFALSE; | |
1441 | } | |
1442 | return kTRUE; | |
1443 | } | |
1444 | ||
1445 | ///________________________________________________________________________ | |
1446 | Bool_t AliDalitzElectronCuts::SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut) | |
1447 | { // Set Cut | |
1448 | switch(LowPRejectionSigmaCut){ | |
1449 | case 0: // | |
1450 | fDoKaonRejectionLowP=kFALSE; | |
1451 | fDoProtonRejectionLowP=kFALSE; | |
1452 | fDoPionRejectionLowP=kFALSE; | |
1453 | fPIDnSigmaAtLowPAroundKaonLine=0; | |
1454 | fPIDnSigmaAtLowPAroundProtonLine=0; | |
1455 | fPIDnSigmaAtLowPAroundPionLine=0; | |
1456 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1457 | break; | |
1458 | case 1: // | |
1459 | fDoKaonRejectionLowP=kTRUE; | |
1460 | fDoProtonRejectionLowP=kTRUE; | |
1461 | fDoPionRejectionLowP=kTRUE; | |
1462 | fPIDnSigmaAtLowPAroundKaonLine=0.5; | |
1463 | fPIDnSigmaAtLowPAroundProtonLine=0.5; | |
1464 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
1465 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1466 | break; | |
1467 | case 2: // | |
1468 | fDoKaonRejectionLowP=kTRUE; | |
1469 | fDoProtonRejectionLowP=kTRUE; | |
1470 | fDoPionRejectionLowP=kTRUE; | |
1471 | fPIDnSigmaAtLowPAroundKaonLine=1.0; | |
1472 | fPIDnSigmaAtLowPAroundProtonLine=1.0; | |
1473 | fPIDnSigmaAtLowPAroundPionLine=1.0; | |
1474 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1475 | break; | |
1476 | case 3: // | |
1477 | fDoKaonRejectionLowP=kTRUE; | |
1478 | fDoProtonRejectionLowP=kTRUE; | |
1479 | fDoPionRejectionLowP=kTRUE; | |
1480 | fPIDnSigmaAtLowPAroundKaonLine=1.5; | |
1481 | fPIDnSigmaAtLowPAroundProtonLine=1.5; | |
1482 | fPIDnSigmaAtLowPAroundPionLine=1.5; | |
1483 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1484 | break; | |
1485 | case 4: // | |
1486 | fDoKaonRejectionLowP=kTRUE; | |
1487 | fDoProtonRejectionLowP=kTRUE; | |
1488 | fDoPionRejectionLowP=kTRUE; | |
1489 | fPIDnSigmaAtLowPAroundKaonLine=2.0; | |
1490 | fPIDnSigmaAtLowPAroundProtonLine=2.0; | |
1491 | fPIDnSigmaAtLowPAroundPionLine=2.0; | |
1492 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1493 | break; | |
1494 | case 5: // | |
1495 | fDoKaonRejectionLowP=kTRUE; | |
1496 | fDoProtonRejectionLowP=kTRUE; | |
1497 | fDoPionRejectionLowP=kTRUE; | |
1498 | fPIDnSigmaAtLowPAroundKaonLine=2.0; | |
1499 | fPIDnSigmaAtLowPAroundProtonLine=2.0; | |
1500 | fPIDnSigmaAtLowPAroundPionLine=2.5; | |
1501 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1502 | break; | |
1503 | case 6: // | |
1504 | fDoKaonRejectionLowP=kTRUE; | |
1505 | fDoProtonRejectionLowP=kTRUE; | |
1506 | fDoPionRejectionLowP=kTRUE; | |
1507 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
1508 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
1509 | fPIDnSigmaAtLowPAroundPionLine=2.; | |
1510 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1511 | break; | |
1512 | case 7: // | |
1513 | fDoKaonRejectionLowP=kFALSE; | |
1514 | fDoProtonRejectionLowP=kFALSE; | |
1515 | fDoPionRejectionLowP=kTRUE; | |
1516 | fPIDnSigmaAtLowPAroundKaonLine=0.0; | |
1517 | fPIDnSigmaAtLowPAroundProtonLine=0.0; | |
1518 | fPIDnSigmaAtLowPAroundPionLine=1.0; | |
1519 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1520 | break; | |
1521 | case 8: | |
1522 | fDoKaonRejectionLowP=kFALSE; | |
1523 | fDoProtonRejectionLowP=kFALSE; | |
1524 | fDoPionRejectionLowP=kTRUE; | |
1525 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
1526 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
1527 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
1528 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLineTPC; | |
1529 | break; | |
1530 | default: | |
1531 | cout<<"Warning: LowPRejectionSigmaCut not defined "<<LowPRejectionSigmaCut<<endl; | |
1532 | return kFALSE; | |
1533 | } | |
1534 | return kTRUE; | |
1535 | } | |
1536 | ||
1537 | ///________________________________________________________________________ | |
1538 | Bool_t AliDalitzElectronCuts::SetTOFElectronPIDCut(Int_t TOFelectronPID){ | |
1539 | // Set Cut | |
1540 | switch(TOFelectronPID){ // RRnewTOF start ////////////////////////////////////////////////////////////////////////// | |
1541 | case 0: // no cut | |
1542 | fRequireTOF = kFALSE; | |
1543 | fUseTOFpid = kFALSE; | |
1544 | fTofPIDnSigmaBelowElectronLine=-100; | |
1545 | fTofPIDnSigmaAboveElectronLine=100; | |
1546 | break; | |
1547 | case 1: // -7,7 | |
1548 | fRequireTOF = kFALSE; | |
1549 | fUseTOFpid = kTRUE; | |
1550 | fTofPIDnSigmaBelowElectronLine=-7; | |
1551 | fTofPIDnSigmaAboveElectronLine=7; | |
1552 | break; | |
1553 | case 2: // -5,5 | |
1554 | fRequireTOF = kFALSE; | |
1555 | fUseTOFpid = kTRUE; | |
1556 | fTofPIDnSigmaBelowElectronLine=-5; | |
1557 | fTofPIDnSigmaAboveElectronLine=5; | |
1558 | break; | |
1559 | case 3: // -3,5 | |
1560 | fRequireTOF = kFALSE; | |
1561 | fUseTOFpid = kTRUE; | |
1562 | fTofPIDnSigmaBelowElectronLine=-3; | |
1563 | fTofPIDnSigmaAboveElectronLine=5; | |
1564 | break; | |
1565 | case 4: // -2,3 | |
1566 | fRequireTOF = kFALSE; | |
1567 | fUseTOFpid = kTRUE; | |
1568 | fTofPIDnSigmaBelowElectronLine=-2; | |
1569 | fTofPIDnSigmaAboveElectronLine=3; | |
1570 | break; | |
1571 | case 5: // -3, 3 TOF mandatory | |
1572 | fRequireTOF = kTRUE; | |
1573 | fUseTOFpid = kTRUE; | |
1574 | fTofPIDnSigmaBelowElectronLine= -3; | |
1575 | fTofPIDnSigmaAboveElectronLine= 3; | |
1576 | break; | |
1577 | default: | |
1578 | cout<<"Warning: TOFElectronCut not defined "<<TOFelectronPID<<endl; | |
1579 | return kFALSE; | |
1580 | } //////////////////////// RRnewTOF end ////////////////////////////////////////////////////////////////////////// | |
1581 | return kTRUE; | |
1582 | } | |
1583 | ///_______________________________________________________________________________ | |
1584 | ||
1585 | Bool_t AliDalitzElectronCuts::SetPsiPairCut(Int_t psiCut) { | |
1586 | ||
1587 | ||
1588 | switch(psiCut) { | |
1589 | case 0: | |
1590 | fDoPsiPairCut = kFALSE; | |
1591 | fPsiPairCut = 10000.; // | |
1592 | fDeltaPhiCutMin = -1000.; | |
1593 | fDeltaPhiCutMax = 1000.; | |
1594 | ||
1595 | break; | |
1596 | case 1: | |
1597 | fDoPsiPairCut = kTRUE; | |
1598 | fPsiPairCut = 0.45; // Standard | |
1599 | fDeltaPhiCutMin = 0.0; | |
1600 | fDeltaPhiCutMax = 0.12; | |
1601 | break; | |
1602 | case 2: | |
1603 | fDoPsiPairCut = kTRUE; | |
1604 | fPsiPairCut = 0.60; | |
1605 | fDeltaPhiCutMin = 0.0; | |
1606 | fDeltaPhiCutMax = 0.12; | |
1607 | break; | |
1608 | case 3: | |
1609 | fDoPsiPairCut = kTRUE; | |
1610 | fPsiPairCut = 0.52; | |
1611 | fDeltaPhiCutMin = 0.0; | |
1612 | fDeltaPhiCutMax = 0.12; | |
c683985a | 1613 | case 4: |
1614 | fDoPsiPairCut = kTRUE; | |
1615 | fPsiPairCut = 0.30; | |
1616 | fDeltaPhiCutMin = 0.0; | |
1617 | fDeltaPhiCutMax = 0.12; | |
1618 | break; | |
209b710e | 1619 | |
c683985a | 1620 | default: |
1621 | cout<<"Warning: PsiPairCut not defined "<<fPsiPairCut<<endl; | |
1622 | return kFALSE; | |
1623 | } | |
1624 | ||
1625 | return kTRUE; | |
1626 | } | |
1627 | ||
1628 | ///_______________________________________________________________________________ | |
1629 | Bool_t AliDalitzElectronCuts::SetRejectSharedElecGamma(Int_t RCut) { | |
1630 | ||
1631 | ||
1632 | switch(RCut) { | |
1633 | case 0: | |
1634 | fDoRejectSharedElecGamma = kFALSE; | |
1635 | fRadiusCut = 10000; // | |
1636 | break; | |
1637 | case 1: | |
1638 | fDoRejectSharedElecGamma = kTRUE; | |
1639 | fRadiusCut = 2.0; // cm | |
1640 | break; | |
1641 | case 2: | |
1642 | fDoRejectSharedElecGamma = kTRUE; | |
1643 | fRadiusCut = 3.0; // Standard | |
1644 | break; | |
1645 | case 3: | |
1646 | fDoRejectSharedElecGamma = kTRUE; | |
1647 | fRadiusCut = 4.0; // | |
1648 | break; | |
1649 | case 4: | |
1650 | fDoRejectSharedElecGamma = kTRUE; | |
1651 | fRadiusCut = 5.0; // | |
1652 | break; | |
1653 | case 5: | |
1654 | fDoRejectSharedElecGamma = kTRUE; | |
1655 | fRadiusCut = 10.0; // | |
1656 | break; | |
1657 | case 6: | |
1658 | fDoRejectSharedElecGamma = kTRUE; | |
1659 | fRadiusCut = 15.0; // | |
1660 | break; | |
1661 | default: | |
1662 | cout<<"Warning: PsiPairCut not defined "<<fDoRejectSharedElecGamma<<endl; | |
1663 | return kFALSE; | |
1664 | } | |
1665 | ||
1666 | return kTRUE; | |
1667 | } | |
1668 | ///__________________________________________________________________________ | |
1669 | Bool_t AliDalitzElectronCuts::SetBackgroundScheme(Int_t BackgroundScheme){ | |
1670 | ||
1671 | // Set Cut | |
1672 | switch(BackgroundScheme){ | |
1673 | ||
1674 | case 0: //Rotation | |
1675 | fBKGMethod = 0; | |
1676 | fUseTrackMultiplicityForBG = kFALSE; | |
1677 | break; | |
1678 | case 1: // mixed event with V0 multiplicity | |
1679 | fBKGMethod = 1; | |
1680 | fUseTrackMultiplicityForBG = kFALSE; | |
1681 | break; | |
1682 | case 2: // mixed event with track multiplicity | |
1683 | fUseTrackMultiplicityForBG = kTRUE; | |
1684 | fBKGMethod = 1; | |
1685 | break; | |
1686 | case 3: //Rotation | |
1687 | fUseTrackMultiplicityForBG = kFALSE; | |
1688 | fBKGMethod = 2; | |
1689 | break; | |
1690 | case 4: //Rotation | |
1691 | fUseTrackMultiplicityForBG = kTRUE; | |
1692 | fBKGMethod = 2; | |
1693 | break; | |
1694 | case 5: fUseTrackMultiplicityForBG = kTRUE; | |
1695 | fBKGMethod = 3; | |
1696 | break; | |
1697 | ||
1698 | default: | |
1699 | cout<<"Warning: BackgroundScheme not defined "<<BackgroundScheme<<endl; | |
1700 | return kFALSE; | |
1701 | } | |
1702 | return kTRUE; | |
1703 | } | |
1704 | ||
1705 | ///________________________________________________________________________ | |
1706 | Bool_t AliDalitzElectronCuts::SetNumberOfRotations(Int_t NumberOfRotations) | |
1707 | { // Set Cut | |
1708 | switch(NumberOfRotations){ | |
1709 | case 0: | |
1710 | fnumberOfRotationEventsForBG = 5; | |
1711 | break; | |
1712 | case 1: | |
1713 | fnumberOfRotationEventsForBG = 10; | |
1714 | break; | |
1715 | case 2: | |
1716 | fnumberOfRotationEventsForBG = 15; | |
1717 | break; | |
1718 | case 3: | |
1719 | fnumberOfRotationEventsForBG = 20; | |
1720 | break; | |
1721 | case 4: | |
1722 | fnumberOfRotationEventsForBG = 2; | |
1723 | break; | |
1724 | case 5: | |
1725 | fnumberOfRotationEventsForBG = 50; | |
1726 | break; | |
1727 | case 6: | |
1728 | fnumberOfRotationEventsForBG = 80; | |
1729 | break; | |
1730 | case 7: | |
1731 | fnumberOfRotationEventsForBG = 100; | |
1732 | break; | |
1733 | default: | |
1734 | cout<<"Warning: NumberOfRotations not defined "<<NumberOfRotations<<endl; | |
1735 | return kFALSE; | |
1736 | } | |
1737 | return kTRUE; | |
1738 | } | |
1739 | ||
1740 | ||
1741 | ||
1742 | ///________________________________________________________________________ | |
1743 | Bool_t AliDalitzElectronCuts::SetDoWeights(Int_t opc) | |
1744 | { // Set Cut | |
1745 | switch(opc){ | |
1746 | ||
1747 | case 0: fDoWeights = kFALSE; | |
1748 | break; | |
1749 | case 1: fDoWeights = kTRUE; | |
1750 | break; | |
1751 | default: | |
1752 | cout<<"Warning: Weights option not defined "<<opc<<endl; | |
1753 | return kFALSE; | |
1754 | } | |
1755 | return kTRUE; | |
1756 | } | |
1757 | ///________________________________________________________________________ | |
1758 | Bool_t AliDalitzElectronCuts::SetMassCut(Int_t massCut) | |
1759 | { // Set Cut | |
1760 | switch(massCut){ | |
1761 | ||
1762 | case 0: | |
1763 | ||
1764 | fMassCutPtMin = -999.; //GeV | |
1765 | fMassCutLowPt = 999.; //GeV/c^2 | |
1766 | fMassCutHighPt = 999.; //GeV/c^2 | |
1767 | fDoMassCut = kFALSE; | |
1768 | break; | |
1769 | case 1: | |
1770 | //fMassCut = 0.135; //GeV/c^2 | |
1771 | fMassCutPtMin = -999.; //GeV | |
1772 | fMassCutLowPt = 0.135; //GeV/c^2 | |
1773 | fMassCutHighPt = 0.135; //GeV/c^2 | |
1774 | fDoMassCut = kTRUE; | |
1775 | break; | |
1776 | case 2: | |
1777 | //fMassCut = 0.100; //GeV/c^2 | |
1778 | fMassCutPtMin = -999.; //GeV | |
1779 | fMassCutLowPt = 0.100; //GeV/c^2 | |
1780 | fMassCutHighPt = 0.100; //GeV/c^2 | |
1781 | fDoMassCut = kTRUE; | |
1782 | break; | |
1783 | case 3: | |
1784 | //fMassCut = 0.075; //GeV/c^2 | |
1785 | fMassCutPtMin = -999.; //GeV | |
1786 | fMassCutLowPt = 0.075; //GeV/c^2 | |
1787 | fMassCutHighPt = 0.075; //GeV/c^2 | |
1788 | fDoMassCut = kTRUE; | |
1789 | break; | |
1790 | case 4: | |
1791 | //fMassCut = 0.050; //GeV/c^2 | |
1792 | fMassCutPtMin = -999.; //GeV | |
1793 | fMassCutLowPt = 0.050; //GeV/c^2 | |
1794 | fMassCutHighPt = 0.050; //GeV/c^2 | |
1795 | fDoMassCut = kTRUE; | |
1796 | break; | |
1797 | case 5: | |
1798 | ||
1799 | fMassCutPtMin = -999.; //GeV | |
1800 | fMassCutLowPt = 0.035; //GeV/c^2 | |
1801 | fMassCutHighPt = 0.035; //GeV/c^2 | |
1802 | fDoMassCut = kTRUE; | |
1803 | break; | |
1804 | case 6: | |
1805 | fMassCutPtMin = -999.; //GeV | |
1806 | fMassCutLowPt = 0.015; //GeV/c^2 | |
1807 | fMassCutHighPt = 0.015; //GeV/c^2 | |
1808 | fDoMassCut = kTRUE; | |
1809 | break; | |
1810 | case 7: fMassCutPtMin = 1.0; //GeV | |
1811 | fMassCutLowPt = 0.015; //GeV/c^2 | |
1812 | fMassCutHighPt = 0.035; //GeV/c^2 | |
1813 | fDoMassCut = kTRUE; | |
1814 | break; | |
899d014b | 1815 | case 8: fMassCutPtMin = 1.0; //GeV |
1816 | fMassCutLowPt = 0.015; //GeV/c^2 | |
1817 | fMassCutHighPt = 0.050; //GeV/c^2 | |
1818 | fDoMassCut = kTRUE; | |
1819 | break; | |
1820 | case 9: fMassCutPtMin = 1.0; //GeV | |
1821 | fMassCutLowPt = 0.025; //GeV/c^2 | |
1822 | fMassCutHighPt = 0.035; //GeV/c^2 | |
1823 | fDoMassCut = kTRUE; | |
1824 | break; | |
c683985a | 1825 | default: |
1826 | cout<<"Warning: MassCut not defined "<<massCut<<endl; | |
1827 | return kFALSE; | |
1828 | } | |
1829 | return kTRUE; | |
1830 | } | |
1831 | ||
1832 | ||
1833 | ||
1834 | ///________________________________________________________________________ | |
1835 | TString AliDalitzElectronCuts::GetCutNumber(){ | |
1836 | // returns TString with current cut number | |
1837 | TString a(kNCuts); | |
1838 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
1839 | a.Append(Form("%d",fCuts[ii])); | |
1840 | } | |
1841 | return a; | |
1842 | } | |
1843 | ||
1844 | ||
1845 | ///________________________________________________________________________ | |
1846 | AliDalitzElectronCuts* AliDalitzElectronCuts::GetStandardCuts2010PbPb(){ | |
1847 | //Create and return standard 2010 PbPb cuts | |
1848 | AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010PbPb","StandardCuts2010PbPb"); | |
1849 | if(!cuts->InitializeCutsFromCutString("9069640364102")){ | |
1850 | cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;} | |
1851 | return cuts; | |
1852 | } | |
1853 | ||
1854 | ///________________________________________________________________________ | |
1855 | AliDalitzElectronCuts* AliDalitzElectronCuts::GetStandardCuts2010pp(){ | |
1856 | //Create and return standard 2010 PbPb cuts | |
1857 | AliDalitzElectronCuts *cuts=new AliDalitzElectronCuts("StandardCuts2010pp","StandardCuts2010pp"); | |
1858 | ||
1859 | if(!cuts->InitializeCutsFromCutString("9069640364102")){ | |
1860 | cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;} | |
1861 | return cuts; | |
1862 | } | |
1863 |