17 #define PI 3.141592653589793238462643383279502884197169399375105820974945
25 fHFRecHits_ = hfhandle.
product();
32 fHORecHits_ = hohandle.
product();
39 fHBHERecHits_ = hehbhandle.
product();
46 geometry_ = geometryHandle.
product();
63 double SClusterEta = cluster->eta();
64 double SClusterPhi = cluster->phi();
70 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
71 double eta = hitpoint.
eta();
72 double phi = hitpoint.
phi();
73 double dEta = fabs(eta-SClusterEta);
74 double dPhi = fabs(phi-SClusterPhi);
75 while (dPhi>2*
PI) dPhi-=2*
PI;
80 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
82 if ( dR < innerR )
continue;
85 double et = rechit.
energy()/cosh(eta);
86 if (et<threshold) et=0;
104 double SClusterEta = cluster->eta();
105 double SClusterPhi = cluster->phi();
111 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
112 double eta = hitpoint.
eta();
113 double phi = hitpoint.
phi();
114 double dEta = fabs(eta-SClusterEta);
115 double dPhi = fabs(phi-SClusterPhi);
116 while (dPhi>2*
PI) dPhi-=2*
PI;
119 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
121 double et = rechit.
energy()/cosh(eta);
122 if (et<threshold) et=0;
132 using namespace reco;
135 LogError(
"RxCalculator") <<
"Error! Can't get HFRecHits for event.";
139 double SClusterEta = cluster->eta();
140 double SClusterPhi = cluster->phi();
146 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
147 double eta = hitpoint.
eta();
148 double phi = hitpoint.
phi();
149 double dEta = fabs(eta-SClusterEta);
150 double dPhi = fabs(phi-SClusterPhi);
151 while (dPhi>2*
PI) dPhi-=2*
PI;
155 double dR =
sqrt(dEta * dEta + dPhi * dPhi);
157 double et = rechit.
energy()/cosh(eta);
158 if (et<threshold) et=0;
172 using namespace reco;
180 double SClusterEta = cluster->eta();
181 double SClusterPhi = cluster->phi();
187 const GlobalPoint& hitpoint = geometry_->getPosition(detid);
188 double eta = hitpoint.
eta();
189 double phi = hitpoint.
phi();
190 double dEta = fabs(eta-SClusterEta);
191 double dPhi = fabs(phi-SClusterPhi);
192 while (dPhi>2*
PI) dPhi-=2*
PI;
196 double et = rechit.
energy()/cosh(eta);
197 if (et<threshold) et=0;
202 double Rx = getRx(cluster,x,threshold,innerR);
203 double CRx = Rx - TotalEt * (0.01*x*x - innerR*innerR) / (2 * 2 * 0.1 * x) ;
HcalDetId id() const
get the id
Geom::Phi< T > phi() const
double getRx(const reco::SuperClusterRef clus, double i, double threshold, double innerR=0.0)
double dPhi(double phi1, double phi2)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RxCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag &hbheLabel, const edm::InputTag &hfLabel, const edm::InputTag &hoLabel)
double getCRx(const reco::SuperClusterRef clus, double i, double threshold, double innerR=0.0)
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