]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | ///////////////////////////////////////////////////////////// | |
19 | // | |
20 | // Class for cuts on AOD reconstructed D+->Kpipi | |
21 | // | |
22 | // Author: R. Bala, bala@to.infn.it | |
23 | // G. Ortona, ortona@to.infn.it | |
24 | ///////////////////////////////////////////////////////////// | |
25 | ||
26 | #include <TDatabasePDG.h> | |
27 | #include <Riostream.h> | |
28 | ||
29 | #include "AliRDHFCutsDplustoKpipi.h" | |
30 | #include "AliAODRecoDecayHF3Prong.h" | |
31 | #include "AliAODTrack.h" | |
32 | #include "AliESDtrack.h" | |
33 | ||
34 | ||
35 | ClassImp(AliRDHFCutsDplustoKpipi) | |
36 | ||
37 | //-------------------------------------------------------------------------- | |
38 | AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const char* name) : | |
39 | AliRDHFCuts(name), | |
40 | fUseStrongPid(kFALSE) | |
41 | { | |
42 | // | |
43 | // Default Constructor | |
44 | // | |
45 | Int_t nvars=12; | |
46 | SetNVars(nvars); | |
47 | TString varNames[12]={"inv. mass [GeV]", | |
48 | "pTK [GeV/c]", | |
49 | "pTPi [GeV/c]", | |
50 | "d0K [cm] lower limit!", | |
51 | "d0Pi [cm] lower limit!", | |
52 | "dist12 (cm)", | |
53 | "sigmavert (cm)", | |
54 | "dist prim-sec (cm)", | |
55 | "pM=Max{pT1,pT2,pT3} (GeV/c)", | |
56 | "cosThetaPoint", | |
57 | "Sum d0^2 (cm^2)", | |
58 | "dca cut (cm)"}; | |
59 | Bool_t isUpperCut[12]={kTRUE, | |
60 | kFALSE, | |
61 | kFALSE, | |
62 | kFALSE, | |
63 | kFALSE, | |
64 | kFALSE, | |
65 | kTRUE, | |
66 | kFALSE, | |
67 | kFALSE, | |
68 | kFALSE, | |
69 | kFALSE, | |
70 | kTRUE}; | |
71 | SetVarNames(nvars,varNames,isUpperCut); | |
72 | Bool_t forOpt[12]={kFALSE, | |
73 | kFALSE, | |
74 | kFALSE, | |
75 | kFALSE, | |
76 | kFALSE, | |
77 | kFALSE, | |
78 | kTRUE, | |
79 | kTRUE, | |
80 | kTRUE, | |
81 | kTRUE, | |
82 | kTRUE, | |
83 | kFALSE}; | |
84 | SetVarsForOpt(5,forOpt); | |
85 | Float_t limits[2]={0,999999999.}; | |
86 | SetPtBins(2,limits); | |
87 | if(fPidHF)delete fPidHF; | |
88 | fPidHF=new AliAODPidHF(); | |
89 | Double_t plim[2]={0.6,0.8}; | |
90 | Double_t nsigma[5]={2.,1.,2.,3.,0.}; | |
91 | ||
92 | fPidHF->SetPLimit(plim); | |
93 | fPidHF->SetAsym(kTRUE); | |
94 | fPidHF->SetSigma(nsigma); | |
95 | fPidHF->SetMatch(1); | |
96 | fPidHF->SetTPC(1); | |
97 | fPidHF->SetTOF(1); | |
98 | fPidHF->SetITS(0); | |
99 | fPidHF->SetTRD(0); | |
100 | fPidHF->SetCompat(kTRUE); | |
101 | ||
102 | ||
103 | } | |
104 | ||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | //-------------------------------------------------------------------------- | |
113 | AliRDHFCutsDplustoKpipi::AliRDHFCutsDplustoKpipi(const AliRDHFCutsDplustoKpipi &source) : | |
114 | AliRDHFCuts(source), | |
115 | fUseStrongPid(source.fUseStrongPid) | |
116 | ||
117 | { | |
118 | // | |
119 | // Copy constructor | |
120 | // | |
121 | ||
122 | } | |
123 | //-------------------------------------------------------------------------- | |
124 | AliRDHFCutsDplustoKpipi &AliRDHFCutsDplustoKpipi::operator=(const AliRDHFCutsDplustoKpipi &source) | |
125 | { | |
126 | // | |
127 | // assignment operator | |
128 | // | |
129 | if(&source == this) return *this; | |
130 | ||
131 | AliRDHFCuts::operator=(source); | |
132 | ||
133 | return *this; | |
134 | } | |
135 | // | |
136 | ||
137 | ||
138 | //--------------------------------------------------------------------------- | |
139 | void AliRDHFCutsDplustoKpipi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) { | |
140 | // | |
141 | // Fills in vars the values of the variables | |
142 | // | |
143 | ||
144 | ||
145 | if(nvars!=fnVarsForOpt) { | |
146 | printf("AliRDHFCutsDplustoKpipi::GetCutsVarsForOpt: wrong number of variables\n"); | |
147 | return; | |
148 | } | |
149 | ||
150 | AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d; | |
151 | ||
152 | Int_t iter=-1; | |
153 | if(fVarsForOpt[0]){ | |
154 | iter++; | |
155 | vars[iter]=dd->InvMassDplus(); | |
156 | } | |
157 | if(fVarsForOpt[1]){ | |
158 | iter++; | |
159 | for(Int_t iprong=0;iprong<3;iprong++){ | |
160 | if(TMath::Abs(pdgdaughters[iprong])==321) { | |
161 | vars[iter]=dd->PtProng(iprong); | |
162 | } | |
163 | } | |
164 | } | |
165 | if(fVarsForOpt[2]){ | |
166 | iter++; | |
167 | Float_t minPtDau=1000000.0; | |
168 | for(Int_t iprong=0;iprong<3;iprong++){ | |
169 | if(TMath::Abs(pdgdaughters[iprong])==211) { | |
170 | if(dd->PtProng(iprong)<minPtDau){ | |
171 | minPtDau=dd->PtProng(iprong); | |
172 | } | |
173 | } | |
174 | } | |
175 | vars[iter]=minPtDau; | |
176 | } | |
177 | if(fVarsForOpt[3]){ | |
178 | iter++; | |
179 | for(Int_t iprong=0;iprong<3;iprong++){ | |
180 | if(TMath::Abs(pdgdaughters[iprong])==321) { | |
181 | vars[iter]=dd->Getd0Prong(iprong); | |
182 | } | |
183 | } | |
184 | } | |
185 | if(fVarsForOpt[4]){ | |
186 | iter++; | |
187 | Float_t minImpParDau=1000000.0; | |
188 | for(Int_t iprong=0;iprong<3;iprong++){ | |
189 | if(TMath::Abs(pdgdaughters[iprong])==211) { | |
190 | if(dd->Getd0Prong(iprong)<minImpParDau){ | |
191 | minImpParDau=dd->Getd0Prong(iprong); | |
192 | } | |
193 | } | |
194 | } | |
195 | vars[iter]=minImpParDau; | |
196 | } | |
197 | if(fVarsForOpt[5]){ | |
198 | iter++; | |
199 | Float_t dist12 = dd->GetDist12toPrim(); | |
200 | Float_t dist23 = dd->GetDist23toPrim(); | |
201 | if(dist12<dist23)vars[iter]=dist12; | |
202 | else vars[iter]=dist23; | |
203 | } | |
204 | if(fVarsForOpt[6]){ | |
205 | iter++; | |
206 | vars[iter]=dd->GetSigmaVert(); | |
207 | } | |
208 | if(fVarsForOpt[7]){ | |
209 | iter++; | |
210 | vars[iter] = dd->DecayLength(); | |
211 | } | |
212 | if(fVarsForOpt[8]){ | |
213 | iter++; | |
214 | Float_t ptmax=0; | |
215 | for(Int_t i=0;i<3;i++){ | |
216 | if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i); | |
217 | } | |
218 | vars[iter]=ptmax; | |
219 | } | |
220 | if(fVarsForOpt[9]){ | |
221 | iter++; | |
222 | vars[iter]=dd->CosPointingAngle(); | |
223 | } | |
224 | if(fVarsForOpt[10]){ | |
225 | iter++; | |
226 | vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2); | |
227 | } | |
228 | if(fVarsForOpt[11]){ | |
229 | iter++; | |
230 | Float_t maxDCA=0; | |
231 | for(Int_t iprong=0;iprong<3;iprong++){ | |
232 | if(dd->GetDCA(iprong)<maxDCA){ | |
233 | maxDCA=dd->GetDCA(iprong); | |
234 | } | |
235 | } | |
236 | vars[iter]=maxDCA; | |
237 | } | |
238 | return; | |
239 | } | |
240 | //--------------------------------------------------------------------------- | |
241 | Bool_t AliRDHFCutsDplustoKpipi::IsInFiducialAcceptance(Double_t pt, Double_t y) const | |
242 | { | |
243 | // | |
244 | // Checking if Dplus is in fiducial acceptance region | |
245 | // | |
246 | ||
247 | if(pt > 5.) { | |
248 | // applying cut for pt > 5 GeV | |
249 | AliDebug(2,Form("pt of D+ = %f (> 5), cutting at |y| < 0.8",pt)); | |
250 | if (TMath::Abs(y) > 0.8) return kFALSE; | |
251 | ||
252 | } else { | |
253 | // appliying smooth cut for pt < 5 GeV | |
254 | Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5; | |
255 | Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5; | |
256 | AliDebug(2,Form("pt of D+ = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY)); | |
257 | if (y < minFiducialY || y > maxFiducialY) return kFALSE; | |
258 | } | |
259 | ||
260 | return kTRUE; | |
261 | } | |
262 | ||
263 | //--------------------------------------------------------------------------- | |
264 | Int_t AliRDHFCutsDplustoKpipi::IsSelectedPID(AliAODRecoDecayHF *rd) | |
265 | { | |
266 | // | |
267 | // PID selection, returns 3 if accepted, 0 if not accepted | |
268 | // | |
269 | if(!fUsePID || !rd) return 3; | |
270 | //if(fUsePID)printf("i am inside the pid \n"); | |
271 | Int_t nkaons=0; | |
272 | Int_t nNotKaons=0; | |
273 | Int_t sign= rd->GetCharge(); | |
274 | for(Int_t daught=0;daught<3;daught++){ | |
275 | AliAODTrack *track=(AliAODTrack*)rd->GetDaughter(daught); | |
276 | Int_t isPion=fPidHF->MakeRawPid(track,AliPID::kPion); | |
277 | Int_t isKaon=fPidHF->MakeRawPid(track,AliPID::kKaon); | |
278 | Int_t isProton=fPidHF->MakeRawPid(track,AliPID::kProton); | |
279 | ||
280 | if(isProton>0 && isKaon<0 && isPion<0) return 0; | |
281 | if(isKaon>0 && isPion<0) nkaons++; | |
282 | if(isKaon<0) nNotKaons++; | |
283 | if(sign==track->Charge()){//pions | |
284 | if(isPion<0)return 0; | |
285 | if(rd->Pt()<2. && isPion<=0 && fUseStrongPid)return 0; | |
286 | } | |
287 | else{//kaons | |
288 | if(isKaon<0)return 0; | |
289 | if(rd->Pt()<2. && isKaon<=0 && fUseStrongPid)return 0; | |
290 | } | |
291 | ||
292 | ||
293 | } | |
294 | ||
295 | if(nkaons>1)return 0; | |
296 | if(nNotKaons==3)return 0; | |
297 | ||
298 | return 3; | |
299 | } | |
300 | ||
301 | ||
302 | //--------------------------------------------------------------------------- | |
303 | Int_t AliRDHFCutsDplustoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) { | |
304 | // | |
305 | // Apply selection, returns 3 if accepted, 0 if not accepted | |
306 | // | |
307 | ||
308 | ||
309 | fIsSelectedCuts=0; | |
310 | fIsSelectedPID=0; | |
311 | ||
312 | if(!fCutsRD){ | |
313 | cout<<"Cut matrix not inizialized. Exit..."<<endl; | |
314 | return 0; | |
315 | } | |
316 | //PrintAll(); | |
317 | AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj; | |
318 | ||
319 | ||
320 | if(!d){ | |
321 | cout<<"AliAODRecoDecayHF3Prong null"<<endl; | |
322 | return 0; | |
323 | } | |
324 | ||
325 | // PID selection | |
326 | Int_t returnvaluePID=3; | |
327 | Int_t returnvalueCuts=3; | |
328 | ||
329 | Double_t pt=d->Pt(); | |
330 | if(pt<fMinPtCand) return 0; | |
331 | if(pt>fMaxPtCand) return 0; | |
332 | ||
333 | ||
334 | // selection on candidate | |
335 | if(selectionLevel==AliRDHFCuts::kAll || | |
336 | selectionLevel==AliRDHFCuts::kCandidate) { | |
337 | ||
338 | //recalculate vertex w/o daughters | |
339 | AliAODVertex *origownvtx=0x0; | |
340 | if(fRemoveDaughtersFromPrimary) { | |
341 | if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx()); | |
342 | if(!RecalcOwnPrimaryVtx(d,aod)) { | |
343 | CleanOwnPrimaryVtx(d,aod,origownvtx); | |
344 | return 0; | |
345 | } | |
346 | } | |
347 | ||
348 | Int_t ptbin=PtBin(pt); | |
349 | if (ptbin==-1) { | |
350 | CleanOwnPrimaryVtx(d,aod,origownvtx); | |
351 | return 0; | |
352 | } | |
353 | ||
354 | Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass(); | |
355 | Double_t mDplus=d->InvMassDplus(); | |
356 | if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
357 | ||
358 | //2track cuts | |
359 | if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
360 | ||
361 | Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); | |
362 | if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
363 | ||
364 | if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
365 | ||
366 | //sec vert | |
367 | if(d->GetSigmaVert()>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
368 | ||
369 | //DCA | |
370 | for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
371 | ||
372 | if(d->Pt2Prong(1) < fCutsRD[GetGlobalIndex(1,ptbin)]*fCutsRD[GetGlobalIndex(1,ptbin)] || TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Kaon | |
373 | ||
374 | if(d->Pt2Prong(0) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(4,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Pion1 | |
375 | ||
376 | if(d->Pt2Prong(2) < fCutsRD[GetGlobalIndex(2,ptbin)]*fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(4,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;}//Pion2 | |
377 | ||
378 | ||
379 | ||
380 | ||
381 | ||
382 | ||
383 | if(d->Pt2Prong(0)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] && d->Pt2Prong(1)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)] && d->Pt2Prong(2)<fCutsRD[GetGlobalIndex(8,ptbin)]*fCutsRD[GetGlobalIndex(8,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
384 | ||
385 | if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
386 | ||
387 | ||
388 | ||
389 | if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
390 | ||
391 | ||
392 | ||
393 | ||
394 | // unset recalculated primary vertex when not needed any more | |
395 | CleanOwnPrimaryVtx(d,aod,origownvtx); | |
396 | ||
397 | fIsSelectedCuts=returnvalueCuts; | |
398 | ||
399 | //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here | |
400 | } | |
401 | ||
402 | if(selectionLevel==AliRDHFCuts::kAll || | |
403 | selectionLevel==AliRDHFCuts::kCandidate || | |
404 | selectionLevel==AliRDHFCuts::kPID) { | |
405 | returnvaluePID = IsSelectedPID(d); | |
406 | fIsSelectedPID=returnvaluePID; | |
407 | } | |
408 | if(returnvaluePID==0)return 0; | |
409 | ||
410 | // selection on daughter tracks | |
411 | if(selectionLevel==AliRDHFCuts::kAll || | |
412 | selectionLevel==AliRDHFCuts::kTracks) { | |
413 | if(!AreDaughtersSelected(d)) return 0; | |
414 | } | |
415 | ||
416 | ||
417 | ||
418 | ||
419 | return 3; | |
420 | } | |
421 | ||
422 | ||
423 | ||
424 | ||
425 | //--------------------------------------------------------------------------- | |
426 | ||
427 | ||
428 | void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() { | |
429 | // | |
430 | //STANDARD CUTS USED FOR 2010 pp analysis | |
431 | // | |
432 | ||
433 | SetName("DplustoKpipiCutsStandard"); | |
434 | SetTitle("Standard Cuts for D+ analysis"); | |
435 | ||
436 | // PILE UP REJECTION | |
437 | SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
438 | ||
439 | // EVENT CUTS | |
440 | SetMinVtxContr(1); | |
441 | ||
442 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
443 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
444 | //default | |
445 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
446 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
447 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
448 | esdTrackCuts->SetMinNClustersTPC(70); | |
449 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
450 | AliESDtrackCuts::kAny); | |
451 | // default is kBoth, otherwise kAny | |
452 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
453 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
454 | ||
455 | AddTrackCuts(esdTrackCuts); | |
456 | ||
457 | ||
458 | const Int_t nptbins =13; | |
459 | const Int_t nvars=12; | |
460 | Float_t ptbins[nptbins+1]; | |
461 | ptbins[0]=0.; | |
462 | ptbins[1]=1; | |
463 | ptbins[2]=2.; | |
464 | ptbins[3]=3.; | |
465 | ptbins[4]=4.; | |
466 | ptbins[5]=5.; | |
467 | ptbins[6]=6.; | |
468 | ptbins[7]=8.; | |
469 | ptbins[8]=10.; | |
470 | ptbins[9]=12.; | |
471 | ptbins[10]=14.; | |
472 | ptbins[11]=16.; | |
473 | ptbins[12]=24.; | |
474 | ptbins[13]=99999.; | |
475 | ||
476 | ||
477 | Float_t** anacutsval; | |
478 | anacutsval=new Float_t*[nvars]; | |
479 | ||
480 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
481 | ||
482 | //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.}; | |
483 | Int_t ic=0; | |
484 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
485 | anacutsval[ic][ipt]=0.2; | |
486 | } | |
487 | ||
488 | ic=3; | |
489 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
490 | anacutsval[ic][ipt]=0.; | |
491 | } | |
492 | ic=4; | |
493 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
494 | anacutsval[ic][ipt]=0.; | |
495 | } | |
496 | ic=5; | |
497 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
498 | anacutsval[ic][ipt]=0.01; | |
499 | } | |
500 | //ic=6; | |
501 | //for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
502 | // anacutsval[ic][ipt]=0.06; | |
503 | ||
504 | ic=11; | |
505 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
506 | anacutsval[ic][ipt]=10000000000.; | |
507 | } | |
508 | ||
509 | ||
510 | anacutsval[1][0]=0.3; | |
511 | anacutsval[1][1]=0.3; | |
512 | anacutsval[1][2]=0.4; | |
513 | ||
514 | anacutsval[2][0]=0.3; | |
515 | anacutsval[2][1]=0.3; | |
516 | anacutsval[2][2]=0.4; | |
517 | ||
518 | ||
519 | ic=1; | |
520 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
521 | anacutsval[ic][ipt]=0.4; | |
522 | } | |
523 | ic=2; | |
524 | for(Int_t ipt=3;ipt<nptbins;ipt++){ | |
525 | anacutsval[ic][ipt]=0.4; | |
526 | } | |
527 | ||
528 | anacutsval[6][0]=0.022100; | |
529 | anacutsval[6][1]=0.022100; | |
530 | anacutsval[6][2]=0.034; | |
531 | anacutsval[6][3]=0.020667; | |
532 | anacutsval[6][4]=0.020667; | |
533 | anacutsval[6][5]=0.023333; | |
534 | anacutsval[6][6]=0.023333; | |
535 | anacutsval[6][7]=0.023333; | |
536 | anacutsval[6][8]=0.023333; | |
537 | anacutsval[6][9]=0.023333; | |
538 | anacutsval[6][10]=0.06; | |
539 | anacutsval[6][11]=0.06; | |
540 | anacutsval[6][12]=0.06; | |
541 | ||
542 | ||
543 | anacutsval[7][0]=0.08; | |
544 | anacutsval[7][1]=0.08; | |
545 | anacutsval[7][2]=0.09; | |
546 | anacutsval[7][3]=0.095; | |
547 | anacutsval[7][4]=0.095; | |
548 | anacutsval[7][5]=0.115; | |
549 | anacutsval[7][6]=0.115; | |
550 | anacutsval[7][7]=0.115; | |
551 | anacutsval[7][8]=0.115; | |
552 | anacutsval[7][9]=0.115; | |
553 | anacutsval[7][10]=0.02; | |
554 | anacutsval[7][11]=0.02; | |
555 | anacutsval[7][12]=0.02; | |
556 | ||
557 | ||
558 | anacutsval[8][0]=0.5; | |
559 | anacutsval[8][1]=0.5; | |
560 | anacutsval[8][2]=1.0; | |
561 | anacutsval[8][3]=0.5; | |
562 | anacutsval[8][4]=0.5; | |
563 | anacutsval[8][5]=0.5; | |
564 | anacutsval[8][6]=0.5; | |
565 | anacutsval[8][7]=0.5; | |
566 | anacutsval[8][8]=0.5; | |
567 | anacutsval[8][9]=0.5; | |
568 | anacutsval[8][10]=0.2; | |
569 | anacutsval[8][11]=0.2; | |
570 | anacutsval[8][12]=0.2; | |
571 | ||
572 | ||
573 | anacutsval[9][0]=0.95; | |
574 | anacutsval[9][1]=0.95; | |
575 | anacutsval[9][2]=0.95; | |
576 | anacutsval[9][3]=0.95; | |
577 | anacutsval[9][4]= 0.95; | |
578 | anacutsval[9][5]=0.92; | |
579 | anacutsval[9][6]=0.92; | |
580 | anacutsval[9][7]=0.92; | |
581 | anacutsval[9][8]=0.92; | |
582 | anacutsval[9][9]=0.90; | |
583 | anacutsval[9][10]=0.90; | |
584 | anacutsval[9][11]=0.90; | |
585 | anacutsval[9][12]=0.90; | |
586 | ||
587 | anacutsval[10][0]=0.0055; | |
588 | anacutsval[10][1]=0.0055; | |
589 | anacutsval[10][2]= 0.0028; | |
590 | anacutsval[10][3]=0.000883; | |
591 | anacutsval[10][4]=0.000883; | |
592 | anacutsval[10][5]=0.000883; | |
593 | anacutsval[10][6]=0.000883; | |
594 | anacutsval[10][7]=0.000883; | |
595 | anacutsval[10][8]=0.000883; | |
596 | anacutsval[10][9]=0.000883; | |
597 | anacutsval[10][10]=0.0; | |
598 | anacutsval[10][11]=0.0; | |
599 | anacutsval[10][12]=0.0; | |
600 | ||
601 | SetGlobalIndex(nvars,nptbins); | |
602 | SetPtBins(nptbins+1,ptbins); | |
603 | SetCuts(nvars,nptbins,anacutsval); | |
604 | SetUsePID(kTRUE); | |
605 | SetRemoveDaughtersFromPrim(kTRUE); | |
606 | ||
607 | PrintAll(); | |
608 | ||
609 | for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];} | |
610 | delete [] anacutsval; | |
611 | anacutsval=NULL; | |
612 | ||
613 | return; | |
614 | } | |
615 | ||
616 | ||
617 | void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() { | |
618 | // | |
619 | //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet | |
620 | // | |
621 | ||
622 | SetName("DplustoKpipiCutsStandard"); | |
623 | SetTitle("Standard Cuts for D+ analysis in PbPb2010 run"); | |
624 | ||
625 | // PILE UP REJECTION | |
626 | //SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
627 | ||
628 | // EVENT CUTS | |
629 | SetMinVtxContr(1); | |
630 | ||
631 | ||
632 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
633 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
634 | //default | |
635 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
636 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
637 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
638 | esdTrackCuts->SetMinNClustersTPC(70); | |
639 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
640 | AliESDtrackCuts::kAny); | |
641 | // default is kBoth, otherwise kAny | |
642 | ||
643 | esdTrackCuts->SetMaxDCAToVertexXY(1.); | |
644 | esdTrackCuts->SetMaxDCAToVertexZ(1.); | |
645 | esdTrackCuts->SetMinDCAToVertexXYPtDep("0.0100*TMath::Max(0.,(1-TMath::Floor(TMath::Abs(pt)/2.)))"); | |
646 | esdTrackCuts->SetPtRange(0.8,1.e10); | |
647 | ||
648 | AddTrackCuts(esdTrackCuts); | |
649 | ||
650 | const Int_t nptbins=10; | |
651 | Float_t* ptbins; | |
652 | ptbins=new Float_t[nptbins+1]; | |
653 | ||
654 | ptbins[0]=0.; | |
655 | ptbins[1]=1.; | |
656 | ptbins[2]=2.; | |
657 | ptbins[3]=3.; | |
658 | ptbins[4]=4.; | |
659 | ptbins[5]=5.; | |
660 | ptbins[6]=6.; | |
661 | ptbins[7]=8.; | |
662 | ptbins[8]=12.; | |
663 | ptbins[9]=16.; | |
664 | ptbins[10]=24.; | |
665 | const Int_t nvars=12; | |
666 | ||
667 | ||
668 | ||
669 | Float_t** anacutsval; | |
670 | anacutsval=new Float_t*[nvars]; | |
671 | ||
672 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
673 | //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.}; | |
674 | Int_t ic=0; | |
675 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
676 | anacutsval[ic][ipt]=0.2; | |
677 | } | |
678 | ||
679 | ic=3; | |
680 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
681 | anacutsval[ic][ipt]=0.; | |
682 | } | |
683 | ic=4; | |
684 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
685 | anacutsval[ic][ipt]=0.; | |
686 | } | |
687 | ic=5; | |
688 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
689 | anacutsval[ic][ipt]=0.01; | |
690 | } | |
691 | //ic=6; | |
692 | //for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
693 | // anacutsval[ic][ipt]=0.06; | |
694 | ||
695 | ic=11; | |
696 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
697 | anacutsval[ic][ipt]=10000000000.; | |
698 | } | |
699 | ||
700 | ||
701 | ||
702 | ||
703 | ic=1; | |
704 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
705 | anacutsval[ic][ipt]=0.8; | |
706 | } | |
707 | ic=2; | |
708 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
709 | anacutsval[ic][ipt]=0.8; | |
710 | } | |
711 | ||
712 | ||
713 | ||
714 | ||
715 | anacutsval[6][0]=0.022100; | |
716 | anacutsval[6][1]=0.022100; | |
717 | anacutsval[6][2]=0.034; | |
718 | anacutsval[6][3]=0.020667; | |
719 | anacutsval[6][4]=0.020667; | |
720 | anacutsval[6][5]=0.023333; | |
721 | anacutsval[6][6]=0.023333; | |
722 | anacutsval[6][7]=0.023333; | |
723 | anacutsval[6][8]=0.023333; | |
724 | anacutsval[6][9]=0.023333; | |
725 | ||
726 | anacutsval[7][0]=0.08; | |
727 | anacutsval[7][1]=0.08; | |
728 | anacutsval[7][2]=0.17; | |
729 | anacutsval[7][3]=0.14; | |
730 | anacutsval[7][4]=0.14; | |
731 | anacutsval[7][5]=0.14; | |
732 | anacutsval[7][6]=0.19; | |
733 | anacutsval[7][7]=0.19; | |
734 | anacutsval[7][8]=0.19; | |
735 | anacutsval[7][9]=0.19; | |
736 | ||
737 | anacutsval[8][0]=0.8; | |
738 | anacutsval[8][1]=0.8; | |
739 | anacutsval[8][2]=1.1; | |
740 | anacutsval[8][3]=0.5; | |
741 | anacutsval[8][4]=0.5; | |
742 | anacutsval[8][5]=2.0; | |
743 | anacutsval[8][6]=2.0; | |
744 | anacutsval[8][7]=2.0; | |
745 | anacutsval[8][8]=2.0; | |
746 | anacutsval[8][9]=2.0; | |
747 | ||
748 | anacutsval[9][0]=0.995; | |
749 | anacutsval[9][1]=0.995; | |
750 | anacutsval[9][2]=0.997; | |
751 | anacutsval[9][3]=0.998; | |
752 | anacutsval[9][4]= 0.998; | |
753 | anacutsval[9][5]=0.997; | |
754 | anacutsval[9][6]=0.997; | |
755 | anacutsval[9][7]=0.997; | |
756 | anacutsval[9][8]=0.997; | |
757 | anacutsval[9][9]=0.997; | |
758 | ||
759 | ||
760 | ||
761 | ||
762 | ||
763 | anacutsval[10][0]=0.0055; | |
764 | anacutsval[10][1]=0.0055; | |
765 | anacutsval[10][2]= 0.0028; | |
766 | anacutsval[10][3]=0.000883; | |
767 | anacutsval[10][4]=0.000883; | |
768 | anacutsval[10][5]=0.000883; | |
769 | anacutsval[10][6]=0.000883; | |
770 | anacutsval[10][7]=0.000883; | |
771 | anacutsval[10][8]=0.000883; | |
772 | anacutsval[10][9]=0.000883; | |
773 | ||
774 | ||
775 | ||
776 | ||
777 | ||
778 | SetPtBins(nptbins+1,ptbins); | |
779 | SetCuts(nvars,nptbins,anacutsval); | |
780 | SetUsePID(kTRUE); | |
781 | SetMinCentrality(0.); | |
782 | SetMaxCentrality(20.); | |
783 | SetUseCentrality(AliRDHFCuts::kCentV0M); | |
784 | SetRemoveDaughtersFromPrim(kFALSE); | |
785 | SetOptPileup(kFALSE); | |
786 | SetMinPtCandidate(4.); | |
787 | SetMaxPtCandidate(10000.); | |
788 | ||
789 | PrintAll(); | |
790 | ||
791 | for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];} | |
792 | delete [] anacutsval; | |
793 | anacutsval=NULL; | |
794 | ||
795 | delete [] ptbins; | |
796 | ptbins=NULL; | |
797 | ||
798 | return; | |
799 | } |