14 std::vector< std::pair<DetId, float> > hitsAndFracs = cluster.
hitsAndFractions();
15 std::vector< std::pair<DetId, float> >::const_iterator it;
16 for ( it = hitsAndFracs.begin(); it != hitsAndFracs.end(); ++it ) {
17 DetId id = (*it).first;
19 if ( jrh == recHits.
end() ) {
20 edm::LogError(
"EcalClusterSeverityLevelAlgo") <<
"The cluster DetId " <<
id.rawId() <<
" is not in the recHit collection!!";
30 fraction += (*jrh).energy() * (*it).second / cluster.
energy();
41 if (closestProb.
null())
44 std::vector<DetId> neighbours = topology->
getWindow(closestProb,3,3);
45 std::vector<DetId>::const_iterator itn;
47 std::vector< std::pair<DetId, float> > hitsAndFracs = cluster.
hitsAndFractions();
48 std::vector< std::pair<DetId, float> >::const_iterator it;
52 for ( itn = neighbours.begin(); itn != neighbours.end(); ++itn )
55 for ( it = hitsAndFracs.begin(); it != hitsAndFracs.end(); ++it )
57 DetId id = (*it).first;
62 if ( jrh == recHits.
end() )
64 edm::LogError(
"EcalClusterSeverityLevelAlgo") <<
"The cluster DetId " <<
id.rawId() <<
" is not in the recHit collection!!";
68 fraction += (*jrh).energy() * (*it).second / cluster.
energy();
84 edm::LogError(
"EcalClusterSeverityLevelAlgo") <<
"The cluster seed is not in the BARREL";
88 int minDist=9999;
DetId closestProb(0);
90 std::vector<DetId> neighbours = topology->
getWindow(seed,51,11);
92 for ( std::vector<DetId>::const_iterator it = neighbours.begin(); it != neighbours.end(); ++it )
95 if ( jrh == recHits.
end() )
105 if (
sqrt(deta*deta + dphi*dphi) < minDist)
120 edm::LogError(
"EcalClusterSeverityLevelAlgo") <<
"The cluster seed is not in the BARREL";
122 return std::pair<int,int>(-1,-1);
127 if (! closestProb.
null())
130 return std::pair<int,int>(-1,-1);
static std::pair< int, int > etaphiDistanceClosestProblematic(const reco::CaloCluster &, const EcalRecHitCollection &, const CaloTopology *topology, const EcalSeverityLevelAlgo &)
std::vector< EcalRecHit >::const_iterator const_iterator
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
static int distanceEta(const EBDetId &a, const EBDetId &b)
std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Get the neighbors of the given cell in a window of given size.
static int distancePhi(const EBDetId &a, const EBDetId &b)
static float goodFraction(const reco::CaloCluster &, const EcalRecHitCollection &, const EcalSeverityLevelAlgo &)
static float fractionAroundClosestProblematic(const reco::CaloCluster &, const EcalRecHitCollection &, const CaloTopology *topology, const EcalSeverityLevelAlgo &)
double energy() const
cluster energy
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const_iterator end() const
static DetId closestProblematic(const reco::CaloCluster &, const EcalRecHitCollection &, const CaloTopology *topology, const EcalSeverityLevelAlgo &)
bool null() const
is this a null id ?
iterator find(key_type k)
Detector det() const
get the detector field from this detid
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id, const EcalRecHitCollection &rhs) const
Evaluate status from id.