17 #include "CaloGeoHelpers/CaloSampling.h"
22 const IInterface*
parent) :
28 const EventContext& context)
const
35 double energyEta = rtrigEmCluster.
eta();
36 double energyPhi = rtrigEmCluster.
phi();
46 for (
unsigned int sampling = 0; sampling < 3; sampling++) {
54 double etaCell = larcell->eta();
55 double phiCell = larcell->phi();
56 double energyCell = larcell->energy();
59 deta = std::abs(etaCell - energyEta);
60 dphi = std::abs(phiCell - energyPhi);
61 if (dphi >
M_PI) dphi = 2. *
M_PI - dphi;
63 if (deta <= 0.12 && dphi <= 0.12) {
65 samp = larcell->caloDDE()->getSampling();
66 rtrigEmCluster.
setEnergy(samp, rtrigEmCluster.
energy(samp) + energyCell);
79 std::vector<const TileCell*> seltile;
82 for (
const TileCell* tilecell : seltile) {
85 double etaCell = tilecell->eta();
86 double phiCell = tilecell->phi();
87 double energyCell = tilecell->energy();
90 deta = std::abs(etaCell - energyEta);
91 dphi = std::abs(phiCell - energyPhi);
92 if (dphi >
M_PI) dphi = 2. *
M_PI - dphi;
94 if (deta <= 0.12 && dphi <= 0.12) {
96 samp = tilecell->caloDDE()->getSampling();
97 rtrigEmCluster.
setEnergy(samp, rtrigEmCluster.
energy(samp) + energyCell);
101 rtrigEmCluster.
setEhad1(rtrigEmCluster.
ehad1() + energyCell);
109 return StatusCode::SUCCESS;