19 #define PI 3.141592654 20 #define TWOPI 6.283185308 30 if(candSCphi<0) candSCphi+=
TWOPI;
36 if(fabs(HcalHit_eta-candSCeta)<
conesize) {
37 float HcalHit_pth=hbheItr->energy()*
sin(2*atan(
exp(-HcalHit_eta)));
38 if(HcalHit_pth>
ptMin) {
40 float deltaeta=fabs(HcalHit_eta-candSCeta);
41 if(HcalHit_phi<0) HcalHit_phi+=
TWOPI;
42 float deltaphi=fabs(HcalHit_phi-candSCphi);
44 if(deltaphi>
PI) deltaphi=
TWOPI-deltaphi;
45 float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
46 if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth;
53 if(fabs(HcalHit_eta-candSCeta)<
conesize) {
54 float HcalHit_pth=hfItr->energy()*
sin(2*atan(
exp(-HcalHit_eta)));
55 if(HcalHit_pth>
ptMin) {
57 float deltaeta=fabs(HcalHit_eta-candSCeta);
59 if(HcalHit_phi<0) HcalHit_phi+=
TWOPI;
60 if(candSCphi<0) candSCphi+=
TWOPI;
61 deltaphi=fabs(HcalHit_phi-candSCphi);
63 if(deltaphi>
PI) deltaphi=
TWOPI-deltaphi;
64 float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
65 if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth;
float isolPtSum(const reco::RecoCandidate *recocandidate, const HBHERecHitCollection *hbhe, const HFRecHitCollection *hf, const CaloGeometry *geometry)
Sin< T >::type sin(const T &t)
std::vector< HBHERecHit >::const_iterator const_iterator
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
const_iterator end() const
const_iterator begin() const
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster