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)) {
63 for (BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); iclu != fEEclusters_->end(); ++iclu) {
66 double eta = ClusPoint.eta();
70 if (
dR2 < (
x *
x * 0.01)) {
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) {
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) {
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)
T const * product() const
double x() const
x coordinate of cluster centroid
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.
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
double z() const
z coordinate of cluster centroid
double y() const
y 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())
XYZVectorD XYZVector
spatial vector with cartesian internal representation