13 #include <Math/VectorUtil.h> 47 theCaloGeom_(theCaloGeom),
50 useNumCrystals_(
false),
51 vetoClustered_(
false),
52 ecalBarHits_(nullptr),
73 GlobalPoint pclu(theCaloPosition.x(), theCaloPosition.y(), theCaloPosition.z());
74 float etaclus = pclu.
eta();
75 float phiclus = pclu.phi();
78 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
80 for (
int subdetnr = 0; subdetnr <= 1; subdetnr++) {
81 if (
nullptr ==
subdet_[subdetnr])
88 for (CaloSubdetectorGeometry::DetIdSet::const_iterator
i = chosen.begin();
i != chosen.end();
93 float eta = cell->etaPos();
94 float phi = cell->phiPos();
95 float etaDiff =
eta - etaclus;
100 if (fabs(etaclus) < 1.479) {
105 if ((etaDiff * etaDiff + phiDiff * phiDiff) < 0.00030276 *
r2)
108 if (fabs(etaDiff) < 0.00864 * fabs(sinh(
eta)) *
etaSlice_)
112 if ((etaDiff * etaDiff + phiDiff * phiDiff) < (0.000037325 * (cosh(2 *
eta) - 1) *
r2))
118 if (etaDiff * etaDiff + phiDiff * phiDiff <
r2)
124 bool isClustered =
false;
126 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
127 if (rhIt->first == *
i)
143 std::vector<int>::const_iterator sit =
161 float et =
energy *
std::sqrt(cell->getPosition().perp2() / cell->getPosition().mag2());
183 GlobalPoint pclu(theCaloPosition.x(), theCaloPosition.y(), theCaloPosition.z());
184 double etaclus = pclu.
eta();
185 double phiclus = pclu.phi();
188 std::vector<std::pair<DetId, float> >::const_iterator rhIt;
190 for (
int subdetnr = 0; subdetnr <= 1; subdetnr++) {
191 if (
nullptr ==
subdet_[subdetnr])
196 for (CaloSubdetectorGeometry::DetIdSet::const_iterator
i = chosen.begin();
i != chosen.end();
204 double etaDiff =
eta - etaclus;
209 if (fabs(etaclus) < 1.479) {
213 if ((etaDiff * etaDiff + phiDiff * phiDiff) < 0.00030276 *
r2)
216 if (fabs(etaDiff) < 0.00864 * fabs(sinh(
eta)) *
etaSlice_)
219 if ((etaDiff * etaDiff + phiDiff * phiDiff) < (0.000037325 * (cosh(2 *
eta) - 1) *
r2))
225 if (etaDiff * etaDiff + phiDiff * phiDiff <
r2)
232 bool isClustered =
false;
234 for (rhIt = (*bcIt)->hitsAndFractions().begin(); rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
235 if (rhIt->first == *
i)
249 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_
double getSum_(const reco::Candidate *, bool returnEt) const
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
const EcalRecHitCollection & caloHits_