|
|
Go to the documentation of this file.
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 =
T const * product() const
edm::ESHandle< CaloGeometry > theCaloGeom_
std::vector< EcalRecHit >::const_iterator const_iterator
const EcalRecHitCollection & caloHits_
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
std::set< DetId > DetIdSet
std::vector< int > severitiesexcl_
constexpr double deltaPhi(double phi1, double phi2)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
T const * get() const
Returns C++ pointer to the item.
T get() const
get a component
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const EcalSeverityLevelAlgo * sevLevel_
double energySum(const DataFrame &df, int fs, int ls)
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
std::vector< int > flags_
const EcalRecHitCollection * ecalBarHits_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
const_iterator end() const
static int position[264][3]
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
const math::XYZPoint & position() const
cluster centroid position
iterator find(key_type k)
const CaloSubdetectorGeometry * subdet_[2]
double getSum_(const reco::Candidate *, bool returnEt) const
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, const EcalRecHitCollection &, const EcalSeverityLevelAlgo *, DetId::Detector detector)
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents