Skip to content
Snippets Groups Projects
Commit 33341159 authored by Carl Gwilliam's avatar Carl Gwilliam
Browse files

fix float to int trunncation in digi

parent f1fee5de
No related branches found
No related tags found
No related merge requests found
Pipeline #5132773 passed
...@@ -123,7 +123,7 @@ CaloWaveformDigiAlg::execute(const EventContext& ctx) const { ...@@ -123,7 +123,7 @@ CaloWaveformDigiAlg::execute(const EventContext& ctx) const {
// Subtract count from basleine and add result to correct waveform vector // Subtract count from basleine and add result to correct waveform vector
for (const auto& c : counts) { for (const auto& c : counts) {
double baseline = m_digiTool->generate_baseline(m_base_mean, m_base_rms); float baseline = m_digiTool->generate_baseline(m_base_mean, m_base_rms);
int value = std::round(baseline - c.second); int value = std::round(baseline - c.second);
if (value < 0) { if (value < 0) {
......
...@@ -171,7 +171,7 @@ ScintWaveformDigiAlg::execute(const EventContext& ctx) const { ...@@ -171,7 +171,7 @@ ScintWaveformDigiAlg::execute(const EventContext& ctx) const {
// Subtract count from basleine and add result to correct waveform vector // Subtract count from basleine and add result to correct waveform vector
for (const auto& c : counts) { for (const auto& c : counts) {
double baseline = m_digiTool->generate_baseline(m_base_mean, m_base_rms); float baseline = m_digiTool->generate_baseline(m_base_mean, m_base_rms);
int value = std::round(baseline - c.second); int value = std::round(baseline - c.second);
if (value < 0) { if (value < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment