Skip to content

Commit 85bbeec

Browse files
author
Changhwan Choi
committed
Added configurable for GNN analysis
1 parent 863809f commit 85bbeec

1 file changed

Lines changed: 29 additions & 26 deletions

File tree

PWGJE/TableProducer/jetTaggerHF.cxx

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ struct JetTaggerHFTask {
119119
Configurable<bool> loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"};
120120

121121
// GNN configuration
122+
Configurable<float> jetpTMin{"jetpTMin", 5., "minimum jet pT"};
122123
Configurable<float> dbMin{"dbMin", -10., "minimum GNN Db"};
123124
Configurable<float> dbMax{"dbMax", 20., "maximum GNN Db"};
124125
Configurable<double> fC{"fC", 0.018, "Parameter f_c for D_b calculation"};
@@ -276,34 +277,36 @@ struct JetTaggerHFTask {
276277
}
277278
if (doprocessAlgorithmGNN) {
278279
float dbRange;
279-
if (scoreML[jet.globalIndex()] < dbMin) {
280-
dbRange = 0.5; // underflow
281-
} else if (scoreML[jet.globalIndex()] >= dbMax) {
282-
dbRange = 2.5; // overflow
283-
} else {
284-
dbRange = 1.5; // in range
285-
}
286-
registry.fill(HIST("h2_count_db"), 3.5, dbRange); // incl jet
287-
if constexpr (isMC) {
288-
switch (origin) {
289-
case 2:
290-
registry.fill(HIST("h_db_b"), scoreML[jet.globalIndex()]);
291-
registry.fill(HIST("h2_count_db"), 0.5, dbRange); // b-jet
292-
break;
293-
case 1:
294-
registry.fill(HIST("h_db_c"), scoreML[jet.globalIndex()]);
295-
registry.fill(HIST("h2_count_db"), 1.5, dbRange); // c-jet
296-
break;
297-
case 0:
298-
case 3:
299-
registry.fill(HIST("h_db_lf"), scoreML[jet.globalIndex()]);
300-
registry.fill(HIST("h2_count_db"), 2.5, dbRange); // lf-jet
301-
break;
302-
default:
303-
LOGF(debug, "doprocessAlgorithmGNN, Unexpected origin value: %d (%d)", origin, jet.globalIndex());
280+
if (jet.pt() >= jetpTMin) {
281+
if (scoreML[jet.globalIndex()] < dbMin) {
282+
dbRange = 0.5; // underflow
283+
} else if (scoreML[jet.globalIndex()] >= dbMax) {
284+
dbRange = 2.5; // overflow
285+
} else {
286+
dbRange = 1.5; // in range
287+
}
288+
registry.fill(HIST("h2_count_db"), 3.5, dbRange); // incl jet
289+
if constexpr (isMC) {
290+
switch (origin) {
291+
case 2:
292+
registry.fill(HIST("h_db_b"), scoreML[jet.globalIndex()]);
293+
registry.fill(HIST("h2_count_db"), 0.5, dbRange); // b-jet
294+
break;
295+
case 1:
296+
registry.fill(HIST("h_db_c"), scoreML[jet.globalIndex()]);
297+
registry.fill(HIST("h2_count_db"), 1.5, dbRange); // c-jet
298+
break;
299+
case 0:
300+
case 3:
301+
registry.fill(HIST("h_db_lf"), scoreML[jet.globalIndex()]);
302+
registry.fill(HIST("h2_count_db"), 2.5, dbRange); // lf-jet
303+
break;
304+
default:
305+
LOGF(debug, "doprocessAlgorithmGNN, Unexpected origin value: %d (%d)", origin, jet.globalIndex());
306+
}
304307
}
308+
registry.fill(HIST("h2_pt_db"), jet.pt(), scoreML[jet.globalIndex()]);
305309
}
306-
registry.fill(HIST("h2_pt_db"), jet.pt(), scoreML[jet.globalIndex()]);
307310
}
308311
taggingTable(decisionNonML[jet.globalIndex()], jetProb, scoreML[jet.globalIndex()]);
309312
}

0 commit comments

Comments
 (0)