From 0250b95ae2ce37b1dfc32c9785fa87d9048fe1bb Mon Sep 17 00:00:00 2001 From: Nicolas Strangmann Date: Mon, 9 Dec 2024 16:31:05 +0100 Subject: [PATCH] [PWGJE,EMCAL-670] Bugfix in EMCalCorrectionTask for ShaperCorrection --- PWGJE/TableProducer/emcalCorrectionTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGJE/TableProducer/emcalCorrectionTask.cxx b/PWGJE/TableProducer/emcalCorrectionTask.cxx index 576df1a585a..464f23a360d 100644 --- a/PWGJE/TableProducer/emcalCorrectionTask.cxx +++ b/PWGJE/TableProducer/emcalCorrectionTask.cxx @@ -280,7 +280,7 @@ struct EmcalCorrectionTask { std::vector cellIndicesBC; for (const auto& cell : cellsInBC) { auto amplitude = cell.amplitude(); - if (static_cast(hasShaperCorrection)) { + if (static_cast(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude); } if (applyCellAbsScale) { @@ -402,7 +402,7 @@ struct EmcalCorrectionTask { mHistManager.fill(HIST("hMCParticleEnergy"), cellparticle.e()); } auto amplitude = cell.amplitude(); - if (static_cast(hasShaperCorrection)) { + if (static_cast(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(),