@@ -217,8 +217,9 @@ struct PiKpRAA {
217217 ConfigurableAxis binsPtNcl{" binsPtNcl" , {VARIABLE_WIDTH, 0.0 , 0.15 , 0.2 , 0.3 , 0.4 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.2 , 1.4 , 1.6 , 1.8 , 2.0 , 2.5 , 3.0 , 3.5 , 4.0 , 5.0 , 7.0 , 9.0 , 12.0 , 15.0 , 20.0 , 25.0 , 30.0 , 35.0 , 40.0 , 45.0 , 50.0 }, " pT" };
218218 ConfigurableAxis binsPt{" binsPt" , {VARIABLE_WIDTH, 0.0 , 0.1 , 0.12 }, " pT binning" };
219219 ConfigurableAxis binsCent{" binsCent" , {VARIABLE_WIDTH, 0 ., 5 ., 10 ., 20 ., 30 ., 40 ., 50 ., 60 ., 70 ., 80 ., 90 ., 100 .}, " T0C binning" };
220- ConfigurableAxis axisEta{" axisEta" , {50 , -1.0 , 1.0 }, " Eta axix" };
221- ConfigurableAxis axisY{" axisY" , {50 , -1.0 , 1.0 }, " rapidity axix" };
220+ ConfigurableAxis binsZpos{" binsZpos" , {60 , -30.0 , 30.0 }, " Z pos axis" };
221+ ConfigurableAxis axisEta{" axisEta" , {50 , -1.0 , 1.0 }, " Eta axis" };
222+ ConfigurableAxis axisY{" axisY" , {50 , -1.0 , 1.0 }, " rapidity axis" };
222223 ConfigurableAxis axisArmAlpha{" axisArmAlpha" , {200 , -1.0 , 1.0 }, " Armenteros alpha" };
223224 ConfigurableAxis axisArmqT{" axisArmqT" , {600 , 0 .0f , 0 .3f }, " Armenteros qT" };
224225 ConfigurableAxis axisK0Mass{" axisK0Mass" , {200 , 0 .4f , 0 .6f }, " Mass K0Short" };
@@ -345,21 +346,19 @@ struct PiKpRAA {
345346
346347 // define axes you want to use
347348 const std::string titlePorPt{v0Selections.usePinPhiSelection ? " #it{p} (GeV/#it{c})" : " #it{p}_{T} (GeV/#it{c})" };
348- const AxisSpec axisZpos{80 , - 20 ., 20 . , " Vtx_{z} (cm)" };
349+ const AxisSpec axisZpos{binsZpos , " Vtx_{z} (cm)" };
349350 const AxisSpec axisEvent{15 , 0.5 , 15.5 , " " };
350351 const AxisSpec axisNcl{161 , -0.5 , 160.5 , " #it{N}_{cl} TPC" };
351352 const AxisSpec axisPt{binsPt, " #it{p}_{T} (GeV/#it{c})" };
352353 const AxisSpec axisPtV0s{binsPtV0s, " #it{p}_{T} (GeV/#it{c})" };
353354 const AxisSpec axisPtNcl{binsPtNcl, Form (" %s" , titlePorPt.data ())};
354355 const AxisSpec axisXPhiCut{binsPtPhiCut, Form (" %s" , titlePorPt.data ())};
355356 const AxisSpec axisCent{binsCent, " Centrality Perc." };
356- // const char* endingEta[kNEtaHists] = {"02", "24", "46", "68"};
357- // const char* latexEta[kNEtaHists] = {"0<|#eta|<0.2", "0.2<#eta<0.4", "0.4<#eta<0.6", "0.6<#eta<0.8"};
358357 const char * endingEta[kNEtaHists ] = {" 86" , " 64" , " 42" , " 20" , " 02" , " 24" , " 46" , " 68" };
359358 const char * latexEta[kNEtaHists ] = {" -0.8<#eta<-0.6" , " -0.6<#eta<-0.4" , " -0.4<#eta<-0.2" , " -0.2<#eta<0" , " 0<#eta<0.2" , " 0.2<#eta<0.4" , " 0.4<#eta<0.6" , " 0.6<#eta<0.8" };
360359
361360 registry.add (" EventCounter" , " ;;Events" , kTH1F , {axisEvent});
362- registry.add (" zPos" , " ;;Entries;" , kTH1F , {axisZpos});
361+ registry.add (" zPos" , " With Event Selection ;;Entries;" , kTH1F , {axisZpos});
363362 registry.add (" T0Ccent" , " ;;Entries" , kTH1F , {axisCent});
364363 registry.add (" NclVsEtaPID" , " ;#eta;Ncl used for PID" , kTH2F , {{{axisEta}, {161 , -0.5 , 160.5 }}});
365364 registry.add (" NclVsEtaPIDp" , " ;#eta;#LTNcl#GT used for PID" , kTProfile , {axisEta});
@@ -491,7 +490,7 @@ struct PiKpRAA {
491490 }
492491
493492 if (doprocessMC || doprocessSim) {
494- registry.add (" zPosMC" , " ;Gen. Coll. With at least One Ass. Rec. Coll. ;Entries;" , kTH1F , {axisZpos});
493+ registry.add (" zPosMC" , " Generated Events With at least One Rec. Collision + Sel. criteria; ;Entries;" , kTH1F , {axisZpos});
495494 registry.add (" dcaVsPtPiDec" , " Secondary pions from decays;#it{p}_{T} (GeV/#it{c});DCA_{xy} (cm);Centrality Perc.;" , kTH3F , {axisPt, axisDCAxy, axisCent});
496495 registry.add (" dcaVsPtPrDec" , " Secondary protons from decays;#it{p}_{T} (GeV/#it{c});DCA_{xy} (cm);Centrality Perc.;" , kTH3F , {axisPt, axisDCAxy, axisCent});
497496 registry.add (" dcaVsPtPiMat" , " Secondary pions from material interactions;#it{p}_{T} (GeV/#it{c});DCA_{xy} (cm);Centrality Perc.;" , kTH3F , {axisPt, axisDCAxy, axisCent});
@@ -513,8 +512,12 @@ struct PiKpRAA {
513512 }
514513
515514 if (doprocessSim) {
515+
516516 registry.add (" NumberOfRecoCollisions" , " Number of times Gen. Coll.are reconstructed;N;Entries" , kTH1F , {{10 , -0.5 , 9.5 }});
517517
518+ // Pt resolution
519+ registry.add (" PtResolution" , " p_{T} resolution;;(pt_{rec} - pt_{gen})/pt_{gen};" , kTH2F , {axisPt, {100 , -1.0 , 1.0 }});
520+
518521 // Needed to calculate the numerator of the Acceptance X Efficiency
519522 registry.add (" PtPiVsCent_WithRecoEvt" , " Generated Events With at least One Rec. Collision + Sel. criteria;;;" , kTH2F , {axisPt, axisCent});
520523 registry.add (" PtKaVsCent_WithRecoEvt" , " Generated Events With at least One Rec. Collision + Sel. criteria;;;" , kTH2F , {axisPt, axisCent});
@@ -533,7 +536,8 @@ struct PiKpRAA {
533536 registry.add (" NchMC_AllGen" , " Generated Nch of All Gen. Evts.;Gen. Nch;Entries" , kTH1F , {{nBinsNch, minNch, maxNch}});
534537
535538 // Needed to measure Event Splitting
536- registry.add (" Centrality_WithRecoEvt" , " Generated Events With at least One Rec. Collision + Sel. criteria;;Entries" , kTH1F , {axisCent});
539+ registry.add (" Centrality_WRecoEvt" , " Generated Events With at least One Rec. Collision And NO Sel. criteria;;Entries" , kTH1F , {axisCent});
540+ registry.add (" Centrality_WRecoEvtWSelCri" , " Generated Events With at least One Rec. Collision + Sel. criteria;;Entries" , kTH1F , {axisCent});
537541 registry.add (" Centrality_AllRecoEvt" , " Generated Events Irrespective of the number of times it was reconstructed + Evt. Selections;;Entries" , kTH1F , {axisCent});
538542
539543 // Needed to calculate the numerator of the Signal Loss correction
@@ -1438,9 +1442,9 @@ struct PiKpRAA {
14381442 nChMC++;
14391443 }
14401444
1441- registry.fill (HIST (" zPosMC" ), mccollision.posZ ());
1442-
14431445 const float centrality{isT0Ccent ? collision.centFT0C () : collision.centFT0M ()};
1446+ registry.fill (HIST (" Centrality_WRecoEvt" ), centrality);
1447+ registry.fill (HIST (" zPosMC" ), mccollision.posZ ());
14441448
14451449 // ---------------------------
14461450 // All Generated events with at least one associated reconstructed collision
@@ -1456,10 +1460,11 @@ struct PiKpRAA {
14561460 auto charge{0 .};
14571461 // Get the MC particle
14581462 auto * pdgParticle = pdg->GetParticle (particle.pdgCode ());
1459- if (pdgParticle != nullptr )
1463+ if (pdgParticle != nullptr ) {
14601464 charge = pdgParticle->Charge ();
1461- else
1465+ } else {
14621466 continue ;
1467+ }
14631468
14641469 // Is it a charged particle?
14651470 if (std::abs (charge) < kMinCharge )
@@ -1495,7 +1500,7 @@ struct PiKpRAA {
14951500 continue ;
14961501 }
14971502
1498- registry.fill (HIST (" Centrality_WithRecoEvt " ), centrality);
1503+ registry.fill (HIST (" Centrality_WRecoEvtWSelCri " ), centrality);
14991504 registry.fill (HIST (" NchMCVsCent" ), centrality, nChMC);
15001505 registry.fill (HIST (" NchMC_WithRecoEvt" ), nChMC);
15011506 registry.fill (HIST (" T0Ccent" ), centrality);
@@ -1522,10 +1527,11 @@ struct PiKpRAA {
15221527 const auto & particle{track.mcParticle ()};
15231528 auto charge{0 .};
15241529 auto * pdgParticle = pdg->GetParticle (particle.pdgCode ());
1525- if (pdgParticle != nullptr )
1530+ if (pdgParticle != nullptr ) {
15261531 charge = pdgParticle->Charge ();
1527- else
1532+ } else {
15281533 continue ;
1534+ }
15291535
15301536 // Is it a charged particle?
15311537 if (std::abs (charge) < kMinCharge )
@@ -1549,21 +1555,23 @@ struct PiKpRAA {
15491555 bool isPrimary{false };
15501556 bool isDecay{false };
15511557 bool isMaterial{false };
1552- if (particle.isPhysicalPrimary ())
1558+ if (particle.isPhysicalPrimary ()) {
15531559 isPrimary = true ;
1554- else if (particle.getProcess () == TMCProcess::kPDecay )
1560+ } else if (particle.getProcess () == TMCProcess::kPDecay ) {
15551561 isDecay = true ;
1556- else
1562+ } else {
15571563 isMaterial = true ;
1564+ }
15581565
15591566 bool isPi{false };
15601567 bool isPr{false };
1561- if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus )
1568+ if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus ) {
15621569 isPi = true ;
1563- else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar )
1570+ } else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar ) {
15641571 isPr = true ;
1565- else
1572+ } else {
15661573 continue ;
1574+ }
15671575
15681576 if (isPrimary && !isDecay && !isMaterial) {
15691577 if (isPi && !isPr)
@@ -1607,10 +1615,11 @@ struct PiKpRAA {
16071615 const auto & particle{track.mcParticle ()};
16081616 auto charge{0 .};
16091617 auto * pdgParticle = pdg->GetParticle (particle.pdgCode ());
1610- if (pdgParticle != nullptr )
1618+ if (pdgParticle != nullptr ) {
16111619 charge = pdgParticle->Charge ();
1612- else
1620+ } else {
16131621 continue ;
1622+ }
16141623
16151624 // Is it a charged particle?
16161625 if (std::abs (charge) < kMinCharge )
@@ -1658,14 +1667,15 @@ struct PiKpRAA {
16581667 bool isKa{false };
16591668 bool isPr{false };
16601669
1661- if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus )
1670+ if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus ) {
16621671 isPi = true ;
1663- else if (particle.pdgCode () == PDG_t::kKPlus || particle.pdgCode () == PDG_t::kKMinus )
1672+ } else if (particle.pdgCode () == PDG_t::kKPlus || particle.pdgCode () == PDG_t::kKMinus ) {
16641673 isKa = true ;
1665- else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar )
1674+ } else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar ) {
16661675 isPr = true ;
1667- else
1676+ } else {
16681677 continue ;
1678+ }
16691679
16701680 if (isPi && !isKa && !isPr)
16711681 registry.fill (HIST (" PtPiVsCent_WithRecoEvt" ), track.pt (), centrality);
@@ -1674,6 +1684,7 @@ struct PiKpRAA {
16741684 if (isPr && !isPi && !isKa)
16751685 registry.fill (HIST (" PtPrVsCent_WithRecoEvt" ), track.pt (), centrality);
16761686
1687+ registry.fill (HIST (" PtResolution" ), particle.pt (), (track.pt () - particle.pt ()) / particle.pt ());
16771688 } // Loop over reconstructed tracks
16781689 } // Loop over Reco. Collisions: These collisions are not required to pass the event selection
16791690 } // If condition: Only simulated evets with at least one reconstrued collision
@@ -1695,10 +1706,11 @@ struct PiKpRAA {
16951706 auto charge{0 .};
16961707 // Get the MC particle
16971708 auto * pdgParticle = pdg->GetParticle (particle.pdgCode ());
1698- if (pdgParticle != nullptr )
1709+ if (pdgParticle != nullptr ) {
16991710 charge = pdgParticle->Charge ();
1700- else
1711+ } else {
17011712 continue ;
1713+ }
17021714
17031715 // Is it a charged particle?
17041716 if (std::abs (charge) < kMinCharge )
@@ -1721,10 +1733,11 @@ struct PiKpRAA {
17211733 auto charge{0 .};
17221734 // Get the MC particle
17231735 auto * pdgParticle = pdg->GetParticle (particle.pdgCode ());
1724- if (pdgParticle != nullptr )
1736+ if (pdgParticle != nullptr ) {
17251737 charge = pdgParticle->Charge ();
1726- else
1738+ } else {
17271739 continue ;
1740+ }
17281741
17291742 // Is it a charged particle?
17301743 if (std::abs (charge) < kMinCharge )
@@ -1736,14 +1749,15 @@ struct PiKpRAA {
17361749 isPrimary = false ;
17371750
17381751 if (isPrimary) {
1739- if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus ) // pion
1752+ if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus ) {
17401753 registry.fill (HIST (" PtPiVsNchMC_AllGen" ), particle.pt (), nChMC);
1741- else if (particle.pdgCode () == PDG_t::kKPlus || particle.pdgCode () == PDG_t::kKMinus ) // kaon
1754+ } else if (particle.pdgCode () == PDG_t::kKPlus || particle.pdgCode () == PDG_t::kKMinus ) {
17421755 registry.fill (HIST (" PtKaVsNchMC_AllGen" ), particle.pt (), nChMC);
1743- else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar ) // proton
1756+ } else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar ) {
17441757 registry.fill (HIST (" PtPrVsNchMC_AllGen" ), particle.pt (), nChMC);
1745- else
1758+ } else {
17461759 continue ;
1760+ }
17471761 }
17481762 } // Loop over Generated Particles
17491763 registry.fill (HIST (" NchMC_AllGen" ), nChMC);
0 commit comments