30 #include <Riostream.h>
31 #include <TClonesArray.h>
38 #include <TDatabasePDG.h>
39 #include <THnSparse.h>
43 #include <AliAnalysisDataSlot.h>
44 #include <AliAnalysisDataContainer.h>
45 #include "AliAnalysisManager.h"
46 #include "AliESDtrack.h"
47 #include "AliVertexerTracks.h"
48 #include "AliAODHandler.h"
49 #include "AliAODEvent.h"
50 #include "AliAODVertex.h"
51 #include "AliAODTrack.h"
52 #include "AliAODMCHeader.h"
53 #include "AliAODMCParticle.h"
57 #include "AliAnalysisTaskSE.h"
86 fIsSelectedCandidate(0),
90 fIsRejectSDDClusters(0),
93 fFillImpParHist(kFALSE),
94 fUseSelectionBit(kTRUE),
97 fWriteVariableTree(kFALSE),
99 fCandidateVariables(),
101 fDrawDetSignal(kFALSE),
102 fUseQuarkTagInKine(kTRUE),
104 fhMultVZEROTPCoutTrackCorrNoCut(0x0),
105 fhMultVZEROTPCoutTrackCorr(0x0),
106 fEnablePileupRejVZEROTPCout(kFALSE)
128 fLsNormalization(1.),
131 fIsSelectedCandidate(0),
132 fFillVarHists(kTRUE),
135 fIsRejectSDDClusters(0),
138 fFillImpParHist(kFALSE),
139 fUseSelectionBit(kTRUE),
142 fWriteVariableTree(kFALSE),
144 fCandidateVariables(),
146 fDrawDetSignal(kFALSE),
147 fUseQuarkTagInKine(kTRUE),
149 fhMultVZEROTPCoutTrackCorrNoCut(0x0),
150 fhMultVZEROTPCoutTrackCorr(0x0),
151 fEnablePileupRejVZEROTPCout(kFALSE)
161 DefineOutput(1,TList::Class());
163 DefineOutput(2,TList::Class());
165 DefineOutput(3,TH1F::Class());
167 DefineOutput(4,AliRDHFCutsD0toKpi::Class());
169 DefineOutput(5,AliNormalizationCounter::Class());
171 DefineOutput(6,TList::Class());
173 DefineOutput(7,TTree::Class());
175 DefineOutput(8, TList::Class());
177 DefineOutput(9, TList::Class());
203 for(
Int_t i=0; i<5; i++){
239 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass::Init() \n");
243 const char* nameoutput=GetOutputSlot(4)->GetContainer()->GetName();
244 copyfCuts->SetName(nameoutput);
246 PostData(4,copyfCuts);
258 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass::UserCreateOutputObjects() \n");
275 fDistr->SetName(
"distributionslist");
281 TString nameMass=
" ",nameSgn27=
" ",nameSgn=
" ", nameBkg=
" ", nameRfl=
" ",nameMassNocutsS =
" ",nameMassNocutsB =
" ", namedistr=
" ";
282 TString nameMassPt=
"", nameSgnPt=
"", nameBkgPt=
"", nameRflPt=
"";
283 TString nameMassY=
"", nameSgnY=
"", nameBkgY=
"", nameRflY=
"";
289 nameMass=
"histMass_";
291 nameSgn27=
"histSgn27_";
301 nameMassNocutsS=
"hMassS_";
303 nameMassNocutsB=
"hMassB_";
310 namedistr=
"hNclsD0vsptS_";
312 TH2F *hNclsD0vsptS =
new TH2F(namedistr.Data(),
"N cls distrubution [S];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
313 namedistr=
"hNclsD0barvsptS_";
315 TH2F *hNclsD0barvsptS =
new TH2F(namedistr.Data(),
"N cls distrubution [S];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
317 namedistr=
"hNITSpointsD0vsptS_";
319 TH2F *hNITSpointsD0vsptS =
new TH2F(namedistr.Data(),
"N ITS points distrubution [S];p_{T} [GeV/c];N points",200,0.,20.,7,0.,7.);
321 namedistr=
"hNSPDpointsD0S_";
323 TH1I *hNSPDpointsD0S =
new TH1I(namedistr.Data(),
"N SPD points distrubution [S]; ;N tracks",4,0,4);
324 hNSPDpointsD0S->GetXaxis()->SetBinLabel(1,
"no SPD");
325 hNSPDpointsD0S->GetXaxis()->SetBinLabel(2,
"kOnlyFirst");
326 hNSPDpointsD0S->GetXaxis()->SetBinLabel(3,
"kOnlySecond");
327 hNSPDpointsD0S->GetXaxis()->SetBinLabel(4,
"kBoth");
331 TH1F *hptD0S =
new TH1F(namedistr.Data(),
"p_{T} distribution [S];p_{T} [GeV/c]",200,0.,20.);
332 namedistr=
"hptD0barS_";
334 TH1F *hptD0barS =
new TH1F(namedistr.Data(),
"p_{T} distribution [S];p_{T} [GeV/c]",200,0.,20.);
336 namedistr=
"hphiD0S_";
338 TH1F *hphiD0S =
new TH1F(namedistr.Data(),
"#phi distribution [S];#phi [rad]",100,0.,2*TMath::Pi());
339 namedistr=
"hphiD0barS_";
341 TH1F *hphiD0barS =
new TH1F(namedistr.Data(),
"#phi distribution [S];#phi [rad]",100,0.,2*TMath::Pi());
344 namedistr=
"hetaphiD0candidateS_";
346 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());
347 namedistr=
"hetaphiD0barcandidateS_";
349 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());
351 namedistr=
"hetaphiD0candidatesignalregionS_";
353 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());
354 namedistr=
"hetaphiD0barcandidatesignalregionS_";
356 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());
361 TH1F *hdcaS =
new TH1F(namedistr.Data(),
"DCA distribution;dca [cm]",200,0.,0.1);
365 TH1F *hd0piS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (pions);d0(#pi) [cm]",200,-0.1,0.1);
369 TH1F *hd0KS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (kaons);d0(K) [cm]",200,-0.1,0.1);
373 TH1F *hd0d0S =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
378 TH1F *hdeclengthS =
new TH1F(namedistr.Data(),
"Decay Length^{2} distribution;Decay Length^{2} [cm]",200,0,0.015);
380 namedistr=
"hnormdeclS_";
382 TH1F *hnormdeclengthS =
new TH1F(namedistr.Data(),
"Normalized Decay Length^{2} distribution;(Decay Length/Err)^{2} ",200,0,12.);
384 namedistr=
"hdeclxyS_";
386 TH1F* hdeclxyS=
new TH1F(namedistr.Data(),
"Decay Length XY distribution;Decay Length XY [cm]",200,0,0.15);
388 namedistr=
"hnormdeclxyS_";
390 TH1F* hnormdeclxyS=
new TH1F(namedistr.Data(),
"Normalized decay Length XY distribution;Decay Length XY/Err",200,0,6.);
393 namedistr=
"hCorrCosX_";
395 TH2F* hCorrCosPpdX =
new TH2F(namedistr.Data(),
"Correlation CosPointAngle vs Pseudo-proper decay-length",200, -1, 1, 1000,-1.5,1.5);
399 namedistr=
"hCorrCosXtrue_";
401 TH2F* hCorrCosPpdXtrue =
new TH2F(namedistr.Data(),
"Correlation CosPointAngle vs Pseudo-proper decay-length",200, -1, 1, 1000,-1.5,1.5);
403 namedistr=
"hCorrCosX_prim_";
405 TH2F* hCorrCosPpdX_prim =
new TH2F(namedistr.Data(),
"Correlation CosPointAngle vs Pseudo-proper decay-length",200, -1, 1, 1000,-1.5,1.5);
407 namedistr=
"hCorrCosX_sec_";
409 TH2F* hCorrCosPpdX_sec =
new TH2F(namedistr.Data(),
"Correlation CosPointAngle vs Pseudo-proper decay-length",200, -1, 1, 1000,-1.5,1.5);
414 namedistr=
"hCorrDistX_";
416 TH2F* hCorrDistPpdX =
new TH2F(namedistr.Data(),
"Distance vs pseudo-proper decay-length correlation",1000, 0, 1.5, 1000,-1.5,1.5);
419 namedistr=
"hCorrDistXtrue_";
421 TH2F* hCorrDistPpdXtrue =
new TH2F(namedistr.Data(),
"Distance vs pseudo-proper decay-length correlation",1000, 0, 1.5, 1000,-1.5,1.5);
424 namedistr=
"hCorrDistX_prim_";
426 TH2F* hCorrDistPpdX_prim =
new TH2F(namedistr.Data(),
"Distance vs pseudo-proper decay-length correlation",1000, 0, 1.5, 1000,-1.5,1.5);
429 namedistr=
"hCorrDistX_sec_";
431 TH2F* hCorrDistPpdX_sec =
new TH2F(namedistr.Data(),
"Distance vs pseudo-proper decay-length correlation",1000, 0, 1.5, 1000,-1.5,1.5);
433 namedistr=
"hCorrNormLxyXtrue_";
435 TH2F* hcorrnormLxyXtrue =
new TH2F(namedistr.Data(),
"Normalized Lxy vs pseudo-proper decay-length correlation",1000, 0, 1.5, 1000,-1.5,1.5);
438 namedistr=
"hCorrNormLxyX_prim_";
440 TH2F* hcorrnormLxyX_prim =
new TH2F(namedistr.Data(),
"Normalized Lxy vs pseudo-proper decay-length correlatio",1000, 0, 1.5, 1000,-1.5,1.5);
443 namedistr=
"hCorrNormLxyX_sec_";
445 TH2F* hcorrnormLxyX_sec =
new TH2F(namedistr.Data(),
"Normalized Lxy vs pseudo-proper decay-length correlatio",1000, 0, 1.5, 1000,-1.5,1.5);
450 namedistr=
"hpseudoProperDLRec_";
452 TH1F* hpseudoProperDecLen =
new TH1F(namedistr.Data(),
"Pseudo-proper decay-length (reconstructed)",1000,-0.1,0.5);
455 namedistr=
"hpseudoProperGENERATE_";
457 TH1F* hpseudoProperGENERATED =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated)",1000,-1.5,1.5);
460 namedistr=
"hpseudoProperPrimGenerate_";
462 TH1F* hXPrimGenerate =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated)",1500,-1.5,1.5);
464 namedistr=
"hpseudoProperSecGenerate_";
466 TH1F* hXSecGenerate =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated)",1000,-1.5,1.5);
470 namedistr=
"hGenMatchRec_";
472 TH1F* hGenReconstructed =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated matched reconstructed)",1000,-1.5,1.5);
475 namedistr=
"hGenMatchRecPrim_";
477 TH1F* hGenRecPrimaries =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated matched reconstructed)",2000,-1.5,1.5);
479 namedistr=
"hGenMatchRecSec_";
481 TH1F* hGenRecSecondaries =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (MC-generated matched reconstructed)",1000,-1.5,1.5);
483 namedistr=
"hresidualX_";
485 TH1F* hresidualX =
new TH1F(namedistr.Data(),
"Residual x - x_{gen}",1000,-1.5,1.5);
489 namedistr=
"hpseudoProperDLRecSec_";
491 TH1F* hpseudoProperDecLen2 =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (reconstructed)",1000,-0.1,0.5);
493 namedistr=
"hresidualXSec_";
495 TH1F* hresidualpseudoXsec =
new TH1F(namedistr.Data(),
"Residual x - x_{gen}",1000,-1.5,1.5);
498 namedistr=
"hresidual_Primary_";
500 TH1F* hresidualXprim =
new TH1F(namedistr.Data(),
"Residual x - x_{gen}",1000,-1.5,1.5);
502 namedistr=
"hpseudoProperDLRecPrim_";
504 TH1F* hpseudoProperDecLenprim =
new TH1F(namedistr.Data(),
"Pseudo proper decay length (reconstructed)",1000,-0.1,0.5);
510 TH1F* hdctauS =
new TH1F(namedistr.Data(),
"Proper Decay time distribution (zeta component); ctau [cm]",200,0,0.5);
515 namedistr=
"hctauD0_";
517 TH1F* hctauD0meson1=
new TH1F(namedistr.Data(),
"CtauD0 [cm]",200,0,0.5);
519 namedistr=
"hctauD0S_";
521 TH1F* hctauD0meson1S=
new TH1F(namedistr.Data(),
"CtauD0 [cm]",200,0,0.5);
526 namedistr=
"hctauXYctauZ_";
528 TH2F* hctauXYvsZ=
new TH2F(namedistr.Data(),
"ctauD0-XY plane vs Ctau-Z [cm]",200,0,0.5,200,0,0.05);
531 namedistr=
"hctauXYctauZS_";
533 TH2F* hctauXYvsZS=
new TH2F(namedistr.Data(),
"ctauD0-XY plane vs Ctau-Z [cm]",200,0,0.5,200,0,0.05);
538 namedistr=
"hctauD0prim_";
540 TH1F* hctauD0primary=
new TH1F(namedistr.Data(),
"ctauD0 [cm]",200,0,0.5);
545 namedistr=
"hctauD0sec_";
547 TH1F* hctauD0secondary =
new TH1F(namedistr.Data(),
"ctauD0 [cm]",200,0,0.5);
552 namedistr=
"hdeclxyd0d0S_";
554 TH2F* hdeclxyd0d0S=
new TH2F(namedistr.Data(),
"Correlation decay Length XY [cm] vs d_{0}#times d_{0} [cm^{2}]",200,0,0.15,200,-0.001,0.001);
556 namedistr=
"hnormdeclxyd0d0S_";
558 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);
563 namedistr=
"hCorrXd0D0_";
565 TH2F* hcorrXd0D0 =
new TH2F(namedistr.Data(),
"Correlation Proper Decay time XY - D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",200,-1.5, 1.5, 1000,-1000,1000);
568 namedistr=
"hCorrXd0D0true_";
570 TH2F* hcorrXd0D0true =
new TH2F(namedistr.Data(),
"Correlation Proper Decay time XY - D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",200,-1.5, 1.5, 1000,-1000,1000);
573 namedistr=
"hCorrXd0D0_sec_";
575 TH2F* hcorrXd0D0sec =
new TH2F(namedistr.Data(),
"Correlation Proper Decay time XY - D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",200,-1.5, 1.5, 1000,-1000,1000);
578 namedistr=
"hCorrXd0D0_prim_";
580 TH2F* hcorrXd0D0prim =
new TH2F(namedistr.Data(),
"Correlation Proper Decay time XY - D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",200,-1.5, 1.5, 1000,-1000,1000);
584 namedistr=
"hImpParXYtrue_";
586 TH1F* hImpactParXYtrue =
new TH1F(namedistr.Data(),
" D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]", 1000,-1000,1000);
589 namedistr=
"hImpParXY_sec_";
591 TH1F* hImpParXYsec =
new TH1F(namedistr.Data(),
"D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",1000,-1000,1000);
594 namedistr=
"hImpParXY_prim_";
596 TH1F* hImpParXYprim =
new TH1F(namedistr.Data(),
"D0 d_{0} ; Proper decay time XY [cm]; d_{0}[cm]",1000,-1000,1000);
602 namedistr=
"hcosthetapointS_";
604 TH1F *hcosthetapointS =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
606 namedistr=
"hcosthetapointxyS_";
608 TH1F *hcosthetapointxyS =
new TH1F(namedistr.Data(),
"cos#theta_{Point} XYdistribution;cos#theta_{Point}",300,0.,1.);
610 TH1F* tmpMS =
new TH1F(nameMassNocutsS.Data(),
"D^{0} invariant mass; M [GeV]; Entries",300,1.5648,2.1648);
613 fDistr->Add(hNclsD0vsptS);
614 fDistr->Add(hNclsD0barvsptS);
615 fDistr->Add(hNITSpointsD0vsptS);
616 fDistr->Add(hNSPDpointsD0S);
621 fDistr->Add(hetaphiD0candidateS);
622 fDistr->Add(hetaphiD0candidatesignalregionS);
623 fDistr->Add(hetaphiD0barcandidateS);
624 fDistr->Add(hetaphiD0barcandidatesignalregionS);
629 fDistr->Add(hcosthetapointS);
630 fDistr->Add(hcosthetapointxyS);
632 fDistr->Add(hnormdeclengthS);
635 fDistr->Add(hctauD0meson1);
636 fDistr->Add(hctauD0meson1S);
639 fDistr->Add(hctauD0primary);
640 fDistr->Add(hctauD0secondary);
641 fDistr->Add(hnormdeclxyS);
642 fDistr->Add(hCorrCosPpdX);
643 fDistr->Add(hCorrCosPpdXtrue);
644 fDistr->Add(hCorrCosPpdX_prim);
645 fDistr->Add(hCorrCosPpdX_sec);
646 fDistr->Add(hCorrDistPpdX);
647 fDistr->Add(hCorrDistPpdXtrue);
648 fDistr->Add(hCorrDistPpdX_prim);
649 fDistr->Add(hCorrDistPpdX_sec);
650 fDistr->Add(hcorrnormLxyXtrue);
651 fDistr->Add(hcorrnormLxyX_prim);
652 fDistr->Add(hcorrnormLxyX_sec);
653 fDistr->Add(hpseudoProperDecLen);
654 fDistr->Add(hpseudoProperGENERATED);
655 fDistr->Add(hXSecGenerate);
656 fDistr->Add(hXPrimGenerate);
657 fDistr->Add(hGenReconstructed);
658 fDistr->Add(hGenRecPrimaries);
659 fDistr->Add(hGenRecSecondaries);
660 fDistr->Add(hpseudoProperDecLen2);
662 fDistr->Add(hresidualpseudoXsec);
663 fDistr->Add(hresidualXprim);
664 fDistr->Add(hpseudoProperDecLenprim);
665 fDistr->Add(hdeclxyd0d0S);
667 fDistr->Add(hcorrXd0D0true);
668 fDistr->Add(hcorrXd0D0sec);
669 fDistr->Add(hcorrXd0D0prim);
670 fDistr->Add(hImpactParXYtrue);
671 fDistr->Add(hImpParXYsec);
672 fDistr->Add(hImpParXYprim);
673 fDistr->Add(hnormdeclxyd0d0S);
680 namedistr=
"hNclsD0vsptB_";
682 TH2F *hNclsD0vsptB =
new TH2F(namedistr.Data(),
"N cls distrubution [B];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
683 namedistr=
"hNclsD0barvsptB_";
685 TH2F *hNclsD0barvsptB =
new TH2F(namedistr.Data(),
"N cls distrubution [B];p_{T} [GeV/c];N cls",200,0.,20.,100,0.,200.);
687 namedistr=
"hNITSpointsD0vsptB_";
689 TH2F *hNITSpointsD0vsptB =
new TH2F(namedistr.Data(),
"N ITS points distrubution [B];p_{T} [GeV/c];N points",200,0.,20.,7,0.,7.);
691 namedistr=
"hNSPDpointsD0B_";
693 TH1I *hNSPDpointsD0B =
new TH1I(namedistr.Data(),
"N SPD points distrubution [B]; ;N tracks",4,0,4);
694 hNSPDpointsD0B->GetXaxis()->SetBinLabel(1,
"no SPD");
695 hNSPDpointsD0B->GetXaxis()->SetBinLabel(2,
"kOnlyFirst");
696 hNSPDpointsD0B->GetXaxis()->SetBinLabel(3,
"kOnlySecond");
697 hNSPDpointsD0B->GetXaxis()->SetBinLabel(4,
"kBoth");
701 TH1F *hptD0B =
new TH1F(namedistr.Data(),
"p_{T} distribution [B];p_{T} [GeV/c]",200,0.,20.);
702 namedistr=
"hptD0barB_";
704 TH1F *hptD0barB =
new TH1F(namedistr.Data(),
"p_{T} distribution [B];p_{T} [GeV/c]",200,0.,20.);
706 namedistr=
"hphiD0B_";
708 TH1F *hphiD0B =
new TH1F(namedistr.Data(),
"#phi distribution [B];#phi [rad]",100,0.,2*TMath::Pi());
709 namedistr=
"hphiD0barB_";
711 TH1F *hphiD0barB =
new TH1F(namedistr.Data(),
"#phi distribution [B];#phi [rad]",100,0.,2*TMath::Pi());
713 namedistr=
"hetaphiD0candidateB_";
715 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());
716 namedistr=
"hetaphiD0barcandidateB_";
718 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());
720 namedistr=
"hetaphiD0candidatesignalregionB_";
722 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());
723 namedistr=
"hetaphiD0barcandidatesignalregionB_";
725 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());
730 TH1F *hdcaB =
new TH1F(namedistr.Data(),
"DCA distribution;dca [cm]",200,0.,0.1);
735 TH1F *hd0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
739 TH1F *hd0d0B =
new TH1F(namedistr.Data(),
"d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
744 TH1F *hdeclengthB =
new TH1F(namedistr.Data(),
"Decay Length^{2} distribution;Decay Length^{2} [cm^{2}]",200,0,0.015);
746 namedistr=
"hnormdeclB_";
748 TH1F *hnormdeclengthB =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution;(Decay Length/Err)^{2} ",200,0,12.);
753 TH1F *hctauD =
new TH1F(namedistr.Data(),
"Ctau D meson;(ctau);[cm] ",200,0,0.15);
759 namedistr=
"hdeclxyB_";
761 TH1F* hdeclxyB=
new TH1F(namedistr.Data(),
"Decay Length XY distribution;Decay Length XY [cm]",200,0,0.15);
762 namedistr=
"hnormdeclxyB_";
764 TH1F* hnormdeclxyB=
new TH1F(namedistr.Data(),
"Normalized decay Length XY distribution;Decay Length XY/Err",200,0,6.);
766 namedistr=
"hdeclxyd0d0B_";
768 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);
770 namedistr=
"hnormdeclxyd0d0B_";
772 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);
775 namedistr=
"hcosthetapointB_";
777 TH1F *hcosthetapointB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
779 namedistr=
"hcosthetapointxyB_";
781 TH1F *hcosthetapointxyB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} XY distribution;cos#theta_{Point} XY",300,0.,1.);
783 TH1F* tmpMB =
new TH1F(nameMassNocutsB.Data(),
"D^{0} invariant mass; M [GeV]; Entries",300,1.5648,2.1648);
787 fDistr->Add(hNclsD0vsptB);
788 fDistr->Add(hNclsD0barvsptB);
789 fDistr->Add(hNITSpointsD0vsptB);
790 fDistr->Add(hNSPDpointsD0B);
795 fDistr->Add(hetaphiD0candidateB);
796 fDistr->Add(hetaphiD0candidatesignalregionB);
797 fDistr->Add(hetaphiD0barcandidateB);
798 fDistr->Add(hetaphiD0barcandidatesignalregionB);
802 fDistr->Add(hcosthetapointB);
803 fDistr->Add(hcosthetapointxyB);
805 fDistr->Add(hnormdeclengthB);
808 fDistr->Add(hnormdeclxyB);
809 fDistr->Add(hdeclxyd0d0B);
810 fDistr->Add(hnormdeclxyd0d0B);
817 namedistr=
"hd0vpiS_";
819 TH1F *hd0vpiS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (pions)(vtx w/o these tracks);d0(#pi) [cm]",200,-0.1,0.1);
823 TH1F *hd0vKS =
new TH1F(namedistr.Data(),
"Impact parameter distribution (kaons) (vtx w/o these tracks);d0(K) [cm]",200,-0.1,0.1);
825 namedistr=
"hd0d0vS_";
827 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);
829 namedistr=
"hdeclvS_";
831 TH1F *hdeclengthvS =
new TH1F(namedistr.Data(),
"Decay Length distribution (vtx w/o tracks);Decay Length [cm]",200,0,0.6);
833 namedistr=
"hnormdeclvS_";
835 TH1F *hnormdeclengthvS =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution (vtx w/o tracks);Decay Length/Err ",200,0,10.);
840 fDistr->Add(hdeclengthvS);
841 fDistr->Add(hnormdeclengthvS);
845 namedistr=
"hd0vmoresB_";
847 TH1F *hd0vmoresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
849 namedistr=
"hd0d0vmoresB_";
851 TH1F *hd0d0vmoresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.001,0.001);
856 TH1F *hd0vB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
858 namedistr=
"hd0vp0B_";
860 TH1F *hd0vp0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong + ** vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
862 namedistr=
"hd0vp1B_";
864 TH1F *hd0vp1B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong - ** vtx w/o these tracks);d0 [cm]",200,-0.1,0.1);
866 namedistr=
"hd0d0vB_";
868 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);
870 namedistr=
"hdeclvB_";
872 TH1F *hdeclengthvB =
new TH1F(namedistr.Data(),
"Decay Length distribution (vtx w/o tracks);Decay Length [cm]",200,0,0.6);
874 namedistr=
"hnormdeclvB_";
876 TH1F *hnormdeclengthvB =
new TH1F(namedistr.Data(),
"Normalized Decay Length distribution (vtx w/o tracks);Decay Length/Err ",200,0,10.);
884 fDistr->Add(hd0d0vmoresB);
886 fDistr->Add(hdeclengthvB);
888 fDistr->Add(hnormdeclengthvB);
898 TH1F* tmpSt =
new TH1F(nameSgn.Data(),
"D^{0} invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
900 TH1F *tmpSl=(TH1F*)tmpSt->Clone();
905 TH1F* tmpRt =
new TH1F(nameRfl.Data(),
"Reflected signal invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
907 TH1F* tmpBt =
new TH1F(nameBkg.Data(),
"Background invariant mass - MC; M [GeV]; Entries",600,1.5648,2.1648);
921 TH1F* tmpMt =
new TH1F(nameMass.Data(),
"D^{0} invariant mass; M [GeV]; Entries",600,1.5648,2.1648);
937 TH1F *hptpiS =
new TH1F(namedistr.Data(),
"P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
941 TH1F *hptKS =
new TH1F(namedistr.Data(),
"P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
944 namedistr=
"hcosthetastarS_";
946 TH1F *hcosthetastarS =
new TH1F(namedistr.Data(),
"cos#theta* distribution;cos#theta*",200,-1.,1.);
950 namedistr=
"hptpiSnoMcut_";
952 TH1F *hptpiSnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
954 namedistr=
"hptKSnoMcut_";
956 TH1F *hptKSnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
960 fDistr->Add(hcosthetastarS);
962 fDistr->Add(hptpiSnoMcut);
966 namedistr=
"hcosthpointd0S_";
968 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);
969 namedistr=
"hcosthpointd0d0S_";
971 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);
973 fDistr->Add(hcosthpointd0S);
974 fDistr->Add(hcosthpointd0d0S);
977 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);
978 TH1F *tmpS27l=(TH1F*)tmpS27t->Clone();
990 TH1F *hptB =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
993 namedistr=
"hcosthetastarB_";
995 TH1F *hcosthetastarB =
new TH1F(namedistr.Data(),
"cos#theta* distribution;cos#theta*",200,-1.,1.);
998 namedistr=
"hptB1prongnoMcut_";
1000 TH1F *hptB1pnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
1002 namedistr=
"hptB2prongsnoMcut_";
1004 TH1F *hptB2pnoMcut =
new TH1F(namedistr.Data(),
"P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
1007 fDistr->Add(hcosthetastarB);
1009 fDistr->Add(hptB1pnoMcut);
1010 fDistr->Add(hptB2pnoMcut);
1013 namedistr=
"hd0p0B_";
1015 TH1F *hd0p0B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.1,0.1);
1017 namedistr=
"hd0p1B_";
1019 TH1F *hd0p1B =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong -);d0 [cm]",200,-0.1,0.1);
1022 namedistr=
"hd0moresB_";
1024 TH1F *hd0moresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (both);d0 [cm]",200,-0.1,0.1);
1026 namedistr=
"hd0d0moresB_";
1028 TH1F *hd0d0moresB =
new TH1F(namedistr.Data(),
"Impact parameter distribution (prong +);d0 [cm]",200,-0.001,0.001);
1031 namedistr=
"hcosthetapointmoresB_";
1033 TH1F *hcosthetapointmoresB =
new TH1F(namedistr.Data(),
"cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
1036 namedistr=
"hcosthpointd0B_";
1038 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);
1040 namedistr=
"hcosthpointd0d0B_";
1042 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);
1048 fDistr->Add(hd0d0moresB);
1049 fDistr->Add(hcosthetapointmoresB);
1052 fDistr->Add(hcosthpointd0B);
1055 fDistr->Add(hcosthpointd0d0B);
1065 namedistr=
"hpospair";
1067 namedistr=
"hnegpair";
1077 nameMassPt=
"histMassPt";
1078 nameSgnPt=
"histSgnPt";
1079 nameBkgPt=
"histBkgPt";
1080 nameRflPt=
"histRflPt";
1084 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);
1085 TH2F *tmpSlPt=(
TH2F*)tmpStPt->Clone();
1090 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);
1091 TH2F* tmpBtPt =
new TH2F(nameBkgPt.Data(),
"Background invariant mass - MC; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.1648,nbins2dPt,binInPt,binFinPt);
1105 TH2F* tmpMtPt =
new TH2F(nameMassPt.Data(),
"D^{0} invariant mass; M [GeV]; Entries; Pt[GeV/c]",600,1.5648,2.1648,nbins2dPt,binInPt,binFinPt);
1117 nameMassY=
"histMassY_";
1119 nameSgnY=
"histSgnY_";
1121 nameBkgY=
"histBkgY_";
1123 nameRflY=
"histRflY_";
1127 TH2F* tmpStY =
new TH2F(nameSgnY.Data(),
"D^{0} invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.16484,nbins2dY,binInY,binFinY);
1130 TH2F* tmpRtY =
new TH2F(nameRflY.Data(),
"Reflected signal invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
1131 TH2F* tmpBtY =
new TH2F(nameBkgY.Data(),
"Background invariant mass - MC; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
1139 TH2F* tmpMtY =
new TH2F(nameMassY.Data(),
"D^{0} invariant mass; M [GeV]; Entries; y",600,1.5648,2.1648,nbins2dY,binInY,binFinY);
1146 const char* nameoutput=GetOutputSlot(3)->GetContainer()->GetName();
1148 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", 19,-0.5,18.5);
1150 fNentries->GetXaxis()->SetBinLabel(1,
"nEventsAnal");
1151 fNentries->GetXaxis()->SetBinLabel(2,
"nCandSel(Cuts)");
1153 else fNentries->GetXaxis()->SetBinLabel(3,
"Dstar<-D0");
1154 fNentries->GetXaxis()->SetBinLabel(4,
"nEventsGoodVtxS");
1155 fNentries->GetXaxis()->SetBinLabel(5,
"ptbin = -1");
1156 fNentries->GetXaxis()->SetBinLabel(6,
"no daughter");
1157 if(
fSys==0)
fNentries->GetXaxis()->SetBinLabel(7,
"nCandSel(Tr)");
1159 fNentries->GetXaxis()->SetBinLabel(8,
"PID=0");
1160 fNentries->GetXaxis()->SetBinLabel(9,
"PID=1");
1161 fNentries->GetXaxis()->SetBinLabel(10,
"PID=2");
1162 fNentries->GetXaxis()->SetBinLabel(11,
"PID=3");
1165 fNentries->GetXaxis()->SetBinLabel(12,
"K");
1166 fNentries->GetXaxis()->SetBinLabel(13,
"Lambda");
1168 fNentries->GetXaxis()->SetBinLabel(14,
"Pile-up Rej");
1169 fNentries->GetXaxis()->SetBinLabel(15,
"N. of 0SMH");
1170 if(
fSys==1)
fNentries->GetXaxis()->SetBinLabel(16,
"Nev in centr");
1172 fNentries->GetXaxis()->SetBinLabel(18,
"Phys.Sel.Rej");
1173 fNentries->GetXaxis()->SetBinLabel(19,
"D0 failed to be filled");
1174 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
1182 nameoutput = GetOutputSlot(7)->GetContainer()->GetName();
1187 fCandidateVariableNames[0] =
"massD0";
1188 fCandidateVariableNames[1] =
"massD0bar";
1189 fCandidateVariableNames[2] =
"pt";
1202 fCandidateVariableNames[3] =
"ctau";
1203 fCandidateVariableNames[4] =
"PseudoProperDecayLength";
1204 fCandidateVariableNames[5] =
"IsSelected";
1214 TH2F *TOFSigBefPID =
new TH2F(
"TOFSigBefPID",
"TOF signal of daughters before PID;p(daught)(GeV/c);Signal", 500, 0, 10, 5000, 0, 50e3);
1215 TH2F *TOFSigAftPID =
new TH2F(
"TOFSigAftPID",
"TOF signal after PID;p(daught)(GeV/c);Signal", 500, 0, 10, 5000, 0, 50e3);
1217 TH2F *TPCSigBefPID =
new TH2F(
"TPCSigBefPID",
"TPC dE/dx before PID;p(daught)(GeV/c);dE/dx (arb. units)", 1000, 0, 10, 1000, 0, 500);
1218 TH2F *TPCSigAftPID =
new TH2F(
"TPCSigAftPID",
"TPC dE/dx after PID;p(daught)(GeV/c);dE/dx (arb. units)", 1000, 0, 10, 1000, 0, 500);
1229 fhMultVZEROTPCoutTrackCorr =
new TH2F(
"hMultVZEROTPCoutTrackCorr",
";Tracks with kTPCout on;VZERO multiplicity", 1000, 0., 30000., 1000, 0., 40000.);
1272 if (matchingAODdeltaAODlevel<0 || (matchingAODdeltaAODlevel==0 &&
fAODProtection==1)) {
1288 bname=
"LikeSign2Prong";
1290 TClonesArray *inputArray=0;
1291 if(!aod && AODEvent() && IsStandardAOD()) {
1297 AliAODHandler* aodHandler = (AliAODHandler*)
1298 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
1303 if(aodHandler->GetExtensions()) {
1304 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
1306 inputArray=(TClonesArray*)aodFromExt->GetList()->FindObject(bname.Data());
1309 inputArray=(TClonesArray*)aod->GetList()->FindObject(bname.Data());
1312 if(!inputArray || !aod) {
1313 printf(
"AliAnalysisTaskSED0MassNonPromptFraction::UserExec: input branch not found!\n");
1318 if(!aod->GetPrimaryVertex() || TMath::Abs(aod->GetMagneticField())<0.001)
return;
1321 TClonesArray *mcArray = 0;
1322 AliAODMCHeader *mcHeader = 0;
1326 mcArray = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
1328 printf(
"AliAnalysisTaskSED0MassNonPromptFraction::UserExec: MC particles branch not found!\n");
1333 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1335 printf(
"AliAnalysisTaskSED0MassNonPromptFraction::UserExec: MC header branch not found!\n");
1342 AliAODVZERO* v0data=(AliAODVZERO*)((
AliAODEvent*)aod)->GetVZEROData();
1343 Float_t mTotV0A=v0data->GetMTotV0A();
1344 Float_t mTotV0C=v0data->GetMTotV0C();
1345 mTotV0=mTotV0A+mTotV0C;
1346 Int_t ntracksEv = aod->GetNumberOfTracks();
1347 for(
Int_t itrack=0; itrack<ntracksEv; itrack++) {
1349 AliAODTrack * track =
dynamic_cast<AliAODTrack*
>(aod->GetTrack(itrack));
1350 if(!track) {AliFatal(
"Not a standard AOD");}
1351 if(track->GetID()<0)
continue;
1352 if((track->GetFlags())&(AliESDtrack::kTPCout)) nTPCout++;
1356 Float_t mV0Cut=-2200.+(2.5*nTPCout)+(0.000012*nTPCout*nTPCout);
1358 if(mTotV0<mV0Cut)
return;
1372 TString trigclass=aod->GetFiredTriggerClasses();
1373 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fNentries->Fill(14);
1385 Bool_t skipEvent = kFALSE;
1387 if (aod) ntracks = aod->GetNumberOfTracks();
1388 for(
Int_t itrack=0; itrack<ntracks; itrack++) {
1390 AliAODTrack * track =
dynamic_cast<AliAODTrack*
>(aod->GetTrack(itrack));
1391 if(!track) AliFatal(
"Not a standard AOD");
1392 if(TESTBIT(track->GetITSClusterMap(),2) || TESTBIT(track->GetITSClusterMap(),3) ){
1398 if (skipEvent)
return;
1402 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
1407 TString primTitle = vtx1->GetTitle();
1408 if(primTitle.Contains(
"VertexerTracks") && vtx1->GetNContributors()>0) {
1414 Int_t nInD0toKpi = inputArray->GetEntriesFast();
1415 if(fDebug>2) printf(
"Number of D0->Kpi: %d\n",nInD0toKpi);
1419 Int_t nSelectedloose=0,nSelectedtight=0;
1426 for (
Int_t iD0toKpi = 0; iD0toKpi < nInD0toKpi; iD0toKpi++) {
1446 if(ptbin==-1) {
fNentries->Fill(4);
continue;}
1454 AliDebug(1,
"at least one daughter not found!");
1479 Int_t isSelectedPIDfill = 3;
1482 if (isSelectedPIDfill == 0)
fNentries->Fill(7);
1483 if (isSelectedPIDfill == 1)
fNentries->Fill(8);
1484 if (isSelectedPIDfill == 2)
fNentries->Fill(9);
1485 if (isSelectedPIDfill == 3)
fNentries->Fill(10);
1519 for(
Int_t i=0; i< arrMC->GetEntries(); i++){
1521 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(i);
1527 Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
1529 if (TMath::Abs(((AliAODMCParticle*)partD0)->GetPdgCode() != 421))
continue;
1531 AliAODMCParticle *partDaughter = (AliAODMCParticle*)arrMC->At(partD0->GetDaughter(0));
1534 if (!arrMC->At(partD0->GetDaughter(0)))
continue;
1545 XvtxGen = partDaughter->Xv();
1546 YvtxGen = partDaughter->Yv();
1547 ZvtxGen = partDaughter->Zv();
1553 PvecGen[0] = partD0->Px();
1554 PvecGen[1] = partD0->Py();
1559 AliAODMCHeader* mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1561 printf(
"AliAnalysisTaskSED0MassNonPromptFraction::UserExec: MC header branch not found!\n");
1566 XpGen = mcHeader->GetVtxX();
1567 YpGen = mcHeader->GetVtxY();
1568 ZpGen = mcHeader->GetVtxZ();
1575 LGen.SetXYZ (XvtxGen-XpGen, YvtxGen-YpGen, ZvtxGen-ZpGen);
1580 PtvecGen.SetXYZ (partD0->Px(), partD0->Py(), 0.);
1585 LxyGen = (LGen.Dot(PtvecGen))/ptravGen;
1590 xgenerate= LxyGen*mPDG/ptravGen;
1594 fillthisGEN=
"hpseudoProperGENERATE_";
1596 ((TH1F*)listout->FindObject(fillthisGEN))->Fill(xgenerate);
1604 fillthisGEN=
"hpseudoProperSecGenerate_";
1606 ((TH1F*)listout->FindObject(fillthisGEN))->Fill(xgenerate);
1613 fillthisGEN=
"hpseudoProperPrimGenerate_";
1615 ((TH1F*)listout->FindObject(fillthisGEN))->Fill(xgenerate);
1635 AliESDtrack *esdtrack1 =
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(0));
1636 AliESDtrack *esdtrack2 =
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(1));
1640 Int_t isSelectedPIDfill = 3;
1645 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigBefPID"))->Fill(esdtrack1->P(), esdtrack1->GetTOFsignal());
1646 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigBefPID"))->Fill(esdtrack2->P(), esdtrack2->GetTOFsignal());
1647 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigBefPID"))->Fill(esdtrack1->P(), esdtrack1->GetTPCsignal());
1648 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigBefPID"))->Fill(esdtrack2->P(), esdtrack2->GetTPCsignal());
1650 if (isSelectedPIDfill != 0) {
1651 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigAftPID"))->Fill(esdtrack1->P(), esdtrack1->GetTOFsignal());
1652 ((
TH2F*)ListDetSignal->FindObject(
"TOFSigAftPID"))->Fill(esdtrack2->P(), esdtrack2->GetTOFsignal());
1653 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigAftPID"))->Fill(esdtrack1->P(), esdtrack1->GetTPCsignal());
1654 ((
TH2F*)ListDetSignal->FindObject(
"TPCSigAftPID"))->Fill(esdtrack2->P(), esdtrack2->GetTPCsignal());
1671 Int_t pdgDgD0toKpi[2]={321,211};
1673 if(
fReadMC) lab=part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
1675 Int_t isSelectedPID=3;
1678 if (isSelectedPID==0)
fNentries->Fill(7);
1679 if (isSelectedPID==1)
fNentries->Fill(8);
1680 if (isSelectedPID==2)
fNentries->Fill(9);
1681 if (isSelectedPID==3)
fNentries->Fill(10);
1692 Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
1700 Xvtx = part->GetSecondaryVtx()->GetX();
1702 Yvtx = part->GetSecondaryVtx()->GetY();
1703 Zvtx = part->GetSecondaryVtx()->GetZ();
1705 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
1711 Xp=aod->GetPrimaryVertex()->GetX();
1712 Yp=aod->GetPrimaryVertex()->GetY();
1713 Zp=aod->GetPrimaryVertex()->GetZ();
1720 dSecToPrim = TMath::Sqrt((Xvtx-Xp)*(Xvtx-Xp) +(Yvtx-Yp)*(Yvtx-Yp)+(Zvtx-Zp)*(Zvtx-Zp));
1727 Pvec[0] = part->Px();
1728 Pvec[1] = part->Py();
1730 Double_t Pt = TMath::Sqrt(Pvec[0]*Pvec[0]+Pvec[1]*Pvec[1]);
1744 L.SetXYZ (Xvtx-Xp, Yvtx-Yp, Zvtx-Zp);
1747 L1.SetXYZ (Xp-Xvtx, Yp-Yvtx, 0);
1751 Ptvec.SetXYZ (part->Px(), part->Py(), 0);
1759 Lxy = (L.Dot(Ptvec))/ptrav;
1762 Lxy1 = (L1.Dot(Ptvec))/ptrav;
1806 if(fDebug>2) cout <<
"Candidate selected" << endl;
1814 CtauD0 = part->
CtD0();
1829 TString fillthispi=
"",fillthisK=
"",fillthis=
"", fillthispt=
"", fillthisetaphi=
"";
1836 Double_t dz1[2],dz2[2],covar1[3],covar2[3];
1837 dz1[0]=-99; dz2[0]=-99;
1842 fillthis=
"hCorrCosX_";
1844 ((
TH2F*)listout->FindObject(fillthis))->Fill(CosinePointingAngle, x);
1848 fillthis=
"hCorrDistX_";
1850 ((
TH2F*)listout->FindObject(fillthis))->Fill(dSecToPrim, x);
1854 fillthis=
"hCorrXd0D0_";
1856 ((
TH2F*)listout->FindObject(fillthis))->Fill(x,impparXY);
1859 fillthis=
"hctauD0_";
1861 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0);
1866 AliAODVertex *vtxProp=0x0;
1872 AliESDtrack *esdtrack1=
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(0));
1873 AliESDtrack *esdtrack2=
new AliESDtrack((AliVTrack*)
fDaughterTracks.UncheckedAt(1));
1874 esdtrack1->PropagateToDCA(vtxProp,aod->GetMagneticField(),1.,dz1,covar1);
1875 esdtrack2->PropagateToDCA(vtxProp,aod->GetMagneticField(),1.,dz2,covar2);
1876 delete vtxProp; vtxProp=NULL;
1897 Double_t normalizedDecayLength2 = -1;
1911 if (
fReadMC) labD0 = part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
1912 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
1919 fillthis=
"hpseudoProperDLRec_";
1921 ((TH1F*)listout->FindObject(fillthis))->Fill(x);
1924 fillthis=
"hCorrCosXtrue_";
1926 ((
TH2F*)listout->FindObject(fillthis))->Fill(CosinePointingAngle, x);
1928 fillthis=
"hCorrDistXtrue_";
1930 ((
TH2F*)listout->FindObject(fillthis))->Fill(dSecToPrim, x);
1933 fillthis=
"hCorrXd0D0true_";
1935 ((
TH2F*)listout->FindObject(fillthis))->Fill(x,impparXY);
1938 fillthis=
"hImpParXYtrue_";
1940 ((TH1F*)listout->FindObject(fillthis))->Fill(impparXY);
1943 fillthis=
"hCorrNormLxyXtrue_";
1945 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy, x);
1948 fillthis=
"hctauD0S_";
1950 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0);
1963 AliAODMCParticle *partDaughter = (AliAODMCParticle*)arrMC->At(partD0->GetDaughter(0));
1965 if (!arrMC->At(partD0->GetDaughter(0)))
return;
1968 XvtxGen = partDaughter->Xv();
1969 YvtxGen = partDaughter->Yv();
1970 ZvtxGen = partDaughter->Zv();
1975 PvecGen[0] = partD0->Px();
1976 PvecGen[1] = partD0->Py();
1981 AliAODMCHeader* mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1983 printf(
"alysisTaskSED0MassNonPromptFraction::UserExec: MC header branch not found!\n");
1988 XpGen = mcHeader->GetVtxX();
1989 YpGen = mcHeader->GetVtxY();
1990 ZpGen = mcHeader->GetVtxZ();}
1995 LGen.SetXYZ (XvtxGen-XpGen, YvtxGen-YpGen, ZvtxGen-ZpGen);
2000 PtvecGen.SetXYZ (partD0->Px(), partD0->Py(), 0);
2004 LxyGen = (LGen.Dot(PtvecGen))/ptravGen;
2008 xgen= LxyGen*mPDG/ptravGen;
2014 fillthis=
"hGenMatchRec_";
2016 ((TH1F*)listout->FindObject(fillthis))->Fill(xgen);
2019 fillthis=
"hresidualX_";
2021 ((TH1F*)listout->FindObject(fillthis))->Fill(Residual);
2032 fillthis=
"hpseudoProperDLRecSec_";
2034 ((TH1F*)listout->FindObject(fillthis))->Fill(x);
2037 fillthis=
"hCorrDistX_sec_";
2039 ((
TH2F*)listout->FindObject(fillthis))->Fill(dSecToPrim, x);
2041 fillthis=
"hCorrNormLxyX_sec_";
2043 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy, x);
2045 fillthis=
"hCorrCosX_sec_";
2047 ((
TH2F*)listout->FindObject(fillthis))->Fill(CosinePointingAngle, x);
2049 fillthis=
"hCorrXd0D0_sec_";
2051 ((
TH2F*)listout->FindObject(fillthis))->Fill(x,impparXY);
2053 fillthis=
"hImpParXY_sec_";
2055 ((TH1F*)listout->FindObject(fillthis))->Fill(impparXY);
2059 fillthis=
"hresidualXSec_";
2061 ((TH1F*)listout->FindObject(fillthis))->Fill(Residual);
2063 fillthis=
"hGenMatchRecSec_";
2065 ((TH1F*)listout->FindObject(fillthis))->Fill(xgen);
2070 fillthis=
"hctauD0sec_";
2072 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0);
2081 fillthis=
"hpseudoProperDLRecPrim_";
2083 ((TH1F*)listout->FindObject(fillthis))->Fill(x);
2086 fillthis=
"hresidual_Primary_";
2088 ((TH1F*)listout->FindObject(fillthis))->Fill(Residual);
2090 fillthis=
"hGenMatchRecPrim_";
2092 ((TH1F*)listout->FindObject(fillthis))->Fill(xgen);
2094 fillthis=
"hCorrNormLxyX_prim_";
2096 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy, x);
2098 fillthis=
"hCorrDistX_prim_";
2100 ((
TH2F*)listout->FindObject(fillthis))->Fill(dSecToPrim, x);
2102 fillthis=
"hCorrCosX_prim_";
2104 ((
TH2F*)listout->FindObject(fillthis))->Fill(CosinePointingAngle, x);
2106 fillthis=
"hCorrXd0D0_prim_";
2108 ((
TH2F*)listout->FindObject(fillthis))->Fill(x,impparXY);
2110 fillthis=
"hImpParXY_prim_";
2112 ((TH1F*)listout->FindObject(fillthis))->Fill(impparXY);
2115 fillthis=
"hctauD0prim_";
2117 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0);
2136 if(!prong0 || !prong1) {
2141 labprong[0]=prong0->GetLabel();
2142 labprong[1]=prong1->GetLabel();
2144 AliAODMCParticle *mcprong=0;
2145 Int_t pdgProng[2]={0,0};
2147 for (
Int_t iprong=0;iprong<2;iprong++){
2148 if(
fReadMC && labprong[iprong]>=0) {
2149 mcprong= (AliAODMCParticle*)arrMC->At(labprong[iprong]);
2150 pdgProng[iprong]=mcprong->GetPdgCode();
2160 fillthispi=
"hptpiSnoMcut_";
2163 fillthisK=
"hptKSnoMcut_";
2166 if ((TMath::Abs(pdgProng[0]) == 211 && TMath::Abs(pdgProng[1]) == 321)
2167 || (isSelectedPID==1 || isSelectedPID==3)){
2168 ((TH1F*)listout->FindObject(fillthispi))->Fill(prong0->Pt());
2169 ((TH1F*)listout->FindObject(fillthisK))->Fill(prong1->Pt());
2172 if ((TMath::Abs(pdgProng[0]) == 321 && TMath::Abs(pdgProng[1]) == 211)
2173 || (isSelectedPID==2 || isSelectedPID==3)){
2174 ((TH1F*)listout->FindObject(fillthisK))->Fill(prong0->Pt());
2175 ((TH1F*)listout->FindObject(fillthispi))->Fill(prong1->Pt());
2187 fillthispt=
"histSgnPt";
2189 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)
2190 || (!
fReadMC && (isSelectedPID==1 || isSelectedPID==3))){
2191 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0);
2194 fillthisetaphi=
"hetaphiD0candidateS_";
2195 fillthisetaphi+=ptbin;
2196 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2198 if(TMath::Abs(minvD0-mPDG)<0.05){
2199 fillthisetaphi=
"hetaphiD0candidatesignalregionS_";
2200 fillthisetaphi+=ptbin;
2201 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2207 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0bar);
2210 fillthisetaphi=
"hetaphiD0barcandidateS_";
2211 fillthisetaphi+=ptbin;
2212 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2214 if(TMath::Abs(minvD0bar-mPDG)<0.05){
2215 fillthisetaphi=
"hetaphiD0barcandidatesignalregionS_";
2216 fillthisetaphi+=ptbin;
2217 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2227 if(TMath::Abs(minvD0-mPDG)<invmasscut || TMath::Abs(minvD0bar-mPDG)<invmasscut){
2242 ptProng[0]=prong0->Pt(); ptProng[1]=prong1->Pt();
2243 d0Prong[0]=part->Getd0Prong(0); d0Prong[1]=part->Getd0Prong(1);
2244 decayLengthz = TMath::Sqrt(decayLength2-decayLengthxy*decayLengthxy);
2245 pzprong0 = prong0->Pz();
2246 pzprong1 = prong1->Pz();
2251 if(
fArray==1) cout<<
"LS signal: ERROR"<<endl;
2252 for (
Int_t iprong=0; iprong<2; iprong++){
2254 if (
fReadMC) labprong[iprong]=prong->GetLabel();
2258 if(
fReadMC && labprong[iprong]>=0) {
2259 mcprong= (AliAODMCParticle*)arrMC->At(labprong[iprong]);
2260 pdgprong=mcprong->GetPdgCode();
2263 Bool_t isPionHere[2]={(isSelectedPID==1 || isSelectedPID==3) ? kTRUE : kFALSE,(isSelectedPID==2 || isSelectedPID==3) ? kTRUE : kFALSE};
2265 if(TMath::Abs(pdgprong)==211 || isPionHere[iprong]) {
2269 fillthispi=
"hptpiS_";
2271 ((TH1F*)listout->FindObject(fillthispi))->Fill(ptProng[iprong]);
2277 fillthispi=
"hd0piS_";
2279 ((TH1F*)listout->FindObject(fillthispi))->Fill(d0Prong[iprong]);
2282 fillthispi=
"hd0vpiS_";
2284 ((TH1F*)listout->FindObject(fillthispi))->Fill(d0[iprong]);
2289 if(TMath::Abs(pdgprong)==321 || !isPionHere[iprong]) {
2294 ((TH1F*)listout->FindObject(fillthisK))->Fill(ptProng[iprong]);
2301 ((TH1F*)listout->FindObject(fillthisK))->Fill(d0Prong[iprong]);
2303 fillthisK=
"hd0vKS_";
2305 ((TH1F*)listout->FindObject(fillthisK))->Fill(d0[iprong]);
2310 fillthis=
"hcosthpointd0S_";
2312 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[iprong]);
2318 ((TH1F*)listout->FindObject(fillthis))->Fill(part->GetDCA());
2320 fillthis=
"hcosthetapointS_";
2322 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle);
2324 fillthis=
"hcosthetapointxyS_";
2331 ((TH1F*)listout->FindObject(fillthis))->Fill(part->
Prodd0d0());
2335 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLength2);
2337 fillthis=
"hnormdeclS_";
2339 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLength2);
2344 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0z);
2352 fillthis=
"hctauXYctauZS_" ;
2354 ((
TH2F*)listout->FindObject(fillthis))->Fill(CtauD0,CtauD0z);
2362 fillthis=
"hdeclxyS_";
2364 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLengthxy);
2366 fillthis=
"hnormdeclxyS_";
2368 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy);
2370 fillthis=
"hdeclxyd0d0S_";
2372 ((
TH2F*)listout->FindObject(fillthis))->Fill(decayLengthxy,d0Prong[0]*d0Prong[1]);
2376 fillthis=
"hnormdeclxyd0d0S_";
2378 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy,d0Prong[0]*d0Prong[1]);
2381 fillthis=
"hdeclvS_";
2383 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[0]);
2385 fillthis=
"hnormdeclvS_";
2387 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[1]);
2389 fillthis=
"hd0d0vS_";
2391 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1]);
2395 fillthis=
"hcosthetastarS_";
2397 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)) ((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0);
2399 if (
fReadMC || isSelectedPID>1)((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0bar);
2400 if(isSelectedPID==1 || isSelectedPID==3)((TH1F*)listout->FindObject(fillthis))->Fill(cosThetaStarD0);
2403 fillthis=
"hcosthpointd0d0S_";
2405 ((
TH2F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,part->
Prodd0d0());
2408 if ((
fReadMC && ((AliAODMCParticle*)arrMC->At(lab))->GetPdgCode() == 421)){
2409 for(
Int_t it=0; it<2; it++){
2412 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
2413 fillthis=
"hphiD0S_";
2415 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
2416 Int_t nPointsITS = 0;
2417 for (
Int_t il=0; il<6; il++){
2418 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
2420 fillthis=
"hNITSpointsD0vsptS_";
2422 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(),nPointsITS);
2423 fillthis=
"hNSPDpointsD0S_";
2425 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
2426 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
2428 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
2429 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
2431 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2432 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
2434 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2435 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
2437 fillthis=
"hNclsD0vsptS_";
2441 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
2445 if (
fReadMC || isSelectedPID>1){
2446 for(
Int_t it=0; it<2; it++){
2447 fillthis=
"hptD0barS_";
2449 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
2450 fillthis=
"hphiD0barS_";
2452 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
2453 fillthis=
"hNclsD0barvsptS_";
2457 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
2460 if(isSelectedPID==1 || isSelectedPID==3){
2461 for(
Int_t it=0; it<2; it++){
2464 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
2465 fillthis=
"hphiD0S_";
2467 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
2468 Int_t nPointsITS = 0;
2469 for (
Int_t il=0; il<6; il++){
2470 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
2472 fillthis=
"hNITSpointsD0vsptS_";
2474 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(), nPointsITS);
2475 fillthis=
"hNSPDpointsD0S_";
2477 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
2478 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
2480 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
2481 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
2483 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2484 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
2486 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2487 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
2489 fillthis=
"hNclsD0vsptS_";
2493 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
2511 fillthispt=
"histBkgPt";
2514 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0);
2517 fillthisetaphi=
"hetaphiD0candidateB_";
2518 fillthisetaphi+=ptbin;
2519 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2521 if(TMath::Abs(minvD0-mPDG)<0.05){
2522 fillthisetaphi=
"hetaphiD0candidatesignalregionB_";
2523 fillthisetaphi+=ptbin;
2524 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2528 ((TH1F*)listout->FindObject(fillthis))->Fill(minvD0bar);
2531 fillthisetaphi=
"hetaphiD0barcandidateB_";
2532 fillthisetaphi+=ptbin;
2533 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2535 if(TMath::Abs(minvD0bar-mPDG)<0.05){
2536 fillthisetaphi=
"hetaphiD0barcandidatesignalregionB_";
2537 fillthisetaphi+=ptbin;
2538 ((
TH2F*)listout->FindObject(fillthisetaphi))->Fill(etaD, phiD);
2543 fillthis=
"hptB1prongnoMcut_";
2546 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
2548 fillthis=
"hptB2prongsnoMcut_";
2550 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
2551 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(0))->Pt());
2556 if(TMath::Abs(minvD0-mPDG)<invmasscut || TMath::Abs(minvD0bar-mPDG)<invmasscut){
2568 ctau = part->
CtD0();
2579 CtauD0z = ((decayLengthz*mPDG*C)/(TMath::Sqrt(part->Pz()* part->Pz())));
2585 d0Prong[0]=part->Getd0Prong(0); d0Prong[1]=part->Getd0Prong(1);
2590 if(fDebug>2) cout<<
"No daughter found";
2595 if(prongg->Charge()==1) {
2597 ((TH1F*)
fOutputMass->FindObject(
"hpospair"))->Fill(ptbin);
2600 ((TH1F*)
fOutputMass->FindObject(
"hnegpair"))->Fill(ptbin);
2608 for(
Int_t it=0; it<2; it++){
2611 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
2612 fillthis=
"hphiD0B_";
2614 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
2616 Int_t nPointsITS = 0;
2617 for (
Int_t il=0; il<6; il++){
2618 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(il)) nPointsITS++;
2620 fillthis=
"hNITSpointsD0vsptB_";
2622 ((
TH2F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt(), nPointsITS);
2623 fillthis=
"hNSPDpointsD0B_";
2625 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && !(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1))){
2626 ((
TH1I*)listout->FindObject(fillthis))->Fill(0);
2628 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && !(((AliAODTrack*)(
fDaughterTracks.UncheckedAt(it)))->HasPointOnITSLayer(1))){
2629 ((
TH1I*)listout->FindObject(fillthis))->Fill(1);
2631 if(!(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0)) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2632 ((
TH1I*)listout->FindObject(fillthis))->Fill(2);
2634 if(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(0) && ((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->HasPointOnITSLayer(1)){
2635 ((
TH1I*)listout->FindObject(fillthis))->Fill(3);
2637 fillthis=
"hNclsD0vsptB_";
2641 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
2648 for(
Int_t it=0; it<2; it++){
2649 fillthis=
"hptD0barB_";
2651 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Pt());
2652 fillthis=
"hphiD0barB_";
2654 ((TH1F*)listout->FindObject(fillthis))->Fill(((AliAODTrack*)
fDaughterTracks.UncheckedAt(it))->Phi());
2655 fillthis=
"hNclsD0barvsptB_";
2659 ((
TH2F*)listout->FindObject(fillthis))->Fill(mom, ncls);
2665 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]);
2666 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[1]);
2669 Int_t pdgMother[2]={0,0};
2672 for(
Int_t iprong=0;iprong<2;iprong++){
2674 lab=prong->GetLabel();
2676 AliAODMCParticle* mcprong=(AliAODMCParticle*)arrMC->At(lab);
2678 Int_t labmom=mcprong->GetMother();
2680 AliAODMCParticle* mcmother=(AliAODMCParticle*)arrMC->At(labmom);
2681 if(mcmother) pdgMother[iprong]=mcmother->GetPdgCode();
2688 fillthis=
"hd0moresB_";
2691 if(TMath::Abs(pdgMother[iprong])==310 || TMath::Abs(pdgMother[iprong])==130 || TMath::Abs(pdgMother[iprong])==321){
2692 if(ptProng[iprong]<=1)factor[iprong]=1./.7;
2693 else factor[iprong]=1./.6;
2697 if(TMath::Abs(pdgMother[iprong])==3122) {
2698 factor[iprong]=1./0.25;
2701 fillthis=
"hd0moresB_";
2704 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[iprong],factor[iprong]);
2707 fillthis=
"hd0vmoresB_";
2709 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[iprong],factor[iprong]);
2715 fillthis=
"hd0d0moresB_";
2717 ((TH1F*)listout->FindObject(fillthis))->Fill(part->
Prodd0d0(),factor[0]*factor[1]);
2719 fillthis=
"hcosthetapointmoresB_";
2721 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,factor[0]*factor[1]);
2724 fillthis=
"hd0d0vmoresB_";
2726 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1],factor[0]*factor[1]);
2734 ((TH1F*)listout->FindObject(fillthis))->Fill(CtauD0z);
2739 fillthis=
"hctauXYctauZ_" ;
2741 ((
TH2F*)listout->FindObject(fillthis))->Fill(CtauD0,CtauD0z);
2746 Int_t pdgDgD0toKpi[2]={321,211};
2752 Double_t arrayForSparse[3]={invmassD0,pt,impparXY};
2753 Double_t arrayForSparseTrue[3]={invmassD0,pt,trueImpParXY};
2754 if (
fReadMC) labD0 = part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
2767 if(
fArray==1) cout<<
"LS signal ERROR"<<endl;
2769 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
2770 Int_t pdgD0 = partD0->GetPdgCode();
2786 if (weigD0 > 1.0 || weigD0 < 0.) {weigD0 = 0.;}
2787 if (weigD0bar > 1.0 || weigD0bar < 0.) {weigD0bar = 0.;}
2801 ((TH1F*)listout->FindObject(fillthis))->Fill(ptProng[0]);
2802 ((TH1F*)listout->FindObject(fillthis))->Fill(ptProng[1]);
2804 fillthis=
"hcosthetastarB_";
2812 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]);
2815 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[1]);
2817 fillthis=
"hcosthpointd0d0B_";
2819 ((
TH2F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,part->
Prodd0d0());
2821 fillthis=
"hcosthpointd0B_";
2823 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[0]);
2824 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle,d0Prong[1]);
2829 fillthis=
"hd0vp0B_";
2831 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]);
2832 fillthis=
"hd0vp1B_";
2834 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[1]);
2838 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]);
2839 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[1]);
2847 ((TH1F*)listout->FindObject(fillthis))->Fill(part->GetDCA());
2851 ((TH1F*)listout->FindObject(fillthis))->Fill(d0Prong[0]*d0Prong[1]);
2854 fillthis=
"hd0d0vB_";
2856 ((TH1F*)listout->FindObject(fillthis))->Fill(d0[0]*d0[1]);
2859 fillthis=
"hcosthetapointB_";
2861 ((TH1F*)listout->FindObject(fillthis))->Fill(cosPointingAngle);
2863 fillthis=
"hcosthetapointxyB_";
2869 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLength2);
2871 fillthis=
"hnormdeclB_";
2873 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLength2);
2882 fillthis=
"hdeclxyB_";
2884 ((TH1F*)listout->FindObject(fillthis))->Fill(decayLengthxy);
2886 fillthis=
"hnormdeclxyB_";
2888 ((TH1F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy);
2890 fillthis=
"hdeclxyd0d0B_";
2892 ((
TH2F*)listout->FindObject(fillthis))->Fill(decayLengthxy,d0Prong[0]*d0Prong[1]);
2894 fillthis=
"hnormdeclxyd0d0B_";
2896 ((
TH2F*)listout->FindObject(fillthis))->Fill(normalizedDecayLengthxy,d0Prong[0]*d0Prong[1]);
2901 fillthis=
"hdeclvB_";
2903 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[0]);
2905 fillthis=
"hnormdeclvB_";
2907 ((TH1F*)listout->FindObject(fillthis))->Fill(decl[1]);
2923 Double_t mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
2963 if(fDebug>2) cout<<
"Candidate selected"<<endl;
2973 Double_t arrayForSparse[3]={invmassD0,pt,impparXY};
2974 Double_t arrayForSparseTrue[3]={invmassD0,pt,trueImpParXY};
2978 TString fillthis=
"", fillthispt=
"", fillthismasspt=
"", fillthismassy=
"";
2979 Int_t pdgDgD0toKpi[2]={321,211};
2994 if (
fReadMC) labD0 = part->MatchToMC(421,arrMC,2,pdgDgD0toKpi);
3003 if (weigD0 > 1.0 || weigD0 < 0.) {weigD0 = 0.;}
3004 if (weigD0bar > 1.0 || weigD0bar < 0.) {weigD0bar = 0.;}
3014 arrayForSparse[0]=invmassD0; arrayForSparse[2]=impparXY;
3018 if(
fArray==1) cout<<
"LS signal ERROR"<<endl;
3020 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
3021 Int_t pdgD0 = partD0->GetPdgCode();
3033 arrayForSparseTrue[0]=invmassD0; arrayForSparseTrue[2]=trueImpParXY;
3039 fillthis=
"histSgn_";
3041 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
3046 fillthismasspt=
"histSgnPt";
3047 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
3058 fillthismassy=
"histSgnY_";
3059 fillthismassy+=ptbin;
3060 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
3065 fillthis=
"histSgn27_";
3067 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
3071 fillthis=
"histRfl_";
3073 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
3076 fillthismasspt=
"histRflPt";
3078 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
3082 fillthismassy=
"histRflY_";
3083 fillthismassy+=ptbin;
3085 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
3090 fillthis=
"histBkg_";
3092 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
3095 fillthismasspt=
"histBkgPt";
3097 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
3102 fillthismassy=
"histBkgY_";
3103 fillthismassy+=ptbin;
3105 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
3111 fillthis=
"histMass_";
3116 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0,weigD0);
3120 fillthismasspt=
"histMassPt";
3122 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0,pt,weigD0);
3130 fillthismassy=
"histMassY_";
3131 fillthismassy+=ptbin;
3133 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0,y,weigD0);
3141 arrayForSparse[0]=invmassD0bar; arrayForSparse[2]=impparXY;
3145 if(
fArray==1) cout<<
"LS signal ERROR"<<endl;
3146 AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
3147 Int_t pdgD0 = partD0->GetPdgCode();
3155 arrayForSparseTrue[0]=invmassD0bar; arrayForSparseTrue[2]=trueImpParXY;
3158 fillthis=
"histSgn_";
3160 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
3164 fillthismasspt=
"histSgnPt";
3166 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
3178 fillthismassy=
"histSgnY_";
3179 fillthismassy+=ptbin;
3181 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
3185 fillthis=
"histRfl_";
3187 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
3189 fillthismasspt=
"histRflPt";
3191 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
3194 fillthismassy=
"histRflY_";
3195 fillthismassy+=ptbin;
3197 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
3201 fillthis=
"histBkg_";
3203 ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar,weigD0bar);
3206 fillthismasspt=
"histBkgPt";
3208 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
3212 fillthismassy=
"histBkgY_";
3213 fillthismassy+=ptbin;
3215 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
3219 fillthis=
"histMass_";
3223 ((TH1F*)listout->FindObject(fillthis))->Fill(invmassD0bar,weigD0bar);
3227 fillthismasspt=
"histMassPt";
3229 ((
TH2F*)(
fOutputMassPt->FindObject(fillthismasspt)))->Fill(invmassD0bar,pt,weigD0bar);
3233 fillthismassy=
"histMassY_";
3234 fillthismassy+=ptbin;
3236 ((
TH2F*)(
fOutputMassY->FindObject(fillthismassy)))->Fill(invmassD0bar,y,weigD0bar);
3249 Int_t nTrksToSkip=2;
3252 AliDebug(2,
"no daughter found!");
3255 skipped[0]=dgTrack->GetID();
3258 AliDebug(2,
"no daughter found!");
3261 skipped[1]=dgTrack->GetID();
3263 AliESDVertex *vertexESD=0x0;
3264 AliAODVertex *vertexAOD=0x0;
3265 AliVertexerTracks *vertexer =
new AliVertexerTracks(aodev->GetMagneticField());
3268 vertexer->SetSkipTracks(nTrksToSkip,skipped);
3269 vertexer->SetMinClusters(4);
3270 vertexESD = (AliESDVertex*)vertexer->FindPrimaryVertex(aodev);
3271 if(!vertexESD)
return vertexAOD;
3272 if(vertexESD->GetNContributors()<=0) {
3273 AliDebug(2,
"vertexing failed");
3274 delete vertexESD; vertexESD=NULL;
3278 delete vertexer; vertexer=NULL;
3283 vertexESD->GetXYZ(pos);
3284 vertexESD->GetCovMatrix(cov);
3285 chi2perNDF = vertexESD->GetChi2toNDF();
3286 delete vertexESD; vertexESD=NULL;
3288 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF);
3299 if(fDebug > 1) printf(
"AnalysisTaskSED0Mass: Terminate() \n");
3304 printf(
"ERROR: fOutputMass not available\n");
3309 printf(
"ERROR: fOutputMass not available\n");
3316 printf(
"ERROR: fDistr not available\n");
3321 fNentries =
dynamic_cast<TH1F*
>(GetOutputData(3));
3324 printf(
"ERROR: fNEntries not available\n");
3329 printf(
"ERROR: fCuts not available\n");
3334 printf(
"ERROR: fCounter not available\n");
3340 printf(
"ERROR: fDetSignal not available\n");
3347 printf(
"ERROR: fOutputMassY not available\n");
3356 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));
3379 nameDistr=
"hd0d0B_";
3382 nameDistr=
"hcosthetapointB_";
3389 nameDistr=
"hcosthetastarB_";
3392 nameDistr=
"hcosthpointd0d0B_";
3409 TCanvas *cMass=
new TCanvas(cvname,cvname);
3413 TCanvas* cStat=
new TCanvas(cstname,Form(
"Stat%s",
fArray ?
"LS" :
"D0"));
3429 Int_t nmassbins=200;
3430 Double_t fLowmasslimit=1.5648, fUpmasslimit=2.1648;
3431 Int_t fNImpParBins=400;
3432 Double_t fLowerImpPar=-2000., fHigherImpPar=2000.;
3434 Double_t xmin[3]={fLowmasslimit,0.,fLowerImpPar};
3435 Double_t xmax[3]={fUpmasslimit,20.,fHigherImpPar};
3439 "Mass vs. pt vs.imppar - All",
3442 "Mass vs. pt vs.imppar - promptD",
3445 "Mass vs. pt vs.imppar - DfromB",
3448 "Mass vs. pt vs.true imppar -DfromB",
3451 "Mass vs. pt vs.imppar - backgr.",
3454 for(
Int_t i=0; i<5;i++){
3463 printf(
" AliAnalysisTaskSED0MassNonPromptFractionV1::GetTrueImpactParameter() \n");
3466 mcHeader->GetVertex(vtxTrue);
3468 partD0->XvYvZv(origD);
3470 Double_t pXdauTrue[2],pYdauTrue[2],pZdauTrue[2];
3471 for(
Int_t iDau=0; iDau<2; iDau++){
3478 Int_t labelFirstDau = partD0->GetDaughter(0);
3480 for(
Int_t iDau=0; iDau<2; iDau++){
3481 Int_t ind = labelFirstDau+iDau;
3482 AliAODMCParticle* part =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(ind));
3484 Int_t pdgCode = TMath::Abs( part->GetPdgCode() );
3486 AliError(
"Daughter particle not found in MC array");
3489 if(pdgCode==211 || pdgCode==321){
3490 pXdauTrue[iDau]=part->Px();
3491 pYdauTrue[iDau]=part->Py();
3492 pZdauTrue[iDau]=part->Pz();
3497 AliAODRecoDecayHF aodDzeroMC(vtxTrue,origD,2,charge,pXdauTrue,pYdauTrue,pZdauTrue,d0dummy);
3509 Int_t pdgGranma = 0;
3511 mother = mcPartCandidate->GetMother();
3513 Int_t abspdgGranma =0;
3515 Bool_t isQuarkFound=kFALSE;
3518 AliAODMCParticle* mcGranma =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(mother));
3520 pdgGranma = mcGranma->GetPdgCode();
3521 abspdgGranma = TMath::Abs(pdgGranma);
3522 if ((abspdgGranma > 500 && abspdgGranma < 600) || (abspdgGranma > 5000 && abspdgGranma < 6000)){
3525 if(abspdgGranma==4 || abspdgGranma==5) isQuarkFound=kTRUE;
3526 mother = mcGranma->GetMother();
3528 AliError(
"Failed casting the mother particle!");
3533 if(isFromB)
return 5;
Int_t fIsSelectedCandidate
keeps the daughter tracks
TList * fDetSignal
flag to decide whether to draw the TPC dE/dx and TOF signal before/after PID
Bool_t fFillYHist
flag to fill Pt and Impact Parameter Histograms
Double_t * fCandidateVariables
! variables to be written to the tree
AliAODVertex * GetPrimaryVtxSkipped(AliAODEvent *aodev)
virtual void UserExec(Option_t *option)
Bool_t fDrawDetSignal
flag to decide whether to fill "PID = x" bins in fNentrie
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)
Bool_t GetCombPID() const
TH1F * fNentries
! histogram with number of events on output slot 3
Bool_t HasSelectionBit(Int_t i) const
TList * fOutputMassY
! list send on output slot 9
Int_t fFillOnlyD0D0bar
normalization
void UnsetOwnPrimaryVtx()
TList * fOutputMassPt
! list send on output slot 6
Double_t NormalizedDecayLength2() const
Double_t ImpParXY() const
static Int_t CheckMatchingAODdeltaAODevents()
Bool_t fFillVarHists
flag for filling var hists only after cuts
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables
AliNormalizationCounter * fCounter
! AliNormalizationCounter on output slot 5
Int_t GetWhyRejection() const
Double_t CosPointingAngleXY() const
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
Double_t InvMassD0() const
Bool_t fReadMC
can be D0 or Like Sign candidates
ULong_t GetSelectionMap() const
Double_t Prodd0d0() const
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
virtual void Terminate(Option_t *option)
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Functions to check the decay tree.
Float_t GetTrueImpactParameter(AliAODMCHeader *mcHeader, TClonesArray *arrayMC, AliAODMCParticle *partD0) const
void FillMCGenHists(AliAODEvent *aod, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout)
TH2F * fhMultVZEROTPCoutTrackCorr
!
Int_t fAODProtection
flag to check or not the selection bit
Int_t GetBayesianStrategy() const
Bool_t HasBadDaughters() const
TObjArray fDaughterTracks
flag to fill mass histogram with D0/D0bar only (0 = fill with both, 1 = fill with D0 only...
Double_t CosThetaStarD0bar() const
angle of K
Bool_t fUsePid4Distr
flag to decide if apply cut also on distributions: 0 no cuts, 1 looser cuts, 2 tighter/ cuts ...
Bool_t fFillAfterCuts
selection outcome
virtual ~AliAnalysisTaskSED0MassNonPromptFraction()
Bool_t fUseSelectionBit
flag to fill Pt and Impact Parameter Histograms
AliRDHFCutsD0toKpi * fCuts
Double_t InvMassD0bar() const
Bool_t fEnablePileupRejVZEROTPCout
void FillVarHists(AliAODEvent *aodev, AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout)
Double_t DecayLength2() const
kinematics & topology
void CreateImpactParameterHistos()
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)
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Double_t DecayLengthXY() const
Bool_t GetIsPrimaryWithoutDaughters() const
AliAnalysisTaskSED0MassNonPromptFraction()
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.)
THnSparseF * fHistMassPtImpParTC[5]
! histograms for impact paramter studies
Bool_t fFillPtHist
flag to reject events with SDD clusters
virtual Int_t IsSelectedPID(AliAODRecoDecayHF *rd)
Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const
Bool_t fCutOnDistr
flag for MC array: kTRUE = read it, kFALSE = do not read it
void FillMassHists(AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliAODMCHeader *mcHeader, AliRDHFCutsD0toKpi *cuts, TList *listout)
Bool_t fUseQuarkTagInKine
TH2 * Scale(TH2 *h, TH1 *g)
TH2F * fhMultVZEROTPCoutTrackCorrNoCut
!
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
void DrawDetSignal(AliAODRecoDecayHF2Prong *part, TList *ListDetSignal)
Bool_t fWriteVariableTree
Bool_t fFillImpParHist
flag to fill Y Histograms
Double_t CosPointingAngle() const
Double_t DecayLengthXYError() const
Double_t CosThetaStarD0() const
Bool_t fIsRejectSDDClusters
fSys=0 -> p-p; fSys=1 ->PbPb (in this case fFillVarHists=kFALSE by default: set it to kTRUE after if ...
TList * fDistr
! list send on output slot 2
Int_t PtBin(Double_t pt) const
Double_t fLsNormalization
number of pt bins
Double_t * GetWeightsNegative() const
TList * fOutputMass
! list send on output slot 1