20 #define PI 3.141592654
21 #define TWOPI 6.283185308
31 if(candSCphi<0) candSCphi+=
TWOPI;
37 if(fabs(HcalHit_eta-candSCeta)<
conesize) {
38 float HcalHit_pth=hbheItr->energy()*
sin(2*atan(
exp(-HcalHit_eta)));
39 if(HcalHit_pth>
ptMin) {
41 float deltaeta=fabs(HcalHit_eta-candSCeta);
42 if(HcalHit_phi<0) HcalHit_phi+=
TWOPI;
43 float deltaphi=fabs(HcalHit_phi-candSCphi);
45 if(deltaphi>
PI) deltaphi=
TWOPI-deltaphi;
46 float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
47 if(newDelta<conesizeSquared && newDelta>exclusionSquared ) hcalIsol+=HcalHit_pth;
54 if(fabs(HcalHit_eta-candSCeta)<
conesize) {
55 float HcalHit_pth=hfItr->energy()*
sin(2*atan(
exp(-HcalHit_eta)));
56 if(HcalHit_pth>
ptMin) {
58 float deltaeta=fabs(HcalHit_eta-candSCeta);
60 if(HcalHit_phi<0) HcalHit_phi+=
TWOPI;
61 if(candSCphi<0) candSCphi+=
TWOPI;
62 deltaphi=fabs(HcalHit_phi-candSCphi);
64 if(deltaphi>
PI) deltaphi=
TWOPI-deltaphi;
65 float newDelta= (deltaphi*deltaphi+ deltaeta*deltaeta);
66 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< T >::const_iterator const_iterator
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
const_iterator end() const
ESHandle< TrackerGeometry > geometry
const_iterator begin() const
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster