]>
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++; | |
e0fb900a | 227 | vars[iter]=dd->GetSigmaVert(aod); |
e3d40058 | 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 | ||
5e938293 | 355 | if(fKeepSignalMC) if(IsSignalMC(d,aod,411)) return 3; |
356 | ||
73173a6a | 357 | // PID selection |
595cc7e2 | 358 | Int_t returnvaluePID=3; |
359 | Int_t returnvalueCuts=3; | |
e3d40058 | 360 | |
5639e412 | 361 | Double_t pt=d->Pt(); |
362 | if(pt<fMinPtCand) return 0; | |
363 | if(pt>fMaxPtCand) return 0; | |
dcc2ade0 | 364 | |
ba27eecd | 365 | if(d->HasBadDaughters()) return 0; |
73173a6a | 366 | |
e3d40058 | 367 | // selection on candidate |
368 | if(selectionLevel==AliRDHFCuts::kAll || | |
369 | selectionLevel==AliRDHFCuts::kCandidate) { | |
370 | ||
c1cc7a53 | 371 | //recalculate vertex w/o daughters |
372 | AliAODVertex *origownvtx=0x0; | |
c1cc7a53 | 373 | if(fRemoveDaughtersFromPrimary) { |
793fdbec | 374 | if(d->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*d->GetOwnPrimaryVtx()); |
375 | if(!RecalcOwnPrimaryVtx(d,aod)) { | |
376 | CleanOwnPrimaryVtx(d,aod,origownvtx); | |
377 | return 0; | |
378 | } | |
c1cc7a53 | 379 | } |
380 | ||
e3d40058 | 381 | Int_t ptbin=PtBin(pt); |
c1cc7a53 | 382 | if (ptbin==-1) { |
793fdbec | 383 | CleanOwnPrimaryVtx(d,aod,origownvtx); |
c1cc7a53 | 384 | return 0; |
385 | } | |
73173a6a | 386 | |
e3d40058 | 387 | Double_t mDplusPDG = TDatabasePDG::Instance()->GetParticle(411)->Mass(); |
388 | Double_t mDplus=d->InvMassDplus(); | |
793fdbec | 389 | if(TMath::Abs(mDplus-mDplusPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
e3d40058 | 390 | |
c1cc7a53 | 391 | //2track cuts |
793fdbec | 392 | if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 393 | |
394 | Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); | |
793fdbec | 395 | if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 396 | |
3ec9254b | 397 | if(fUseImpParProdCorrCut){ |
398 | if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
399 | } | |
400 | ||
5d2d6118 | 401 | |
402 | //DCA | |
793fdbec | 403 | for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 404 | |
793fdbec | 405 | 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 | 406 | |
793fdbec | 407 | 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 | 408 | |
793fdbec | 409 | 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 | 410 | |
793fdbec | 411 | 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 | 412 | |
793fdbec | 413 | if(d->DecayLength2()<fCutsRD[GetGlobalIndex(7,ptbin)]*fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 414 | |
793fdbec | 415 | if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 416 | |
9c90a16e | 417 | if(d->NormalizedDecayLengthXY()*d->P()/pt<fCutsRD[GetGlobalIndex(12,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
5d2d6118 | 418 | |
3ec9254b | 419 | if(d->CosPointingAngleXY()<fCutsRD[GetGlobalIndex(13,ptbin)]){CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} |
930eb764 | 420 | |
e0fb900a | 421 | //sec vert |
422 | Double_t sigmavert=d->GetSigmaVert(aod); | |
423 | if(sigmavert>fCutsRD[GetGlobalIndex(6,ptbin)]) {CleanOwnPrimaryVtx(d,aod,origownvtx); return 0;} | |
424 | ||
c1cc7a53 | 425 | // unset recalculated primary vertex when not needed any more |
793fdbec | 426 | CleanOwnPrimaryVtx(d,aod,origownvtx); |
c1cc7a53 | 427 | |
5d2d6118 | 428 | fIsSelectedCuts=returnvalueCuts; |
429 | ||
f754294e | 430 | //if(!returnvalueCuts) return 0; // returnvalueCuts cannot be 0 here |
e3d40058 | 431 | } |
dcc2ade0 | 432 | |
433 | if(selectionLevel==AliRDHFCuts::kAll || | |
434 | selectionLevel==AliRDHFCuts::kCandidate || | |
435 | selectionLevel==AliRDHFCuts::kPID) { | |
436 | returnvaluePID = IsSelectedPID(d); | |
5d2d6118 | 437 | fIsSelectedPID=returnvaluePID; |
dcc2ade0 | 438 | } |
439 | if(returnvaluePID==0)return 0; | |
440 | ||
441 | // selection on daughter tracks | |
442 | if(selectionLevel==AliRDHFCuts::kAll || | |
443 | selectionLevel==AliRDHFCuts::kTracks) { | |
444 | if(!AreDaughtersSelected(d)) return 0; | |
445 | } | |
446 | ||
447 | ||
448 | ||
c1cc7a53 | 449 | |
595cc7e2 | 450 | return 3; |
e3d40058 | 451 | } |
370f7180 | 452 | |
453 | ||
454 | ||
455 | ||
e3d40058 | 456 | //--------------------------------------------------------------------------- |
370f7180 | 457 | |
458 | ||
459 | void AliRDHFCutsDplustoKpipi::SetStandardCutsPP2010() { | |
460 | // | |
461 | //STANDARD CUTS USED FOR 2010 pp analysis | |
462 | // | |
463 | ||
464 | SetName("DplustoKpipiCutsStandard"); | |
465 | SetTitle("Standard Cuts for D+ analysis"); | |
466 | ||
467 | // PILE UP REJECTION | |
468 | SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
469 | ||
470 | // EVENT CUTS | |
471 | SetMinVtxContr(1); | |
472 | ||
473 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
474 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
475 | //default | |
476 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
477 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
478 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
479 | esdTrackCuts->SetMinNClustersTPC(70); | |
480 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
481 | AliESDtrackCuts::kAny); | |
482 | // default is kBoth, otherwise kAny | |
483 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
484 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
485 | ||
486 | AddTrackCuts(esdTrackCuts); | |
487 | ||
488 | ||
489 | const Int_t nptbins =13; | |
3ec9254b | 490 | const Int_t nvars=14; |
370f7180 | 491 | Float_t ptbins[nptbins+1]; |
492 | ptbins[0]=0.; | |
493 | ptbins[1]=1; | |
494 | ptbins[2]=2.; | |
495 | ptbins[3]=3.; | |
496 | ptbins[4]=4.; | |
497 | ptbins[5]=5.; | |
498 | ptbins[6]=6.; | |
499 | ptbins[7]=8.; | |
500 | ptbins[8]=10.; | |
501 | ptbins[9]=12.; | |
502 | ptbins[10]=14.; | |
503 | ptbins[11]=16.; | |
504 | ptbins[12]=24.; | |
505 | ptbins[13]=99999.; | |
506 | ||
507 | ||
508 | Float_t** anacutsval; | |
509 | anacutsval=new Float_t*[nvars]; | |
510 | ||
511 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
e11ae259 | 512 | |
370f7180 | 513 | //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.}; |
370f7180 | 514 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
3ec9254b | 515 | anacutsval[0][ipt]=0.2; |
516 | anacutsval[3][ipt]=0.; | |
517 | anacutsval[4][ipt]=0.; | |
518 | anacutsval[5][ipt]=0.01; | |
519 | anacutsval[11][ipt]=10000000000.; | |
520 | anacutsval[12][ipt]=0.; | |
521 | anacutsval[13][ipt]=0.; | |
370f7180 | 522 | } |
3ec9254b | 523 | |
370f7180 | 524 | anacutsval[1][0]=0.3; |
525 | anacutsval[1][1]=0.3; | |
3ec9254b | 526 | anacutsval[1][2]=0.4; |
370f7180 | 527 | anacutsval[2][0]=0.3; |
528 | anacutsval[2][1]=0.3; | |
3ec9254b | 529 | anacutsval[2][2]=0.4; |
370f7180 | 530 | for(Int_t ipt=3;ipt<nptbins;ipt++){ |
3ec9254b | 531 | anacutsval[1][ipt]=0.4; |
532 | anacutsval[2][ipt]=0.4; | |
370f7180 | 533 | } |
65b4f6d7 | 534 | |
370f7180 | 535 | anacutsval[6][0]=0.022100; |
536 | anacutsval[6][1]=0.022100; | |
537 | anacutsval[6][2]=0.034; | |
538 | anacutsval[6][3]=0.020667; | |
539 | anacutsval[6][4]=0.020667; | |
540 | anacutsval[6][5]=0.023333; | |
3ec9254b | 541 | |
65b4f6d7 | 542 | |
370f7180 | 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; | |
3ec9254b | 548 | |
370f7180 | 549 | anacutsval[8][0]=0.5; |
550 | anacutsval[8][1]=0.5; | |
551 | anacutsval[8][2]=1.0; | |
552 | anacutsval[8][3]=0.5; | |
3ec9254b | 553 | anacutsval[8][4]=0.5; |
554 | ||
555 | ||
556 | anacutsval[9][0]=0.95; | |
557 | anacutsval[9][1]=0.95; | |
370f7180 | 558 | anacutsval[9][2]=0.95; |
559 | anacutsval[9][3]=0.95; | |
560 | anacutsval[9][4]= 0.95; | |
561 | anacutsval[9][5]=0.92; | |
562 | anacutsval[9][6]=0.92; | |
563 | anacutsval[9][7]=0.92; | |
564 | anacutsval[9][8]=0.92; | |
565 | anacutsval[9][9]=0.90; | |
3ec9254b | 566 | anacutsval[9][10]=0.90; |
567 | anacutsval[9][11]=0.90; | |
568 | anacutsval[9][12]=0.90; | |
370f7180 | 569 | |
570 | anacutsval[10][0]=0.0055; | |
571 | anacutsval[10][1]=0.0055; | |
572 | anacutsval[10][2]= 0.0028; | |
573 | anacutsval[10][3]=0.000883; | |
3ec9254b | 574 | anacutsval[10][4]=0.000883; |
575 | ||
65b4f6d7 | 576 | |
3ec9254b | 577 | for(Int_t ipt=5;ipt<nptbins;ipt++){ |
578 | anacutsval[6][ipt]=0.02333; | |
579 | anacutsval[7][ipt]=0.115; | |
580 | anacutsval[8][ipt]=0.5; | |
581 | anacutsval[10][ipt]=0.000883; | |
582 | } | |
583 | ||
584 | ||
ae39ad32 | 585 | SetGlobalIndex(nvars,nptbins); |
370f7180 | 586 | SetPtBins(nptbins+1,ptbins); |
587 | SetCuts(nvars,nptbins,anacutsval); | |
588 | SetUsePID(kTRUE); | |
589 | SetRemoveDaughtersFromPrim(kTRUE); | |
3ec9254b | 590 | |
370f7180 | 591 | PrintAll(); |
592 | ||
e11ae259 | 593 | for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];} |
594 | delete [] anacutsval; | |
595 | anacutsval=NULL; | |
596 | ||
370f7180 | 597 | return; |
598 | } | |
599 | ||
600 | ||
601 | void AliRDHFCutsDplustoKpipi::SetStandardCutsPbPb2010() { | |
602 | // | |
603 | //STANDARD CUTS USED FOR 2010 Pb Pb analysis.... not optimized yet | |
604 | // | |
605 | ||
606 | SetName("DplustoKpipiCutsStandard"); | |
607 | SetTitle("Standard Cuts for D+ analysis in PbPb2010 run"); | |
608 | ||
609 | // PILE UP REJECTION | |
610 | //SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
611 | ||
612 | // EVENT CUTS | |
613 | SetMinVtxContr(1); | |
614 | ||
615 | ||
616 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
617 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
618 | //default | |
619 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
620 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
621 | //esdTrackCuts->SetMinNClustersITS(4); // default is 5 | |
622 | esdTrackCuts->SetMinNClustersTPC(70); | |
623 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
624 | AliESDtrackCuts::kAny); | |
625 | // default is kBoth, otherwise kAny | |
3ec9254b | 626 | esdTrackCuts->SetMinDCAToVertexXY(0.); |
370f7180 | 627 | esdTrackCuts->SetPtRange(0.8,1.e10); |
628 | ||
629 | AddTrackCuts(esdTrackCuts); | |
630 | ||
631 | const Int_t nptbins=10; | |
632 | Float_t* ptbins; | |
633 | ptbins=new Float_t[nptbins+1]; | |
e11ae259 | 634 | |
370f7180 | 635 | ptbins[0]=0.; |
636 | ptbins[1]=1.; | |
637 | ptbins[2]=2.; | |
638 | ptbins[3]=3.; | |
639 | ptbins[4]=4.; | |
640 | ptbins[5]=5.; | |
641 | ptbins[6]=6.; | |
642 | ptbins[7]=8.; | |
643 | ptbins[8]=12.; | |
644 | ptbins[9]=16.; | |
645 | ptbins[10]=24.; | |
3ec9254b | 646 | const Int_t nvars=14; |
370f7180 | 647 | |
370f7180 | 648 | Float_t** anacutsval; |
649 | anacutsval=new Float_t*[nvars]; | |
650 | ||
651 | for(Int_t ic=0;ic<nvars;ic++){anacutsval[ic]=new Float_t[nptbins];} | |
652 | //Double_t cutsDplus[12]={0.2,0.4,0.4,0.,0.,0.01,0.06,0.02,0.,0.85,0.,10000000000.}; | |
3ec9254b | 653 | |
370f7180 | 654 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
3ec9254b | 655 | anacutsval[0][ipt]=0.2; |
656 | anacutsval[1][ipt]=0.8; | |
657 | anacutsval[2][ipt]=0.8; | |
658 | anacutsval[3][ipt]=0.; | |
659 | anacutsval[4][ipt]=0.; | |
660 | anacutsval[5][ipt]=0.01; | |
661 | anacutsval[11][ipt]=10000000000.; | |
662 | anacutsval[12][ipt]=0.; | |
663 | anacutsval[13][ipt]=0.; | |
370f7180 | 664 | } |
9c90a16e | 665 | anacutsval[1][5]=0.9; |
666 | ||
667 | anacutsval[6][0]=0.022100; | |
668 | anacutsval[6][1]=0.022100; | |
669 | anacutsval[6][2]=0.034; | |
670 | anacutsval[6][3]=0.020667; | |
671 | anacutsval[6][4]=0.020667; | |
672 | anacutsval[6][5]=0.023333; | |
370f7180 | 673 | |
9c90a16e | 674 | anacutsval[7][0]=0.08; |
675 | anacutsval[7][1]=0.08; | |
676 | anacutsval[7][2]=0.17; | |
677 | anacutsval[7][3]=0.14; | |
678 | anacutsval[7][4]=0.14; | |
679 | anacutsval[7][5]=0.19; | |
680 | ||
681 | anacutsval[8][0]=0.8; | |
682 | anacutsval[8][1]=0.8; | |
683 | anacutsval[8][2]=1.1; | |
684 | anacutsval[8][3]=0.5; | |
685 | anacutsval[8][4]=0.5; | |
686 | anacutsval[8][5]=0.5; | |
687 | ||
688 | anacutsval[9][0]=0.995; | |
689 | anacutsval[9][1]=0.995; | |
690 | anacutsval[9][2]=0.997; | |
691 | anacutsval[9][3]=0.998; | |
692 | anacutsval[9][4]=0.998; | |
693 | anacutsval[9][5]=0.995; | |
694 | ||
695 | anacutsval[10][0]=0.0055; | |
696 | anacutsval[10][1]=0.0055; | |
697 | anacutsval[10][2]= 0.0028; | |
698 | anacutsval[10][3]=0.000883; | |
699 | anacutsval[10][4]=0.000883; | |
700 | anacutsval[10][5]=0.000883; | |
3ec9254b | 701 | |
9c90a16e | 702 | anacutsval[12][5]=12.; |
703 | anacutsval[13][5]=0.998571; | |
704 | anacutsval[12][6]=10.; | |
705 | anacutsval[13][6]=0.997143; | |
3ec9254b | 706 | |
9c90a16e | 707 | for(Int_t ipt=6;ipt<nptbins;ipt++){ |
708 | anacutsval[6][ipt]=0.02333; | |
709 | anacutsval[7][ipt]=0.19; | |
710 | anacutsval[8][ipt]=2.0; | |
711 | anacutsval[9][ipt]=0.997; | |
712 | anacutsval[10][ipt]=0.000883; | |
713 | } | |
714 | anacutsval[7][6]=0.14; | |
715 | anacutsval[9][6]=0.995; | |
62ad0d28 | 716 | |
370f7180 | 717 | SetPtBins(nptbins+1,ptbins); |
718 | SetCuts(nvars,nptbins,anacutsval); | |
719 | SetUsePID(kTRUE); | |
9c90a16e | 720 | SetMinCentrality(1E-10); |
5bccd3e8 | 721 | SetMaxCentrality(20.); |
722 | SetUseCentrality(AliRDHFCuts::kCentV0M); | |
370f7180 | 723 | SetRemoveDaughtersFromPrim(kFALSE); |
3ec9254b | 724 | |
370f7180 | 725 | PrintAll(); |
726 | ||
7a29658d | 727 | for(Int_t iic=0;iic<nvars;iic++){delete [] anacutsval[iic];} |
e11ae259 | 728 | delete [] anacutsval; |
729 | anacutsval=NULL; | |
730 | ||
731 | delete [] ptbins; | |
732 | ptbins=NULL; | |
733 | ||
370f7180 | 734 | return; |
735 | } |