From dbdb13ca46ed3ddcd0e76ee50df513e5ef69b1cd Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Wed, 15 Jul 2026 15:44:01 +0200 Subject: [PATCH 1/6] [PWGJE] improve QA histograms in jetDsSpecSubs --- PWGJE/Tasks/jetDsSpecSubs.cxx | 170 +++++++++++++++++----------------- 1 file changed, 83 insertions(+), 87 deletions(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index 8b9f45541f2..b1e35a7ca63 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -111,34 +111,29 @@ struct JetDsSpecSubs { "registry", { {"h_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}}, - {"h_collision_counter_data", ";event counter;entries", {HistType::kTH1F, {{10, 0., 10.}}}}, + {"h_event_counter_data", ";Selection step;Events", {HistType::kTH1F, {{3,0.5,3.5}}}}, {"h_track_pt", ";#it{p}_{T,track};entries", {HistType::kTH1F, {{200, 0., 200.}}}}, {"h_track_eta", ";#eta_{track};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, {"h_track_phi", ";#varphi_{track};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, // Data histograms - {"h_dsjet_counter_data", ";type;counts", {HistType::kTH1F, {{3, 0., 3.}}}}, - {"h_jet_pt_data", "jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}}, {"h_jet_eta_data", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"h_jet_phi_data", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}}, - {"h_ds_mass_data", ";m_{D_{S}} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{1000, 0., 6.}}}}, - {"h_ds_pt_data", ";#it{p}_{T,D_{S}} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_eta_data", ";#eta_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_phi_data", ";#phi_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, - - {"h_ds_jet_pt_data", ";#it{p}_{T,D_{S} jet} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_jet_eta_data", ";#eta_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_jet_phi_data", ";#phi_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, + {"h_ds_mass_data", ";m_{D_{S}} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 1.7, 2.15}}}}, + {"h_ds_pt_data", ";#it{p}_{T,D_{S}} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, + {"h_ds_eta_data", ";#eta_{D_{S}};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_ds_phi_data", ";#phi_{D_{S}};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, - {"h_ds_jet_projection_data", ";z^{D_{S},jet}_{||};entries", {HistType::kTH1F, {{1000, 0., 2.}}}}, - {"h_ds_jet_distance_data", ";#DeltaR_{D_{S},jet};entries", {HistType::kTH1F, {{1000, 0., 1.}}}}, - {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{200, 0., 50.}}}}, - {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet};Origin(D_{S})", {HistType::kTHnSparseF, {{60, 1.7, 2.1}, {60, 0., 100.}, {60, 0., 100.}, {60, 0., 2.}, {60, 0., 1.0}}}}, + {"h_ds_jet_projection_data", ";z^{D_{S},jet}_{||};entries", {HistType::kTH1F, {{200, 0., 1.2}}}}, + {"h_ds_jet_distance_data", ";#DeltaR_{D_{S},jet};entries", {HistType::kTH1F, {{200, 0., 1.}}}}, + {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 0., 25.}}}}, + {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", + {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC general histograms {"McEffJet", "N_{jet};", {HistType::kTH1F, {{4, 0., 4.0}}}}, @@ -149,38 +144,39 @@ struct JetDsSpecSubs { {"h_jet_eta_mcd", "detector-level jet #eta;#eta_{jet}^{det};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"h_jet_phi_mcd", "detector-level jet #phi;#phi_{jet}^{det};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}}, - {"h_ds_mass_mcd", ";m_{D_{S}}^{rec} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{1000, 0., 6.}}}}, - {"h_ds_pt_mcd", ";#it{p}_{T,D_{S}}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_eta_mcd", ";#eta_{D_{S}}^{det};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_phi_mcd", ";#phi_{D_{S}}^{det};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, - - {"h_ds_jet_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_jet_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_jet_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, - {"h_ds_jet_projection_mcd", ";z^{D_{S},jet}_{||, det};entries", {HistType::kTH1F, {{1000, 0., 2.}}}}, - {"h_ds_jet_distance_mcd", ";#DeltaR_{D_{S},jet}^{det};entries", {HistType::kTH1F, {{1000, 0., 1.}}}}, - {"h_ds_jet_mass_mcd", ";m_{jet}^{ch, det} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{200, 0., 50.}}}}, - {"h_ds_jet_lambda11_mcd", ";#lambda_{1}^{1, det};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"h_ds_jet_lambda12_mcd", ";#lambda_{2}^{1, det};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"hSparse_ds_mcd", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 1.7, 2.1}, {60, 0., 100.}, {60, 0., 100.}, {60, 0., 2.}, {60, 0., 1.0}, {2, -0.5, 1.5}}}}, + {"h_ds_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, + {"h_ds_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_ds_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, + {"h_ds_mass_mcd", ";m_{D_{S}}^{det} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 1.7, 2.15}}}}, + + {"h_ds_jet_lambda11_mcd", ";#lambda_{1}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"h_ds_jet_lambda12_mcd", ";#lambda_{2}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + + // MCD - Sparse 1: mass, p_{T,Ds}, p_{T,jet}, z|| and prompt/non-prompt + {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", + {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, + // MCD - Sparse 2: p_{T,Ds}, p_{T,jet}, and DeltaR + {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", + {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.0}}}}, + // MCD - Sparse 3: p_{T,jet}, z|| and DeltaR + {"hSparse_ds_mcd3", ";#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", + {HistType::kTHnSparseF, {{60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC particle-level histograms {"h_jet_pt_mcp", "particle-level jet pT;#it{p}_{T,jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}}, {"h_jet_eta_mcp", "particle-level jet #eta;#eta_{jet}^{part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"h_jet_phi_mcp", "particle-level jet #phi;#phi_{jet}^{part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}}, - {"h_ds_pt_mcp", ";#it{p}_{T,D_{S}}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_eta_mcp", ";#eta_{D_{S}}^{part};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_phi_mcp", ";#phi_{D_{S}}^{part};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, - - {"h_ds_jet_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{1000, 0., 100.}}}}, - {"h_ds_jet_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{250, -1., 1.}}}}, - {"h_ds_jet_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{250, -1., 7.}}}}, - {"h_ds_jet_projection_mcp", ";z^{D_{S},jet}_{||, part};entries", {HistType::kTH1F, {{1000, 0., 2.}}}}, - {"h_ds_jet_distance_mcp", ";#DeltaR_{D_{S},jet}^{part};entries", {HistType::kTH1F, {{1000, 0., 1.}}}}, - {"h_ds_jet_lambda11_mcp", ";#lambda_{1}^{1, part};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"h_ds_jet_lambda12_mcp", ";#lambda_{2}^{1, part};entries", {HistType::kTH1F, {{200, 0., 1.0}}}}, - {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", {HistType::kTHnSparseF, {{60, 0., 100.}, {60, 0., 100.}, {60, 0., 2.}, {60, 0., 1.0}}}}, + {"h_ds_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, + {"h_ds_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_ds_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, + + {"h_ds_jet_lambda11_mcp", ";#lambda_{1}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"h_ds_jet_lambda12_mcp", ";#lambda_{2}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + + // MCP - Sparse: p_{T,Ds}, p_{T,jet}, z|| and DeltaR + {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", + {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, }}; //======== // INIT @@ -191,10 +187,10 @@ struct JetDsSpecSubs { eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast(eventSelections)); trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast(trackSelections)); - auto hData = registry.get(HIST("h_dsjet_counter_data")); - hData->GetXaxis()->SetBinLabel(1, "Ds-jet entries"); - hData->GetXaxis()->SetBinLabel(2, "Ds candidates"); - hData->GetXaxis()->SetBinLabel(3, "Ds jets with >=1 cand."); + auto hEvt = registry.get(HIST("h_event_counter_data")); + hEvt->GetXaxis()->SetBinLabel(1,"Input collisions"); + hEvt->GetXaxis()->SetBinLabel(2,"Event selection"); + hEvt->GetXaxis()->SetBinLabel(3,"|z| < 10 cm"); // Labels auto mcCollisionCounter = registry.get(HIST("McEffCol")); @@ -209,8 +205,8 @@ struct JetDsSpecSubs { jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetWithMatchedCandidate, "particle matched jets"); jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::ParticleLevelJetWithMatchedCandidate, "detector matched jets"); - auto hSparse_ds_mcd = registry.get(HIST("hSparse_ds_mcd")); - auto* axisOrigin = hSparse_ds_mcd->GetAxis(5); + auto hSparse_ds_mcd1 = registry.get(HIST("hSparse_ds_mcd1")); + auto* axisOrigin = hSparse_ds_mcd1->GetAxis(4); axisOrigin->SetBinLabel(1, "Prompt"); axisOrigin->SetBinLabel(2, "Non-prompt"); } @@ -302,17 +298,19 @@ struct JetDsSpecSubs { void processDataChargedSubstructure(aod::JetCollision const& collision, FilteredDsDataJets const& jets, aod::CandidatesDsData const&, aod::JetTracks const&) { - registry.fill(HIST("h_collision_counter_data"), 2.0); + registry.fill(HIST("h_event_counter_data"), 1); - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || - !(std::abs(collision.posZ()) < vertexZCut)) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { return; } + registry.fill(HIST("h_event_counter_data"), 2); - registry.fill(HIST("h_collision_counter_data"), 3.0); + if (std::abs(collision.posZ()) >= vertexZCut) { + return; + } + registry.fill(HIST("h_event_counter_data"), 3); for (const auto& jet : jets) { - registry.fill(HIST("h_dsjet_counter_data"), 0.5); // DsChargedJets entries registry.fill(HIST("h_jet_pt_data"), jet.pt()); registry.fill(HIST("h_jet_eta_data"), jet.eta()); @@ -327,12 +325,8 @@ struct JetDsSpecSubs { TVector3 jetVector(jet.px(), jet.py(), jet.pz()); - int nDsInJet = 0; - // Loop over Ds candidates (particle level) for (const auto& dsCandidate : jet.candidates_as()) { - ++nDsInJet; - registry.fill(HIST("h_dsjet_counter_data"), 1.5); // Ds candidates associated with the jet TVector3 dsVector(dsCandidate.px(), dsCandidate.py(), dsCandidate.pz()); @@ -351,6 +345,7 @@ struct JetDsSpecSubs { registry.fill(HIST("h_ds_jet_distance_data"), deltaR); + // Main THnSparse: invariant mass, pT, z, and DeltaR registry.fill(HIST("hSparse_ds_data"), dsCandidate.m(), @@ -360,25 +355,17 @@ struct JetDsSpecSubs { deltaR); } - // Jet-level quantities (filled once per jet containing at least one Ds) - if (nDsInJet > 0) { - - registry.fill(HIST("h_dsjet_counter_data"), 2.5); // Ds jets with at least one associated candidate + if (!jet.candidates_as().empty()) { + // Jet mass + registry.fill(HIST("h_ds_jet_mass_data"),mjet); - // Jet properties - registry.fill(HIST("h_ds_jet_pt_data"), jet.pt()); - registry.fill(HIST("h_ds_jet_eta_data"), jet.eta()); - registry.fill(HIST("h_ds_jet_phi_data"), jet.phi()); - // Jet Mass - registry.fill(HIST("h_ds_jet_mass_data"), mjet); - - // Jet substructure observables - if (lambda11 >= 0.f) { - registry.fill(HIST("h_ds_jet_lambda11_data"), lambda11); - } - if (lambda12 >= 0.f) { - registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12); - } + // Jet angularity + if (lambda11 >= 0.f) { + registry.fill(HIST("h_ds_jet_lambda11_data"), lambda11); + } + if (lambda12 >= 0.f) { + registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12); + } } } } @@ -464,19 +451,28 @@ struct JetDsSpecSubs { registry.fill(HIST("h_ds_jet_lambda11_mcd"), mcd_lambda11); registry.fill(HIST("h_ds_jet_lambda12_mcd"), mcd_lambda12); // Detector-level Ds Histgrams - registry.fill(HIST("h_ds_jet_pt_mcd"), mcdDscand.pt()); - registry.fill(HIST("h_ds_jet_mass_mcd"), mcdDscand.m()); - registry.fill(HIST("h_ds_jet_eta_mcd"), mcdDscand.eta()); - registry.fill(HIST("h_ds_jet_phi_mcd"), mcdDscand.phi()); + registry.fill(HIST("h_ds_pt_mcd"), mcdDscand.pt()); + registry.fill(HIST("h_ds_mass_mcd"), mcdDscand.m()); + registry.fill(HIST("h_ds_eta_mcd"), mcdDscand.eta()); + registry.fill(HIST("h_ds_phi_mcd"), mcdDscand.phi()); - // Main THnSparse: invariant mass, pT, z, and DeltaR - registry.fill(HIST("hSparse_ds_mcd"), + // MCD THnSparse1: invariant mass, p{T,Ds}, pT, z, and origin (prompt/non-prompt) + registry.fill(HIST("hSparse_ds_mcd1"), mcdDscand.m(), mcdDscand.pt(), mcdjet.pt(), mcd_zParallel, - mcd_deltaR, origin); + // MCD THnSparse2: invariant p{T,Ds}, pT and DeltaR + registry.fill(HIST("hSparse_ds_mcd2"), + mcdDscand.pt(), + mcdjet.pt(), + mcd_deltaR); + // MCD THnSparse3: invariant pT z and DeltaR + registry.fill(HIST("hSparse_ds_mcd3"), + mcdjet.pt(), + mcd_zParallel, + mcd_deltaR); } } // Particle level @@ -505,13 +501,13 @@ struct JetDsSpecSubs { registry.fill(HIST("h_jet_pt_mcp"), mcpjet.pt()); registry.fill(HIST("h_jet_eta_mcp"), mcpjet.eta()); registry.fill(HIST("h_jet_phi_mcp"), mcpjet.phi()); - registry.fill(HIST("h_ds_jet_projection_mcp"), mcp_zParallel); + registry.fill(HIST("h_ds_jet_lambda11_mcp"), mcp_lambda11); registry.fill(HIST("h_ds_jet_lambda12_mcp"), mcp_lambda12); // Particle-level Ds Histgrams - registry.fill(HIST("h_ds_jet_pt_mcp"), mcpDscand.pt()); - registry.fill(HIST("h_ds_jet_eta_mcp"), mcpDscand.eta()); - registry.fill(HIST("h_ds_jet_phi_mcp"), mcpDscand.phi()); + registry.fill(HIST("h_ds_pt_mcp"), mcpDscand.pt()); + registry.fill(HIST("h_ds_eta_mcp"), mcpDscand.eta()); + registry.fill(HIST("h_ds_phi_mcp"), mcpDscand.phi()); // Main THnSparse: invariant mass, pT, z, and DeltaR registry.fill(HIST("hSparse_ds_mcp"), From 8f8a26b5ea4b4bb59f1a8f68c3b53242476b327c Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Wed, 15 Jul 2026 15:50:51 +0200 Subject: [PATCH 2/6] PWGJE: remove trailing whitespace --- PWGJE/Tasks/jetDsSpecSubs.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index b1e35a7ca63..cb4f6f1eef2 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -132,7 +132,7 @@ struct JetDsSpecSubs { {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 0., 25.}}}}, {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", + {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC general histograms @@ -146,20 +146,20 @@ struct JetDsSpecSubs { {"h_ds_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, {"h_ds_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, - {"h_ds_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, + {"h_ds_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, {"h_ds_mass_mcd", ";m_{D_{S}}^{det} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 1.7, 2.15}}}}, {"h_ds_jet_lambda11_mcd", ";#lambda_{1}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"h_ds_jet_lambda12_mcd", ";#lambda_{2}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, // MCD - Sparse 1: mass, p_{T,Ds}, p_{T,jet}, z|| and prompt/non-prompt - {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", + {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, // MCD - Sparse 2: p_{T,Ds}, p_{T,jet}, and DeltaR - {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", + {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.0}}}}, // MCD - Sparse 3: p_{T,jet}, z|| and DeltaR - {"hSparse_ds_mcd3", ";#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", + {"hSparse_ds_mcd3", ";#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC particle-level histograms @@ -170,12 +170,12 @@ struct JetDsSpecSubs { {"h_ds_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, {"h_ds_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, {"h_ds_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, - + {"h_ds_jet_lambda11_mcp", ";#lambda_{1}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"h_ds_jet_lambda12_mcp", ";#lambda_{2}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, // MCP - Sparse: p_{T,Ds}, p_{T,jet}, z|| and DeltaR - {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", + {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, }}; //======== From 1d954e1892b98cc34470046067a8c33c534ed282 Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Wed, 15 Jul 2026 15:58:34 +0200 Subject: [PATCH 3/6] [PWGJE] apply clang-format --- PWGJE/Tasks/jetDsSpecSubs.cxx | 42 +++++++++++++++-------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index cb4f6f1eef2..778153736ca 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -111,7 +111,7 @@ struct JetDsSpecSubs { "registry", { {"h_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}}, - {"h_event_counter_data", ";Selection step;Events", {HistType::kTH1F, {{3,0.5,3.5}}}}, + {"h_event_counter_data", ";Selection step;Events", {HistType::kTH1F, {{3, 0.5, 3.5}}}}, {"h_track_pt", ";#it{p}_{T,track};entries", {HistType::kTH1F, {{200, 0., 200.}}}}, {"h_track_eta", ";#eta_{track};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, @@ -132,8 +132,7 @@ struct JetDsSpecSubs { {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 0., 25.}}}}, {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", - {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, + {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC general histograms {"McEffJet", "N_{jet};", {HistType::kTH1F, {{4, 0., 4.0}}}}, @@ -153,14 +152,11 @@ struct JetDsSpecSubs { {"h_ds_jet_lambda12_mcd", ";#lambda_{2}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, // MCD - Sparse 1: mass, p_{T,Ds}, p_{T,jet}, z|| and prompt/non-prompt - {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", - {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, + {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, // MCD - Sparse 2: p_{T,Ds}, p_{T,jet}, and DeltaR - {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", - {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.0}}}}, + {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.0}}}}, // MCD - Sparse 3: p_{T,jet}, z|| and DeltaR - {"hSparse_ds_mcd3", ";#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", - {HistType::kTHnSparseF, {{60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, + {"hSparse_ds_mcd3", ";#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC particle-level histograms {"h_jet_pt_mcp", "particle-level jet pT;#it{p}_{T,jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}}, @@ -175,8 +171,7 @@ struct JetDsSpecSubs { {"h_ds_jet_lambda12_mcp", ";#lambda_{2}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, // MCP - Sparse: p_{T,Ds}, p_{T,jet}, z|| and DeltaR - {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", - {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, + {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, }}; //======== // INIT @@ -188,9 +183,9 @@ struct JetDsSpecSubs { trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast(trackSelections)); auto hEvt = registry.get(HIST("h_event_counter_data")); - hEvt->GetXaxis()->SetBinLabel(1,"Input collisions"); - hEvt->GetXaxis()->SetBinLabel(2,"Event selection"); - hEvt->GetXaxis()->SetBinLabel(3,"|z| < 10 cm"); + hEvt->GetXaxis()->SetBinLabel(1, "Input collisions"); + hEvt->GetXaxis()->SetBinLabel(2, "Event selection"); + hEvt->GetXaxis()->SetBinLabel(3, "|z| < 10 cm"); // Labels auto mcCollisionCounter = registry.get(HIST("McEffCol")); @@ -345,7 +340,6 @@ struct JetDsSpecSubs { registry.fill(HIST("h_ds_jet_distance_data"), deltaR); - // Main THnSparse: invariant mass, pT, z, and DeltaR registry.fill(HIST("hSparse_ds_data"), dsCandidate.m(), @@ -356,16 +350,16 @@ struct JetDsSpecSubs { } if (!jet.candidates_as().empty()) { - // Jet mass - registry.fill(HIST("h_ds_jet_mass_data"),mjet); + // Jet mass + registry.fill(HIST("h_ds_jet_mass_data"), mjet); - // Jet angularity - if (lambda11 >= 0.f) { - registry.fill(HIST("h_ds_jet_lambda11_data"), lambda11); - } - if (lambda12 >= 0.f) { - registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12); - } + // Jet angularity + if (lambda11 >= 0.f) { + registry.fill(HIST("h_ds_jet_lambda11_data"), lambda11); + } + if (lambda12 >= 0.f) { + registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12); + } } } } From 9183706a5bc48c88e2bf847573470f3bf844aa10 Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Tue, 21 Jul 2026 22:55:39 +0200 Subject: [PATCH 4/6] PWGJE: remove unused detector-level Ds jet projection histogram --- PWGJE/Tasks/jetDsSpecSubs.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index 778153736ca..68b90850fc2 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -441,7 +441,6 @@ struct JetDsSpecSubs { registry.fill(HIST("h_jet_pt_mcd"), mcdjet.pt()); registry.fill(HIST("h_jet_eta_mcd"), mcdjet.eta()); registry.fill(HIST("h_jet_phi_mcd"), mcdjet.phi()); - registry.fill(HIST("h_ds_jet_projection_mcd"), mcd_zParallel); registry.fill(HIST("h_ds_jet_lambda11_mcd"), mcd_lambda11); registry.fill(HIST("h_ds_jet_lambda12_mcd"), mcd_lambda12); // Detector-level Ds Histgrams From 44aa8f61d04fda39879545edc2569965cf62420c Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Mon, 27 Jul 2026 18:09:34 +0200 Subject: [PATCH 5/6] [PWGJE] remove unused MC jet angularity histograms --- PWGJE/Tasks/jetDsSpecSubs.cxx | 37 ++++++++++------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index 68b90850fc2..b0415f94324 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -132,7 +132,7 @@ struct JetDsSpecSubs { {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 0., 25.}}}}, {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, + {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.6, 2.3}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, // MC general histograms {"McEffJet", "N_{jet};", {HistType::kTH1F, {{4, 0., 4.0}}}}, @@ -143,16 +143,13 @@ struct JetDsSpecSubs { {"h_jet_eta_mcd", "detector-level jet #eta;#eta_{jet}^{det};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"h_jet_phi_mcd", "detector-level jet #phi;#phi_{jet}^{det};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}}, - {"h_ds_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, - {"h_ds_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_ds_pt_mcd", ";#it{p}_{T,D_{S} jet}^{det} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 100.}}}}, + {"h_ds_eta_mcd", ";#eta_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{60, -1., 1.}}}}, {"h_ds_phi_mcd", ";#phi_{D_{S} jet}^{det};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, - {"h_ds_mass_mcd", ";m_{D_{S}}^{det} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 1.7, 2.15}}}}, - - {"h_ds_jet_lambda11_mcd", ";#lambda_{1}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"h_ds_jet_lambda12_mcd", ";#lambda_{2}^{1, det};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"h_ds_mass_mcd", ";m_{D_{S}}^{det} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{200, 1.7, 2.15}}}}, // MCD - Sparse 1: mass, p_{T,Ds}, p_{T,jet}, z|| and prompt/non-prompt - {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", {HistType::kTHnSparseF, {{60, 1.7, 2.15}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, + {"hSparse_ds_mcd1", ";m_{D_{S}}^{rec};#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};z^{D_{S},jet}_{||, det};Origin(D_{S})", {HistType::kTHnSparseF, {{60, 1.6, 2.3}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {2, -0.5, 1.5}}}}, // MCD - Sparse 2: p_{T,Ds}, p_{T,jet}, and DeltaR {"hSparse_ds_mcd2", ";#it{p}_{T,D_{S}}^{det};#it{p}_{T,jet}^{det};#DeltaR_{D_{S},jet}^{det}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.0}}}}, // MCD - Sparse 3: p_{T,jet}, z|| and DeltaR @@ -163,13 +160,10 @@ struct JetDsSpecSubs { {"h_jet_eta_mcp", "particle-level jet #eta;#eta_{jet}^{part};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}}, {"h_jet_phi_mcp", "particle-level jet #phi;#phi_{jet}^{part};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}}, - {"h_ds_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{250, 0., 100.}}}}, - {"h_ds_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_ds_pt_mcp", ";#it{p}_{T,D_{S} jet}^{part} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 100.}}}}, + {"h_ds_eta_mcp", ";#eta_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{60, -1., 1.}}}}, {"h_ds_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, - {"h_ds_jet_lambda11_mcp", ";#lambda_{1}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"h_ds_jet_lambda12_mcp", ";#lambda_{2}^{1, part};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - // MCP - Sparse: p_{T,Ds}, p_{T,jet}, z|| and DeltaR {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, }}; @@ -381,8 +375,7 @@ struct JetDsSpecSubs { FilteredDsMCDJets const& mcdjets, FilteredDsMCPJets const& mcpjets, DsCandidatesMCD const& /*mcdCandidates*/, - DsCandidatesMCP const& /*mcpCandidates*/, - aod::JetTracks const& tracks) + DsCandidatesMCP const& /*mcpCandidates*/) { for (const auto& mccollision : mccollisions) { // Count all generated MC collisions @@ -434,15 +427,11 @@ struct JetDsSpecSubs { float mcd_zParallel = (mcd_jetvector * mcd_candvector) / (mcd_jetvector * mcd_jetvector); // Axis distance Delta_R float mcd_deltaR = jetutilities::deltaR(mcdjet, mcdDscand); - float mcd_lambda11 = computeLambda(mcdjet, tracks, 1.f, 1.f); - float mcd_lambda12 = computeLambda(mcdjet, tracks, 2.f, 1.f); // Detector-level Jet Histograms registry.fill(HIST("h_jet_pt_mcd"), mcdjet.pt()); registry.fill(HIST("h_jet_eta_mcd"), mcdjet.eta()); registry.fill(HIST("h_jet_phi_mcd"), mcdjet.phi()); - registry.fill(HIST("h_ds_jet_lambda11_mcd"), mcd_lambda11); - registry.fill(HIST("h_ds_jet_lambda12_mcd"), mcd_lambda12); // Detector-level Ds Histgrams registry.fill(HIST("h_ds_pt_mcd"), mcdDscand.pt()); registry.fill(HIST("h_ds_mass_mcd"), mcdDscand.m()); @@ -487,16 +476,12 @@ struct JetDsSpecSubs { float mcp_zParallel = (mcp_jetvector * mcp_candvector) / (mcp_jetvector * mcp_jetvector); // Axis distance Delta_R float mcp_deltaR = jetutilities::deltaR(mcpjet, mcpDscand); - float mcp_lambda11 = computeLambda(mcpjet, tracks, 1.f, 1.f); - float mcp_lambda12 = computeLambda(mcpjet, tracks, 2.f, 1.f); // Particle-level Jet Histograms registry.fill(HIST("h_jet_pt_mcp"), mcpjet.pt()); registry.fill(HIST("h_jet_eta_mcp"), mcpjet.eta()); registry.fill(HIST("h_jet_phi_mcp"), mcpjet.phi()); - registry.fill(HIST("h_ds_jet_lambda11_mcp"), mcp_lambda11); - registry.fill(HIST("h_ds_jet_lambda12_mcp"), mcp_lambda12); // Particle-level Ds Histgrams registry.fill(HIST("h_ds_pt_mcp"), mcpDscand.pt()); registry.fill(HIST("h_ds_eta_mcp"), mcpDscand.eta()); @@ -520,8 +505,7 @@ struct JetDsSpecSubs { FilteredDsMCDJets const& mcdjets, FilteredDsMCPJets const& mcpjets, DsCandidatesMCD const& mcdDscand, - DsCandidatesMCP const& mcpDscand, - aod::JetTracks const& jettracks) + DsCandidatesMCP const& mcpDscand) { analyseMonteCarloEfficiency, Preslice, @@ -535,8 +519,7 @@ struct JetDsSpecSubs { mcdjets, mcpjets, mcdDscand, - mcpDscand, - jettracks); + mcpDscand); } PROCESS_SWITCH(JetDsSpecSubs, processMonteCarloEfficiencyDs, "Non-matched and matched MC Ds and jets", false); }; From cd7ad21edcdeabacc4819f61a5bbf03c80dada5a Mon Sep 17 00:00:00 2001 From: Monalisa Melo Date: Mon, 3 Aug 2026 16:24:38 +0200 Subject: [PATCH 6/6] [PWGJE] add MCP matching and origin information for Ds-tagged jets --- PWGJE/Tasks/jetDsSpecSubs.cxx | 203 +++++++++++++++++++++++++++------- 1 file changed, 161 insertions(+), 42 deletions(-) diff --git a/PWGJE/Tasks/jetDsSpecSubs.cxx b/PWGJE/Tasks/jetDsSpecSubs.cxx index e324f752374..7cb624f23d5 100644 --- a/PWGJE/Tasks/jetDsSpecSubs.cxx +++ b/PWGJE/Tasks/jetDsSpecSubs.cxx @@ -77,12 +77,24 @@ struct JetDsSpecSubs { using DsMCDJets = soa::Join; using DsMCPJets = soa::Join; + using DsDataJetsEWS = soa::Join< + aod::DsChargedEventWiseSubtractedJets, + aod::DsChargedEventWiseSubtractedJetConstituents>; + + // Inclusive charged jets + using ChargedJets = soa::Join; + using ChargedJetsEWS = soa::Join; + // Slices for access to proper HF MCD jet collision that is associated to MCCollision PresliceUnsorted collisionsPerMCCollisionPreslice = aod::jmccollisionlb::mcCollisionId; + Preslice dsMCDJetsPerEXPCollisionPreslice = aod::jet::collisionId; + // Preslice dsMCDJetsEWSPerEXPCollisionPreslice = aod::jet::collisionId; + Preslice dsMCPJetsPerMCCollisionPreslice = aod::jet::mcCollisionId; + // Preslice dsMCPJetsEWSPerMCCollisionPreslice = aod::jet::mcCollisionId; - // Configurables + // Event configurables Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable jetPtMin{"jetPtMin", 5.0, "minimum jet pT cut"}; Configurable jetR{"jetR", 0.4, "jet resolution parameter"}; @@ -90,6 +102,10 @@ struct JetDsSpecSubs { Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable trackSelections{"trackSelections", "globalTracks", "set track selections"}; + // Event-wise constituent subtraction jet tables + Configurable centralityMin{"centralityMin", -999.f, "Minimum FT0M centrality"}; + Configurable centralityMax{"centralityMax", 999.f, "Maximum FT0M centrality"}; + // internals std::vector eventSelectionBits; int trackSelection = -1; @@ -103,6 +119,19 @@ struct JetDsSpecSubs { using FilteredDsMCDJets = soa::Filtered; using FilteredDsMCPJets = soa::Filtered; + using FilteredDsDataJetsEWS = soa::Filtered; + // using FilteredDsMCDJetsEWS = soa::Filtered; + // using FilteredDsMCPJetsEWS = soa::Filtered; + + // Filtered inclusive charged jets + using FilteredChargedJets = soa::Filtered; + using FilteredChargedJetsEWS = soa::Filtered; + + Filter collisionFilter = + nabs(aod::jcollision::posZ) < vertexZCut && + aod::jcollision::centFT0M >= centralityMin && + aod::jcollision::centFT0M < centralityMax; + //============= // Histograms //============= @@ -112,10 +141,19 @@ struct JetDsSpecSubs { { {"h_collisions", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}}, {"h_event_counter_data", ";Selection step;Events", {HistType::kTH1F, {{3, 0.5, 3.5}}}}, - + // Track QA {"h_track_pt", ";#it{p}_{T,track};entries", {HistType::kTH1F, {{200, 0., 200.}}}}, {"h_track_eta", ";#eta_{track};entries", {HistType::kTH1F, {{100, -1., 1.}}}}, {"h_track_phi", ";#varphi_{track};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, + // Inclusive jet QA + {"h_njets_inclusive", ";Number of charged jets per event;Events", {HistType::kTH1F, {{100, 0., 100.}}}}, + {"h_jet_pt_inclusive", ";#it{p}_{T,jet} (GeV/#it{c});Entries", {HistType::kTH1F, {{200, 0., 200.}}}}, + {"h_jet_eta_inclusive", ";#eta_{jet};Entries", {HistType::kTH1F, {{100, -1., 1.}}}}, + {"h_jet_phi_inclusive", ";#varphi_{jet} (rad);Entries", {HistType::kTH1F, {{80, -1., 7.}}}}, + {"h_jet_mass_inclusive", ";#it{m}_{jet} (GeV/#it{c}^{2});Entries", {HistType::kTH1F, {{120, 0., 60.}}}}, + {"h_jet_nconst_inclusive", ";Jet constituents;Entries", {HistType::kTH1F, {{100, 0., 100.}}}}, + {"h_lambda11_inclusive", ";#lambda_{1}^{1};Entries", {HistType::kTH1F, {{100, 0., 1.}}}}, + {"h_lambda21_inclusive", ";#lambda_{2}^{1};Entries", {HistType::kTH1F, {{100, 0., 1.}}}}, // Data histograms {"h_jet_pt_data", "jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{200, 0., 200.}}}}, @@ -131,7 +169,7 @@ struct JetDsSpecSubs { {"h_ds_jet_distance_data", ";#DeltaR_{D_{S},jet};entries", {HistType::kTH1F, {{200, 0., 1.}}}}, {"h_ds_jet_mass_data", ";m_{jet}^{ch} (GeV/#it{c}^{2});entries", {HistType::kTH1F, {{300, 0., 25.}}}}, {"h_ds_jet_lambda11_data", ";#lambda_{1}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, - {"h_ds_jet_lambda12_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, + {"h_ds_jet_lambda21_data", ";#lambda_{2}^{1};entries", {HistType::kTH1F, {{100, 0., 1.0}}}}, {"hSparse_ds_data", ";m_{D_{S}};#it{p}_{T,D_{S}};#it{p}_{T,jet};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.6, 2.3}, {60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, @@ -167,7 +205,7 @@ struct JetDsSpecSubs { {"h_ds_phi_mcp", ";#phi_{D_{S} jet}^{part};entries", {HistType::kTH1F, {{80, -1., 7.}}}}, // MCP - Sparse: p_{T,Ds}, p_{T,jet}, z|| and DeltaR - {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part}", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}}}}, + {"hSparse_ds_mcp", ";#it{p}_{T,D_{S}}^{part};#it{p}_{T,jet}^{part};z^{D_{S},jet}_{||, part};#DeltaR_{D_{S},jet}^{part};Origin(D_{S};Matching status)", {HistType::kTHnSparseF, {{60, 0., 80.}, {60, 0., 100.}, {20, 0., 1.2}, {20, 0., 1.0}, {2, -0.5, 1.5}, {2, -0.5, 1.5}}}}, }}; //======== // INIT @@ -193,13 +231,22 @@ struct JetDsSpecSubs { auto jetCounter = registry.get(HIST("McEffJet")); jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::ParticleLevelJetInMCCollision, "particle level"); jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetInMCCollision, "detector level"); - jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetWithMatchedCandidate, "particle matched jets"); - jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::ParticleLevelJetWithMatchedCandidate, "detector matched jets"); + jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::DetectorLevelJetWithMatchedCandidate, "detector matched jets"); + jetCounter->GetXaxis()->SetBinLabel(BinMCJetCntr::ParticleLevelJetWithMatchedCandidate, "particle matched jets"); auto hSparse_ds_mcd1 = registry.get(HIST("hSparse_ds_mcd1")); auto* axisOrigin = hSparse_ds_mcd1->GetAxis(4); axisOrigin->SetBinLabel(1, "Prompt"); axisOrigin->SetBinLabel(2, "Non-prompt"); + + auto hSparse_ds_mcp = registry.get(HIST("hSparse_ds_mcp")); + auto* axisOriginMCP = hSparse_ds_mcp->GetAxis(4); + axisOriginMCP->SetBinLabel(1, "Prompt"); + axisOriginMCP->SetBinLabel(2, "Non-prompt"); + + auto* axisMatching = hSparse_ds_mcp->GetAxis(5); + axisMatching->SetBinLabel(1, "Unmatched"); + axisMatching->SetBinLabel(2, "Matched"); } //=============== // Lambda compute @@ -259,35 +306,76 @@ struct JetDsSpecSubs { // Collision QA //============== - void processCollisions(aod::JetCollision const& collision, aod::JetTracks const& tracks) + // This function is shared by the pp and Pb–Pb (event-wise subtraction) + template + void fillInclusiveJetQA(aod::JetCollision const& collision, + aod::JetTracks const& tracks, + JetTable const& jets) { - registry.fill(HIST("h_collisions"), 0.5); + // Collision counter + registry.fill(HIST("h_collisions"), getValFromBin(AllCollisions)); if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { return; } + registry.fill(HIST("h_collisions"), getValFromBin(Sel8ZCut)); - registry.fill(HIST("h_collisions"), 1.5); - + // Track QA for (auto const& track : tracks) { - if (!jetderiveddatautilities::selectTrack(track, trackSelection)) { - return; + continue; } registry.fill(HIST("h_track_pt"), track.pt()); registry.fill(HIST("h_track_eta"), track.eta()); registry.fill(HIST("h_track_phi"), track.phi()); } + + // Inclusive charged-jet QA + registry.fill(HIST("h_njets_inclusive"), jets.size()); + + for (auto const& jet : jets) { + + registry.fill(HIST("h_jet_pt_inclusive"), jet.pt()); + registry.fill(HIST("h_jet_eta_inclusive"), jet.eta()); + registry.fill(HIST("h_jet_phi_inclusive"), jet.phi()); + + auto constituents = jet.template tracks_as(); + + registry.fill(HIST("h_jet_nconst_inclusive"), constituents.size()); + + registry.fill(HIST("h_jet_mass_inclusive"), computeJetMass(constituents)); + registry.fill(HIST("h_lambda11_inclusive"), computeLambda(jet, constituents, 1.f, 1.f)); + registry.fill(HIST("h_lambda21_inclusive"), computeLambda(jet, constituents, 2.f, 1.f)); + } + } + // Inclusive charged-jet QA for pp collisions + void processCollisions(aod::JetCollision const& collision, + aod::JetTracks const& tracks, + FilteredChargedJets const& jets) + { + fillInclusiveJetQA(collision, tracks, jets); } PROCESS_SWITCH(JetDsSpecSubs, processCollisions, "collision QA", false); + // Inclusive charged-jet QA for Pb–Pb collisions using + // event-wise constituent-subtracted jets + void processCollisionsEWS(aod::JetCollision const& collision, + aod::JetTracks const& tracks, + FilteredChargedJetsEWS const& jets) + { + fillInclusiveJetQA(collision, tracks, jets); + } + PROCESS_SWITCH(JetDsSpecSubs, processCollisionsEWS, "collision QA EWS", false); - //============== - // DATA process - //============== + //===================================================================================== + // DATA function + //===================================================================================== - void processDataChargedSubstructure(aod::JetCollision const& collision, FilteredDsDataJets const& jets, - aod::CandidatesDsData const&, aod::JetTracks const&) + // Common implementation of the Ds-in-jet analysis for data + // Shared by the pp and Pb–Pb (event-wise subtraction) workflows + template + void analyseDataDsJet(aod::JetCollision const& collision, + JetTable const& jets) { registry.fill(HIST("h_event_counter_data"), 1); @@ -307,17 +395,17 @@ struct JetDsSpecSubs { registry.fill(HIST("h_jet_eta_data"), jet.eta()); registry.fill(HIST("h_jet_phi_data"), jet.phi()); - auto jetTracks = jet.tracks_as(); + auto jetTracks = jet.template tracks_as(); const float lambda11 = computeLambda(jet, jetTracks, 1.f, 1.f); - const float lambda12 = computeLambda(jet, jetTracks, 2.f, 1.f); + const float lambda21 = computeLambda(jet, jetTracks, 2.f, 1.f); const float mjet = computeJetMass(jetTracks); TVector3 jetVector(jet.px(), jet.py(), jet.pz()); - // Loop over Ds candidates (particle level) - for (const auto& dsCandidate : jet.candidates_as()) { + // Loop over Ds candidates + for (const auto& dsCandidate : jet.template candidates_as()) { TVector3 dsVector(dsCandidate.px(), dsCandidate.py(), dsCandidate.pz()); @@ -333,7 +421,6 @@ struct JetDsSpecSubs { registry.fill(HIST("h_ds_phi_data"), dsCandidate.phi()); registry.fill(HIST("h_ds_jet_projection_data"), zParallel); - registry.fill(HIST("h_ds_jet_distance_data"), deltaR); // Main THnSparse: invariant mass, pT, z, and DeltaR @@ -345,39 +432,62 @@ struct JetDsSpecSubs { deltaR); } - if (!jet.candidates_as().empty()) { - // Jet mass + if (!jet.template candidates_as().empty()) { + // Jet Mass registry.fill(HIST("h_ds_jet_mass_data"), mjet); // Jet angularity if (lambda11 >= 0.f) { registry.fill(HIST("h_ds_jet_lambda11_data"), lambda11); } - if (lambda12 >= 0.f) { - registry.fill(HIST("h_ds_jet_lambda12_data"), lambda12); + if (lambda21 >= 0.f) { + registry.fill(HIST("h_ds_jet_lambda21_data"), lambda21); } } } } + + //===================================================================================== + // DATA process + //===================================================================================== + + // Data analysis using standard charged jets (pp) + void processDataChargedSubstructure(aod::JetCollision const& collision, + FilteredDsDataJets const& jets, + aod::CandidatesDsData const&, + aod::JetTracks const&) + { + analyseDataDsJet(collision, jets); + } PROCESS_SWITCH(JetDsSpecSubs, processDataChargedSubstructure, "Data charged jets", false); - //============== + // Data analysis using event-wise constituent-subtracted charged jets (Pb–Pb) + void processDataChargedSubstructureEWS(aod::JetCollision const& collision, + FilteredDsDataJetsEWS const& jets, + aod::CandidatesDsData const&, + aod::JetTracks const&) + { + analyseDataDsJet(collision, jets); + } + PROCESS_SWITCH(JetDsSpecSubs, processDataChargedSubstructureEWS, "Data charged jets EWS", false); + + //===================================================================================== // MC function - //============== - template - void analyseMonteCarloEfficiency(MCDJetsPerMCCollissionPreslice const& jetmcdpreslice, - MCPJetsPerMCCollissionPreslice const& jetmcppreslice, + void analyseMonteCarloEfficiency(MCDJetsPerCollisionPreslice const& jetmcdpreslice, + MCPJetsPerCollisionPreslice const& jetmcppreslice, aod::JetMcCollisions const& mccollisions, aod::JetCollisionsMCD const& collisions, - FilteredDsMCDJets const& mcdjets, - FilteredDsMCPJets const& mcpjets, - DsCandidatesMCD const& /*mcdCandidates*/, - DsCandidatesMCP const& /*mcpCandidates*/) + MCDJetTable const& mcdjets, + MCPJetTable const& mcpjets, + DsCandidatesMCD const&, + DsCandidatesMCP const&) { for (const auto& mccollision : mccollisions) { // Count all generated MC collisions @@ -469,6 +579,12 @@ struct JetDsSpecSubs { // obtain leading HF particle in jet auto mcpDscand = mcpjet.template candidates_first_as(); + // Check if it's prompt 0 prompt, 1 non-prompt + int originMCP = (mcpDscand.originMcGen() != RecoDecay::OriginType::Prompt) ? 1 : 0; + + // Matching status: 1 if the particle-level jet has a detector-level partner, 0 otherwise + int isMatched = mcpjet.has_matchedJetCand() ? 1 : 0; + if (mcpjet.has_matchedJetCand()) { registry.fill(HIST("McEffJet"), getValFromBin(BinMCJetCntr::ParticleLevelJetWithMatchedCandidate)); } @@ -490,19 +606,22 @@ struct JetDsSpecSubs { registry.fill(HIST("h_ds_eta_mcp"), mcpDscand.eta()); registry.fill(HIST("h_ds_phi_mcp"), mcpDscand.phi()); - // Main THnSparse: invariant mass, pT, z, and DeltaR + // Main THnSparse: invariant mass, pT, z, DeltaR , and origin (prompt/non-prompt) registry.fill(HIST("hSparse_ds_mcp"), mcpDscand.pt(), mcpjet.pt(), mcp_zParallel, - mcp_deltaR); + mcp_deltaR, + originMCP, + isMatched); } } } - //============== + //===================================================================================== // MC process - //============== + //===================================================================================== + // MC efficiency analysis using standard Ds-tagged jets (pp) void processMonteCarloEfficiencyDs(aod::JetMcCollisions const& mccollisions, aod::JetCollisionsMCD const& collisions, FilteredDsMCDJets const& mcdjets,