Skip to content
Snippets Groups Projects
Commit 2c1cc0f5 authored by Makayla Vessella's avatar Makayla Vessella :sheep: Committed by Johannes Elmsheuser
Browse files

add NaN protection to HSGN2 photon decorations

add NaN protection to HSGN2 photon decorations
parent 3d438b1e
No related branches found
No related tags found
No related merge requests found
......@@ -196,13 +196,26 @@ namespace InDetGNNHardScatterSelection
dec_z_skew(*vertex) = z_skew;
if (acc_deltaZ.isAvailable()) {
//protect against rare NaNs before assigning decorator
if (std::isnan(acc_deltaZ(*vertex))) {
ATH_MSG_WARNING("photon deltaZ is NaN: setting to -999!");
dec_photon_deltaz(*vertex) = -999;
}
else{
dec_photon_deltaz(*vertex) = acc_deltaZ(*vertex);
}
}
else{
dec_photon_deltaz(*vertex) = -999;
}
if (acc_deltaPhi.isAvailable()) {
if (std::isnan(acc_deltaPhi(*vertex))) {
ATH_MSG_WARNING("photon deltaPhi is NaN: setting to -999!");
dec_photon_deltaPhi(*vertex) = -999;
}
else{
dec_photon_deltaPhi(*vertex) = acc_deltaPhi(*vertex);
}
}
else{
dec_photon_deltaPhi(*vertex) = -999;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment