Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rzChisquared NaN's on CPU Backend for T5 #97

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions RecoTracker/LSTCore/src/alpaka/Quintuplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "RecoTracker/LSTCore/interface/alpaka/Constants.h"
#include "RecoTracker/LSTCore/interface/Module.h"
#include "RecoTracker/LSTCore/interface/EndcapGeometry.h"
#include "FWCore/Utilities/interface/isFinite.h"

#include "NeuralNetwork.h"
#include "Segment.h"
Expand Down Expand Up @@ -555,9 +556,9 @@ namespace lst {
float diffz1 = (solz1 - zsi) * 100;
float diffz2 = (solz2 - zsi) * 100;
// Alpaka : Needs to be moved over
if (alpaka::math::isnan(acc, diffz1))
if (edm::isNotFinite(diffz1))
diffz = diffz2;
else if (alpaka::math::isnan(acc, diffz2))
else if (edm::isNotFinite(diffz2))
diffz = diffz1;
else {
diffz = (alpaka::math::abs(acc, diffz1) < alpaka::math::abs(acc, diffz2)) ? diffz1 : diffz2;
Expand Down Expand Up @@ -604,7 +605,7 @@ namespace lst {
// for set rzchi2 cut
// if the 5 points are linear, helix calculation gives nan
// Alpaka : Needs to be moved over
if (inner_pt > 100 || alpaka::math::isnan(acc, rzChiSquared)) {
if (inner_pt > 100 || edm::isNotFinite(rzChiSquared)) {
float slope;
if (moduleType1 == 0 and moduleType2 == 0 and moduleType3 == 1) //PSPS2S
{
Expand Down