26 int plane = strip.
plane();
29 std::vector< std::pair<DetId,float> >
dummy;
32 if (strip ==
ESDetId(0))
return nullcluster;
36 double refEta = refpos.
eta();
37 double refPhi = refpos.
phi();
46 RecHitsMap::iterator strip_it;
52 if (mystrip.
plane() != plane)
continue;
54 auto thisCell = geometry_p->
getGeometry(strip_it->first);
57 if (fabs(position.
eta() - refEta) < deltaEta) {
66 clusterRecHits.
push_back(strip_it->second);
67 used_s->insert(strip_it->first);
69 x_pos += strip_it->second.energy() * position.
x();
70 y_pos += strip_it->second.energy() * position.
y();
71 z_pos += strip_it->second.energy() * position.
z();
79 std::vector<std::pair<DetId,float > > usedHits;
80 for (it=clusterRecHits.
begin(); it != clusterRecHits.
end(); it++) {
81 Eclust += it->energy();
82 usedHits.push_back(std::pair<DetId,float > (it->id(), 1.));
100 if (
used_s->find(candidate_it->first) !=
used_s->end())
101 LogTrace(
"PreShowerPhiClusterAlgo") <<
" This strip is in use";
103 LogTrace(
"PreShowerPhiClusterAlgo") <<
" No such a strip in rechits_map";
105 LogTrace(
"PreShowerPhiClusterAlgo") <<
"Strip energy" << candidate_it->second.energy() <<
"is below threshold";
108 if ( (
used_s->find(candidate_it->first) !=
used_s->end()) ||
constexpr double deltaPhi(double phi1, double phi2)
reco::PreshowerCluster makeOneCluster(ESDetId strip, HitsID *used_strips, RecHitsMap *rechits_map, const CaloSubdetectorGeometry *&geometry_p, CaloSubdetectorTopology *&topology_p, double deltaEta, double minDeltaPhi, double maxDeltaPhi)
Geom::Phi< T > phi() const
void push_back(T const &t)
static const double deltaEta
bool goodStrip(RecHitsMap::iterator candidate_it)
std::vector< EcalRecHit >::iterator iterator
const_iterator end() const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
std::map< DetId, EcalRecHit > RecHitsMap
static int position[264][3]
const_iterator begin() const