From 1f03b5c28cda44277eafed3e4d527cc3480b2994 Mon Sep 17 00:00:00 2001 From: aandvalenzuela Date: Mon, 16 Jan 2023 16:00:29 +0100 Subject: [PATCH] Fix warnings on bitwise operators --- SimCalorimetry/HcalTrigPrimAlgos/src/HcalFinegrainBit.cc | 2 +- .../HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SimCalorimetry/HcalTrigPrimAlgos/src/HcalFinegrainBit.cc b/SimCalorimetry/HcalTrigPrimAlgos/src/HcalFinegrainBit.cc index 118a81905f71e..f29ccd754cc99 100644 --- a/SimCalorimetry/HcalTrigPrimAlgos/src/HcalFinegrainBit.cc +++ b/SimCalorimetry/HcalTrigPrimAlgos/src/HcalFinegrainBit.cc @@ -11,7 +11,7 @@ std::bitset<2> HcalFinegrainBit::compute(const HcalFinegrainBit::Tower& tower) c // First layer consistent with a MIP, at least one layer with more // than MIP energy deposition - result[1] = result[0] & (tower[is_above_mip].count() > 0); + result[1] = result[0] && (tower[is_above_mip].count() > 0); // There layers consistent with a MIP // result[2] = tower[is_mip].count() >= 3; diff --git a/SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc b/SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc index e7b0e60f775c1..463e873dddfd3 100644 --- a/SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc +++ b/SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc @@ -479,8 +479,8 @@ void HcalTriggerPrimitiveAlgo::analyzeQIE11(IntegerCaloSamples& samples, int sampleTSminus1 = samples[ibin]; if (fix_saturation_ && (sample_saturation.size() > ibin + 1)) - check_sat = (sample_saturation[ibin + 1] | (sampleTS >= QIE11_MAX_LINEARIZATION_ET) | sample_saturation[ibin] | - (sampleTSminus1 >= QIE11_MAX_LINEARIZATION_ET)); + check_sat = (sample_saturation[ibin + 1] || (sampleTS >= QIE11_MAX_LINEARIZATION_ET) || + sample_saturation[ibin] || (sampleTSminus1 >= QIE11_MAX_LINEARIZATION_ET)); if (sampleTS > QIE11_MAX_LINEARIZATION_ET) sampleTS = QIE11_MAX_LINEARIZATION_ET;