23 const std::vector<RectangularEtaPhiRegion> &
regions) {
34 ecalPart_string =
"EndCap";
40 ecalPart_string =
"Barrel";
46 std::cout <<
"-------------------------------------------------------------" << std::endl;
47 std::cout <<
"Island algorithm invoked for ECAL" << ecalPart_string << std::endl;
48 std::cout <<
"Looking for seeds, energy threshold used = " <<
threshold <<
" GeV" << std::endl;
55 if (!regional || nregions) {
70 auto const &
position = thisCell->getPosition();
74 bool withinRegion =
false;
76 std::vector<RectangularEtaPhiRegion>::const_iterator
region;
78 if (
region->inRegion(thisCell->etaPos(), thisCell->phiPos())) {
85 if (!regional || withinRegion) {
86 float ET =
it->energy() *
position.basicVector().unit().perp();
93 sort(
seeds.begin(),
seeds.end(), [](
auto const &
x,
auto const &
y) {
return x.energy() >
y.energy(); });
96 std::cout <<
"Total number of seeds found in event = " <<
seeds.size() << std::endl;
103 std::cout <<
"---------- end of main search. clusters have been sorted ----" << std::endl;
115 std::cout <<
"Building clusters............" << std::endl;
119 std::vector<EcalRecHit>::iterator
it;
125 std::cout <<
"##############################################################" << std::endl;
126 std::cout <<
"DEBUG ALERT: Highest energy seed already belongs to a cluster!" << std::endl;
127 std::cout <<
"##############################################################" << std::endl;
136 current_v.push_back(std::pair<DetId, float>(
it->id(), 1.));
158 if (northern ==
DetId(0))
168 current_v.push_back(std::pair<DetId, float>(northern, 1.));
178 if (southern ==
DetId(0))
187 current_v.push_back(std::pair<DetId, float>(southern, 1.));
198 if (western ==
DetId(0))
211 current_v.push_back(std::pair<DetId, float>(western, 1.));
221 if (eastern ==
DetId(0))
234 current_v.push_back(std::pair<DetId, float>(eastern, 1.));
245 (candidate_it->energy() <= 0) ||
246 (candidate_it->energy() > previous_it->energy()) ||
262 std::vector<std::pair<DetId, float> >::iterator
it;
282 std::cout <<
"******** NEW CLUSTER ********" << std::endl;
287 std::cout <<
"*****************************" << std::endl;
void home() const
move the navigator back to the starting point
void searchEast(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
double ecalBarrelSeedThreshold
void searchWest(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< int > v_chstatusSeed_Endcap_
double ecalEndcapSeedThreshold
PositionCalc posCalculator_
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
std::vector< std::pair< DetId, float > > current_v
bool isClusterEtLess(const reco::CaloCluster &x, const reco::CaloCluster &y)
std::vector< EcalRecHit > seeds
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.
const_iterator end() const
std::vector< int > v_chstatus_Endcap_
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
void searchNorth(const CaloNavigator< DetId > &navigator)
bool shouldBeAdded(EcalRecHitCollection::const_iterator candidate_it, EcalRecHitCollection::const_iterator previous_it)
std::vector< int > v_chstatusSeed_
std::vector< reco::BasicCluster > clusters_v
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
iterator find(key_type k)
Structure Point Contains parameters of Gaussian fits to DMRs.
static int position[264][3]
std::vector< int > v_chstatusSeed_Barrel_
const EcalRecHitCollection * recHits_
std::vector< int > v_chstatus_
void searchSouth(const CaloNavigator< DetId > &navigator)
std::vector< int > v_chstatus_Barrel_
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)