52 const auto & eventShape = *eventShapeHandle;
53 auto outputCells = std::make_unique<CaloConstCellContainer>();
55 for (
auto const* cell : *inputCellHandle) {
56 std::unique_ptr<CaloCell> copy = cell->clone();
58 int layer = copy->caloDDE()->getSampling();
60 double eavg = get_average_energy(eventShape, layer, copy->eta());
61 double etotal = (copy->et() - eavg) / copy->sinTh();
63 copy->setEnergy(etotal);
64 outputCells->push_back(std::move(copy));
68 if (inputCellHandle->hasCalo(
id))
69 outputCells->setHasCalo(
id);
71 outputCells->updateCaloIterators();
75 return StatusCode::SUCCESS;