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