|
|
Go to the documentation of this file.
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) {
57 for (it =
hits->begin(); it !=
hits->end(); it++) {
58 double energy = it->energy();
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;
120 for (it =
seeds.begin(); it !=
seeds.end(); it++) {
123 if (it ==
seeds.begin()) {
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;
std::vector< int > v_chstatusSeed_Barrel_
void searchWest(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
std::vector< EcalRecHit >::const_iterator const_iterator
double ecalEndcapSeedThreshold
std::vector< int > v_chstatusSeed_Endcap_
std::vector< int > v_chstatus_
PositionCalc posCalculator_
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
const CaloTopology * topology(nullptr)
void searchNorth(const CaloNavigator< DetId > &navigator)
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
Structure Point Contains parameters of Gaussian fits to DMRs.
void home() const
move the navigator back to the starting point
const_iterator end() const
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
static int position[264][3]
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 EcalRecHitCollection * recHits_
std::vector< EcalRecHit > seeds
bool isClusterEtLess(const reco::CaloCluster &x, const reco::CaloCluster &y)
iterator find(key_type k)
void searchSouth(const CaloNavigator< DetId > &navigator)
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 >())
std::vector< int > v_chstatus_Barrel_
std::vector< std::pair< DetId, float > > current_v
void searchEast(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
std::vector< reco::BasicCluster > clusters_v
std::vector< int > v_chstatus_Endcap_
std::vector< int > v_chstatusSeed_
bool shouldBeAdded(EcalRecHitCollection::const_iterator candidate_it, EcalRecHitCollection::const_iterator previous_it)
double ecalBarrelSeedThreshold