1 #ifndef dRxyCalculator_h
2 #define dRxyCalculator_h
24 #define PI 3.141592653
33 double dRDistance(
double eta1,
double phi1,
double eta2,
double phi2)
35 double deta = eta1 - eta2;
36 double dphi = (
calcDphi(phi1, phi2));
38 return sqrt(deta * deta + dphi * dphi);
43 double dphi=phi1_-phi2_;
46 while (dphi>2*
PI) dphi-=2*
PI;
47 if (dphi>
PI) dphi=2*
PI-dphi;
49 while (dphi<-2*
PI) dphi+=2*
PI;
50 if (dphi<-
PI) dphi=-2*
PI-dphi;
dRxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, edm::InputTag trackLabel)
edm::Handle< reco::TrackCollection > recCollection
double getDRxy(const reco::Photon cluster, double x, double y)
double calcDphi(double phi1_, double phi2_)
double dRDistance(double eta1, double phi1, double eta2, double phi2)