Skip to content

Commit 1a597d4

Browse files
nstrangmNicolas Strangmann
andauthored
[PWGJE,EMCAL-670] Bugfix in EMCalCorrectionTask for ShaperCorrection (#8883)
Co-authored-by: Nicolas Strangmann <nicolas.strangmann@.cern.ch>
1 parent f11e1e9 commit 1a597d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ struct EmcalCorrectionTask {
280280
std::vector<int64_t> cellIndicesBC;
281281
for (const auto& cell : cellsInBC) {
282282
auto amplitude = cell.amplitude();
283-
if (static_cast<bool>(hasShaperCorrection)) {
283+
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
284284
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
285285
}
286286
if (applyCellAbsScale) {
@@ -402,7 +402,7 @@ struct EmcalCorrectionTask {
402402
mHistManager.fill(HIST("hMCParticleEnergy"), cellparticle.e());
403403
}
404404
auto amplitude = cell.amplitude();
405-
if (static_cast<bool>(hasShaperCorrection)) {
405+
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
406406
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
407407
}
408408
cellsBC.emplace_back(cell.cellNumber(),

0 commit comments

Comments
 (0)