17 #define PI 3.141592653589793238462643383279502884197169399375105820974945
24 fHFRecHits_ = hfhandle.
product();
28 fHORecHits_ = hohandle.
product();
32 fHBHERecHits_ = hehbhandle.
product();
36 geometry_ = geometryHandle.
product();
48 LogError(
"RxCalculator") <<
"Error! Can't get HBHERecHits for event.";
52 double SClusterEta = cluster->eta();
53 double SClusterPhi = cluster->phi();
59 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
60 double eta = hitpoint.
eta();
61 double phi = hitpoint.
phi();
62 double dEta = fabs(eta-SClusterEta);
63 double dPhi = fabs(phi-SClusterPhi);
64 while (dPhi>2*
PI) dPhi-=2*
PI;
69 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
72 double et = rechit.
energy()/cosh(eta);
73 if (et<threshold) et=0;
87 LogError(
"RxCalculator") <<
"Error! Can't get HORecHits for event.";
91 double SClusterEta = cluster->eta();
92 double SClusterPhi = cluster->phi();
98 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
99 double eta = hitpoint.
eta();
100 double phi = hitpoint.
phi();
101 double dEta = fabs(eta-SClusterEta);
102 double dPhi = fabs(phi-SClusterPhi);
103 while (dPhi>2*
PI) dPhi-=2*
PI;
106 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
108 double et = rechit.
energy()/cosh(eta);
109 if (et<threshold) et=0;
119 using namespace reco;
122 LogError(
"RxCalculator") <<
"Error! Can't get HFRecHits for event.";
126 double SClusterEta = cluster->eta();
127 double SClusterPhi = cluster->phi();
133 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
134 double eta = hitpoint.
eta();
135 double phi = hitpoint.
phi();
136 double dEta = fabs(eta-SClusterEta);
137 double dPhi = fabs(phi-SClusterPhi);
138 while (dPhi>2*
PI) dPhi-=2*
PI;
142 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
144 double et = rechit.
energy()/cosh(eta);
145 if (et<threshold) et=0;
159 using namespace reco;
163 LogError(
"RxCalculator") <<
"Error! Can't get HBHERecHits for event.";
167 double SClusterEta = cluster->eta();
168 double SClusterPhi = cluster->phi();
174 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
175 double eta = hitpoint.
eta();
176 double phi = hitpoint.
phi();
177 double dEta = fabs(eta-SClusterEta);
178 double dPhi = fabs(phi-SClusterPhi);
179 while (dPhi>2*
PI) dPhi-=2*
PI;
183 double et = rechit.
energy()/cosh(eta);
184 if (et<threshold) et=0;
189 double Rx = getRx(cluster,x,threshold);
190 double CRx = Rx - TotalEt / 40.0 *
x;
HcalDetId id() const
get the id
double getCRx(const reco::SuperClusterRef clus, double i, double threshold)
Geom::Phi< T > phi() const
double dPhi(double phi1, double phi2)
double getRx(const reco::SuperClusterRef clus, double i, double threshold)
RxCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, edm::InputTag hbheLabel, edm::InputTag hfLabel, edm::InputTag hoLabel)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
T const * product() const
double getROx(const reco::SuperClusterRef clus, double i, double threshold)
double getRFx(const reco::SuperClusterRef clus, double i, double threshold)
HcalDetId id() const
get the id
HcalDetId id() const
get the id