Skip to content

Commit

Permalink
[PWGJE,EMCAL-670] Bugfix in EMCalCorrectionTask for ShaperCorrection
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Strangmann committed Dec 9, 2024
1 parent c6375c4 commit 0250b95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PWGJE/TableProducer/emcalCorrectionTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ struct EmcalCorrectionTask {
std::vector<int64_t> cellIndicesBC;
for (const auto& cell : cellsInBC) {
auto amplitude = cell.amplitude();
if (static_cast<bool>(hasShaperCorrection)) {
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
}
if (applyCellAbsScale) {
Expand Down Expand Up @@ -402,7 +402,7 @@ struct EmcalCorrectionTask {
mHistManager.fill(HIST("hMCParticleEnergy"), cellparticle.e());
}
auto amplitude = cell.amplitude();
if (static_cast<bool>(hasShaperCorrection)) {
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
}
cellsBC.emplace_back(cell.cellNumber(),
Expand Down

0 comments on commit 0250b95

Please sign in to comment.