2 #include <Math/VectorUtil.h> 24 fEBclusters_ = pEBclusters.
product();
26 fEBclusters_ =
nullptr;
29 fEEclusters_ = pEEclusters.
product();
31 fEEclusters_ =
nullptr;
36 geometry_ = geometryHandle.
product();
52 math::XYZVector SClusPoint(cluster->position().x(), cluster->position().y(), cluster->position().z());
56 TotalEt = -cluster->rawEnergy() / cosh(cluster->eta());
59 for (BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); iclu != fEBclusters_->end(); ++iclu) {
62 double eta = ClusPoint.eta();
66 if (dR2 < (x * x * 0.01)) {
67 double et = clu->energy() / cosh(eta);
74 for (BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); iclu != fEEclusters_->end(); ++iclu) {
76 const GlobalPoint clusPoint(clu->x(), clu->y(), clu->z());
78 double eta = ClusPoint.eta();
82 if (dR2 < (x * x * 0.01)) {
83 double et = clu->energy() / cosh(eta);
104 double SClusterEta = cluster->eta();
107 TotalEt = -cluster->rawEnergy() / cosh(cluster->eta());
109 for (BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); iclu != fEBclusters_->end(); ++iclu) {
112 double eta = ClusPoint.eta();
114 double dEta = fabs(eta - SClusterEta);
116 if (dEta < x * 0.1) {
117 double et = clu->energy() / cosh(eta);
124 for (BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); iclu != fEEclusters_->end(); ++iclu) {
127 double eta = ClusPoint.eta();
128 double dEta = fabs(eta - SClusterEta);
130 if (dEta < x * 0.1) {
131 double et = clu->energy() / cosh(eta);
138 double Cx = getEcalClusterIso(cluster, x, threshold);
139 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.
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
T const * product() const