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