Skip to content

Commit

Permalink
Remove warnings when disabling probQ computation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasciov committed Oct 17, 2022
1 parent f6282af commit 574595a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DataFormats/TrackerRecHit2D/interface/SiPixelRecHitQuality.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SiPixelRecHitQuality {
inline float probabilityXY(QualWordType qualWord) const {
int raw = (qualWord >> probX_shift) & probX_mask;
if (raw < 0 || raw > 16383) {
warningOutOfBoundRaw("XY", raw, qualWord);
//warningOutOfBoundRaw("XY", raw, qualWord);
raw = 16383;
}
float prob = (raw == 16383) ? 0 : pow(probX_units, (float)(-raw));
Expand All @@ -75,7 +75,7 @@ class SiPixelRecHitQuality {
inline float probabilityQ(QualWordType qualWord) const {
int raw = (qualWord >> probY_shift) & probY_mask;
if (raw < 0 || raw > 255) {
warningOutOfBoundRaw("Q", raw, qualWord);
//warningOutOfBoundRaw("Q", raw, qualWord);
raw = 255;
}
float prob = (raw == 255) ? 0 : pow(probY_units, (float)(-raw));
Expand All @@ -87,7 +87,7 @@ class SiPixelRecHitQuality {
inline int qBin(QualWordType qualWord) const {
int qbin = (qualWord >> qBin_shift) & qBin_mask;
if (qbin < 0 || qbin > 7) {
warningOutOfBoundQbin(qbin, qualWord);
//warningOutOfBoundQbin(qbin, qualWord);
qbin = 0;
}
return qbin;
Expand All @@ -112,7 +112,7 @@ class SiPixelRecHitQuality {
if (prob > 1.0f && prob <= 1.0f + std::numeric_limits<float>::epsilon()) {
prob = 1;
} else if (prob < 0.0f || prob > 1.0f + std::numeric_limits<float>::epsilon()) {
warningOutOfBoundProb("XY", prob, qualWord);
//warningOutOfBoundProb("XY", prob, qualWord);
prob = 0;
}
double draw = (prob <= 1.6E-13) ? 16383 : -log((double)prob) * probX_1_over_log_units;
Expand All @@ -124,7 +124,7 @@ class SiPixelRecHitQuality {
if (prob > 1.0f && prob <= 1.0f + std::numeric_limits<float>::epsilon()) {
prob = 1;
} else if (prob < 0.0f || prob > 1.0f + std::numeric_limits<float>::epsilon()) {
warningOutOfBoundProb("Q", prob, qualWord);
//warningOutOfBoundProb("Q", prob, qualWord);
prob = 0;
}
double draw = (prob <= 1E-5) ? 255 : -log((double)prob) * probY_1_over_log_units;
Expand All @@ -135,7 +135,7 @@ class SiPixelRecHitQuality {

inline void setQBin(int qbin, QualWordType& qualWord) const {
if (qbin < 0 || qbin > 7) {
warningOutOfBoundQbin(qbin, qualWord);
//warningOutOfBoundQbin(qbin, qualWord);
qbin = 0;
}
qualWord |= ((qbin & qBin_mask) << qBin_shift);
Expand Down

0 comments on commit 574595a

Please sign in to comment.