From c8eaf10ffbe32e20e9830a5656ba7842edefdea3 Mon Sep 17 00:00:00 2001 From: Arvind Khuntia Date: Thu, 18 Sep 2025 17:55:00 +0200 Subject: [PATCH 1/4] [PWGJE] Histograms added for MC and rapidity selection for rec particle --- PWGJE/Tasks/nucleiInJets.cxx | 87 ++++++++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/PWGJE/Tasks/nucleiInJets.cxx b/PWGJE/Tasks/nucleiInJets.cxx index 37fb0764947..e60839c00f0 100644 --- a/PWGJE/Tasks/nucleiInJets.cxx +++ b/PWGJE/Tasks/nucleiInJets.cxx @@ -38,6 +38,7 @@ #include #include +#include "TDatabasePDG.h" #include #include #include @@ -495,6 +496,9 @@ struct nucleiInJets { jetHist.add("recInc/pt/PtParticleTypeTPCTOF", "Pt vs ParticleType vs Centrality (TPC+TOF)", HistType::kTH3F, {{100, 0.f, 10.f}, {14, -7, 7}, {100, 0, 100}}); jetHist.add("recInc/pt/PtParticleTypeTPCTOFVeto", "Pt vs ParticleType vs Centrality (TPC+TOF Veto)", HistType::kTH3F, {{100, 0.f, 10.f}, {14, -7, 7}, {100, 0, 100}}); jetHist.add("genInc/pt/PtParticleType", "Pt vs ParticleType vs Centrality (gen)", HistType::kTH3F, {{100, 0.f, 10.f}, {14, -7, 7}, {100, 0, 100}}); + + jetHist.add("recInc/eff/tpcTrack3D", "Pt vs ParticleType vs Centrality (tpc)", HistType::kTH3F, {{100, 0.f, 10.f}, {14, -7, 7}, {100, 0, 100}}); + jetHist.add("recInc/eff/tpcTofTrack3D", "Pt vs ParticleType vs Centrality (tpc-tof)", HistType::kTH3F, {{100, 0.f, 10.f}, {14, -7, 7}, {100, 0, 100}}); // inside jet jetHist.add("tracks/mc/proton/h3PtVsProtonNSigmaTPCVsPtJet_jet", "pT(p) vs NSigmaTPC (p) vs jet pT; #it{p}_{T} (GeV/#it{c}; NSigmaTPC; p^{jet}_{T}", HistType::kTH3F, {{PtAxis}, {200, -10, 10}, {PtJetAxis}}); jetHist.add("tracks/mc/antiProton/h3PtVsantiProtonNSigmaTPCVsPtJet_jet", "pT(#bar{p}) vs NSigmaTPC (#bar{p}) vs jet pT; #it{p}_{T} (GeV/#it{c}; NSigmaTPC; p^{jet}_{T}", HistType::kTH3F, {{PtAxis}, {200, -10, 10}, {PtJetAxis}}); @@ -1981,6 +1985,7 @@ struct nucleiInJets { centrality = -999; } jetHist.fill(HIST("recInc/vertexZ"), coll.posZ(), centrality); + for (const auto& track : tracks) { if (!isTrackSelected(track)) { continue; @@ -1989,20 +1994,85 @@ struct nucleiInJets { continue; if (std::fabs(track.eta()) > cfgtrkMaxEta) continue; + auto mcTrack = track.mcParticle_as(); if (!mcTrack.isPhysicalPrimary()) continue; - bool isTOFAndTPCPreSel(track.hasTOF() && - (std::abs(track.tpcNSigmaPr()) < cfgnTPCPIDPrTOF || std::abs(track.tpcNSigmaDe()) < cfgnTPCPIDDeTOF)); - if (mapPDGToValue(mcTrack.pdgCode()) != 0) { - jetHist.fill(HIST("recInc/pt/PtParticleTypeTPC"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + auto mass = TDatabasePDG::Instance()->GetParticle(abs(mcTrack.pdgCode()))->Mass(); + auto rapidity = RecoDecay::y(std::array{track.px(), track.py(), track.pz()}, mass); - if (isTOFAndTPCPreSel) { + if (rapidity > cfgtrkMaxRap) + continue; + // Proton + if (std::abs(mcTrack.pdgCode()) == 2212) { // Proton + jetHist.fill(HIST("recInc/eff/tpcTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (track.hasTOF()) + jetHist.fill(HIST("recInc/eff/tpcTofTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tpcNSigmaPr()) < cfgnTPCPIDPr) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPC"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } + // Deuteron + if (std::abs(mcTrack.pdgCode()) == Pdg::kDeuteron) { // Deuteron + jetHist.fill(HIST("recInc/eff/tpcTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (track.hasTOF()) + jetHist.fill(HIST("recInc/eff/tpcTofTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tpcNSigmaDe()) < cfgnTPCPIDDe) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPC"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } + // Helium + if (std::abs(mcTrack.pdgCode()) == Pdg::kHelium3) { // Helium-3 + jetHist.fill(HIST("recInc/eff/tpcTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (track.hasTOF()) + jetHist.fill(HIST("recInc/eff/tpcTofTrack3D"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tpcNSigmaHe()) < cfgnTPCPIDHe) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPC"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } + + // TPCTOF and TPCTOFVeto histograms + // Proton + if (std::abs(track.tpcNSigmaPr()) < cfgnTPCPIDPr && track.hasTOF()) { + if (std::abs(mcTrack.pdgCode()) == 2212) { jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOF"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); - jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); - } else { - jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tofNSigmaPr()) < cfgnTPCPIDPrTOF) + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } else { + if (std::abs(track.tpcNSigmaPr()) < cfgnTPCPIDPr) { + if (std::abs(mcTrack.pdgCode()) == 2212) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } + } + // Deuteron + if (std::abs(track.tpcNSigmaDe()) < cfgnTPCPIDDe && track.hasTOF()) { + if (std::abs(mcTrack.pdgCode()) == Pdg::kDeuteron) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOF"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tofNSigmaDe()) < cfgnTPCPIDDeTOF) + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } else { + if (std::abs(track.tpcNSigmaDe()) < cfgnTPCPIDDe) { + if (std::abs(mcTrack.pdgCode()) == Pdg::kDeuteron) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } + } + // Helium + if (std::abs(track.tpcNSigmaHe()) < cfgnTPCPIDHe && track.hasTOF()) { + if (std::abs(mcTrack.pdgCode()) == Pdg::kHelium3) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOF"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + if (std::abs(track.tofNSigmaHe()) < cfgnTPCPIDHeTOF) + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } + } else { + if (std::abs(track.tpcNSigmaHe()) < cfgnTPCPIDHe) { + if (std::abs(mcTrack.pdgCode()) == Pdg::kHelium3) { + jetHist.fill(HIST("recInc/pt/PtParticleTypeTPCTOFVeto"), mcTrack.pt(), mapPDGToValue(mcTrack.pdgCode()), centrality); + } } } } // track @@ -2016,6 +2086,7 @@ struct nucleiInJets { continue; if (std::fabs(mcParticle.y()) > cfgtrkMaxRap) continue; + if (mapPDGToValue(mcParticle.pdgCode()) != 0) { jetHist.fill(HIST("genInc/pt/PtParticleType"), mcParticle.pt(), mapPDGToValue(mcParticle.pdgCode()), centrality); } From 343b8be655220ebc84aca1623aba3f894ed3d8ce Mon Sep 17 00:00:00 2001 From: Arvind Khuntia Date: Tue, 7 Oct 2025 15:43:24 +0200 Subject: [PATCH 2/4] [PWGMM] CTP trigger mask included to FIT tables --- PWGMM/Lumi/Tasks/LumiFDDFT0.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx index c67e36672b8..2fe4b62f51d 100644 --- a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx +++ b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx @@ -64,6 +64,7 @@ DECLARE_SOA_COLUMN(VertexXY, vertexXY, double); DECLARE_SOA_COLUMN(GlobalBC, globalBC, uint64_t); DECLARE_SOA_COLUMN(VertexChi2, vertexChi2, double); DECLARE_SOA_COLUMN(NContrib, nContrib, int); +DECLARE_SOA_COLUMN(InputMask, inputMask, uint64_t); //! CTP input mask // Information for FDD DECLARE_SOA_COLUMN(isFDD, isfdd, bool); @@ -90,7 +91,7 @@ DECLARE_SOA_COLUMN(TimeAFV0, timeAfv0, double); // Only FV0-A time DECLARE_SOA_COLUMN(ChargeAFV0, chargeAfv0, double); // Only FV0-A charge } // namespace full -DECLARE_SOA_TABLE(EventInfo, "AOD", "EventInfo", full::TimeStamp, full::VertexX, +DECLARE_SOA_TABLE(EventInfo, "AOD", "EventInfo", full::TimeStamp, full::InputMask, full::VertexX, full::VertexY, full::VertexZ, full::GlobalBC, full::VertexChi2, full::NContrib, full::isFDD, full::TCMTriggerFDD, @@ -103,20 +104,20 @@ DECLARE_SOA_TABLE(EventInfo, "AOD", "EventInfo", full::TimeStamp, full::VertexX, DECLARE_SOA_TABLE(EventInfoFDD, "AOD", "EventInfoFDD", full::TimeStamp, full::GlobalBC, - full::TCMTriggerFDD, full::TimeAFDD, + full::InputMask, full::TCMTriggerFDD, full::TimeAFDD, full::TimeCFDD, full::IsCoinAmpFDDA, full::IsCoinAmpFDDC, full::ChargeAFDD, full::ChargeCFDD); DECLARE_SOA_TABLE(EventInfoFT0, "AOD", "EventInfoFT0", full::TimeStamp, full::GlobalBC, - full::TCMTriggerFT0, full::TimeAFT0, + full::InputMask, full::TCMTriggerFT0, full::TimeAFT0, full::TimeCFT0, full::ChargeAFT0, full::ChargeCFT0); DECLARE_SOA_TABLE(EventInfoFV0, "AOD", "EventInfoFV0", full::TimeStamp, full::GlobalBC, - full::TCMTriggerFV0, full::TimeAFV0, + full::InputMask, full::TCMTriggerFV0, full::TimeAFV0, full::ChargeAFV0); } // namespace o2::aod @@ -304,7 +305,7 @@ struct LumiFDDFT0 { } } // fv0 - rowEventInfo(relTS, refitX, refitY, refitZ, globalBC, chi2, nContrib, collision.has_foundFDD(), + rowEventInfo(relTS, bc.inputMask(), refitX, refitY, refitZ, globalBC, chi2, nContrib, collision.has_foundFDD(), mTriggerFDD, timeaFDD, timecFDD, chargeaFDD, chargecFDD, collision.has_foundFT0(), mTriggerFT0, timeaFT0, timecFT0, chargeaFT0, chargecFT0, collision.has_foundFV0(), mTriggerFV0, timeaFV0, chargeaFV0); @@ -388,7 +389,7 @@ struct LumiFDDFT0 { bool isCoinA = checkAnyCoincidence(channelA); bool isCoinC = checkAnyCoincidence(channelC); - rowEventInfofdd(relTS, globalBC, fdd.triggerMask(), fdd.timeA(), fdd.timeC(), isCoinA, isCoinC, chargeaFDD, chargecFDD); + rowEventInfofdd(relTS, globalBC, bc.inputMask(), fdd.triggerMask(), fdd.timeA(), fdd.timeC(), isCoinA, isCoinC, chargeaFDD, chargecFDD); } // end of fdd table // Scan over the FT0 table and store charge and time along with globalBC @@ -408,7 +409,7 @@ struct LumiFDDFT0 { for (auto amplitude : ft0.amplitudeC()) { chargecFT0 += amplitude; } - rowEventInfoft0(relTS, globalBC, ft0.triggerMask(), ft0.timeA(), ft0.timeC(), chargeaFT0, chargecFT0); + rowEventInfoft0(relTS, globalBC, bc.inputMask(), ft0.triggerMask(), ft0.timeA(), ft0.timeC(), chargeaFT0, chargecFT0); } // end of ft0 table // Scan over the FV0 table and store charge and time along with globalBC @@ -425,7 +426,7 @@ struct LumiFDDFT0 { for (auto amplitude : fv0.amplitude()) { chargeaFV0 += amplitude; } - rowEventInfofv0(relTS, globalBC, fv0.triggerMask(), fv0.time(), chargeaFV0); + rowEventInfofv0(relTS, globalBC, bc.inputMask(), fv0.triggerMask(), fv0.time(), chargeaFV0); } // end of fv0 table }; PROCESS_SWITCH(LumiFDDFT0, processLite, "Process FDD and FT0 info", false); From fd849c350aa0fd8c67dd6aa245eec72ce5c5471d Mon Sep 17 00:00:00 2001 From: arvindkhuntia <31609955+arvindkhuntia@users.noreply.github.com> Date: Wed, 8 Oct 2025 18:05:22 +0200 Subject: [PATCH 3/4] Update LumiFDDFT0.cxx --- PWGMM/Lumi/Tasks/LumiFDDFT0.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx index 2fe4b62f51d..91b4564657c 100644 --- a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx +++ b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx @@ -229,6 +229,7 @@ struct LumiFDDFT0 { o2::conf::ConfigurableParam::updateFromString( "pvertexer.useMeanVertexConstraint=false"); // we want to refit w/o // MeanVertex constraint + vertexer.init(); bool PVrefit_doable = vertexer.prepareVertexRefit(vec_TrkContributos, Pvtx); double chi2 = -1.; From 92634f1038b51b8ee03bb0da9eeb8b3bfd5672bb Mon Sep 17 00:00:00 2001 From: arvindkhuntia <31609955+arvindkhuntia@users.noreply.github.com> Date: Wed, 8 Oct 2025 18:06:47 +0200 Subject: [PATCH 4/4] Update LumiFDDFT0.cxx --- PWGMM/Lumi/Tasks/LumiFDDFT0.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx index 91b4564657c..2fe4b62f51d 100644 --- a/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx +++ b/PWGMM/Lumi/Tasks/LumiFDDFT0.cxx @@ -229,7 +229,6 @@ struct LumiFDDFT0 { o2::conf::ConfigurableParam::updateFromString( "pvertexer.useMeanVertexConstraint=false"); // we want to refit w/o // MeanVertex constraint - vertexer.init(); bool PVrefit_doable = vertexer.prepareVertexRefit(vec_TrkContributos, Pvtx); double chi2 = -1.;