Skip to content

Commit

Permalink
[PWGJE,EMCAL-670] Bugfix in EMCalCorrectionTask for ShaperCorrection (#…
Browse files Browse the repository at this point in the history
…8883)

Co-authored-by: Nicolas Strangmann <nicolas.strangmann@.cern.ch>
  • Loading branch information
nstrangm and Nicolas Strangmann authored Dec 9, 2024
1 parent f11e1e9 commit 1a597d4
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 1a597d4

Please sign in to comment.