14 #include <Math/VectorUtil.h>
25 using namespace ROOT::Math::VectorUtil;
30 EgammaTowerExtractor::~EgammaTowerExtractor() {}
36 iEvent.getByToken(caloTowerToken, towercollectionH);
42 Direction candDir(caloPosition.eta(), caloPosition.phi());
45 deposit.addCandEnergy(sc->energy() *
sin(2 * atan(
exp(-sc->eta()))));
57 if (depth_ == AllDepths)
58 depEt = trItr->hadEt();
59 else if (depth_ == Depth1)
60 depEt = trItr->ietaAbs() < 18 || trItr->ietaAbs() > 29
62 : trItr->hadEnergyHeInnerLayer() *
sin(trItr->p4().theta());
63 else if (depth_ == Depth2)
64 depEt = trItr->hadEnergyHeOuterLayer() *
sin(trItr->p4().theta());
69 Direction towerDir(trItr->eta(), trItr->phi());
70 double dR2 = candDir.
deltaR2(towerDir);
72 if (dR2 < extRadius2_) {
73 deposit.addDeposit(towerDir, depEt);