@@ -67,6 +67,7 @@ struct MultiplicityPt {
6767 static constexpr int CentBinMax = 100 ;
6868 static constexpr int MultBinMax = 200 ;
6969 static constexpr int RecMultBinMax = 100 ;
70+ static constexpr int ParticlesType = 4 ;
7071
7172 enum INELCutSelection : int {
7273 INEL = 0 ,
@@ -111,6 +112,16 @@ struct MultiplicityPt {
111112 Configurable<float > cfgCutNsigmaPi{" cfgCutNsigmaPi" , 3 .0f , " nsigma cut for pions" };
112113 Configurable<float > cfgCutNsigmaKa{" cfgCutNsigmaKa" , 2 .5f , " nsigma cut for kaons" };
113114 Configurable<float > cfgCutNsigmaPr{" cfgCutNsigmaPr" , 2 .5f , " nsigma cut for protons" };
115+ // Histogram names for V0s dE/dx analysis
116+ static constexpr std::string_view DedxvsMomentumPos[ParticlesType] = {" dEdx_vs_Momentum_all_Pos" , " dEdx_vs_Momentum_Pi_v0_Pos" , " dEdx_vs_Momentum_Pr_v0_Pos" , " dEdx_vs_Momentum_El_v0_Pos" };
117+ static constexpr std::string_view DedxvsMomentumNeg[ParticlesType] = {" dEdx_vs_Momentum_all_Neg" , " dEdx_vs_Momentum_Pi_v0_Neg" , " dEdx_vs_Momentum_Pr_v0_Neg" , " dEdx_vs_Momentum_El_v0_Neg" };
118+ // Particle fractions histograms
119+ static constexpr std::string_view ParticleFractionsVsMomentumPos[ParticlesType + 1 ] = {" hFractionVsMomentum_Pion_Pos" , " hFractionVsMomentum_Kaon_Pos" , " hFractionVsMomentum_Proton_Pos" , " hFractionVsMomentum_Electron_Pos" , " hFractionVsMomentum_Muon_Pos" };
120+
121+ static constexpr std::string_view ParticleFractionsVsPtPos[ParticlesType + 1 ] = {" hFractionVsPt_Pion_Pos" , " hFractionVsPt_Kaon_Pos" , " hFractionVsPt_Proton_Pos" , " hFractionVsPt_Electron_Pos" , " hFractionVsPt_Muon_Pos" };
122+ static constexpr std::string_view ParticleFractionsVsMomentumNeg[ParticlesType + 1 ] = {" hFractionVsMomentum_Pion_Neg" , " hFractionVsMomentum_Kaon_Neg" , " hFractionVsMomentum_Proton_Neg" , " hFractionVsMomentum_Electron_Neg" , " hFractionVsMomentum_Muon_Neg" };
123+
124+ static constexpr std::string_view ParticleFractionsVsPtNeg[ParticlesType + 1 ] = {" hFractionVsPt_Pion_Neg" , " hFractionVsPt_Kaon_Neg" , " hFractionVsPt_Proton_Neg" , " hFractionVsPt_Electron_Neg" , " hFractionVsPt_Muon_Neg" };
114125
115126 TrackSelection customTrackCuts;
116127 TF1* fphiCutLow = nullptr ;
@@ -346,6 +357,10 @@ void MultiplicityPt::init(InitContext const&)
346357 // Axis definitions
347358 ConfigurableAxis ptBinning{" ptBinning" , {VARIABLE_WIDTH, 0.1 , 0.12 , 0.14 , 0.16 , 0.18 , 0.2 , 0.25 , 0.3 , 0.35 , 0.4 , 0.45 , 0.5 , 0.55 , 0.6 , 0.65 , 0.7 , 0.75 , 0.8 , 0.85 , 0.9 , 0.95 , 1.0 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2.0 , 2.1 , 2.2 , 2.3 , 2.4 , 2.5 , 2.6 , 2.7 , 2.8 , 2.9 , 3.0 , 3.2 , 3.4 , 3.6 , 3.8 , 4.0 , 4.5 , 5.0 , 5.5 , 6.0 , 6.5 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0 , 12.0 , 13.0 , 14.0 , 15.0 , 16.0 , 18.0 , 20.0 }, " pT bin limits" };
348359 AxisSpec ptAxis = {ptBinning, " #it{p}_{T} (GeV/#it{c})" };
360+ AxisSpec dedxAxis{100 , 0.0 , 100.0 , " dE/dx (a. u.)" };
361+ AxisSpec etaAxis{8 , -0.8 , 0.8 , " #eta" };
362+ AxisSpec pAxis = {ptBinning, " #it{p} (GeV/#it{c})" };
363+
349364
350365 std::vector<double > centBinningStd = {0 ., 1 ., 5 ., 10 ., 15 ., 20 ., 30 ., 40 ., 50 ., 60 ., 70 ., 80 ., 90 ., 100 .};
351366 AxisSpec centAxis = {centBinningStd, " FT0M Centrality (%)" };
@@ -450,11 +465,47 @@ void MultiplicityPt::init(InitContext const&)
450465 ue.add (" hEventsReco_Cent" , " Reconstructed events vs centrality;FT0M Centrality (%);Counts" , HistType::kTH1D , {centAxis});
451466 ue.add (" hEventsINEL_Cent" , " INEL>0 events vs centrality;FT0M Centrality (%);Counts" , HistType::kTH1D , {centAxis});
452467
453- ue.add (" hNclFoundTPC" , " Number of TPC found clusters" , HistType::kTH1D , {{200 , 0 , 200 }});
454- ue.add (" hNclPIDTPC" , " Number of TPC PID clusters" , HistType::kTH1D , {{200 , 0 , 200 }});
468+ ue.add (" hNclFoundTPCBefore" , " Number of TPC found clusters before tkr cuts" , HistType::kTH1D , {{200 , 0 , 200 }});
469+ ue.add (" hNclPIDTPCBefore" , " Number of TPC PID clusters before tkr cuts" , HistType::kTH1D , {{200 , 0 , 200 }});
470+ ue.add (" hNclFoundTPCAfter" , " Number of TPC found after tkr cuts" , HistType::kTH1D , {{200 , 0 , 200 }});
471+ ue.add (" hNclPIDTPCAfter" , " Number of TPC PID after tkr cuts" , HistType::kTH1D , {{200 , 0 , 200 }});
455472 ue.add (" hEta" , " Track eta;#eta;Counts" , HistType::kTH1D , {{20 , -0.8 , 0.8 }});
456473 ue.add (" hPhi" , " Track phi;#varphi (rad);Counts" , HistType::kTH1D , {{64 , 0 , TwoPI}});
457474 ue.add (" hvtxZ" , " Vertex Z (data);Vertex Z (cm);Events" , HistType::kTH1F , {{40 , -20.0 , 20.0 }});
475+
476+ // De/Dx for ch and v0 particles
477+ for (int i = 0 ; i < ParticlesType; ++i) {
478+ ue.add ((" DedxVsMomentum/" + std::string (DedxvsMomentumPos[i])).c_str (),
479+ " dE/dx vs Momentum Positive" , HistType::kTH3F ,
480+ {{pAxis}, {dedxAxis}, {etaAxis}});
481+ ue.add ((" DedxVsMomentum/" + std::string (DedxvsMomentumNeg[i])).c_str (),
482+ " dE/dx vs Momentum Negative" , HistType::kTH3F ,
483+ {{pAxis}, {dedxAxis}, {etaAxis}});
484+ }
485+
486+ // ===== Particle Fractions as function of p and pT =====
487+ ue.add (" ParticleFractions/hTotalCountsVsMomentumPos" , " Total counts vs momentum;#it{p} (GeV/#it{c});Counts" , HistType::kTH2D ,{{etaAxis}, {pAxis}});
488+ ue.add (" ParticleFractions/hTotalCountsVsPtPos" , " Total counts vs pT;#it{p}_{T} (GeV/#it{c});Counts" , HistType::kTH2D ,{{etaAxis}, {ptAxis}});
489+ ue.add (" ParticleFractions/hTotalCountsVsMomentumNeg" , " Total counts vs momentum;#it{p} (GeV/#it{c});Counts" , HistType::kTH2D ,{{etaAxis}, {pAxis}});
490+ ue.add (" ParticleFractions/hTotalCountsVsPtNeg" , " Total counts vs pT;#it{p}_{T} (GeV/#it{c});Counts" , HistType::kTH2D , {{etaAxis},{ptAxis}});
491+
492+ for (int i = 0 ; i < ParticlesType + 1 ; ++i) {
493+ ue.add ((" ParticleFractions/" + std::string (ParticleFractionsVsMomentumPos[i])).c_str (),
494+ " Particle fraction vs momentum" , HistType::kTH2D , {{etaAxis}, {pAxis}});
495+ ue.add ((" ParticleFractions/" + std::string (ParticleFractionsVsPtPos[i])).c_str (),
496+ " Particle fraction vs pT" , HistType::kTH2D , {{etaAxis}, {ptAxis}});
497+ ue.add ((" ParticleFractions/" + std::string (ParticleFractionsVsMomentumNeg[i])).c_str (),
498+ " Particle fraction vs momentum" , HistType::kTH2D , {{etaAxis}, {pAxis}});
499+ ue.add ((" ParticleFractions/" + std::string (ParticleFractionsVsPtNeg[i])).c_str (),
500+ " Particle fraction vs pT" , HistType::kTH2D , {{etaAxis}, {ptAxis}});
501+ }
502+ // pt vs p
503+ ue.add (
504+ " heta_vs_pt_vs_p_all_Neg" , " eta_vs_pT_vs_p" , HistType::kTH3F ,
505+ {{etaAxis}, {ptAxis}, {pAxis}});
506+ ue.add (
507+ " heta_vs_pt_vs_p_all_Pos" , " eta_vs_pT_vs_p" , HistType::kTH3F ,
508+ {{etaAxis}, {ptAxis}, {pAxis}});
458509
459510 LOG (info) << " === Initialization complete ===" ;
460511}
@@ -679,35 +730,83 @@ void MultiplicityPt::processMC(TrackTableMC const& tracks,
679730 continue ;
680731 if (track.collisionId () != collId)
681732 continue ;
682-
733+ // Ncl distribution before cuts
734+ ue.fill (HIST (" hNclFoundTPCBefore" ), track.tpcNClsFound ());
735+ ue.fill (HIST (" hNclPIDTPCBefore" ), track.tpcNClsPID ());
736+
683737 if (!passesTrackSelection (track, magField))
684738 continue ;
685739
686740 nTracksInEvent++;
687-
688- ue.fill (HIST (" hNclFoundTPC " ), track.tpcNClsFound ());
689- ue.fill (HIST (" hNclPIDTPC " ), track.tpcNClsPID ());
741+ // Ncl distribution before cuts
742+ ue.fill (HIST (" hNclFoundTPCAfter " ), track.tpcNClsFound ());
743+ ue.fill (HIST (" hNclPIDTPCAfter " ), track.tpcNClsPID ());
690744 ue.fill (HIST (" hEta" ), track.eta ());
691745 ue.fill (HIST (" hPhi" ), track.phi ());
692746 ue.fill (HIST (" Inclusive/hPtReco" ), track.pt ());
693-
747+
748+ // ===== dE/dx and momentum for V0 cross-check histograms =====
749+ float tpcSignal = track.tpcSignal ();
750+ float momentum = track.p (); // momentum total
751+ float eta = track.eta ();
752+ int charge = track.sign ();
753+
754+ // dedx for all particles
755+ if (charge > 0 ) {
756+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_all_Pos" ), momentum, tpcSignal, eta);
757+ ue.fill (HIST (" heta_vs_pt_vs_p_all_Pos" ), eta, track.pt (), momentum);
758+ } else {
759+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_all_Neg" ), momentum, tpcSignal, eta);
760+ ue.fill (HIST (" heta_vs_pt_vs_p_all_Neg" ), eta, track.pt (), momentum);
761+ }
762+
694763 if (track.has_mcParticle ()) {
695764 const auto & particle = track.mcParticle ();
696765 int pdgCode = std::abs (particle.pdgCode ());
697-
766+ if (pdgCode == PDG_t::kPiPlus || pdgCode == PDG_t::kKPlus || pdgCode == PDG_t::kProton || pdgCode == PDG_t::kElectron || pdgCode == PDG_t::kMuonPlus ) {
767+ if (particle.isPhysicalPrimary ()) {
768+ // Fill total counts for fractions
769+ if (charge > 0 ) {
770+ ue.fill (HIST (" ParticleFractions/hTotalCountsVsMomentumPos" ),eta, momentum);
771+ ue.fill (HIST (" ParticleFractions/hTotalCountsVsPtPos" ), eta, track.pt ());
772+ }else {
773+ ue.fill (HIST (" ParticleFractions/hTotalCountsVsMomentumNeg" ),eta, momentum);
774+ ue.fill (HIST (" ParticleFractions/hTotalCountsVsPtNeg" ), eta, track.pt ());
775+ }
776+ }
777+ }
778+
698779 if (pdgCode == PDG_t::kPiPlus ) {
699780 ue.fill (HIST (" Pion/hPtReco" ), track.pt ());
700781 if (particle.isPhysicalPrimary ()) {
701782 ue.fill (HIST (" Pion/hPtPrimReco" ), track.pt ());
702783 ue.fill (HIST (" Inclusive/hPtPrimReco" ), track.pt ());
784+ if (charge > 0 ) {
785+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Pion_Pos" ),eta, momentum);
786+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Pion_Pos" ), eta, track.pt ());
787+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_Pi_v0_Pos" ), momentum, tpcSignal, eta);
788+ }else {
789+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Pion_Neg" ),eta, momentum);
790+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Pion_Neg" ), eta, track.pt ());
791+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_Pi_v0_Neg" ), momentum, tpcSignal, eta);
792+ }
793+
703794 } else {
704795 ue.fill (HIST (" Inclusive/hPtSecReco" ), track.pt ());
796+
705797 }
706798 } else if (pdgCode == PDG_t::kKPlus ) {
707799 ue.fill (HIST (" Kaon/hPtReco" ), track.pt ());
708800 if (particle.isPhysicalPrimary ()) {
709801 ue.fill (HIST (" Kaon/hPtPrimReco" ), track.pt ());
710802 ue.fill (HIST (" Inclusive/hPtPrimReco" ), track.pt ());
803+ if (charge > 0 ) {
804+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Kaon_Pos" ),eta, momentum);
805+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Kaon_Pos" ),eta, track.pt ());
806+ }else {
807+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Kaon_Neg" ),eta, momentum);
808+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Kaon_Neg" ),eta, track.pt ());
809+ }
711810 } else {
712811 ue.fill (HIST (" Inclusive/hPtSecReco" ), track.pt ());
713812 }
@@ -716,9 +815,40 @@ void MultiplicityPt::processMC(TrackTableMC const& tracks,
716815 if (particle.isPhysicalPrimary ()) {
717816 ue.fill (HIST (" Proton/hPtPrimReco" ), track.pt ());
718817 ue.fill (HIST (" Inclusive/hPtPrimReco" ), track.pt ());
818+ if (charge > 0 ) {
819+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Proton_Pos" ),eta, momentum);
820+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Proton_Pos" ),eta, track.pt ());
821+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_Pr_v0_Pos" ), momentum, tpcSignal, eta);
822+ }else {
823+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Proton_Neg" ),eta, momentum);
824+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Proton_Neg" ),eta, track.pt ());
825+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_Pr_v0_Neg" ), momentum, tpcSignal, eta);
826+ }
719827 } else {
720828 ue.fill (HIST (" Inclusive/hPtSecReco" ), track.pt ());
721829 }
830+ }else if (pdgCode == PDG_t::kElectron ) {
831+ if (particle.isPhysicalPrimary ()) {
832+ if (charge > 0 ){
833+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Electron_Pos" ),eta, momentum);
834+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Electron_Pos" ),eta, track.pt ());
835+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_El_v0_Pos" ), momentum, tpcSignal, eta);
836+ }else {
837+ ue.fill (HIST (" DedxVsMomentum/dEdx_vs_Momentum_El_v0_Neg" ), momentum, tpcSignal, eta);
838+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Electron_Neg" ),eta, momentum);
839+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Electron_Neg" ),eta, track.pt ());
840+ }
841+ }
842+ }else if (pdgCode == PDG_t::kMuonPlus ) {
843+ if (particle.isPhysicalPrimary ()) {
844+ if (charge > 0 ){
845+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Muon_Pos" ),eta, momentum);
846+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Muon_Pos" ),eta, track.pt ());
847+ }else {
848+ ue.fill (HIST (" ParticleFractions/hFractionVsMomentum_Muon_Neg" ),eta, momentum);
849+ ue.fill (HIST (" ParticleFractions/hFractionVsPt_Muon_Neg" ),eta, track.pt ());
850+ }
851+ }
722852 }
723853 }
724854
0 commit comments