13 #include <Math/VectorUtil.h> 47 theCaloGeom_(theCaloGeom),
50 useNumCrystals_(
false),
51 vetoClustered_(
false),
52 ecalBarHits_(nullptr),
75 GlobalPoint pclu(theCaloPosition.x(), theCaloPosition.y(), theCaloPosition.z());
76 float etaclus = pclu.
eta();
77 float phiclus = pclu.phi();
80 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
82 for (
int subdetnr = 0; subdetnr <= 1; subdetnr++) {
83 if (
nullptr ==
subdet_[subdetnr])
90 for (CaloSubdetectorGeometry::DetIdSet::const_iterator
i = chosen.begin();
i != chosen.end();
95 float eta = cell->etaPos();
96 float phi = cell->phiPos();
97 float etaDiff =
eta - etaclus;
106 if (fabs(etaclus) < 1.479) {
111 if ((etaDiff * etaDiff + phiDiff * phiDiff) < 0.00030276 *
r2)
114 if (fabs(etaDiff) < 0.00864 * fabs(sinh(
eta)) *
etaSlice_)
118 if ((etaDiff * etaDiff + phiDiff * phiDiff) < (0.000037325 * (cosh(2 *
eta) - 1) *
r2))
124 if (etaDiff * etaDiff + phiDiff * phiDiff <
r2)
130 bool isClustered =
false;
132 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
133 if (rhIt->first == *
i)
149 std::vector<int>::const_iterator sit =
167 float et =
energy *
std::sqrt(cell->getPosition().perp2() / cell->getPosition().mag2());
191 GlobalPoint pclu(theCaloPosition.x(), theCaloPosition.y(), theCaloPosition.z());
192 double etaclus = pclu.
eta();
193 double phiclus = pclu.phi();
196 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
198 for (
int subdetnr = 0; subdetnr <= 1; subdetnr++) {
199 if (
nullptr ==
subdet_[subdetnr])
204 for (CaloSubdetectorGeometry::DetIdSet::const_iterator
i = chosen.begin();
i != chosen.end();
212 double etaDiff =
eta - etaclus;
221 if (fabs(etaclus) < 1.479) {
225 if ((etaDiff * etaDiff + phiDiff * phiDiff) < 0.00030276 *
r2)
228 if (fabs(etaDiff) < 0.00864 * fabs(sinh(
eta)) *
etaSlice_)
231 if ((etaDiff * etaDiff + phiDiff * phiDiff) < (0.000037325 * (cosh(2 *
eta) - 1) *
r2))
237 if (etaDiff * etaDiff + phiDiff * phiDiff <
r2)
244 bool isClustered =
false;
246 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
247 if (rhIt->first == *
i)
261 std::vector<int>::const_iterator sit =
constexpr double deltaPhi(double phi1, double phi2)
const math::XYZPoint & position() const
cluster centroid position
std::set< DetId > DetIdSet
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< int > flags_
T get() const
get a component
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< int > severitiesexcl_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
T const * product() const
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, const EcalRecHitCollection &, const EcalSeverityLevelAlgo *, DetId::Detector detector)
const EcalRecHitCollection * ecalBarHits_
const_iterator end() const
XYZPointD XYZPoint
point in space with cartesian internal representation
iterator find(key_type k)
static int position[264][3]
T const * get() const
Returns C++ pointer to the item.
const EcalSeverityLevelAlgo * sevLevel_
double energySum(const DataFrame &df, int fs, int ls)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
double getSum_(const reco::Candidate *, bool returnEt, const EcalPFRecHitThresholds *thresholds) const
const EcalRecHitCollection & caloHits_