14 #include <Math/VectorUtil.h> 31 EgammaTowerExtractor::~EgammaTowerExtractor(){}
37 iEvent.
getByToken(caloTowerToken, towercollectionH);
43 Direction candDir(caloPosition.eta(), caloPosition.phi());
46 deposit.addCandEnergy(sc->energy()*
sin(2*atan(
exp(-sc->eta()))));
56 if(depth_==AllDepths) depEt = trItr->hadEt();
57 else if(depth_==Depth1) depEt = trItr->ietaAbs()<18 || trItr->ietaAbs()>29 ? trItr->hadEt() : trItr->hadEnergyHeInnerLayer()*
sin(trItr->p4().theta());
58 else if(depth_==Depth2) depEt = trItr->hadEnergyHeOuterLayer()*
sin(trItr->p4().theta());
60 if ( depEt < etLow_ ) continue ;
63 Direction towerDir( trItr->eta(), trItr->phi() );
64 double dR2 = candDir.
deltaR2(towerDir);
66 if (dR2 < extRadius2_) {
67 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