27 edm::LogVerbatim(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] Total number of rechits in this event: " 33 std::map<uint32_t, std::vector<const GEMRecHit*> > ensembleRH;
50 ensembleRH[
id.rawId()].push_back(&(*it2));
54 for (
auto enIt = ensembleRH.begin(); enIt != ensembleRH.end(); ++enIt) {
56 std::map<uint32_t, const GEMEtaPartition*> ens;
60 for (
auto rechit = enIt->second.begin(); rechit != enIt->second.end(); ++rechit) {
61 gemRecHits.push_back(*rechit);
65 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode 67 <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
68 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << gemRecHits.size()
69 <<
" rechits in GEM Super Chamber " << chamber->
id() <<
" ::";
70 for (
auto rh = gemRecHits.begin(); rh != gemRecHits.end(); ++rh) {
71 auto gemid = (*rh)->gemId();
73 auto rhLP = (*rh)->localPosition();
77 LogTrace(
"GEMSegmentBuilder") <<
"[RecHit :: Loc x = " << std::showpos << std::setw(9)
79 <<
" BX = " << (*rh)->BunchX() <<
" -- " << gemid.rawId() <<
" = " << gemid <<
" ]";
84 std::pair<
const GEMSuperChamber*, std::map<uint32_t, const GEMEtaPartition*> >(chamber, ens));
86 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode 87 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] run the segment reconstruction algorithm now";
91 std::vector<GEMSegment> segv =
algo->run(ensemble, gemRecHits);
92 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode 93 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << segv.size();
98 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode 99 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << segv.size()
100 <<
" segments in GEM Super Chamber " << mid;
102 <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
106 oc.put(mid, segv.begin(), segv.end());
T getParameter(std::string const &) const
const GEMGeometry * geom_
void build(const GEMRecHitCollection *rechits, GEMSegmentCollection &oc)
std::pair< const GEMSuperChamber *, std::map< uint32_t, const GEMEtaPartition * > > GEMEnsemble
GEMSegmentBuilder(const edm::ParameterSet &)
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
C::const_iterator const_iterator
constant access iterator type
const GEMSuperChamber * superChamber(GEMDetId id) const
~GEMSegmentBuilder()
Destructor.
GEMDetId id() const
Return the GEMDetId of this super chamber.
std::unique_ptr< GEMSegmentAlgorithmBase > algo
edm::ParameterSet segAlgoPSet
void setGeometry(const GEMGeometry *g)