From d0650644bb25326e889edfb4d69c2940905dde11 Mon Sep 17 00:00:00 2001 From: Changhwan Choi Date: Tue, 8 Sep 2026 10:55:21 +0900 Subject: [PATCH] bjetTaggingGnn.cxx: Revised histogram fill code --- PWGJE/Tasks/bjetTaggingGnn.cxx | 36 ++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/PWGJE/Tasks/bjetTaggingGnn.cxx b/PWGJE/Tasks/bjetTaggingGnn.cxx index a671bedaebc..cc63eb3bb0b 100644 --- a/PWGJE/Tasks/bjetTaggingGnn.cxx +++ b/PWGJE/Tasks/bjetTaggingGnn.cxx @@ -12,7 +12,7 @@ /// \file bjetTaggingGnn.cxx /// \brief b-jet tagging using GNN /// -/// \author Changhwan Choi , Pusan National University +/// \author Changhwan Choi , Yonsei University #include "PWGJE/Core/JetDerivedDataUtilities.h" #include "PWGJE/Core/JetTaggingUtilities.h" @@ -197,8 +197,12 @@ struct BjetTaggingGnn { Configurable trackNppCrit{"trackNppCrit", 0.95, "track not physical primary ratio"}; // jet level configurables + Configurable jetPtNbins{"jetPtNbins", 300, "number of bins for jet pT"}; Configurable jetPtMin{"jetPtMin", 0.0, "minimum jet pT"}; - Configurable jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"}; + Configurable jetPtMax{"jetPtMax", 300.0, "maximum jet pT"}; + Configurable jetPtSubNbins{"jetPtSubNbins", 300, "number of bins for UE-subtracted jet pT"}; + Configurable jetPtSubMin{"jetPtSubMin", -50.0, "minimum UE-subtracted jet pT"}; + Configurable jetPtSubMax{"jetPtSubMax", 250.0, "maximum UE-subtracted jet pT"}; Configurable jetEtaMin{"jetEtaMin", -0.9, "minimum jet pseudorapidity"}; Configurable jetEtaMax{"jetEtaMax", 0.9, "maximum jet pseudorapidity"}; Configurable leadingConstituentPtMin{"leadingConstituentPtMin", -99.0, "minimum pT selection on jet constituent"}; @@ -331,9 +335,9 @@ struct BjetTaggingGnn { const AxisSpec axisTrackpT{200, 0., 200., "#it{p}_{T} (GeV/#it{c})"}; const AxisSpec axisTrackpTFine{1000, 0., 10., "#it{p}_{T} (GeV/#it{c})"}; - const AxisSpec axisJetpT{250, 0., 250., "#it{p}_{T, ch jet} (GeV/#it{c})"}; + const AxisSpec axisJetpT{jetPtNbins, jetPtMin, jetPtMax, "#it{p}_{T, ch jet} (GeV/#it{c})"}; // Used in place of axisJetpT for every "_sub"-suffixed histogram (UE-subtracted jet pT can go negative). - const AxisSpec axisJetpTSub{300, -50., 250., "#it{p}_{T, ch jet}^{sub} (GeV/#it{c})"}; + const AxisSpec axisJetpTSub{jetPtSubNbins, jetPtSubMin, jetPtSubMax, "#it{p}_{T, ch jet}^{sub} (GeV/#it{c})"}; const AxisSpec axisJetEta{200, -0.8, 0.8, "#it{#eta}_{jet}"}; const AxisSpec axisDb{200, dbMin, dbMax, "#it{D}_{b}"}; const AxisSpec axisDbFine{dbNbins, dbMin, dbMax, "#it{D}_{b}"}; @@ -1135,8 +1139,32 @@ struct BjetTaggingGnn { if (doDataDriven && doDataDrivenSV) { if constexpr (withSub) { registry.fill(HIST("hSparse_Incljets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + if (jetFlavor == JetTaggingSpecies::beauty) { + registry.fill(HIST("hSparse_bjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else if (jetFlavor == JetTaggingSpecies::charm) { + registry.fill(HIST("hSparse_cjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else { + registry.fill(HIST("hSparse_lfjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + if (jetFlavor == JetTaggingSpecies::none) { + registry.fill(HIST("hSparse_lfjets_none_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else { + registry.fill(HIST("hSparse_lfjets_matched_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } + } } else { registry.fill(HIST("hSparse_Incljets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + if (jetFlavor == JetTaggingSpecies::beauty) { + registry.fill(HIST("hSparse_bjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else if (jetFlavor == JetTaggingSpecies::charm) { + registry.fill(HIST("hSparse_cjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else { + registry.fill(HIST("hSparse_lfjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + if (jetFlavor == JetTaggingSpecies::none) { + registry.fill(HIST("hSparse_lfjets_none"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } else { + registry.fill(HIST("hSparse_lfjets_matched"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt); + } + } } }