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

[EMCAL-741] Use std::round for pedestal ADC extraction #13078

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define EMCALCALIBEXTRACTOR_H_

#include <algorithm>
#include <cmath>
#include <iostream>
#include "CCDB/BasicCCDBManager.h"
#include "EMCALCalib/BadChannelMap.h"
Expand Down Expand Up @@ -465,7 +466,7 @@ class EMCALCalibExtractor
if (rms > EMCALCalibParams::Instance().maxPedestalRMS) {
mean = mMaxPedestalVal;
}
pedestalData.addPedestalValue(iCell, mean, isLG, isLEDMON);
pedestalData.addPedestalValue(iCell, std::round(mean), isLG, isLEDMON);
}
}
}
Expand All @@ -488,7 +489,7 @@ class EMCALCalibExtractor
if (!obj)
continue;
for (unsigned short iCell = 0; iCell < maxChannels; ++iCell) {
short mean = static_cast<short>(obj->GetBinContent(iCell + 1));
short mean = static_cast<short>(std::round(obj->GetBinContent(iCell + 1)));
short rms = static_cast<short>(obj->GetBinError(iCell + 1) / obj->GetBinEntries(iCell + 1));
if (rms > EMCALCalibParams::Instance().maxPedestalRMS) {
mean = mMaxPedestalVal;
Expand Down
Loading