Skip to content

Commit 49acafe

Browse files
choich08365Changhwan Choi
andauthored
[PWGJE] bjetTaggingGnn.cxx: Revised histogram fill code (#17824)
Co-authored-by: Changhwan Choi <changhwan.choi@cern.ch>
1 parent 9e419bb commit 49acafe

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"
@@ -196,8 +196,12 @@ struct BjetTaggingGnn {
196196
Configurable<float> trackNppCrit{"trackNppCrit", 0.95, "track not physical primary ratio"};
197197

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

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

0 commit comments

Comments
 (0)