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