Skip to content

Commit 9d566d1

Browse files
committed
safe against 0/inf weights
1 parent f0ef073 commit 9d566d1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎PWGJE/Tasks/jetSpectraEseTask.cxx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,10 @@ struct JetSpectraEseTask {
12291229
registry.fill(HIST("mcd/hCentralitySel"), centrality);
12301230
float eventWeight = 1.0f;
12311231
if (cfgUseMCEventWeights) {
1232-
eventWeight = collision.has_mcCollision() ? collision.mcCollision_as<aod::JetMcCollisions>().weight() : 0.0f;
1232+
eventWeight = collision.has_mcCollision() ? collision.mcCollision_as<aod::JetMcCollisions>().weight() : -1.0f;
1233+
}
1234+
if (eventWeight <= 0.0f) {
1235+
return;
12331236
}
12341237
const float pTHat = getPTHat(eventWeight);
12351238
if (!(pTHat < pTHatAbsoluteMin)) {

0 commit comments

Comments
 (0)