14 #include <Math/VectorUtil.h> 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);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
std::vector< CaloTower >::const_iterator const_iterator
double deltaR2(const Direction &dir2) const
const_iterator end() const
XYZPointD XYZPoint
point in space with cartesian internal representation
T get() const
get a component
const_iterator begin() const