1 #ifndef TxyCalculator_h
2 #define TxyCalculator_h
23 #define PI 3.141592653
35 double dRDistance(
double eta1,
double phi1,
double eta2,
double phi2)
37 double deta = eta1 - eta2;
38 double dphi = (
calcDphi(phi1, phi2));
40 return sqrt(deta * deta + dphi * dphi);
45 double dphi=phi1_-phi2_;
48 while (dphi>2*
PI) dphi-=2*
PI;
49 if (dphi>
PI) dphi=2*
PI-dphi;
51 while (dphi<-2*
PI) dphi+=2*
PI;
52 if (dphi<-
PI) dphi=-2*
PI-dphi;
double dRDistance(double eta1, double phi1, double eta2, double phi2)
edm::Handle< reco::TrackCollection > recCollection
double getTxy(const reco::SuperClusterRef p, double x, double y)
int getNumAllTracks(double ptCut)
int getNumLocalTracks(const reco::SuperClusterRef p, double detaCut, double ptCut)
TxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, edm::InputTag trackLabel)
double calcDphi(double phi1_, double phi2_)