27 #include "Riostream.h" 28 #include "TClonesArray.h" 35 #include "TDatabasePDG.h" 37 #include "AliAnalysisDataSlot.h" 38 #include "AliAnalysisDataContainer.h" 39 #include "AliAnalysisManager.h" 40 #include "AliESDtrack.h" 41 #include "AliVertexerTracks.h" 42 #include "AliAODHandler.h" 43 #include "AliAODEvent.h" 44 #include "AliAODVertex.h" 45 #include "AliAODTrack.h" 46 #include "AliAODMCHeader.h" 47 #include "AliAODMCParticle.h" 51 #include "AliAnalysisTaskSE.h" 80 fIsSelectedCandidate(0),
83 fIsRejectSDDClusters(0),
86 fFillImpParHist(kFALSE),
87 fUseSelectionBit(kTRUE),
88 fWriteVariableTree(kFALSE),
90 fCandidateVariables(),
92 fDrawDetSignal(kFALSE),
145 DefineOutput(1,TList::Class());
147 DefineOutput(2,TList::Class());
149 DefineOutput(3,TH1F::Class());
151 DefineOutput(4,AliRDHFCutsD0toKpi::Class());
153 DefineOutput(5,AliNormalizationCounter::Class());
155 DefineOutput(6,TList::Class());
157 DefineOutput(7,TTree::Class());
159 DefineOutput(8, TList::Class());
161 DefineOutput(9, TList::Class());
162 DefineOutput(10,THnSparseF::Class());
189 for(
Int_t i=0; i<5; i++){
218 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass::Init() \n");
222 const char* nameoutput=GetOutputSlot(4)->GetContainer()->GetName();
223 copyfCuts->SetName(nameoutput);
225 PostData(4,copyfCuts);
237 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass::UserCreateOutputObjects() \n");
254 fDistr->SetName(
"distributionslist");
260 TString nameMass=
" ",nameSgn27=
" ",nameSgn=
" ", nameBkg=
" ", nameRfl=
" ",nameMassNocutsS =
" ",nameMassNocutsB =
" ", namedistr=
" ";
261 TString nameMassPt=
"", nameSgnPt=
"", nameBkgPt=
"", nameRflPt=
"";
262 TString nameMassY=
"", nameSgnY=
"", nameBkgY=
"", nameRflY=
"";
268 nameMass=
"histMass_";
270 nameSgn27=
"histSgn27_";
278 nameMassNocutsS=
"hMassS_";
280 nameMassNocutsB=
"hMassB_";
287 namedistr=
"hNclsD0vsptS_";
289 TH2F *hNclsD0vsptS =
new TH2F(namedistr.Data(),
"N cls distrubution [S];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
290 namedistr=
"hNclsD0barvsptS_";
292 TH2F *hNclsD0barvsptS =
new TH2F(namedistr.Data(),
"N cls distrubution [S];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
294 namedistr=
"hNITSpointsD0vsptS_";
296 TH2F *hNITSpointsD0vsptS =
new TH2F(namedistr.Data(),
"N ITS points distrubution [S];p_{T} [GeV/c];N points",200,0.,20.,7,0.,7.);
298 namedistr=
"hNSPDpointsD0S_";
300 TH1I *hNSPDpointsD0S =
new TH1I(namedistr.Data(),
"N SPD points distrubution [S]; ;N tracks",4,0,4);
301 hNSPDpointsD0S->GetXaxis()->SetBinLabel(1,
"no SPD");
302 hNSPDpointsD0S->GetXaxis()->SetBinLabel(2,
"kOnlyFirst");
303 hNSPDpointsD0S->GetXaxis()->SetBinLabel(3,
"kOnlySecond");
304 hNSPDpointsD0S->GetXaxis()->SetBinLabel(4,
"kBoth");
308 TH1F *hptD0S =
new TH1F(namedistr.Data(),
"p_{T} distribution [S];p_{T} [GeV/c]",200,0.,20.);
309 namedistr=
"hptD0barS_";
311 TH1F *hptD0barS =
new TH1F(namedistr.Data(),
"p_{T} distribution [S];p_{T} [GeV/c]",200,0.,20.);
313 namedistr=
"hphiD0S_";
315 TH1F *hphiD0S =
new TH1F(namedistr.Data(),
"#phi distribution [S];#phi [rad]",100,0.,2*TMath::Pi());
316 namedistr=
"hphiD0barS_";
318 TH1F *hphiD0barS =
new TH1F(namedistr.Data(),
"#phi distribution [S];#phi [rad]",100,0.,2*TMath::Pi());
321 namedistr=
"hetaphiD0candidateS_";
323 TH2F *hetaphiD0candidateS =
new TH2F(namedistr.Data(),
"D^{0} candidates #eta #phi distribution [S];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
324 namedistr=
"hetaphiD0barcandidateS_";
326 TH2F *hetaphiD0barcandidateS =
new TH2F(namedistr.Data(),
"anti-D^{0} candidates #eta #phi distribution [S];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
328 namedistr=
"hetaphiD0candidatesignalregionS_";
330 TH2F *hetaphiD0candidatesignalregionS =
new TH2F(namedistr.Data(),
"D^{0} candidates #eta #phi distribution [S] [mass cut];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
331 namedistr=
"hetaphiD0barcandidatesignalregionS_";
333 TH2F *hetaphiD0barcandidatesignalregionS =
new TH2F(namedistr.Data(),
"anti-D^{0} candidates #eta #phi distribution [S] [mass cut];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
338 TH1F *hdcaS =
new TH1F(namedistr.Data(),
"DCA distribution;dca [cm]",200,0.,0.1);
342 TH1F *hd0piS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (pions);d0(#pi) [cm]",200,-0.1,0.1);
346 TH1F *hd0KS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (kaons);d0(K) [cm]",200,-0.1,0.1);
349 TH1F *hd0d0S =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
354 TH1F *hdeclengthS =
new TH1F(namedistr.Data(),
"Decay Length^{2} distribution;Decay Length^{2} [cm]",200,0,0.015);
356 namedistr=
"hnormdeclS_";
358 TH1F *hnormdeclengthS =
new TH1F(namedistr.Data(),
"Normalized Decay Length^{2} distribution;(Decay Length/Err)^{2} ",200,0,12.);
360 namedistr=
"hdeclxyS_";
362 TH1F* hdeclxyS=
new TH1F(namedistr.Data(),
"Decay Length XY distribution;Decay Length XY [cm]",200,0,0.15);
363 namedistr=
"hnormdeclxyS_";
365 TH1F* hnormdeclxyS=
new TH1F(namedistr.Data(),
"Normalized decay Length XY distribution;Decay Length XY/Err",200,0,6.);
367 namedistr=
"hdeclxyd0d0S_";
369 TH2F* hdeclxyd0d0S=
new TH2F(namedistr.Data(),
"Correlation decay Length XY - d_{0}#times d_{0};Decay Length XY [cm];d_{0}#times d_{0}[cm^{2}]",200,0,0.15,200,-0.001,0.001);
371 namedistr=
"hnormdeclxyd0d0S_";
373 TH2F* hnormdeclxyd0d0S=
new TH2F(namedistr.Data(),
"Correlation normalized decay Length XY - d_{0}#times d_{0};Decay Length XY/Err;d_{0}#times d_{0}[cm^{2}]",200,0,6,200,-0.001,0.001);
376 namedistr=
"hcosthetapointS_";
378 TH1F *hcosthetapointS =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
380 namedistr=
"hcosthetapointxyS_";
382 TH1F *hcosthetapointxyS =
new TH1F(namedistr.Data(),
"cos#theta_{Point} XYdistribution;cos#theta_{Point}",300,0.,1.);
384 TH1F* tmpMS =
new TH1F(nameMassNocutsS.Data(),
"D^{0} invariant mass; M [GeV]; Entries",300,1.5648,2.1648);
387 fDistr->Add(hNclsD0vsptS);
388 fDistr->Add(hNclsD0barvsptS);
389 fDistr->Add(hNITSpointsD0vsptS);
390 fDistr->Add(hNSPDpointsD0S);
395 fDistr->Add(hetaphiD0candidateS);
396 fDistr->Add(hetaphiD0candidatesignalregionS);
397 fDistr->Add(hetaphiD0barcandidateS);
398 fDistr->Add(hetaphiD0barcandidatesignalregionS);
407 fDistr->Add(hcosthetapointS);
409 fDistr->Add(hcosthetapointxyS);
413 fDistr->Add(hnormdeclengthS);
417 fDistr->Add(hnormdeclxyS);
419 fDistr->Add(hdeclxyd0d0S);
420 fDistr->Add(hnormdeclxyd0d0S);
428 namedistr=
"hNclsD0vsptB_";
430 TH2F *hNclsD0vsptB =
new TH2F(namedistr.Data(),
"N cls distrubution [B];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
431 namedistr=
"hNclsD0barvsptB_";
433 TH2F *hNclsD0barvsptB =
new TH2F(namedistr.Data(),
"N cls distrubution [B];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
435 namedistr=
"hNITSpointsD0vsptB_";
437 TH2F *hNITSpointsD0vsptB =
new TH2F(namedistr.Data(),
"N ITS points distrubution [B];p_{T} [GeV/c];N points",200,0.,20.,7,0.,7.);
439 namedistr=
"hNSPDpointsD0B_";
441 TH1I *hNSPDpointsD0B =
new TH1I(namedistr.Data(),
"N SPD points distrubution [B]; ;N tracks",4,0,4);
442 hNSPDpointsD0B->GetXaxis()->SetBinLabel(1,
"no SPD");
443 hNSPDpointsD0B->GetXaxis()->SetBinLabel(2,
"kOnlyFirst");
444 hNSPDpointsD0B->GetXaxis()->SetBinLabel(3,
"kOnlySecond");
445 hNSPDpointsD0B->GetXaxis()->SetBinLabel(4,
"kBoth");
449 TH1F *hptD0B =
new TH1F(namedistr.Data(),
"p_{T} distribution [B];p_{T} [GeV/c]",200,0.,20.);
450 namedistr=
"hptD0barB_";
452 TH1F *hptD0barB =
new TH1F(namedistr.Data(),
"p_{T} distribution [B];p_{T} [GeV/c]",200,0.,20.);
454 namedistr=
"hphiD0B_";
456 TH1F *hphiD0B =
new TH1F(namedistr.Data(),
"#phi distribution [B];#phi [rad]",100,0.,2*TMath::Pi());
457 namedistr=
"hphiD0barB_";
459 TH1F *hphiD0barB =
new TH1F(namedistr.Data(),
"#phi distribution [B];#phi [rad]",100,0.,2*TMath::Pi());
461 namedistr=
"hetaphiD0candidateB_";
463 TH2F *hetaphiD0candidateB =
new TH2F(namedistr.Data(),
"D^{0} candidates #eta #phi distribution [B];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
464 namedistr=
"hetaphiD0barcandidateB_";
466 TH2F *hetaphiD0barcandidateB =
new TH2F(namedistr.Data(),
"anti-D^{0} candidates #eta #phi distribution [B];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
468 namedistr=
"hetaphiD0candidatesignalregionB_";
470 TH2F *hetaphiD0candidatesignalregionB =
new TH2F(namedistr.Data(),
"D^{0} candidates #eta #phi distribution [B] [mass cut];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
471 namedistr=
"hetaphiD0barcandidatesignalregionB_";
473 TH2F *hetaphiD0barcandidatesignalregionB =
new TH2F(namedistr.Data(),
"anti-D^{0} candidates #eta #phi distribution [B] [mass cut];#eta;#phi [rad]",100, -1.5, 1.5, 100, 0.,2*TMath::Pi());
478 TH1F *hdcaB =
new TH1F(namedistr.Data(),
"DCA distribution;dca [cm]",200,0.,0.1);
483 TH1F *hd0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
487 TH1F *hd0d0B =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
492 TH1F *hdeclengthB =
new TH1F(namedistr.Data(),
"Decay Length^{2} distribution;Decay Length^{2} [cm^{2}]",200,0,0.015);
494 namedistr=
"hnormdeclB_";
496 TH1F *hnormdeclengthB =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution;(Decay Length/Err)^{2} ",200,0,12.);
498 namedistr=
"hdeclxyB_";
500 TH1F* hdeclxyB=
new TH1F(namedistr.Data(),
"Decay Length XY distribution;Decay Length XY [cm]",200,0,0.15);
501 namedistr=
"hnormdeclxyB_";
503 TH1F* hnormdeclxyB=
new TH1F(namedistr.Data(),
"Normalized decay Length XY distribution;Decay Length XY/Err",200,0,6.);
505 namedistr=
"hdeclxyd0d0B_";
507 TH2F* hdeclxyd0d0B=
new TH2F(namedistr.Data(),
"Correlation decay Length XY - d_{0}#times d_{0};Decay Length XY [cm];d_{0}#times d_{0}[cm^{2}]",200,0,0.15,200,-0.001,0.001);
509 namedistr=
"hnormdeclxyd0d0B_";
511 TH2F* hnormdeclxyd0d0B=
new TH2F(namedistr.Data(),
"Correlation normalized decay Length XY - d_{0}#times d_{0};Decay Length XY/Err;d_{0}#times d_{0}[cm^{2}]",200,0,6,200,-0.001,0.001);
514 namedistr=
"hcosthetapointB_";
516 TH1F *hcosthetapointB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
518 namedistr=
"hcosthetapointxyB_";
520 TH1F *hcosthetapointxyB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} XY distribution;cos#theta_{Point} XY",300,0.,1.);
522 TH1F* tmpMB =
new TH1F(nameMassNocutsB.Data(),
"D^{0} invariant mass; M [GeV]; Entries",300,1.5648,2.1648);
526 fDistr->Add(hNclsD0vsptB);
527 fDistr->Add(hNclsD0barvsptB);
528 fDistr->Add(hNITSpointsD0vsptB);
529 fDistr->Add(hNSPDpointsD0B);
534 fDistr->Add(hetaphiD0candidateB);
535 fDistr->Add(hetaphiD0candidatesignalregionB);
536 fDistr->Add(hetaphiD0barcandidateB);
537 fDistr->Add(hetaphiD0barcandidatesignalregionB);
545 fDistr->Add(hcosthetapointB);
547 fDistr->Add(hcosthetapointxyB);
551 fDistr->Add(hnormdeclengthB);
555 fDistr->Add(hnormdeclxyB);
557 fDistr->Add(hdeclxyd0d0B);
558 fDistr->Add(hnormdeclxyd0d0B);
566 namedistr=
"hd0vpiS_";
568 TH1F *hd0vpiS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (pions)(vtx w/o these tracks);d0(#pi) [cm]",200,-0.1,0.1);
572 TH1F *hd0vKS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (kaons) (vtx w/o these tracks);d0(K) [cm]",200,-0.1,0.1);
574 namedistr=
"hd0d0vS_";
576 TH1F *hd0d0vS =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution (vtx w/o these tracks);d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
578 namedistr=
"hdeclvS_";
580 TH1F *hdeclengthvS =
new TH1F(namedistr.Data(),
"Decay Length distribution (vtx w/o tracks);Decay Length [cm]",200,0,0.6);
582 namedistr=
"hnormdeclvS_";
584 TH1F *hnormdeclengthvS =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution (vtx w/o tracks);Decay Length/Err ",200,0,10.);
589 fDistr->Add(hdeclengthvS);
590 fDistr->Add(hnormdeclengthvS);
594 namedistr=
"hd0vmoresB_";
596 TH1F *hd0vmoresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
598 namedistr=
"hd0d0vmoresB_";
600 TH1F *hd0d0vmoresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.001,0.001);
605 TH1F *hd0vB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
607 namedistr=
"hd0vp0B_";
609 TH1F *hd0vp0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong + ** vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
611 namedistr=
"hd0vp1B_";
613 TH1F *hd0vp1B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong - ** vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
615 namedistr=
"hd0d0vB_";
617 TH1F *hd0d0vB =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution (vtx w/o these tracks);d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
619 namedistr=
"hdeclvB_";
621 TH1F *hdeclengthvB =
new TH1F(namedistr.Data(),
"Decay Length distribution (vtx w/o tracks);Decay Length [cm]",200,0,0.6);
623 namedistr=
"hnormdeclvB_";
625 TH1F *hnormdeclengthvB =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution (vtx w/o tracks);Decay Length/Err ",200,0,10.);
633 fDistr->Add(hd0d0vmoresB);
635 fDistr->Add(hdeclengthvB);
637 fDistr->Add(hnormdeclengthvB);
647 TH1F* tmpSt =
new TH1F(nameSgn.Data(),
"D^{0} invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
649 TH1F *tmpSl=(TH1F*)tmpSt->Clone();
654 TH1F* tmpRt =
new TH1F(nameRfl.Data(),
"Reflected signal invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
656 TH1F* tmpBt =
new TH1F(nameBkg.Data(),
"Background invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
670 TH1F* tmpMt =
new TH1F(nameMass.Data(),
"D^{0} invariant mass; M [GeV]; Entries",600,1.5648,2.1648);
686 TH1F *hptpiS =
new TH1F(namedistr.Data(),
"P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
690 TH1F *hptKS =
new TH1F(namedistr.Data(),
"P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
693 namedistr=
"hcosthetastarS_";
695 TH1F *hcosthetastarS =
new TH1F(namedistr.Data(),
"cos#theta* distribution;cos#theta*",200,-1.,1.);
699 namedistr=
"hptpiSnoMcut_";
701 TH1F *hptpiSnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
703 namedistr=
"hptKSnoMcut_";
705 TH1F *hptKSnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
709 fDistr->Add(hcosthetastarS);
711 fDistr->Add(hptpiSnoMcut);
715 namedistr=
"hcosthpointd0S_";
717 TH2F *hcosthpointd0S=
new TH2F(namedistr.Data(),
"Correlation cos#theta_{Point}-d_{0};cos#theta_{Point};d_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
718 namedistr=
"hcosthpointd0d0S_";
720 TH2F *hcosthpointd0d0S=
new TH2F(namedistr.Data(),
"Correlation cos#theta_{Point}-d_{0}#timesd_{0};cos#theta_{Point};d_{0}#timesd_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
722 fDistr->Add(hcosthpointd0S);
723 fDistr->Add(hcosthpointd0d0S);
726 TH1F* tmpS27t =
new TH1F(nameSgn27.Data(),
"D^{0} invariant mass in M(D^{0}) +/- 27 MeV - MC; M [GeV]; Entries",600,1.5648,2.1648);
727 TH1F *tmpS27l=(TH1F*)tmpS27t->Clone();
739 TH1F *hptB =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
742 namedistr=
"hcosthetastarB_";
744 TH1F *hcosthetastarB =
new TH1F(namedistr.Data(),
"cos#theta* distribution;cos#theta*",200,-1.,1.);
747 namedistr=
"hptB1prongnoMcut_";
749 TH1F *hptB1pnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
751 namedistr=
"hptB2prongsnoMcut_";
753 TH1F *hptB2pnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
756 fDistr->Add(hcosthetastarB);
758 fDistr->Add(hptB1pnoMcut);
759 fDistr->Add(hptB2pnoMcut);
764 TH1F *hd0p0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.1,0.1);
768 TH1F *hd0p1B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong -);d0 [cm]",200,-0.1,0.1);
771 namedistr=
"hd0moresB_";
773 TH1F *hd0moresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
775 namedistr=
"hd0d0moresB_";
777 TH1F *hd0d0moresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.001,0.001);
780 namedistr=
"hcosthetapointmoresB_";
782 TH1F *hcosthetapointmoresB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
785 namedistr=
"hcosthpointd0B_";
787 TH2F *hcosthpointd0B=
new TH2F(namedistr.Data(),
"Correlation cos#theta_{Point}-d_{0};cos#theta_{Point};d_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
789 namedistr=
"hcosthpointd0d0B_";
791 TH2F *hcosthpointd0d0B=
new TH2F(namedistr.Data(),
"Correlation cos#theta_{Point}-d_{0}#timesd_{0};cos#theta_{Point};d_{0}#timesd_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
798 fDistr->Add(hcosthetapointmoresB);
801 fDistr->Add(hcosthpointd0B);
804 fDistr->Add(hcosthpointd0d0B);
814 namedistr=
"hpospair";
816 namedistr=
"hnegpair";
826 nameMassPt=
"histMassPt";
827 nameSgnPt=
"histSgnPt";
828 nameBkgPt=
"histBkgPt";
829 nameRflPt=
"histRflPt";
833 TH2F* tmpStPt =
new TH2F(nameSgnPt.Data(),
"D^{0} invariant mass - MC; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.16484,nbins2dPt,binInPt,binFinPt);
834 TH2F *tmpSlPt=(
TH2F*)tmpStPt->Clone();
839 TH2F* tmpRtPt =
new TH2F(nameRflPt.Data(),
"Reflected signal invariant mass - MC; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.1648,nbins2dPt,binInPt,binFinPt);
840 TH2F* tmpBtPt =
new TH2F(nameBkgPt.Data(),
"Background invariant mass - MC; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.1648,nbins2dPt,binInPt,binFinPt);
854 TH2F* tmpMtPt =
new TH2F(nameMassPt.Data(),
"D^{0} invariant mass; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.1648,nbins2dPt,binInPt,binFinPt);
866 nameMassY=
"histMassY_";
868 nameSgnY=
"histSgnY_";
870 nameBkgY=
"histBkgY_";
872 nameRflY=
"histRflY_";
876 TH2F* tmpStY =
new TH2F(nameSgnY.Data(),
"D^{0} invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.16484,nbins2dY,binInY,binFinY);
879 TH2F* tmpRtY =
new TH2F(nameRflY.Data(),
"Reflected signal invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
880 TH2F* tmpBtY =
new TH2F(nameBkgY.Data(),
"Background invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
888 TH2F* tmpMtY =
new TH2F(nameMassY.Data(),
"D^{0} invariant mass; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
895 const char* nameoutput=GetOutputSlot(3)->GetContainer()->GetName();
897 fNentries=
new TH1F(nameoutput,
"Integral(1,2) = number of AODs *** Integral(2,3) = number of candidates selected with cuts *** Integral(3,4) = number of D0 selected with cuts *** Integral(4,5) = events with good vertex *** Integral(5,6) = pt out of bounds", 18,-0.5,17.5);
899 fNentries->GetXaxis()->SetBinLabel(1,
"nEventsAnal");
900 fNentries->GetXaxis()->SetBinLabel(2,
"nCandSel(Cuts)");
902 else fNentries->GetXaxis()->SetBinLabel(3,
"Dstar<-D0");
903 fNentries->GetXaxis()->SetBinLabel(4,
"nEventsGoodVtxS");
904 fNentries->GetXaxis()->SetBinLabel(5,
"ptbin = -1");
905 fNentries->GetXaxis()->SetBinLabel(6,
"no daughter");
906 if(
fSys==0)
fNentries->GetXaxis()->SetBinLabel(7,
"nCandSel(Tr)");
908 fNentries->GetXaxis()->SetBinLabel(8,
"PID=0");
909 fNentries->GetXaxis()->SetBinLabel(9,
"PID=1");
910 fNentries->GetXaxis()->SetBinLabel(10,
"PID=2");
911 fNentries->GetXaxis()->SetBinLabel(11,
"PID=3");
914 fNentries->GetXaxis()->SetBinLabel(12,
"K");
915 fNentries->GetXaxis()->SetBinLabel(13,
"Lambda");
917 fNentries->GetXaxis()->SetBinLabel(14,
"Pile-up Rej");
918 fNentries->GetXaxis()->SetBinLabel(15,
"N. of 0SMH");
919 if(
fSys==1)
fNentries->GetXaxis()->SetBinLabel(16,
"Nev in centr");
921 fNentries->GetXaxis()->SetBinLabel(18,
"Phys.Sel.Rej");
922 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
930 nameoutput = GetOutputSlot(7)->GetContainer()->GetName();
935 fCandidateVariableNames[0] =
"massD0";
936 fCandidateVariableNames[1] =
"massD0bar";
937 fCandidateVariableNames[2] =
"pt";
938 fCandidateVariableNames[3] =
"dca";
939 fCandidateVariableNames[4] =
"costhsD0";
940 fCandidateVariableNames[5] =
"costhsD0bar";
941 fCandidateVariableNames[6] =
"ptk";
942 fCandidateVariableNames[7] =
"ptpi";
943 fCandidateVariableNames[8] =
"d0k";
944 fCandidateVariableNames[9] =
"d0pi";
945 fCandidateVariableNames[10] =
"d0xd0";
946 fCandidateVariableNames[11] =
"costhp";
947 fCandidateVariableNames[12] =
"costhpxy";
948 fCandidateVariableNames[13] =
"lxy";
949 fCandidateVariableNames[14] =
"specialcuts";
958 TH2F *TOFSigBefPID =
new TH2F(
"TOFSigBefPID",
"TOF signal of daughters before PID;p(daught)(GeV/c);Signal", 500, 0, 10, 5000, 0, 50e3);
959 TH2F *TOFSigAftPID =
new TH2F(
"TOFSigAftPID",
"TOF signal after PID;p(daught)(GeV/c);Signal", 500, 0, 10, 5000, 0, 50e3);
961 TH2F *TPCSigBefPID =
new TH2F(
"TPCSigBefPID",
"TPC dE/dx before PID;p(daught)(GeV/c);dE/dx (arb. units)", 1000, 0, 10, 1000, 0, 500);
962 TH2F *TPCSigAftPID =
new TH2F(
"TPCSigAftPID",
"TPC dE/dx after PID;p(daught)(GeV/c);dE/dx (arb. units)", 1000, 0, 10, 1000, 0, 500);
1026 bname=
"LikeSign2Prong";
1029 TClonesArray *inputArray=0;
1031 if(!aod && AODEvent() && IsStandardAOD()) {
1037 AliAODHandler* aodHandler = (AliAODHandler*)
1038 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
1040 if(aodHandler->GetExtensions()) {
1041 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
1043 inputArray=(TClonesArray*)aodFromExt->GetList()->FindObject(bname.Data());
1046 inputArray=(TClonesArray*)aod->GetList()->FindObject(bname.Data());
1050 if(!inputArray || !aod) {
1051 printf(
"AliAnalysisTaskSED0MassCutVarFDSub::UserExec: input branch not found!\n");
1057 if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001)
return;
1060 TClonesArray *mcArray = 0;
1061 AliAODMCHeader *mcHeader = 0;
1065 mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
1067 printf(
"AliAnalysisTaskSED0MassCutVarFDSub::UserExec: MC particles branch not found!\n");
1072 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1074 printf(
"AliAnalysisTaskSED0MassCutVarFDSub::UserExec: MC header branch not found!\n");
1087 TString trigclass=aod->GetFiredTriggerClasses();
1088 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fNentries->Fill(14);
1100 Bool_t skipEvent = kFALSE;
1102 if (aod) ntracks = aod->GetNumberOfTracks();
1103 for(
Int_t itrack=0; itrack<ntracks; itrack++) {
1105 AliVTrack * track = aod->GetTrack(itrack);
1106 if(TESTBIT(track->GetITSClusterMap(),2) || TESTBIT(track->GetITSClusterMap(),3) ){
1112 if (skipEvent)
return;
1116 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
1121 TString primTitle = vtx1->GetTitle();
1122 if(primTitle.Contains(
"VertexerTracks") && vtx1->GetNContributors()>0) {
1128 Int_t nInD0toKpi = inputArray->GetEntriesFast();
1129 if(fDebug>2) printf(
"Number of D0->Kpi: %d\n",nInD0toKpi);
1133 Int_t nSelectedloose=0,nSelectedtight=0;
1134 for (
Int_t iD0toKpi = 0; iD0toKpi < nInD0toKpi; iD0toKpi++) {
1156 if(ptbin==-1) {
fNentries->Fill(4);
continue;}
1164 AliDebug(1,
"at least one daughter not found!");
1179 Int_t isSelectedPIDfill = 3;
1182 if (isSelectedPIDfill == 0)
fNentries->Fill(7);
1183 if (isSelectedPIDfill == 1)
fNentries->Fill(8);
1184 if (isSelectedPIDfill == 2)
fNentries->Fill(9);
1185 if (isSelectedPIDfill == 3)
fNentries->Fill(10);
1216 AliESDtrack *esdtrack1 =
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(0));
1217 AliESDtrack *esdtrack2 =
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(1));
1221 Int_t isSelectedPIDfill = 3;
1226 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigBefPID"))->Fill(esdtrack1->P(), esdtrack1->GetTOFsignal());
1227 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigBefPID"))->Fill(esdtrack2->P(), esdtrack2->GetTOFsignal());
1228 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigBefPID"))->Fill(esdtrack1->P(), esdtrack1->GetTPCsignal());
1229 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigBefPID"))->Fill(esdtrack2->P(), esdtrack2->GetTPCsignal());
1231 if (isSelectedPIDfill != 0) {
1232 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigAftPID"))->Fill(esdtrack1->P(), esdtrack1->GetTOFsignal());
1233 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigAftPID"))->Fill(esdtrack2->P(), esdtrack2->GetTOFsignal());
1234 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigAftPID"))->Fill(esdtrack1->P(), esdtrack1->GetTPCsignal());
1235 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigAftPID"))->Fill(esdtrack2->P(), esdtrack2->GetTPCsignal());
1252 Int_t pdgDgD0toKpi[2]={321,211};
1254 if(
fReadMC) lab=part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
1256 Int_t isSelectedPID=3;
1259 if (isSelectedPID==0)
fNentries->Fill(7);
1260 if (isSelectedPID==1)
fNentries->Fill(8);
1261 if (isSelectedPID==2)
fNentries->Fill(9);
1262 if (isSelectedPID==3)
fNentries->Fill(10);
1273 Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
1284 TString fillthispi=
"",fillthisK=
"",fillthis=
"", fillthispt=
"", fillthisetaphi=
"";
1289 Double_t dz1[2],dz2[2],covar1[3],covar2[3];
1290 dz1[0]=-99; dz2[0]=-99;
1300 AliAODVertex *vtxProp=0x0;
1306 AliESDtrack *esdtrack1=
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(0));
1307 AliESDtrack *esdtrack2=
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(1));
1308 esdtrack1->PropagateToDCA(vtxProp,aod->GetMagneticField(),1.,dz1,covar1);
1309 esdtrack2->PropagateToDCA(vtxProp,aod->GetMagneticField(),1.,dz2,covar2);
1310 delete vtxProp; vtxProp=NULL;
1327 Double_t normalizedDecayLength2 = -1, normalizedDecayLengthxy=-1;
1328 Double_t decayLength2 = -1, decayLengthxy=-1;
1343 if(!prong0 || !prong1) {
1348 labprong[0]=prong0->GetLabel();
1349 labprong[1]=prong1->GetLabel();
1351 AliAODMCParticle *mcprong=0;
1352 Int_t pdgProng[2]={0,0};
1354 for (
Int_t iprong=0;iprong<2;iprong++){
1355 if(
fReadMC && labprong[iprong]>=0) {
1356 mcprong= (AliAODMCParticle*)arrMC->At(labprong[iprong]);
1357 pdgProng[iprong]=mcprong->GetPdgCode();
1364 fillthispi=
"hptpiSnoMcut_";
1367 fillthisK=
"hptKSnoMcut_";
1370 if ((TMath::Abs(pdgProng[0]) == 211 && TMath::Abs(pdgProng[1]) == 321)
1371 || (isSelectedPID==1 || isSelectedPID==3)){
1372 ((TH1F*)listout->FindObject(fillthispi))->Fill(prong0->Pt());
1373 ((TH1F*)listout->FindObject(fillthisK))->Fill(prong1->Pt());
1376 if ((TMath::Abs(pdgProng[0]) == 321 && TMath::Abs(pdgProng[1]) == 211)
1377 || (isSelectedPID==2 || isSelectedPID==3)){
1378 ((TH1F*)listout->FindObject(fillthisK))->Fill(prong0->Pt());
1379 ((TH1F*)listout->FindObject(fillthispi))->Fill(prong1->Pt());
1391 fillthispt=
"histSgnPt";
1393 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)
1394 || (!
fReadMC && (isSelectedPID==1 || isSelectedPID==3))){
1395 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0);
1398 fillthisetaphi=
"hetaphiD0candidateS_";
1399 fillthisetaphi+=ptbin;
1400 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1402 if(TMath::Abs(minvD0-mPDG)<0.05){
1403 fillthisetaphi=
"hetaphiD0candidatesignalregionS_";
1404 fillthisetaphi+=ptbin;
1405 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1411 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0bar);
1414 fillthisetaphi=
"hetaphiD0barcandidateS_";
1415 fillthisetaphi+=ptbin;
1416 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1418 if(TMath::Abs(minvD0bar-mPDG)<0.05){
1419 fillthisetaphi=
"hetaphiD0barcandidatesignalregionS_";
1420 fillthisetaphi+=ptbin;
1421 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1428 if(TMath::Abs(minvD0-mPDG)<invmasscut || TMath::Abs(minvD0bar-mPDG)<invmasscut){
1438 ptProng[0]=prong0->Pt(); ptProng[1]=prong1->Pt();
1439 d0Prong[0]=part->Getd0Prong(0); d0Prong[1]=part->Getd0Prong(1);
1441 if(
fArray==1) cout<<
"LS signal: ERROR"<<endl;
1442 for (
Int_t iprong=0; iprong<2; iprong++){
1444 if (
fReadMC) labprong[iprong]=prong->GetLabel();
1448 if(
fReadMC && labprong[iprong]>=0) {
1449 mcprong= (AliAODMCParticle*)arrMC->At(labprong[iprong]);
1450 pdgprong=mcprong->GetPdgCode();
1453 Bool_t isPionHere[2]={(isSelectedPID==1 || isSelectedPID==3) ? kTRUE : kFALSE,(isSelectedPID==2 || isSelectedPID==3) ? kTRUE : kFALSE};
1455 if(TMath::Abs(pdgprong)==211 || isPionHere[iprong]) {
1459 fillthispi=
"hptpiS_";
1461 ((TH1F*)listout->FindObject(fillthispi))->Fill(ptProng[iprong]);
1464 fillthispi=
"hd0piS_";
1466 ((TH1F*)listout->FindObject(fillthispi))->Fill(d0Prong[iprong]);
1469 fillthispi=
"hd0vpiS_";
1471 ((TH1F*)listout->FindObject(fillthispi))->Fill(d0[iprong]);
1476 if(TMath::Abs(pdgprong)==321 || !isPionHere[iprong]) {
1481 ((TH1F*)listout->FindObject(fillthisK))->Fill(ptProng[iprong]);
1487 ((TH1F*)listout->FindObject(fillthisK))->Fill(d0Prong[iprong]);
1489 fillthisK=
"hd0vKS_";
1491 ((TH1F*)listout->FindObject(fillthisK))->Fill(d0[iprong]);
1496 fillthis=
"hcosthpointd0S_";
1498 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[iprong]);
1504 ((TH1F*)listout->FindObject(fillthis))->Fill(part->GetDCA());
1506 fillthis=
"hcosthetapointS_";
1508 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle);
1510 fillthis=
"hcosthetapointxyS_";
1517 ((TH1F*)listout->FindObject(fillthis))->Fill(part->
Prodd0d0());
1521 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLength2);
1523 fillthis=
"hnormdeclS_";
1525 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLength2);
1527 fillthis=
"hdeclxyS_";
1529 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLengthxy);
1531 fillthis=
"hnormdeclxyS_";
1533 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy);
1535 fillthis=
"hdeclxyd0d0S_";
1537 ((
TH2F*)listout->FindObject(fillthis))->Fill(decayLengthxy,d0Prong[0]*d0Prong[1]);
1539 fillthis=
"hnormdeclxyd0d0S_";
1541 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy,d0Prong[0]*d0Prong[1]);
1544 fillthis=
"hdeclvS_";
1546 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[0]);
1548 fillthis=
"hnormdeclvS_";
1550 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[1]);
1552 fillthis=
"hd0d0vS_";
1554 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1]);
1558 fillthis=
"hcosthetastarS_";
1560 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)) ((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0);
1562 if (
fReadMC || isSelectedPID>1)((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0bar);
1563 if(isSelectedPID==1 || isSelectedPID==3)((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0);
1566 fillthis=
"hcosthpointd0d0S_";
1568 ((
TH2F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,part->
Prodd0d0());
1571 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)){
1572 for(
Int_t it=0; it<2; it++){
1575 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
1576 fillthis=
"hphiD0S_";
1578 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
1579 Int_t nPointsITS = 0;
1580 for (
Int_t il=0; il<6; il++){
1581 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
1583 fillthis=
"hNITSpointsD0vsptS_";
1585 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(),nPointsITS);
1586 fillthis=
"hNSPDpointsD0S_";
1588 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
1589 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
1591 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
1592 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
1594 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1595 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
1597 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1598 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
1600 fillthis=
"hNclsD0vsptS_";
1604 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
1608 if (
fReadMC || isSelectedPID>1){
1609 for(
Int_t it=0; it<2; it++){
1610 fillthis=
"hptD0barS_";
1612 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
1613 fillthis=
"hphiD0barS_";
1615 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
1616 fillthis=
"hNclsD0barvsptS_";
1620 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
1623 if(isSelectedPID==1 || isSelectedPID==3){
1624 for(
Int_t it=0; it<2; it++){
1627 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
1628 fillthis=
"hphiD0S_";
1630 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
1631 Int_t nPointsITS = 0;
1632 for (
Int_t il=0; il<6; il++){
1633 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
1635 fillthis=
"hNITSpointsD0vsptS_";
1637 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(), nPointsITS);
1638 fillthis=
"hNSPDpointsD0S_";
1640 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
1641 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
1643 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
1644 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
1646 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1647 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
1649 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1650 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
1652 fillthis=
"hNclsD0vsptS_";
1656 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
1674 fillthispt=
"histBkgPt";
1677 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0);
1680 fillthisetaphi=
"hetaphiD0candidateB_";
1681 fillthisetaphi+=ptbin;
1682 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1684 if(TMath::Abs(minvD0-mPDG)<0.05){
1685 fillthisetaphi=
"hetaphiD0candidatesignalregionB_";
1686 fillthisetaphi+=ptbin;
1687 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1691 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0bar);
1694 fillthisetaphi=
"hetaphiD0barcandidateB_";
1695 fillthisetaphi+=ptbin;
1696 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1698 if(TMath::Abs(minvD0bar-mPDG)<0.05){
1699 fillthisetaphi=
"hetaphiD0barcandidatesignalregionB_";
1700 fillthisetaphi+=ptbin;
1701 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
1706 fillthis=
"hptB1prongnoMcut_";
1709 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
1711 fillthis=
"hptB2prongsnoMcut_";
1713 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
1714 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
1719 if(TMath::Abs(minvD0-mPDG)<invmasscut || TMath::Abs(minvD0bar-mPDG)<invmasscut){
1731 d0Prong[0]=part->Getd0Prong(0); d0Prong[1]=part->Getd0Prong(1);
1736 if(fDebug>2) cout<<
"No daughter found";
1741 if(prongg->Charge()==1) {
1743 ((TH1F*)
fOutputMass->FindObject(
"hpospair"))->Fill(ptbin);
1746 ((TH1F*)
fOutputMass->FindObject(
"hnegpair"))->Fill(ptbin);
1754 for(
Int_t it=0; it<2; it++){
1757 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
1758 fillthis=
"hphiD0B_";
1760 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
1762 Int_t nPointsITS = 0;
1763 for (
Int_t il=0; il<6; il++){
1764 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
1766 fillthis=
"hNITSpointsD0vsptB_";
1768 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(), nPointsITS);
1769 fillthis=
"hNSPDpointsD0B_";
1771 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
1772 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
1774 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
1775 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
1777 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1778 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
1780 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
1781 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
1783 fillthis=
"hNclsD0vsptB_";
1787 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
1794 for(
Int_t it=0; it<2; it++){
1795 fillthis=
"hptD0barB_";
1797 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
1798 fillthis=
"hphiD0barB_";
1800 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
1801 fillthis=
"hNclsD0barvsptB_";
1805 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
1811 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]);
1812 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[1]);
1815 Int_t pdgMother[2]={0,0};
1818 for(
Int_t iprong=0;iprong<2;iprong++){
1820 lab=prong->GetLabel();
1822 AliAODMCParticle* mcprong=(AliAODMCParticle*)arrMC->At(lab);
1824 Int_t labmom=mcprong->GetMother();
1826 AliAODMCParticle* mcmother=(AliAODMCParticle*)arrMC->At(labmom);
1827 if(mcmother) pdgMother[iprong]=mcmother->GetPdgCode();
1834 fillthis=
"hd0moresB_";
1837 if(TMath::Abs(pdgMother[iprong])==310 || TMath::Abs(pdgMother[iprong])==130 || TMath::Abs(pdgMother[iprong])==321){
1838 if(ptProng[iprong]<=1)factor[iprong]=1./.7;
1839 else factor[iprong]=1./.6;
1843 if(TMath::Abs(pdgMother[iprong])==3122) {
1844 factor[iprong]=1./0.25;
1847 fillthis=
"hd0moresB_";
1850 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[iprong],factor[iprong]);
1853 fillthis=
"hd0vmoresB_";
1855 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[iprong],factor[iprong]);
1861 fillthis=
"hd0d0moresB_";
1863 ((TH1F*)listout->FindObject(fillthis))->Fill(part->
Prodd0d0(),factor[0]*factor[1]);
1865 fillthis=
"hcosthetapointmoresB_";
1867 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,factor[0]*factor[1]);
1870 fillthis=
"hd0d0vmoresB_";
1872 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1],factor[0]*factor[1]);
1881 ((TH1F*)listout->FindObject(fillthis))->Fill(ptProng[0]);
1882 ((TH1F*)listout->FindObject(fillthis))->Fill(ptProng[1]);
1884 fillthis=
"hcosthetastarB_";
1892 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]);
1895 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[1]);
1897 fillthis=
"hcosthpointd0d0B_";
1899 ((
TH2F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,part->
Prodd0d0());
1901 fillthis=
"hcosthpointd0B_";
1903 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[0]);
1904 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[1]);
1909 fillthis=
"hd0vp0B_";
1911 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]);
1912 fillthis=
"hd0vp1B_";
1914 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[1]);
1918 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]);
1919 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[1]);
1927 ((TH1F*)listout->FindObject(fillthis))->Fill(part->GetDCA());
1931 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]*d0Prong[1]);
1934 fillthis=
"hd0d0vB_";
1936 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1]);
1939 fillthis=
"hcosthetapointB_";
1941 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle);
1943 fillthis=
"hcosthetapointxyB_";
1949 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLength2);
1951 fillthis=
"hnormdeclB_";
1953 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLength2);
1955 fillthis=
"hdeclxyB_";
1957 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLengthxy);
1959 fillthis=
"hnormdeclxyB_";
1961 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy);
1963 fillthis=
"hdeclxyd0d0B_";
1965 ((
TH2F*)listout->FindObject(fillthis))->Fill(decayLengthxy,d0Prong[0]*d0Prong[1]);
1967 fillthis=
"hnormdeclxyd0d0B_";
1969 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy,d0Prong[0]*d0Prong[1]);
1974 fillthis=
"hdeclvB_";
1976 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[0]);
1978 fillthis=
"hnormdeclvB_";
1980 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[1]);
1997 Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
2032 if(fDebug>2) cout<<
"Candidate selected"<<endl;
2042 Double_t arrayForSparse[3]={invmassD0,pt,impparXY};
2043 Double_t arrayForSparseTrue[3]={invmassD0,pt,trueImpParXY};
2073 TString fillthis=
"", fillthispt=
"", fillthismasspt=
"", fillthismassy=
"";
2074 Int_t pdgDgD0toKpi[2]={321,211};
2077 if (
fReadMC) labD0 = part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
2086 if (weigD0 > 1.0 || weigD0 < 0.) {weigD0 = 0.;}
2087 if (weigD0bar > 1.0 || weigD0bar < 0.) {weigD0bar = 0.;}
2097 arrayForSparse[0]=invmassD0; arrayForSparse[2]=impparXY;
2101 if(
fArray==1) cout<<
"LS signal ERROR"<<endl;
2103 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
2104 Int_t pdgD0 = partD0->GetPdgCode();
2107 if(
CheckOrigin(arrMC,partD0)==5) isPrimary=kFALSE;
2110 arrayForSparseTrue[0]=invmassD0; arrayForSparseTrue[2]=trueImpParXY;
2114 fillthis=
"histSgn_";
2116 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
2119 fillthismasspt=
"histSgnPt";
2120 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
2131 fillthismassy=
"histSgnY_";
2132 fillthismassy+=ptbin;
2133 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
2138 fillthis=
"histSgn27_";
2140 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
2144 fillthis=
"histRfl_";
2146 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
2149 fillthismasspt=
"histRflPt";
2151 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
2155 fillthismassy=
"histRflY_";
2156 fillthismassy+=ptbin;
2158 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
2163 fillthis=
"histBkg_";
2165 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
2168 fillthismasspt=
"histBkgPt";
2170 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
2175 fillthismassy=
"histBkgY_";
2176 fillthismassy+=ptbin;
2178 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
2184 fillthis=
"histMass_";
2189 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
2193 fillthismasspt=
"histMassPt";
2195 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
2203 fillthismassy=
"histMassY_";
2204 fillthismassy+=ptbin;
2206 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
2214 arrayForSparse[0]=invmassD0bar; arrayForSparse[2]=impparXY;
2218 if(
fArray==1) cout<<
"LS signal ERROR"<<endl;
2219 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
2220 Int_t pdgD0 = partD0->GetPdgCode();
2223 if(
CheckOrigin(arrMC,partD0)==5) isPrimary=kFALSE;
2226 arrayForSparseTrue[0]=invmassD0bar; arrayForSparseTrue[2]=trueImpParXY;
2229 fillthis=
"histSgn_";
2231 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
2239 fillthismasspt=
"histSgnPt";
2241 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
2253 fillthismassy=
"histSgnY_";
2254 fillthismassy+=ptbin;
2256 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
2260 fillthis=
"histRfl_";
2262 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
2264 fillthismasspt=
"histRflPt";
2266 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
2269 fillthismassy=
"histRflY_";
2270 fillthismassy+=ptbin;
2272 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
2276 fillthis=
"histBkg_";
2278 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
2281 fillthismasspt=
"histBkgPt";
2283 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
2287 fillthismassy=
"histBkgY_";
2288 fillthismassy+=ptbin;
2290 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
2294 fillthis=
"histMass_";
2298 ((TH1F*)listout->FindObject(fillthis))->Fill(invmassD0bar,weigD0bar);
2302 fillthismasspt=
"histMassPt";
2304 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
2308 fillthismassy=
"histMassY_";
2309 fillthismassy+=ptbin;
2311 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
2324 Int_t nTrksToSkip=2;
2327 AliDebug(2,
"no daughter found!");
2330 skipped[0]=dgTrack->GetID();
2333 AliDebug(2,
"no daughter found!");
2336 skipped[1]=dgTrack->GetID();
2338 AliESDVertex *vertexESD=0x0;
2339 AliAODVertex *vertexAOD=0x0;
2340 AliVertexerTracks *vertexer =
new AliVertexerTracks(aodev->GetMagneticField());
2343 vertexer->SetSkipTracks(nTrksToSkip,skipped);
2344 vertexer->SetMinClusters(4);
2345 vertexESD = (AliESDVertex*)vertexer->FindPrimaryVertex(aodev);
2346 if(!vertexESD)
return vertexAOD;
2347 if(vertexESD->GetNContributors()<=0) {
2348 AliDebug(2,
"vertexing failed");
2349 delete vertexESD; vertexESD=NULL;
2353 delete vertexer; vertexer=NULL;
2358 vertexESD->GetXYZ(pos);
2359 vertexESD->GetCovMatrix(cov);
2360 chi2perNDF = vertexESD->GetChi2toNDF();
2361 delete vertexESD; vertexESD=NULL;
2363 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF);
2374 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass: Terminate() \n");
2379 printf(
"ERROR: fOutputMass not available\n");
2384 printf(
"ERROR: fOutputMass not available\n");
2391 printf(
"ERROR: fDistr not available\n");
2396 fNentries =
dynamic_cast<TH1F*
>(GetOutputData(3));
2399 printf(
"ERROR: fNEntries not available\n");
2404 printf(
"ERROR: fCuts not available\n");
2409 printf(
"ERROR: fCounter not available\n");
2415 printf(
"ERROR: fDetSignal not available\n");
2422 printf(
"ERROR: fOutputMassY not available\n");
2431 fLsNormalization = 2.*TMath::Sqrt(((TH1F*)
fOutputMass->FindObject(
"hpospair"))->Integral(nptbins+ipt+1,nptbins+ipt+2)*((TH1F*)
fOutputMass->FindObject(
"hnegpair"))->Integral(nptbins+ipt+1,nptbins+ipt+2));
2454 nameDistr=
"hd0d0B_";
2457 nameDistr=
"hcosthetapointB_";
2464 nameDistr=
"hcosthetastarB_";
2467 nameDistr=
"hcosthpointd0d0B_";
2484 TCanvas *cMass=
new TCanvas(cvname,cvname);
2488 TCanvas* cStat=
new TCanvas(cstname,Form(
"Stat%s",
fArray ?
"LS" :
"D0"));
2504 Int_t nmassbins=200;
2505 Double_t fLowmasslimit=1.5648, fUpmasslimit=2.1648;
2506 Int_t fNImpParBins=400;
2507 Double_t fLowerImpPar=-2000., fHigherImpPar=2000.;
2509 Double_t xmin[3]={fLowmasslimit,0.,fLowerImpPar};
2510 Double_t xmax[3]={fUpmasslimit,20.,fHigherImpPar};
2514 "Mass vs. pt vs.imppar - All",
2517 "Mass vs. pt vs.imppar - promptD",
2520 "Mass vs. pt vs.imppar - DfromB",
2523 "Mass vs. pt vs.true imppar -DfromB",
2526 "Mass vs. pt vs.imppar - backgr.",
2529 for(
Int_t i=0; i<5;i++){
2538 printf(
" AliAnalysisTaskSED0MassCutVarFDSubV1::GetTrueImpactParameter() \n");
2541 mcHeader->GetVertex(vtxTrue);
2543 partD0->XvYvZv(origD);
2545 Double_t pXdauTrue[2],pYdauTrue[2],pZdauTrue[2];
2546 for(
Int_t iDau=0; iDau<2; iDau++){
2553 Int_t labelFirstDau = partD0->GetDaughter(0);
2555 for(
Int_t iDau=0; iDau<2; iDau++){
2556 Int_t ind = labelFirstDau+iDau;
2557 AliAODMCParticle*
part =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(ind));
2559 Int_t pdgCode = TMath::Abs( part->GetPdgCode() );
2561 AliError(
"Daughter particle not found in MC array");
2564 if(pdgCode==211 || pdgCode==321){
2565 pXdauTrue[iDau]=part->Px();
2566 pYdauTrue[iDau]=part->Py();
2567 pZdauTrue[iDau]=part->Pz();
2572 AliAODRecoDecayHF aodDzeroMC(vtxTrue,origD,2,charge,pXdauTrue,pYdauTrue,pZdauTrue,d0dummy);
2582 printf(
" AliAnalysisTaskSED0MassCutVarFDSubV1::CheckOrigin() \n");
2584 Int_t pdgGranma = 0;
2586 mother = mcPartCandidate->GetMother();
2588 Int_t abspdgGranma =0;
2590 Bool_t isQuarkFound=kFALSE;
2593 AliAODMCParticle* mcGranma =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(mother));
2595 pdgGranma = mcGranma->GetPdgCode();
2596 abspdgGranma = TMath::Abs(pdgGranma);
2597 if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
2600 if(abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE;
2601 mother = mcGranma->GetMother();
2603 AliError(
"Failed casting the mother particle!");
2608 if(isFromB)
return 5;
Double_t NormalizedDecayLengthXY() const
virtual void Terminate(Option_t *option)
THnSparseF * fhsparsecutvar
object for cut variation study
AliNormalizationCounter * fCounter
flag to use the particle identification to fill the signal histograms of distributions. It has effect only with fReadMC=kFALSE
void Draw(const char *filename, const char *title="", const char *others="ALL", const char *options="DEFAULT", const char *outFlg="ALL", UShort_t rebin=5, Float_t eff=0, const char *base="")
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
Int_t fFillOnlyD0D0bar
normalization
Bool_t GetCombPID() const
Bool_t HasSelectionBit(Int_t i) const
void UnsetOwnPrimaryVtx()
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Bool_t fUseSelectionBit
flag to fill Pt and Impact Parameter Histograms
Float_t GetTrueImpactParameter(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partD0) const
Double_t NormalizedDecayLength2() const
Double_t ImpParXY() const
virtual void UserExec(Option_t *option)
Bool_t fUsePid4Distr
flag to decide if apply cut also on distributions: 0 no cuts, 1 looser cuts, 2 tighter cuts ...
AliAnalysisTaskSED0MassCutVarFDSub()
Class for storing and handling D0 meson candidates properties // for estimating the feed-down fractio...
THnSparseF * fHistMassPtImpParTC[5]
! histograms for impact paramter studies
Int_t GetWhyRejection() const
Double_t CosPointingAngleXY() const
Double_t InvMassD0() const
ULong_t GetSelectionMap() const
Double_t Prodd0d0() const
AliAODVertex * GetPrimaryVtxSkipped(AliAODEvent *aodev)
Bool_t fIsRejectSDDClusters
fSys=0 -> p-p; fSys=1 ->PbPb (in this case fFillVarHists=kFALSE by default: set it to kTRUE after if ...
Bool_t fDrawDetSignal
flag to decide whether to fill "PID = x" bins in fNentrie
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
THnSparseF * GetSparseData() const
TList * fOutputMassY
! list send on output slot 9
TString part
use mixed event to constrain combinatorial background
void SetFillMC(Bool_t fillMC=kTRUE)
Int_t fIsSelectedCandidate
keeps the daughter tracks
Int_t GetBayesianStrategy() const
Bool_t HasBadDaughters() const
void FillMassHists(AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliAODMCHeader *mcHeader, AliRDHFCutsD0toKpi *cuts, TList *listout)
Int_t fSys
flag to enable filling variable histos
Bool_t fFillImpParHist
flag to fill Y Histograms
virtual ~AliAnalysisTaskSED0MassCutVarFDSub()
void DrawDetSignal(AliAODRecoDecayHF2Prong *part, TList *ListDetSignal)
Double_t CosThetaStarD0bar() const
angle of K
TList * fDetSignal
flag to decide whether to draw the TPC dE/dx and TOF signal before/after PID
Bool_t fWriteVariableTree
flag to check or not the selection bit
Double_t InvMassD0bar() const
TList * fOutputMass
! list send on output slot 1
Bool_t fFillYHist
flag to fill Pt and Impact Parameter Histograms
Double_t fLsNormalization
number of pt bins
TH1F * fNentries
! histogram with number of events on output slot 3
Double_t DecayLength2() const
kinematics & topology
Bool_t fFillVarHists
selection outcome
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Int_t IsSelectedSpecialCuts(AliAODRecoDecayHF *d) const
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables
Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const
Double_t DecayLengthXY() const
Bool_t fFillPtHist
flag to reject events with SDD clusters
Bool_t fCutOnDistr
flag for MC array: kTRUE = read it, kFALSE = do not read it
Bool_t GetIsPrimaryWithoutDaughters() const
Double_t * GetWeightsPositive() const
Bool_t AreDaughtersSelected(AliAODRecoDecayHF *rd, const AliAODEvent *aod=0x0) const
Bool_t IsEventSelected(AliVEvent *event)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
Double_t * fCandidateVariables
! variables to be written to the tree
AliRDHFCutsD0toKpi * fCuts
Bool_t fReadMC
can be D0 or Like Sign candidates
void FillSparses(AliAODRecoDecayHF2Prong *dzeroPart, Int_t isSelected, Double_t pt=-1, Double_t massD0=-1, Double_t massD0bar=-1, Double_t weight=1., TClonesArray *mcArray=0x0, AliAODEvent *aodEvent=0x0, AliAODMCHeader *mcHeader=0x0)
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd)
TList * fOutputMassPt
! list send on output slot 6
void CreateImpactParameterHistos()
TH2 * Scale(TH2 *h, TH1 *g)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
TObjArray fDaughterTracks
flag to fill mass histogram with D0/D0bar only (0 = fill with both, 1 = fill with D0 only...
Double_t CosPointingAngle() const
Double_t DecayLengthXYError() const
TList * fDistr
! list send on output slot 2
Double_t CosThetaStarD0() const
AliHFsubtractBFDcuts * fobjSpr
Int_t PtBin(Double_t pt) const
void FillVarHists(AliAODEvent *aodev, AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout)
Double_t * GetWeightsNegative() const