2 #include <Math/VectorUtil.h> 23 fEBclusters_ = pEBclusters.
product();
25 fEBclusters_ =
nullptr;
28 fEEclusters_ = pEEclusters.
product();
30 fEEclusters_ =
nullptr;
35 geometry_ = geometryHandle.
product();
51 cluster->position().y(),
52 cluster->position().z());
56 TotalEt = - cluster->rawEnergy()/cosh(cluster->eta());
59 for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin();
60 iclu != fEBclusters_->end(); ++iclu) {
63 double eta = ClusPoint.eta();
67 if (dR2 < (x*x*0.01)) {
68 double et = clu->energy()/cosh(eta);
69 if (et<threshold) et=0;
74 for(BasicClusterCollection::const_iterator iclu = fEEclusters_->begin();
75 iclu != fEEclusters_->end(); ++iclu) {
77 const GlobalPoint clusPoint(clu->x(),clu->y(),clu->z());
79 double eta = ClusPoint.eta();
83 if (dR2 < (x*x*0.01)) {
84 double et = clu->energy()/cosh(eta);
85 if (et<threshold) et=0;
103 double SClusterEta = cluster->eta();
106 TotalEt = - cluster->rawEnergy()/cosh(cluster->eta());
108 for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin();
109 iclu != fEBclusters_->end(); ++iclu) {
112 double eta = ClusPoint.eta();
114 double dEta = fabs(eta-SClusterEta);
117 double et = clu->energy()/cosh(eta);
118 if (et<threshold) et=0;
123 for(BasicClusterCollection::const_iterator iclu = fEEclusters_->begin();
124 iclu != fEEclusters_->end(); ++iclu) {
127 double eta = ClusPoint.eta();
128 double dEta = fabs(eta-SClusterEta);
131 double et = clu->energy()/cosh(eta);
132 if (et<threshold) et=0;
137 double Cx = getEcalClusterIso(cluster,x,threshold);
138 double CCx = (Cx - TotalEt / 40.0 * x) * (1/(1-x/40.));
double getBkgSubEcalClusterIso(const reco::SuperClusterRef clus, const double radius, const double threshold)
Return the background-subtracted ecal cluster energy in a cone around the SC.
EcalClusterIsoCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::Handle< reco::BasicClusterCollection > barrel, const edm::Handle< reco::BasicClusterCollection > endcap)
double getEcalClusterIso(const reco::SuperClusterRef clus, const double radius, const double threshold)
Return the ecal cluster energy in a cone around the SC.
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
et
define resolution functions of each parameter
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
T const * product() const