]>
Commit | Line | Data |
---|---|---|
45bc9115 | 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 | ||
45eae267 | 16 | /* $Id: AliRDHFCutsDStartoKpipi.cxx 61203 2013-03-02 22:52:17Z fprino $ */ |
27de2dfb | 17 | |
45bc9115 | 18 | ///////////////////////////////////////////////////////////// |
19 | // | |
20 | // Class for cuts on AOD reconstructed DStar->Kpipi | |
21 | // | |
22 | // Author: A.Grelli, alessandro.grelli@uu.nl | |
7562813c | 23 | // |
24 | // PID method implemented by Y.Wang, yifei@physi.uni-heidelberg.de | |
25 | // | |
45bc9115 | 26 | ///////////////////////////////////////////////////////////// |
27 | ||
28 | #include <TDatabasePDG.h> | |
29 | #include <Riostream.h> | |
45bc9115 | 30 | #include "AliAODRecoDecayHF2Prong.h" |
31 | #include "AliAODRecoCascadeHF.h" | |
32 | #include "AliRDHFCutsD0toKpi.h" | |
33 | #include "AliRDHFCutsDStartoKpipi.h" | |
34 | #include "AliAODTrack.h" | |
35 | #include "AliESDtrack.h" | |
28e927b1 | 36 | #include "AliAODPid.h" |
37 | #include "AliTPCPIDResponse.h" | |
da6fefc3 | 38 | #include "AliAODVertex.h" |
39 | #include "AliESDVertex.h" | |
45bc9115 | 40 | |
c64cb1f6 | 41 | using std::cout; |
42 | using std::endl; | |
43 | ||
45bc9115 | 44 | ClassImp(AliRDHFCutsDStartoKpipi) |
45 | ||
46 | //-------------------------------------------------------------------------- | |
da6fefc3 | 47 | AliRDHFCutsDStartoKpipi::AliRDHFCutsDStartoKpipi(const char* name) : |
28e927b1 | 48 | AliRDHFCuts(name), |
a8d9f55a | 49 | fTrackCutsSoftPi(0), |
035523fb | 50 | fMaxPtPid(9999.), |
51 | fTPCflag(999.) | |
45bc9115 | 52 | { |
53 | // | |
54 | // Default Constructor | |
55 | // | |
7562813c | 56 | |
c8cd526d | 57 | Int_t nvars=16; |
45bc9115 | 58 | SetNVars(nvars); |
c8cd526d | 59 | TString varNames[16]={ |
45bc9115 | 60 | "inv. mass [GeV]", |
61 | "dca [cm]", | |
62 | "cosThetaStar", | |
63 | "pTK [GeV/c]", | |
64 | "pTPi [GeV/c]", | |
65 | "d0K [cm]", | |
66 | "d0Pi [cm]", | |
67 | "d0d0 [cm^2]", | |
68 | "cosThetaPoint", | |
69 | "inv. mass half width of D* [GeV]", | |
70 | "half width of (M_Kpipi-M_D0) [GeV]", | |
71 | "PtMin of pi_s [GeV/c]", | |
72 | "PtMax of pi_s [GeV/c]", | |
c8cd526d | 73 | "theta, angle between the pi_s and decay plane of the D0 [rad]", |
74 | "|cosThetaPointXY|", | |
75 | "NormDecayLenghtXY"}; | |
76 | Bool_t isUpperCut[16]={ | |
45bc9115 | 77 | kTRUE, |
78 | kTRUE, | |
79 | kTRUE, | |
80 | kFALSE, | |
81 | kFALSE, | |
82 | kTRUE, | |
83 | kTRUE, | |
84 | kTRUE, | |
85 | kFALSE, | |
86 | kTRUE, | |
87 | kTRUE, | |
88 | kTRUE, | |
89 | kTRUE, | |
c8cd526d | 90 | kFALSE, |
91 | kFALSE, | |
45bc9115 | 92 | kFALSE}; |
93 | SetVarNames(nvars,varNames,isUpperCut); | |
c8cd526d | 94 | Bool_t forOpt[16]={ |
45bc9115 | 95 | kFALSE, |
96 | kTRUE, | |
97 | kTRUE, | |
98 | kFALSE, | |
99 | kFALSE, | |
100 | kFALSE, | |
101 | kFALSE, | |
102 | kTRUE, | |
103 | kTRUE, | |
104 | kFALSE, | |
105 | kTRUE, | |
106 | kFALSE, | |
107 | kFALSE, | |
c8cd526d | 108 | kFALSE, |
109 | kFALSE, | |
45bc9115 | 110 | kFALSE}; |
111 | SetVarsForOpt(5,forOpt); | |
112 | Float_t limits[2]={0,999999999.}; | |
113 | SetPtBins(2,limits); | |
114 | } | |
115 | //-------------------------------------------------------------------------- | |
116 | AliRDHFCutsDStartoKpipi::AliRDHFCutsDStartoKpipi(const AliRDHFCutsDStartoKpipi &source) : | |
da6fefc3 | 117 | AliRDHFCuts(source), |
a8d9f55a | 118 | fTrackCutsSoftPi(0), |
035523fb | 119 | fMaxPtPid(9999.), |
120 | fTPCflag(999.) | |
45bc9115 | 121 | { |
122 | // | |
123 | // Copy constructor | |
124 | // | |
ee1128c6 | 125 | |
da6fefc3 | 126 | if(source.GetTrackCutsSoftPi()) AddTrackCutsSoftPi(source.GetTrackCutsSoftPi()); |
ee1128c6 | 127 | |
45bc9115 | 128 | } |
129 | //-------------------------------------------------------------------------- | |
130 | AliRDHFCutsDStartoKpipi &AliRDHFCutsDStartoKpipi::operator=(const AliRDHFCutsDStartoKpipi &source) | |
131 | { | |
132 | // | |
133 | // assignment operator | |
134 | // | |
135 | if(&source == this) return *this; | |
136 | ||
137 | AliRDHFCuts::operator=(source); | |
813b1e3b | 138 | if(source.GetTrackCutsSoftPi()) { |
139 | delete fTrackCutsSoftPi; | |
140 | fTrackCutsSoftPi = new AliESDtrackCuts(*(source.GetTrackCutsSoftPi())); | |
141 | } | |
28e927b1 | 142 | |
45bc9115 | 143 | return *this; |
144 | } | |
145 | ||
146 | ||
147 | //--------------------------------------------------------------------------- | |
148 | void AliRDHFCutsDStartoKpipi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) { | |
149 | // | |
150 | // Fills in vars the values of the variables | |
151 | // | |
152 | if(nvars!=fnVarsForOpt) { | |
153 | printf("AliRDHFCutsDStartoKpipi::GetCutsVarsForOpt: wrong number of variables\n"); | |
154 | return; | |
155 | } | |
156 | ||
157 | ||
158 | AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)d; | |
159 | ||
160 | AliAODTrack *softPi = (AliAODTrack*)dstarD0pi->GetBachelor(); | |
161 | ||
162 | AliAODRecoDecayHF2Prong* dd = (AliAODRecoDecayHF2Prong*)dstarD0pi->Get2Prong(); | |
163 | ||
45eae267 ZCV |
164 | |
165 | Int_t iter=-1; | |
45bc9115 | 166 | if(fVarsForOpt[0]){ |
167 | iter++; | |
168 | if(TMath::Abs(pdgdaughters[0])==211) { | |
169 | vars[iter]=dd->InvMassD0(); | |
170 | } else { | |
171 | vars[iter]=dd->InvMassD0bar(); | |
172 | } | |
173 | } | |
174 | if(fVarsForOpt[1]){ | |
175 | iter++; | |
176 | vars[iter]=dd->GetDCA(); | |
177 | } | |
178 | if(fVarsForOpt[2]){ | |
179 | iter++; | |
180 | if(TMath::Abs(pdgdaughters[0])==211) { | |
181 | vars[iter] = dd->CosThetaStarD0(); | |
182 | } else { | |
183 | vars[iter] = dd->CosThetaStarD0bar(); | |
184 | } | |
185 | } | |
186 | if(fVarsForOpt[3]){ | |
187 | iter++; | |
188 | if(TMath::Abs(pdgdaughters[0])==321) { | |
189 | vars[iter]=dd->PtProng(0); | |
190 | } | |
191 | else{ | |
192 | vars[iter]=dd->PtProng(1); | |
193 | } | |
194 | } | |
195 | if(fVarsForOpt[4]){ | |
196 | iter++; | |
197 | if(TMath::Abs(pdgdaughters[0])==211) { | |
198 | vars[iter]=dd->PtProng(0); | |
199 | } | |
200 | else{ | |
201 | vars[iter]=dd->PtProng(1); | |
202 | } | |
203 | } | |
204 | if(fVarsForOpt[5]){ | |
205 | iter++; | |
206 | if(TMath::Abs(pdgdaughters[0])==321) { | |
207 | vars[iter]=dd->Getd0Prong(0); | |
208 | } | |
209 | else{ | |
210 | vars[iter]=dd->Getd0Prong(1); | |
211 | } | |
212 | } | |
213 | if(fVarsForOpt[6]){ | |
214 | iter++; | |
215 | if(TMath::Abs(pdgdaughters[0])==211) { | |
216 | vars[iter]=dd->Getd0Prong(0); | |
217 | } | |
218 | else{ | |
219 | vars[iter]=dd->Getd0Prong(1); | |
220 | } | |
221 | } | |
222 | if(fVarsForOpt[7]){ | |
223 | iter++; | |
224 | vars[iter]= dd->Prodd0d0(); | |
225 | } | |
226 | if(fVarsForOpt[8]){ | |
227 | iter++; | |
228 | vars[iter]=dd->CosPointingAngle(); | |
229 | } | |
230 | if(fVarsForOpt[9]){ | |
231 | iter++; | |
232 | vars[iter]=dstarD0pi->InvMassDstarKpipi(); | |
233 | } | |
234 | if(fVarsForOpt[10]){ | |
235 | iter++; | |
236 | vars[iter]=dstarD0pi->DeltaInvMass(); | |
237 | } | |
238 | if(fVarsForOpt[11]){ | |
239 | iter++; | |
240 | vars[iter] = softPi->Pt(); | |
241 | } | |
242 | if(fVarsForOpt[12]){ | |
243 | iter++; | |
244 | vars[iter] = softPi->Pt(); | |
245 | } | |
246 | if(fVarsForOpt[13]){ | |
247 | iter++; | |
248 | vars[iter] =dstarD0pi->AngleD0dkpPisoft(); | |
249 | } | |
c8cd526d | 250 | if(fVarsForOpt[14]){ |
251 | iter++; | |
252 | vars[iter]=TMath::Abs(dd->CosPointingAngleXY()); | |
253 | } | |
254 | if(fVarsForOpt[15]){ | |
255 | iter++; | |
256 | vars[iter]=(dd->NormalizedDecayLengthXY()*(dd->P()/dd->Pt())); | |
257 | } | |
45bc9115 | 258 | |
259 | return; | |
260 | } | |
261 | //--------------------------------------------------------------------------- | |
45eae267 | 262 | Int_t AliRDHFCutsDStartoKpipi::IsSelected(TObject* obj,Int_t selectionLevel, AliAODEvent* aod) { |
45bc9115 | 263 | // |
264 | // Apply selection for D*. | |
45eae267 | 265 | // Added functionality to remove the D0 daughters from primary vertex (not dafult) |
306dd1c1 | 266 | |
267 | fIsSelectedCuts=0; | |
268 | fIsSelectedPID=0; | |
269 | ||
45bc9115 | 270 | if(!fCutsRD){ |
271 | cout<<"Cut matrice not inizialized. Exit..."<<endl; | |
272 | return 0; | |
273 | } | |
274 | ||
275 | AliAODRecoCascadeHF* d = (AliAODRecoCascadeHF*)obj; | |
276 | if(!d){ | |
277 | cout<<"AliAODRecoCascadeHF null"<<endl; | |
278 | return 0; | |
279 | } | |
280 | ||
939850df | 281 | Double_t ptD=d->Pt(); |
282 | if(ptD<fMinPtCand) return 0; | |
283 | if(ptD>fMaxPtCand) return 0; | |
ba27eecd | 284 | |
939850df | 285 | |
45bc9115 | 286 | AliAODRecoDecayHF2Prong* dd = (AliAODRecoDecayHF2Prong*)d->Get2Prong(); |
287 | if(!dd){ | |
288 | cout<<"AliAODRecoDecayHF2Prong null"<<endl; | |
289 | return 0; | |
290 | } | |
291 | ||
3e075b37 | 292 | if(fUseTrackSelectionWithFilterBits && dd->HasBadDaughters()) return 0; |
ba27eecd | 293 | |
45bc9115 | 294 | AliAODTrack *b = (AliAODTrack*)d->GetBachelor(); |
c0d01d9d | 295 | if(fTrackCutsSoftPi && fTrackCutsSoftPi->GetRequireTPCRefit()){ |
8f85c649 | 296 | if(!(b->TestFilterMask(BIT(4)))) return 0; |
297 | } | |
45bc9115 | 298 | |
e4f1bb0a | 299 | Int_t returnvalue=1; |
28e927b1 | 300 | Int_t returnvaluePID=3; |
301 | ||
28e927b1 | 302 | |
45bc9115 | 303 | // selection on candidate |
304 | if(selectionLevel==AliRDHFCuts::kAll || | |
305 | selectionLevel==AliRDHFCuts::kCandidate) { | |
306 | ||
307 | Double_t pt=d->Pt(); | |
45eae267 ZCV |
308 | Int_t ptbin=PtBin(pt); |
309 | ||
45bc9115 | 310 | // DStarMass and D0mass |
311 | Double_t mDSPDG = TDatabasePDG::Instance()->GetParticle(413)->Mass(); | |
312 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
313 | // delta mass PDG | |
314 | Double_t deltaPDG = mDSPDG-mD0PDG; | |
45bc9115 | 315 | |
45bc9115 | 316 | // Half width DStar mass |
ee1128c6 | 317 | if(TMath::Abs(mDSPDG - (d->InvMassDstarKpipi()))>fCutsRD[GetGlobalIndex(9,ptbin)]) return 0; |
45bc9115 | 318 | // Half width Delta mass |
319 | ||
ee1128c6 | 320 | if(TMath::Abs(deltaPDG-(d->DeltaInvMass())) > fCutsRD[GetGlobalIndex(10,ptbin)]) return 0; |
45bc9115 | 321 | |
322 | // cut on soft pion pt | |
323 | if(b->Pt() < fCutsRD[GetGlobalIndex(11,ptbin)] || b->Pt() > fCutsRD[GetGlobalIndex(12,ptbin)]) return 0; | |
324 | // cut on the angle between D0 decay plane and soft pion | |
325 | if(d->AngleD0dkpPisoft() > fCutsRD[GetGlobalIndex(13,ptbin)]) return 0; | |
326 | ||
dcc2ade0 | 327 | // select D0 that passes D* cuts |
45eae267 | 328 | returnvalue = IsD0FromDStarSelected(pt,dd,selectionLevel, aod); |
dcc2ade0 | 329 | if((b->Charge()==+1 && returnvalue==2) || (b->Charge()==-1 && returnvalue==1)) return 0; |
330 | ||
331 | } | |
332 | ||
306dd1c1 | 333 | fIsSelectedCuts = returnvalue; |
334 | ||
dcc2ade0 | 335 | // selection on PID |
336 | if(selectionLevel==AliRDHFCuts::kAll || | |
337 | selectionLevel==AliRDHFCuts::kCandidate || | |
338 | selectionLevel==AliRDHFCuts::kPID) { | |
339 | returnvaluePID = IsSelectedPID(d); | |
306dd1c1 | 340 | fIsSelectedPID = returnvaluePID; |
45bc9115 | 341 | } |
7562813c | 342 | if(returnvaluePID!=3) returnvalue =0; |
dcc2ade0 | 343 | |
344 | ||
345 | // selection on daughter tracks | |
346 | if(selectionLevel==AliRDHFCuts::kAll || | |
347 | selectionLevel==AliRDHFCuts::kTracks) { | |
348 | if(!AreDaughtersSelected(dd)) return 0; | |
349 | if(fTrackCutsSoftPi) { | |
350 | AliAODVertex *vAOD = d->GetPrimaryVtx(); | |
351 | Double_t pos[3],cov[6]; | |
352 | vAOD->GetXYZ(pos); | |
353 | vAOD->GetCovarianceMatrix(cov); | |
354 | const AliESDVertex vESD(pos,cov,100.,100); | |
355 | if(!IsDaughterSelected(b,&vESD,fTrackCutsSoftPi)) return 0; | |
356 | } | |
357 | } | |
358 | ||
45bc9115 | 359 | return returnvalue; |
7562813c | 360 | |
45bc9115 | 361 | } |
362 | //_________________________________________________________________________________________________ | |
45eae267 | 363 | Int_t AliRDHFCutsDStartoKpipi::IsD0FromDStarSelected(Double_t pt, TObject* obj,Int_t selectionLevel, AliAODEvent* aod) const { |
45bc9115 | 364 | // |
365 | // Apply selection for D0 from D*. The selection in on D0 prongs | |
45eae267 ZCV |
366 | // added functionality to recalculate the primary vertex without D0 prongs (not default) |
367 | // | |
45bc9115 | 368 | |
369 | if(!fCutsRD){ | |
370 | cout<<"Cut matrice not inizialized. Exit..."<<endl; | |
371 | return 0; | |
372 | } | |
373 | ||
374 | AliAODRecoDecayHF2Prong* dd = (AliAODRecoDecayHF2Prong*)obj; | |
375 | ||
376 | if(!dd){ | |
377 | cout<<"AliAODRecoDecayHF2Prong null"<<endl; | |
378 | return 0; | |
379 | } | |
380 | ||
da6fefc3 | 381 | // selection on daughter tracks is done in IsSelected() |
45bc9115 | 382 | |
383 | Int_t returnvalue=1; | |
384 | ||
385 | // selection on candidate | |
386 | if(selectionLevel==AliRDHFCuts::kAll || | |
387 | selectionLevel==AliRDHFCuts::kCandidate) { | |
388 | ||
389 | // D0 mass | |
390 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
391 | // delta mass PDG | |
392 | ||
45eae267 ZCV |
393 | // add vertex recalculation without daughters |
394 | AliAODVertex *origownvtx=0x0; | |
395 | if(fRemoveDaughtersFromPrimary && !fUseMCVertex) { | |
396 | if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx()); | |
397 | if(!RecalcOwnPrimaryVtx(dd,aod)) { | |
398 | CleanOwnPrimaryVtx(dd,aod,origownvtx); | |
399 | return 0; | |
400 | } | |
401 | } | |
402 | ||
403 | ||
404 | if(fUseMCVertex) { | |
405 | if(dd->GetOwnPrimaryVtx()) origownvtx=new AliAODVertex(*dd->GetOwnPrimaryVtx()); | |
406 | if(!SetMCPrimaryVtx(dd,aod)) { | |
407 | CleanOwnPrimaryVtx(dd,aod,origownvtx); | |
408 | return 0; | |
409 | } | |
410 | } | |
411 | ||
45bc9115 | 412 | Int_t ptbin=PtBin(pt); |
45eae267 ZCV |
413 | if (ptbin==-1) { |
414 | CleanOwnPrimaryVtx(dd,aod,origownvtx); | |
415 | return 0; | |
416 | } | |
45bc9115 | 417 | |
418 | Double_t mD0,mD0bar,ctsD0,ctsD0bar; | |
419 | ||
420 | Int_t okD0 =0; | |
421 | Int_t okD0bar =0; | |
422 | okD0=1; okD0bar=1; | |
423 | ||
424 | if(dd->PtProng(1) < fCutsRD[GetGlobalIndex(3,ptbin)] || dd->PtProng(0) < fCutsRD[GetGlobalIndex(4,ptbin)]) okD0 = 0; | |
425 | if(dd->PtProng(0) < fCutsRD[GetGlobalIndex(3,ptbin)] || dd->PtProng(1) < fCutsRD[GetGlobalIndex(4,ptbin)]) okD0bar = 0; | |
426 | ||
45eae267 | 427 | if(!okD0 && !okD0bar) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 428 | |
429 | if(TMath::Abs(dd->Getd0Prong(1)) > fCutsRD[GetGlobalIndex(5,ptbin)] || | |
430 | TMath::Abs(dd->Getd0Prong(0)) > fCutsRD[GetGlobalIndex(6,ptbin)]) okD0 = 0; | |
431 | if(TMath::Abs(dd->Getd0Prong(0)) > fCutsRD[GetGlobalIndex(6,ptbin)] || | |
432 | TMath::Abs(dd->Getd0Prong(1)) > fCutsRD[GetGlobalIndex(5,ptbin)]) okD0bar = 0; | |
45eae267 | 433 | if(!okD0 && !okD0bar) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 434 | |
45eae267 | 435 | if(dd->GetDCA() > fCutsRD[GetGlobalIndex(1,ptbin)]) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 436 | |
437 | dd->InvMassD0(mD0,mD0bar); | |
438 | if(TMath::Abs(mD0-mD0PDG) > fCutsRD[GetGlobalIndex(0,ptbin)]) okD0 = 0; | |
439 | if(TMath::Abs(mD0bar-mD0PDG) > fCutsRD[GetGlobalIndex(0,ptbin)]) okD0bar = 0; | |
45eae267 | 440 | if(!okD0 && !okD0bar) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 441 | |
442 | dd->CosThetaStarD0(ctsD0,ctsD0bar); | |
443 | if(TMath::Abs(ctsD0) > fCutsRD[GetGlobalIndex(2,ptbin)]) okD0 = 0; | |
444 | if(TMath::Abs(ctsD0bar) > fCutsRD[GetGlobalIndex(2,ptbin)]) okD0bar = 0; | |
45eae267 | 445 | if(!okD0 && !okD0bar) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 446 | |
45eae267 | 447 | if(dd->Prodd0d0() > fCutsRD[GetGlobalIndex(7,ptbin)]) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 448 | |
45eae267 | 449 | if(dd->CosPointingAngle() < fCutsRD[GetGlobalIndex(8,ptbin)]) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
45bc9115 | 450 | |
45eae267 | 451 | if(TMath::Abs(dd->CosPointingAngleXY()) < fCutsRD[GetGlobalIndex(14,ptbin)]) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
c8cd526d | 452 | |
453 | Double_t normalDecayLengXY=(dd->NormalizedDecayLengthXY()*(dd->P()/dd->Pt())); | |
45eae267 | 454 | if (normalDecayLengXY < fCutsRD[GetGlobalIndex(15, ptbin)]) {CleanOwnPrimaryVtx(dd,aod,origownvtx); return 0;} |
c8cd526d | 455 | |
45bc9115 | 456 | if (okD0) returnvalue=1; //cuts passed as D0 |
457 | if (okD0bar) returnvalue=2; //cuts passed as D0bar | |
458 | if (okD0 && okD0bar) returnvalue=3; //both | |
45eae267 ZCV |
459 | |
460 | // unset recalculated primary vertex when not needed any more | |
461 | CleanOwnPrimaryVtx(dd,aod,origownvtx); | |
462 | ||
45bc9115 | 463 | } |
28e927b1 | 464 | |
45bc9115 | 465 | return returnvalue; |
466 | } | |
96462a8c | 467 | //---------------------------------------------------------------------------------- |
468 | Bool_t AliRDHFCutsDStartoKpipi::IsInFiducialAcceptance(Double_t pt, Double_t y) const | |
469 | { | |
470 | // | |
471 | // D* fiducial acceptance region | |
472 | // | |
45bc9115 | 473 | |
af5d687e | 474 | if(fMaxRapidityCand>-998.){ |
475 | if(TMath::Abs(y) > fMaxRapidityCand) return kFALSE; | |
476 | else return kTRUE; | |
477 | } | |
478 | ||
96462a8c | 479 | if(pt > 5.) { |
480 | // applying cut for pt > 5 GeV | |
481 | AliDebug(4,Form("pt of D* = %f (> 5), cutting at |y| < 0.8\n",pt)); | |
482 | if (TMath::Abs(y) > 0.8){ | |
483 | return kFALSE; | |
484 | } | |
7562813c | 485 | } else { |
96462a8c | 486 | // appliying smooth cut for pt < 5 GeV |
28e927b1 | 487 | Double_t maxFiducialY = -0.2/15*pt*pt+1.9/15*pt+0.5; |
488 | Double_t minFiducialY = 0.2/15*pt*pt-1.9/15*pt-0.5; | |
489 | AliDebug(2,Form("pt of D* = %f (< 5), cutting according to the fiducial zone [%f, %f]\n",pt,minFiducialY,maxFiducialY)); | |
96462a8c | 490 | if (y < minFiducialY || y > maxFiducialY){ |
491 | return kFALSE; | |
492 | } | |
493 | } | |
7562813c | 494 | |
495 | return kTRUE; | |
496 | } | |
497 | ||
498 | //_______________________________________________________________________________- | |
499 | Int_t AliRDHFCutsDStartoKpipi::IsSelectedPID(AliAODRecoDecayHF* obj) | |
500 | { | |
501 | // | |
502 | // PID method, n signa approach default | |
503 | // | |
504 | ||
7562813c | 505 | AliAODRecoCascadeHF* dstar = (AliAODRecoCascadeHF*)obj; |
506 | if(!dstar){ | |
507 | cout<<"AliAODRecoCascadeHF null"<<endl; | |
508 | return 0; | |
a8d9f55a | 509 | } |
510 | ||
511 | if(!fUsePID || dstar->Pt() > fMaxPtPid) return 3; | |
512 | ||
7562813c | 513 | AliAODRecoDecayHF2Prong* d0 = (AliAODRecoDecayHF2Prong*)dstar->Get2Prong(); |
514 | if(!d0){ | |
515 | cout<<"AliAODRecoDecayHF2Prong null"<<endl; | |
516 | return 0; | |
517 | } | |
518 | ||
519 | // here the PID | |
520 | AliAODTrack *pos = (AliAODTrack*)dstar->Get2Prong()->GetDaughter(0); | |
521 | AliAODTrack *neg = (AliAODTrack*)dstar->Get2Prong()->GetDaughter(1); | |
45bc9115 | 522 | |
7562813c | 523 | if (dstar->Charge()>0){ |
524 | if(!SelectPID(pos,2)) return 0;//pion+ | |
525 | if(!SelectPID(neg,3)) return 0;//kaon- | |
526 | }else{ | |
527 | if(!SelectPID(pos,3)) return 0;//kaon+ | |
528 | if(!SelectPID(neg,2)) return 0;//pion- | |
529 | } | |
28e927b1 | 530 | |
7562813c | 531 | return 3; |
96462a8c | 532 | } |
7562813c | 533 | |
28e927b1 | 534 | //_______________________________________________________________________________- |
7562813c | 535 | Int_t AliRDHFCutsDStartoKpipi::SelectPID(AliAODTrack *track, Int_t type) |
28e927b1 | 536 | { |
537 | // | |
538 | // here the PID | |
7562813c | 539 | |
540 | Bool_t isParticle=kTRUE; | |
541 | ||
542 | if(fPidHF->GetMatch()==1){//n-sigma | |
543 | Bool_t TPCon=TMath::Abs(2)>1e-4?kTRUE:kFALSE; | |
544 | Bool_t TOFon=TMath::Abs(3)>1e-4?kTRUE:kFALSE; | |
545 | ||
546 | Bool_t isTPC=kTRUE; | |
547 | Bool_t isTOF=kTRUE; | |
548 | ||
549 | if (TPCon){//TPC | |
550 | if(fPidHF->CheckStatus(track,"TPC")){ | |
551 | if(type==2) isTPC=fPidHF->IsPionRaw(track,"TPC"); | |
552 | if(type==3) isTPC=fPidHF->IsKaonRaw(track,"TPC"); | |
553 | } | |
554 | } | |
555 | if (TOFon){//TOF | |
556 | if(fPidHF->CheckStatus(track,"TOF")){ | |
557 | if(type==2) isTOF=fPidHF->IsPionRaw(track,"TOF"); | |
558 | if(type==3) isTOF=fPidHF->IsKaonRaw(track,"TOF"); | |
559 | } | |
560 | } | |
035523fb | 561 | |
562 | //-------------------------------- | |
563 | // cut on high momentum in the TPC | |
564 | //-------------------------------- | |
565 | Double_t pPIDcut = track->P(); | |
566 | if(pPIDcut>fTPCflag) isTPC=1; | |
567 | ||
7562813c | 568 | isParticle = isTPC&&isTOF; |
569 | } | |
570 | ||
571 | if(fPidHF->GetMatch()==2){//bayesian | |
572 | //Double_t priors[5]={0.01,0.001,0.3,0.3,0.3}; | |
573 | Double_t prob[5]={1.,1.,1.,1.,1.}; | |
574 | ||
575 | //fPidHF->SetPriors(priors); | |
a585a726 | 576 | // fPidHF->BayesianProbability(track,prob); |
7562813c | 577 | |
578 | Double_t max=0.; | |
579 | Int_t k=-1; | |
580 | for (Int_t i=0; i<5; i++) { | |
581 | if (prob[i]>max) {k=i; max=prob[i];} | |
582 | } | |
583 | isParticle = Bool_t(k==type); | |
584 | } | |
585 | ||
035523fb | 586 | |
7562813c | 587 | return isParticle; |
588 | ||
589 | } | |
590 | //__________________________________________________________________________________- | |
591 | void AliRDHFCutsDStartoKpipi::SetStandardCutsPP2010() { | |
592 | // | |
593 | //STANDARD CUTS USED FOR 2010 pp analysis | |
594 | // | |
595 | // Need to be updated for the final cut version | |
596 | // | |
597 | ||
598 | SetName("DStartoD0piCutsStandard"); | |
599 | SetTitle("Standard Cuts for D* analysis"); | |
600 | ||
601 | // PILE UP REJECTION | |
602 | SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
603 | ||
604 | // EVENT CUTS | |
605 | SetMinVtxContr(1); | |
606 | ||
607 | // CUTS ON SINGLE TRACKS | |
608 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
609 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
610 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
611 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
612 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); | |
613 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
614 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
615 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
616 | ||
617 | // CUTS on SOFT PION | |
618 | AliESDtrackCuts* esdSoftPicuts=new AliESDtrackCuts(); | |
619 | esdSoftPicuts->SetRequireSigmaToVertex(kFALSE); | |
620 | esdSoftPicuts->SetRequireTPCRefit(kFALSE); | |
621 | esdSoftPicuts->SetRequireITSRefit(kFALSE); | |
622 | esdSoftPicuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
623 | AliESDtrackCuts::kAny); | |
624 | esdSoftPicuts->SetPtRange(0.0,1.e10); | |
625 | ||
626 | AddTrackCuts(esdTrackCuts); | |
627 | AddTrackCutsSoftPi(esdSoftPicuts); | |
628 | ||
629 | const Int_t nptbins =13; | |
630 | const Double_t ptmax = 9999.; | |
c8cd526d | 631 | const Int_t nvars=16; |
7562813c | 632 | Float_t ptbins[nptbins+1]; |
633 | ptbins[0]=0.; | |
634 | ptbins[1]=0.5; | |
635 | ptbins[2]=1.; | |
636 | ptbins[3]=2.; | |
637 | ptbins[4]=3.; | |
638 | ptbins[5]=4.; | |
639 | ptbins[6]=5.; | |
640 | ptbins[7]=6.; | |
c8cd526d | 641 | ptbins[8]=7.; |
642 | ptbins[9]=8.; | |
643 | ptbins[10]=12.; | |
644 | ptbins[11]=16.; | |
7562813c | 645 | ptbins[12]=24.; |
646 | ptbins[13]=ptmax; | |
647 | ||
648 | SetGlobalIndex(nvars,nptbins); | |
649 | SetPtBins(nptbins+1,ptbins); | |
650 | ||
c8cd526d | 651 | Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.7,220.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-2000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* pt<0.5*/ |
652 | {0.7,220.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-16000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* 0.5<pt<1*/ | |
653 | {0.7,400.*1E-4,0.8,0.7,0.7,400.*1E-4,400.*1E-4,-36000.*1E-8,0.82,0.3,0.1,0.05,100,0.5,-1.,0.},/* 1<pt<2 */ | |
654 | {0.7,200.*1E-4,0.8,0.7,0.7,800.*1E-4,800.*1E-4,-16000.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 2<pt<3 */ | |
655 | {0.7,500.*1E-4,0.8,1.0,1.0,420.*1E-4,560.*1E-4,-6500.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 3<pt<4 */ | |
656 | {0.7,800.*1E-4,0.9,1.2,1.2,700.*1E-4,700.*1E-4,1000.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 4<pt<5 */ | |
657 | {0.7,1000.*1E-4,1.0,1.0,1.0,800.*1E-4,800.*1E-4,50000.*1E-8,0.8,0.3,0.1,0.05,100,0.5,-1.,0.},/* 5<pt<6 */ | |
658 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,100000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 6<pt<7 */ | |
659 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,100000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 7<pt<8 */ | |
660 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,600000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 8<pt<12 */ | |
661 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 12<pt<16 */ | |
662 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 16<pt<20 */ | |
663 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.}};/* pt>24 */ | |
7562813c | 664 | |
665 | ||
666 | //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts | |
667 | Float_t **cutsMatrixTransposeStand=new Float_t*[nvars]; | |
668 | for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins]; | |
669 | ||
670 | for (Int_t ibin=0;ibin<nptbins;ibin++){ | |
671 | for (Int_t ivar = 0; ivar<nvars; ivar++){ | |
672 | cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar]; | |
673 | } | |
674 | } | |
675 | ||
676 | SetCuts(nvars,nptbins,cutsMatrixTransposeStand); | |
e11ae259 | 677 | |
678 | for(Int_t iv=0;iv<nvars;iv++) delete [] cutsMatrixTransposeStand[iv]; | |
679 | delete [] cutsMatrixTransposeStand; | |
680 | cutsMatrixTransposeStand=NULL; | |
681 | ||
7562813c | 682 | // PID SETTINGS FOR D* analysis |
683 | AliAODPidHF* pidObj=new AliAODPidHF(); | |
684 | //pidObj->SetName("pid4DSatr"); | |
685 | Int_t mode=1; | |
686 | Double_t priors[5]={0.01,0.001,0.3,0.3,0.3}; | |
687 | pidObj->SetPriors(priors); | |
688 | pidObj->SetMatch(mode); | |
689 | pidObj->SetSigma(0,2); // TPC | |
690 | pidObj->SetSigma(3,3); // TOF | |
691 | pidObj->SetTPC(kTRUE); | |
692 | pidObj->SetTOF(kTRUE); | |
693 | ||
694 | SetPidHF(pidObj); | |
695 | SetUsePID(kTRUE); | |
696 | ||
697 | PrintAll(); | |
698 | ||
e11ae259 | 699 | delete pidObj; |
700 | pidObj=NULL; | |
701 | ||
7562813c | 702 | return; |
703 | } | |
704 | //_____________________________________________________________________________- | |
705 | void AliRDHFCutsDStartoKpipi::SetStandardCutsPbPb2010(){ | |
706 | // | |
707 | // TEMPORARY, WORK IN PROGRESS ... BUT WORKING! | |
708 | // | |
709 | // Lead Lead | |
710 | // | |
711 | ||
712 | SetName("DStartoD0piCutsStandard"); | |
713 | SetTitle("Standard Cuts for D* analysis in PbPb 2010"); | |
714 | ||
715 | // EVENT CUTS | |
716 | SetMinVtxContr(1); | |
717 | ||
718 | // CUTS ON SINGLE TRACKS | |
719 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
720 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
721 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
722 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
723 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); | |
724 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
725 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
726 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
727 | ||
728 | // CUTS on SOFT PION | |
729 | AliESDtrackCuts* esdSoftPicuts=new AliESDtrackCuts(); | |
730 | esdSoftPicuts->SetRequireSigmaToVertex(kFALSE); | |
731 | esdSoftPicuts->SetRequireTPCRefit(kTRUE); | |
732 | esdSoftPicuts->SetRequireITSRefit(kTRUE); | |
733 | esdSoftPicuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
734 | AliESDtrackCuts::kAny); //test d0 asimmetry | |
735 | esdSoftPicuts->SetPtRange(0.25,5); | |
736 | ||
737 | AddTrackCuts(esdTrackCuts); | |
738 | AddTrackCutsSoftPi(esdSoftPicuts); | |
739 | ||
740 | const Int_t nptbins =13; | |
741 | const Double_t ptmax = 9999.; | |
c8cd526d | 742 | const Int_t nvars=16; |
7562813c | 743 | Float_t ptbins[nptbins+1]; |
744 | ptbins[0]=0.; | |
745 | ptbins[1]=0.5; | |
746 | ptbins[2]=1.; | |
747 | ptbins[3]=2.; | |
748 | ptbins[4]=3.; | |
749 | ptbins[5]=4.; | |
750 | ptbins[6]=5.; | |
751 | ptbins[7]=6.; | |
c8cd526d | 752 | ptbins[8]=7.; |
753 | ptbins[9]=8.; | |
754 | ptbins[10]=12.; | |
755 | ptbins[11]=16.; | |
7562813c | 756 | ptbins[12]=24.; |
757 | ptbins[13]=ptmax; | |
758 | ||
759 | SetGlobalIndex(nvars,nptbins); | |
760 | SetPtBins(nptbins+1,ptbins); | |
761 | ||
c8cd526d | 762 | Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.7,220.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-2000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* pt<0.5*/ |
763 | {0.7,220.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-16000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* 0.5<pt<1*/ | |
764 | {0.7,400.*1E-4,0.8,0.7,0.7,800.*1E-4,800.*1E-4,-36000.*1E-8,0.82,0.3,0.1,0.05,100,0.5,-1.,0.},/* 1<pt<2 */ | |
765 | {0.7,200.*1E-4,0.8,0.7,0.7,800.*1E-4,800.*1E-4,-16000.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 2<pt<3 */ | |
766 | {0.7,500.*1E-4,0.8,1.0,1.0,420.*1E-4,560.*1E-4,-6500.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 3<pt<4 */ | |
767 | {0.7,800.*1E-4,0.9,1.2,1.2,700.*1E-4,700.*1E-4,1000.*1E-8,0.9,0.3,0.1,0.05,100,0.5,-1.,0.},/* 4<pt<5 */ | |
768 | {0.7,1000.*1E-4,1.0,1.0,1.0,800.*1E-4,800.*1E-4,50000.*1E-8,0.8,0.3,0.1,0.05,100,0.5,-1.,0.},/* 5<pt<6 */ | |
769 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,100000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 6<pt<7 */ | |
770 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,100000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 7<pt<8 */ | |
771 | {0.7,1000.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,600000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 8<pt<12 */ | |
772 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 12<pt<16 */ | |
773 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.},/* 16<pt<24 */ | |
774 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,0.5,-1.,0.}};/* pt>24 */ | |
7562813c | 775 | |
776 | ||
777 | //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts | |
778 | Float_t **cutsMatrixTransposeStand=new Float_t*[nvars]; | |
779 | for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins]; | |
780 | ||
781 | for (Int_t ibin=0;ibin<nptbins;ibin++){ | |
782 | for (Int_t ivar = 0; ivar<nvars; ivar++){ | |
783 | cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar]; | |
784 | } | |
785 | } | |
786 | ||
787 | SetCuts(nvars,nptbins,cutsMatrixTransposeStand); | |
e11ae259 | 788 | |
789 | for(Int_t iv=0;iv<nvars;iv++) delete [] cutsMatrixTransposeStand[iv]; | |
790 | delete [] cutsMatrixTransposeStand; | |
791 | cutsMatrixTransposeStand=NULL; | |
7562813c | 792 | |
793 | // PID SETTINGS | |
794 | AliAODPidHF* pidObj=new AliAODPidHF(); | |
795 | // pidObj->SetName("pid4DSatr"); | |
796 | Int_t mode=1; | |
797 | Double_t priors[5]={0.01,0.001,0.3,0.3,0.3}; | |
798 | pidObj->SetPriors(priors); | |
799 | pidObj->SetMatch(mode); | |
800 | pidObj->SetSigma(0,2); // TPC | |
801 | pidObj->SetSigma(3,3); // TOF | |
802 | pidObj->SetTPC(kTRUE); | |
803 | pidObj->SetTOF(kTRUE); | |
804 | ||
805 | SetPidHF(pidObj); | |
806 | SetUsePID(kTRUE); | |
28e927b1 | 807 | |
7562813c | 808 | PrintAll(); |
809 | ||
e11ae259 | 810 | delete pidObj; |
811 | pidObj=NULL; | |
812 | ||
7562813c | 813 | return; |
28e927b1 | 814 | |
28e927b1 | 815 | } |
0c22e2ac | 816 | |
817 | //_____________________________________________________________________________ | |
818 | void AliRDHFCutsDStartoKpipi::SetStandardCutsPbPb2011(){ | |
45eae267 ZCV |
819 | // |
820 | // Not implemented !! | |
821 | // | |
822 | SetStandardCutsPbPb2011DStar(0); | |
823 | return; | |
824 | } | |
825 | //_________________________________here the PbPb vs pt _________________________________________ | |
826 | void AliRDHFCutsDStartoKpipi::SetStandardCutsPbPb2011DStar(TH1F *hfl){ | |
0c22e2ac | 827 | |
828 | // Default 2010 PbPb cut object | |
0c22e2ac | 829 | |
45eae267 ZCV |
830 | SetName("DStartoD0piCutsStandard2011"); |
831 | SetTitle("Standard Cuts for D* analysis in PbPb 2011"); | |
832 | ||
833 | // EVENT CUTS | |
834 | SetMinVtxContr(1); | |
835 | // MAX Z-VERTEX CUT | |
836 | SetMaxVtxZ(10.); | |
837 | ||
0c22e2ac | 838 | SetTriggerClass(""); |
839 | ResetMaskAndEnableMBTrigger(); | |
840 | EnableCentralTrigger(); | |
841 | EnableSemiCentralTrigger(); | |
842 | ||
45eae267 ZCV |
843 | // CENTRALITY SELECTION |
844 | SetMinCentrality(0.); | |
845 | SetMaxCentrality(10.); | |
846 | SetUseCentrality(AliRDHFCuts::kCentV0M); | |
847 | ||
848 | // CUTS ON SINGLE TRACKS | |
849 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
850 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
851 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
852 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
853 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); | |
854 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
855 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
856 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
857 | ||
858 | esdTrackCuts->SetMaxDCAToVertexXY(1.); | |
859 | esdTrackCuts->SetMaxDCAToVertexZ(1.); | |
860 | ||
861 | ||
862 | // CUTS on SOFT PION | |
863 | AliESDtrackCuts* esdSoftPicuts=new AliESDtrackCuts(); | |
864 | esdSoftPicuts->SetRequireSigmaToVertex(kFALSE); | |
865 | esdSoftPicuts->SetRequireTPCRefit(kTRUE); | |
866 | esdSoftPicuts->SetRequireITSRefit(kTRUE); | |
867 | esdSoftPicuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
868 | AliESDtrackCuts::kAny); //test d0 asimmetry | |
869 | esdSoftPicuts->SetPtRange(0.1,10); | |
870 | ||
871 | esdSoftPicuts->SetMaxDCAToVertexXY(1.); | |
872 | esdSoftPicuts->SetMaxDCAToVertexZ(1.); | |
873 | ||
874 | SetSelectCandTrackSPDFirst(kTRUE, 4); | |
875 | ||
876 | //nothing below 3 GeV/c, speed up the calculation | |
877 | SetMinPtCandidate(3.0); | |
878 | ||
879 | AddTrackCuts(esdTrackCuts); | |
880 | AddTrackCutsSoftPi(esdSoftPicuts); | |
881 | ||
882 | const Int_t nptbins =14; | |
883 | const Double_t ptmax = 36.; | |
884 | const Int_t nvars=16; | |
885 | Float_t ptbins[nptbins+1]; | |
886 | ptbins[0]=0.5; | |
887 | ptbins[1]=1.; | |
888 | ptbins[2]=2.; | |
889 | ptbins[3]=3.; | |
890 | ptbins[4]=4.; | |
891 | ptbins[5]=5.; | |
892 | ptbins[6]=6.; | |
893 | ptbins[7]=7.; | |
894 | ptbins[8]=8.; | |
895 | ptbins[9]=10.; | |
896 | ptbins[10]=12.; | |
897 | ptbins[11]=16.; | |
898 | ptbins[12]=20.; | |
899 | ptbins[13]=24.; | |
900 | ptbins[14]=ptmax; | |
901 | ||
902 | SetGlobalIndex(nvars,nptbins); | |
903 | SetPtBins(nptbins+1,ptbins); | |
904 | ||
905 | Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.032,220.*1E-4,0.9,0.5,0.5,500.*1E-4,500.*1E-4,-16000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,9.},/* 0.5<pt<1*/ | |
906 | {0.032,350.*1E-4,0.9,0.5,0.5,800.*1E-4,800.*1E-4,-20000.*1E-8,0.96,0.3,0.15,0.05,100,0.5,0.99,10.},/* 1<pt<2 */ | |
907 | {0.032,300.*1E-4,0.9,0.5,0.5,900.*1E-4,900.*1E-4,-42000.*1E-8,0.96,0.3,0.15,0.05,100,0.5,0.99,9.},/* 2<pt<3 */ | |
908 | {0.036,300.*1E-4,0.8,0.8,0.8,900.*1E-4,900.*1E-4,-39000.*1E-8,0.99,0.3,0.15,0.05,100,0.5,0.998,8.},/* 3<pt<4 */ | |
909 | {0.038,225.*1E-4,0.8,1.0,1.0,1000.*1E-4,1000.*1E-4,-30000.*1E-8,0.99,0.3,0.15,0.05,100,0.5,0.998,7.5},/* 4<pt<5 */ | |
910 | {0.045,200.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,-23000.*1E-8,0.99,0.3,0.15,0.05,100,0.5,0.998,7.},/* 5<pt<6 */ | |
911 | {0.045,210.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,-10000.*1E-8,0.982,0.3,0.15,0.05,100,0.5,0.998,6.4},/* 6<pt<7 */ | |
912 | {0.050,230.*1E-4,1.0,1.0,1.0,1000.*1E-4,1000.*1E-4,-12700.*1E-8,0.98,0.3,0.15,0.05,100,0.5,0.998,6.4},/* 7<pt<8 */ | |
913 | {0.060,200.*1E-4,1.0,0.9,0.9,1000.*1E-4,1000.*1E-4,-7500.*1E-8,0.98,0.3,0.15,0.05,100,0.5,0.998,4.7},/* 8<pt<10 */ | |
914 | {0.060,200.*1E-4,1.0,0.9,0.9,1000.*1E-4,1000.*1E-4,-7500.*1E-8,0.97,0.3,0.15,0.05,100,1.0,0.998,4.7},/* 10<pt<12 */ | |
915 | {0.074,200.*1E-4,1.0,0.5,0.5,1500.*1E-4,1500.*1E-4,-7500.*1E-8,0.95,0.3,0.15,0.05,100,1.0,0.998,3},/* 12<pt<16 */ | |
916 | {0.074,210.*1E-4,1.0,0.5,0.5,1500.*1E-4,1500.*1E-4,-5000.*1E-8,0.95,0.3,0.15,0.05,100,1.0,0.998,2.},/* 16<pt<20 */ | |
917 | {0.074,220.*1E-4,1.0,0.5,0.5,1500.*1E-4,1500.*1E-4,-5000.*1E-8,0.93,0.3,0.15,0.05,100,1.0,0.995,2.},/* 20<pt<24 */ | |
918 | {0.074,400.*1E-4,1.0,0.5,0.5,2000.*1E-4,2000.*1E-4,40000.*1E-8,0.7,0.3,0.15,0.05,100,1.0,0.9,1.}};/* 24<pt<36 */ | |
919 | ||
920 | ||
921 | //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts | |
922 | Float_t **cutsMatrixTransposeStand=new Float_t*[nvars]; | |
923 | for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins]; | |
924 | ||
925 | for (Int_t ibin=0;ibin<nptbins;ibin++){ | |
926 | for (Int_t ivar = 0; ivar<nvars; ivar++){ | |
927 | cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar]; | |
928 | } | |
929 | } | |
930 | ||
931 | SetCuts(nvars,nptbins,cutsMatrixTransposeStand); | |
932 | ||
933 | for(Int_t iv=0;iv<nvars;iv++) delete [] cutsMatrixTransposeStand[iv]; | |
934 | delete [] cutsMatrixTransposeStand; | |
935 | cutsMatrixTransposeStand=NULL; | |
936 | ||
937 | // PID SETTINGS // --- | |
938 | AliAODPidHF* pidObj=new AliAODPidHF(); | |
939 | // pidObj->SetName("pid4DSatr"); | |
940 | Int_t mode=1; | |
941 | ||
942 | pidObj->SetMatch(mode); | |
943 | pidObj->SetSigma(0,3); // TPC -- 2 sigma for pt < 4 | |
944 | pidObj->SetSigma(3,3); // TOF | |
945 | pidObj->SetTPC(kTRUE); | |
946 | pidObj->SetTOF(kTRUE); | |
947 | pidObj->SetOldPid(kFALSE); | |
948 | ||
949 | SetPidHF(pidObj); | |
950 | SetUsePID(kTRUE); | |
951 | ||
952 | // PID off for tracks with pt above 4 GeV/c | |
953 | SetOffHighPtPIDinTPC(4.0); | |
954 | SetRemoveDaughtersFromPrim(kFALSE); | |
955 | // flattening | |
956 | SetHistoForCentralityFlattening(hfl,0.,10,0.,0); | |
957 | ||
958 | PrintAll(); | |
959 | ||
960 | delete pidObj; | |
961 | pidObj=NULL; | |
962 | ||
963 | ||
964 | return; | |
965 | } | |
966 | //-----------------------------------Here the multiplicity pp-------------------------------- | |
967 | ||
968 | void AliRDHFCutsDStartoKpipi::SetStandardCutsPP2010DStarMult(Bool_t rec){ | |
969 | ||
970 | ||
971 | // | |
972 | // STANDARD CUTS USED FOR 2010 pp analysis (multiplicity) | |
973 | // | |
974 | // | |
975 | ||
976 | SetName("DStartoD0piCutsStandard"); | |
977 | SetTitle("Standard Cuts for D* analysis pp mult"); | |
978 | ||
979 | // PILE UP REJECTION | |
980 | SetOptPileup(AliRDHFCuts::kRejectPileupEvent); | |
981 | ||
982 | // EVENT CUTS | |
983 | SetMinVtxContr(1); | |
984 | // MAX Z-VERTEX CUT | |
985 | SetMaxVtxZ(10.); | |
986 | ||
987 | // CUTS ON SINGLE TRACKS | |
988 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
989 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
990 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
991 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
992 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); | |
993 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
994 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
995 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
996 | ||
997 | esdTrackCuts->SetMaxDCAToVertexXY(1.); | |
998 | esdTrackCuts->SetMaxDCAToVertexZ(1.); | |
999 | ||
1000 | ||
1001 | // CUTS on SOFT PION | |
1002 | AliESDtrackCuts* esdSoftPicuts=new AliESDtrackCuts(); | |
1003 | esdSoftPicuts->SetRequireSigmaToVertex(kFALSE); | |
1004 | esdSoftPicuts->SetRequireTPCRefit(kFALSE); | |
1005 | esdSoftPicuts->SetRequireITSRefit(kTRUE); | |
1006 | esdSoftPicuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
1007 | AliESDtrackCuts::kAny); | |
1008 | esdSoftPicuts->SetPtRange(0.08,1.e10); | |
1009 | SetUseCentrality(kFALSE); | |
1010 | ||
1011 | AddTrackCuts(esdTrackCuts); | |
1012 | AddTrackCutsSoftPi(esdSoftPicuts); | |
1013 | ||
1014 | const Int_t nptbins =14; | |
1015 | const Double_t ptmax = 9999.; | |
1016 | const Int_t nvars=16; | |
1017 | Float_t ptbins[nptbins+1]; | |
1018 | ptbins[0]=0.; | |
1019 | ptbins[1]=0.5; | |
1020 | ptbins[2]=1.; | |
1021 | ptbins[3]=2.; | |
1022 | ptbins[4]=3.; | |
1023 | ptbins[5]=4.; | |
1024 | ptbins[6]=5.; | |
1025 | ptbins[7]=6.; | |
1026 | ptbins[8]=7.; | |
1027 | ptbins[9]=8.; | |
1028 | ptbins[10]=10.; | |
1029 | ptbins[11]=12.; | |
1030 | ptbins[12]=16.; | |
1031 | ptbins[13]=20.; | |
1032 | ptbins[14]=ptmax; | |
1033 | ||
1034 | SetGlobalIndex(nvars,nptbins); | |
1035 | SetPtBins(nptbins+1,ptbins); | |
1036 | ||
1037 | Float_t cutsMatrixD0toKpiStand[nptbins][nvars]={{0.026,220.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-2000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* pt<0.5*/ | |
1038 | {0.039,300.*1E-4,0.7,0.21,0.21,500.*1E-4,500.*1E-4,-16000.*1E-8,0.85,0.3,0.1,0.05,100,0.5,-1.,0.},/* 0.5<pt<1*/ | |
1039 | {0.022,400.*1E-4,0.8,0.7,0.7,800.*1E-4,800.*1E-4,-20000.*1E-8,0.8,0.3,0.3,0.05,100,0.5,-1.,0.},/* 1<pt<2 */ | |
1040 | {0.032,350.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-13000.*1E-8,0.9,0.3,0.3,0.05,100,0.8,-1.,0.},/* 2<pt<3 */ | |
1041 | {0.032,500.*1E-4,0.8,0.7,0.7,1000.*1E-4,1000.*1E-4,-8000.*1E-8,0.9,0.3,0.3,0.05,100,0.8,-1.,0.},/* 3<pt<4 */ | |
1042 | {0.032,700.*1E-4,0.9,0.9,0.9,1000.*1E-4,1000.*1E-4,10000.*1E-8,0.9,0.3,0.3,0.05,100,1.0,-1.,0.},/* 4<pt<5 */ | |
1043 | {0.036,1000.*1E-4,1.0,0.8,0.8,1000.*1E-4,1000.*1E-4,50000.*1E-8,0.9,0.3,0.3,0.05,100,1.0,-1.,0.},/* 5<pt<6 */ | |
1044 | {0.036,1000.*1E-4,1.0,0.8,0.8,1000.*1E-4,1000.*1E-4,100000.*1E-8,0.7,0.3,0.3,0.05,100,1.0,-1.,0.},/* 6<pt<7 */ | |
1045 | {0.036,1000.*1E-4,1.0,0.8,0.8,1200.*1E-4,1200.*1E-4,100000.*1E-8,0.6,0.3,0.3,0.05,100,1.0,-1.,0.},/* 7<pt<8 */ | |
1046 | {0.065,2000.*1E-4,1.0,0.3,0.3,2000.*1E-4,2000.*1E-4,1000000.*1E-8,0.5,0.3,0.3,0.05,100,1.0,-1.,0.},/* 8<pt<10 */ | |
1047 | {0.075,2000.*1E-4,1.0,0.3,0.3,2000.*1E-4,2000.*1E-4,1000000.*1E-8,0.3,0.3,0.3,0.05,100,1.0,-1.,0.},/* 10<pt<12 */ | |
1048 | {0.084,6000.*1E-4,1.0,0.3,0.3,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.1,0.3,0.1,0.05,100,1.0,-1.,0.},/* 12<pt<16 */ | |
1049 | {0.084,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,1.0,-1.,0.},/* 16<pt<20 */ | |
1050 | {0.7,1000.*1E-4,1.0,1.0,1.0,1500.*1E-4,1500.*1E-4,1000000.*1E-8,0.7,0.3,0.1,0.05,100,1.0,-1.,0.}};/* pt>24 */ | |
1051 | ||
1052 | ||
1053 | //CREATE TRANSPOSE MATRIX...REVERSE INDICES as required by AliRDHFCuts | |
1054 | Float_t **cutsMatrixTransposeStand=new Float_t*[nvars]; | |
1055 | for(Int_t iv=0;iv<nvars;iv++)cutsMatrixTransposeStand[iv]=new Float_t[nptbins]; | |
1056 | ||
1057 | for (Int_t ibin=0;ibin<nptbins;ibin++){ | |
1058 | for (Int_t ivar = 0; ivar<nvars; ivar++){ | |
1059 | cutsMatrixTransposeStand[ivar][ibin]=cutsMatrixD0toKpiStand[ibin][ivar]; | |
1060 | } | |
1061 | } | |
1062 | ||
1063 | SetCuts(nvars,nptbins,cutsMatrixTransposeStand); | |
1064 | ||
1065 | for(Int_t iv=0;iv<nvars;iv++) delete [] cutsMatrixTransposeStand[iv]; | |
1066 | delete [] cutsMatrixTransposeStand; | |
1067 | cutsMatrixTransposeStand=NULL; | |
1068 | ||
1069 | // remove daughters from primary vertex | |
1070 | SetRemoveDaughtersFromPrim(rec); | |
1071 | ||
1072 | // PID SETTINGS FOR D* analysis | |
1073 | AliAODPidHF* pidObj=new AliAODPidHF(); | |
1074 | //pidObj->SetName("pid4DSatr"); | |
1075 | Int_t mode=1; | |
1076 | pidObj->SetMatch(mode); | |
1077 | pidObj->SetSigma(0,3); // TPC | |
1078 | pidObj->SetSigma(3,3); // TOF | |
1079 | pidObj->SetTPC(kTRUE); | |
1080 | pidObj->SetTOF(kTRUE); | |
1081 | ||
1082 | SetPidHF(pidObj); | |
1083 | SetUsePID(kTRUE); | |
1084 | pidObj->SetOldPid(kTRUE); | |
1085 | ||
1086 | PrintAll(); | |
1087 | ||
1088 | delete pidObj; | |
1089 | pidObj=NULL; | |
1090 | ||
1091 | return; | |
1092 | ||
1093 | ||
0c22e2ac | 1094 | } |