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