Skip to content

Commit d065064

Browse files
author
Changhwan Choi
committed
bjetTaggingGnn.cxx: Revised histogram fill code
1 parent 3894426 commit d065064

1 file changed

Lines changed: 32 additions & 4 deletions

File tree

PWGJE/Tasks/bjetTaggingGnn.cxx

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/// \file bjetTaggingGnn.cxx
1313
/// \brief b-jet tagging using GNN
1414
///
15-
/// \author Changhwan Choi <changhwan.choi@cern.ch>, Pusan National University
15+
/// \author Changhwan Choi <changhwan.choi@cern.ch>, Yonsei University
1616

1717
#include "PWGJE/Core/JetDerivedDataUtilities.h"
1818
#include "PWGJE/Core/JetTaggingUtilities.h"
@@ -197,8 +197,12 @@ struct BjetTaggingGnn {
197197
Configurable<float> trackNppCrit{"trackNppCrit", 0.95, "track not physical primary ratio"};
198198

199199
// jet level configurables
200+
Configurable<int> jetPtNbins{"jetPtNbins", 300, "number of bins for jet pT"};
200201
Configurable<float> jetPtMin{"jetPtMin", 0.0, "minimum jet pT"};
201-
Configurable<float> jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"};
202+
Configurable<float> jetPtMax{"jetPtMax", 300.0, "maximum jet pT"};
203+
Configurable<int> jetPtSubNbins{"jetPtSubNbins", 300, "number of bins for UE-subtracted jet pT"};
204+
Configurable<float> jetPtSubMin{"jetPtSubMin", -50.0, "minimum UE-subtracted jet pT"};
205+
Configurable<float> jetPtSubMax{"jetPtSubMax", 250.0, "maximum UE-subtracted jet pT"};
202206
Configurable<float> jetEtaMin{"jetEtaMin", -0.9, "minimum jet pseudorapidity"};
203207
Configurable<float> jetEtaMax{"jetEtaMax", 0.9, "maximum jet pseudorapidity"};
204208
Configurable<float> leadingConstituentPtMin{"leadingConstituentPtMin", -99.0, "minimum pT selection on jet constituent"};
@@ -331,9 +335,9 @@ struct BjetTaggingGnn {
331335

332336
const AxisSpec axisTrackpT{200, 0., 200., "#it{p}_{T} (GeV/#it{c})"};
333337
const AxisSpec axisTrackpTFine{1000, 0., 10., "#it{p}_{T} (GeV/#it{c})"};
334-
const AxisSpec axisJetpT{250, 0., 250., "#it{p}_{T, ch jet} (GeV/#it{c})"};
338+
const AxisSpec axisJetpT{jetPtNbins, jetPtMin, jetPtMax, "#it{p}_{T, ch jet} (GeV/#it{c})"};
335339
// Used in place of axisJetpT for every "_sub"-suffixed histogram (UE-subtracted jet pT can go negative).
336-
const AxisSpec axisJetpTSub{300, -50., 250., "#it{p}_{T, ch jet}^{sub} (GeV/#it{c})"};
340+
const AxisSpec axisJetpTSub{jetPtSubNbins, jetPtSubMin, jetPtSubMax, "#it{p}_{T, ch jet}^{sub} (GeV/#it{c})"};
337341
const AxisSpec axisJetEta{200, -0.8, 0.8, "#it{#eta}_{jet}"};
338342
const AxisSpec axisDb{200, dbMin, dbMax, "#it{D}_{b}"};
339343
const AxisSpec axisDbFine{dbNbins, dbMin, dbMax, "#it{D}_{b}"};
@@ -1135,8 +1139,32 @@ struct BjetTaggingGnn {
11351139
if (doDataDriven && doDataDrivenSV) {
11361140
if constexpr (withSub) {
11371141
registry.fill(HIST("hSparse_Incljets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1142+
if (jetFlavor == JetTaggingSpecies::beauty) {
1143+
registry.fill(HIST("hSparse_bjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1144+
} else if (jetFlavor == JetTaggingSpecies::charm) {
1145+
registry.fill(HIST("hSparse_cjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1146+
} else {
1147+
registry.fill(HIST("hSparse_lfjets_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1148+
if (jetFlavor == JetTaggingSpecies::none) {
1149+
registry.fill(HIST("hSparse_lfjets_none_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1150+
} else {
1151+
registry.fill(HIST("hSparse_lfjets_matched_sub"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1152+
}
1153+
}
11381154
} else {
11391155
registry.fill(HIST("hSparse_Incljets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1156+
if (jetFlavor == JetTaggingSpecies::beauty) {
1157+
registry.fill(HIST("hSparse_bjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1158+
} else if (jetFlavor == JetTaggingSpecies::charm) {
1159+
registry.fill(HIST("hSparse_cjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1160+
} else {
1161+
registry.fill(HIST("hSparse_lfjets"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1162+
if (jetFlavor == JetTaggingSpecies::none) {
1163+
registry.fill(HIST("hSparse_lfjets_none"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1164+
} else {
1165+
registry.fill(HIST("hSparse_lfjets_matched"), jetpT, analysisJet.scoreML(), nTracks, massSV, weightEvt);
1166+
}
1167+
}
11401168
}
11411169
}
11421170

0 commit comments

Comments
 (0)