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 static warnings on DT L1T #43544

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 1 addition & 7 deletions L1Trigger/DTTriggerPhase2/src/GlobalCoordsObtainer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,6 @@ std::vector<double> GlobalCoordsObtainer::get_global_coordinates(uint32_t chid,
int tanpsi_msb = tanpsi >> (TANPSI_SIZE - PHIB_LUT_ADDR_WIDTH);
tanpsi_msb = from_two_comp(tanpsi_msb, PHIB_LUT_ADDR_WIDTH);

x_msb = x >> (X_SIZE - PHI_LUT_ADDR_WIDTH);
x_msb = from_two_comp(x_msb, PHI_LUT_ADDR_WIDTH);

tanpsi_msb = tanpsi >> (TANPSI_SIZE - PHIB_LUT_ADDR_WIDTH);
tanpsi_msb = from_two_comp(tanpsi_msb, PHIB_LUT_ADDR_WIDTH);

// The LSB part can be sliced right away because it must yield a positive integer
int x_lsb = x & (int)(std::pow(2, (X_SIZE - PHI_LUT_ADDR_WIDTH)) - 1);
int tanpsi_lsb = tanpsi & (int)(std::pow(2, (TANPSI_SIZE - PHIB_LUT_ADDR_WIDTH)) - 1);
Expand Down Expand Up @@ -261,4 +255,4 @@ std::vector<double> GlobalCoordsObtainer::get_global_coordinates(uint32_t chid,
double phib_f = (double)phib / pow(2, PHIB_SIZE);

return std::vector({phi_f, phib_f});
}
}
3 changes: 2 additions & 1 deletion L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzerInChamber.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzerInChamber.h"
#include "FWCore/Utilities/interface/isFinite.h"
#include <cmath>
#include <memory>

Expand Down Expand Up @@ -242,7 +243,7 @@ void MuonPathAnalyzerInChamber::analyze(MuonPathPtr &inMPath, MuonPathPtrs &outM
}

// Protection against non-converged fits
if (isnan(jm_x))
if (edm::isNotFinite(jm_x))
continue;

// Updating muon-path horizontal position
Expand Down