2 #include <Math/VectorUtil.h>
20 fEBclusters_ = pEBclusters.
product();
22 fEBclusters_ =
nullptr;
25 fEEclusters_ = pEEclusters.
product();
27 fEEclusters_ =
nullptr;
41 math::XYZVector SClusPoint(cluster->position().x(), cluster->position().y(), cluster->position().z());
45 TotalEt = -cluster->rawEnergy() / cosh(cluster->eta());
48 for (BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); iclu != fEBclusters_->end(); ++iclu) {
51 double eta = ClusPoint.eta();
55 if (dR2 < (x * x * 0.01)) {
56 double et = clu->
energy() / cosh(eta);
63 for (BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); iclu != fEEclusters_->end(); ++iclu) {
66 double eta = ClusPoint.eta();
70 if (dR2 < (x * x * 0.01)) {
71 double et = clu->
energy() / cosh(eta);
92 double SClusterEta = cluster->eta();
95 TotalEt = -cluster->rawEnergy() / cosh(cluster->eta());
97 for (BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); iclu != fEBclusters_->end(); ++iclu) {
100 double eta = ClusPoint.eta();
102 double dEta = fabs(eta - SClusterEta);
104 if (dEta < x * 0.1) {
105 double et = clu->
energy() / cosh(eta);
112 for (BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); iclu != fEEclusters_->end(); ++iclu) {
115 double eta = ClusPoint.eta();
116 double dEta = fabs(eta - SClusterEta);
118 if (dEta < x * 0.1) {
119 double et = clu->
energy() / cosh(eta);
126 double Cx = getEcalClusterIso(cluster, x, threshold);
127 double CCx = (Cx - TotalEt / 40.0 * x) * (1 / (1 - x / 40.));
EcalClusterIsoCalculator(const edm::Handle< reco::BasicClusterCollection > barrel, const edm::Handle< reco::BasicClusterCollection > endcap)
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.
double z() const
z coordinate of cluster centroid
double x() const
x coordinate of cluster centroid
double energy() const
cluster energy
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
double y() const
y coordinate of cluster centroid