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