17 edm::LogVerbatim(
"GEMSegmentBuilder") <<
"GEMSegmentBuilder algorithm : ge0 name : " << ge0AlgoName
31 edm::LogVerbatim(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] Total number of rechits in this event: "
37 std::map<uint32_t, std::vector<const GEMRecHit*> > ensembleRH;
54 ensembleRH[
id.rawId()].push_back(&(*it2));
58 for (
auto enIt = ensembleRH.begin(); enIt != ensembleRH.end(); ++enIt) {
60 std::map<uint32_t, const GEMEtaPartition*> ens;
64 for (
auto rechit = enIt->second.begin(); rechit != enIt->second.end(); ++rechit) {
65 gemRecHits.push_back(*rechit);
69 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
71 <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
72 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << gemRecHits.size()
73 <<
" rechits in GEM Super Chamber " << chamber->
id() <<
" ::";
74 for (
auto rh = gemRecHits.begin(); rh != gemRecHits.end(); ++rh) {
75 auto gemid = (*rh)->gemId();
77 auto rhLP = (*rh)->localPosition();
81 LogTrace(
"GEMSegmentBuilder") <<
"[RecHit :: Loc x = " << std::showpos << std::setw(9)
83 <<
" BX = " << (*rh)->BunchX() <<
" -- " << gemid.rawId() <<
" = " << gemid <<
" ]";
88 std::pair<
const GEMSuperChamber*, std::map<uint32_t, const GEMEtaPartition*> >(chamber, ens));
90 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
91 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] run the segment reconstruction algorithm now";
95 std::vector<GEMSegment> segv;
97 segv =
ge0Algo->run(ensemble, gemRecHits);
99 segv =
segAlgo->run(ensemble, gemRecHits);
100 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
101 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << segv.size();
106 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
107 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << segv.size()
108 <<
" segments in GEM Super Chamber " << mid;
110 <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
114 oc.put(mid, segv.begin(), segv.end());
Log< level::Info, true > LogVerbatim
uint16_t *__restrict__ id
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
std::unique_ptr< GEMSegmentAlgorithmBase > ge0Algo
~GEMSegmentBuilder()
Destructor.
edm::ParameterSet ge0AlgoPSet
GEMDetId id() const
Return the GEMDetId of this super chamber.
T getParameter(std::string const &) const
constexpr int station() const
edm::ParameterSet segAlgoPSet
std::unique_ptr< GEMSegmentAlgorithmBase > segAlgo
void setGeometry(const GEMGeometry *g)