14 for (
const auto es : eventShape) {
15 if (es->layer() !=
layer ||
eta > es->etaMax() || eta <= es->
etaMin())
21 if (std::abs(
et) < 0.1)
24 return et / es->nCells();
40 return StatusCode::SUCCESS;
51 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;