Commit d697ca03 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Resolve "Unsigned eicd::RawCalorimeterHit amplitude causes threshold issues"

parent eda9e3ed
......@@ -168,13 +168,13 @@ public:
// energy time reconstruction
for (const auto& rh : rawhits) {
// did not pass the zero-suppression threshold
if ((rh.getAmplitude() - m_pedMeanADC) < thresholdADC) {
if ((signed)(rh.getAmplitude() - m_pedMeanADC) < thresholdADC) {
continue;
}
// convert ADC -> energy
const float energy =
(rh.getAmplitude() - m_pedMeanADC) / static_cast<float>(m_capADC.value()) * dyRangeADC / m_sampFrac;
(signed)(rh.getAmplitude() - m_pedMeanADC) / static_cast<float>(m_capADC.value()) * dyRangeADC / m_sampFrac;
const float time = rh.getTimeStamp() / stepTDC;
const auto cellID = rh.getCellID();
const int lid = id_dec != nullptr && !m_layerField.value().empty() ? static_cast<int>(id_dec->get(cellID, layer_idx)) : -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment