30 edm::LogVerbatim(
"GEMSegmentBuilder")<<
"[GEMSegmentBuilder::build] Total number of rechits in this event: " << recHits->size();
35 std::map<uint32_t, std::vector<GEMRecHit*> > ensembleRH;
50 GEMDetId id(it2->gemId().region(),1,it2->gemId().station(),0,it2->gemId().chamber(),0);
52 ensembleRH[
id.rawId()].push_back(it2->clone());
56 for(
auto enIt=ensembleRH.begin(); enIt != ensembleRH.end(); ++enIt) {
59 std::map<uint32_t,const GEMEtaPartition* > ens;
63 for(
auto rechit = enIt->second.begin(); rechit != enIt->second.end(); ++rechit) {
64 gemRecHits.push_back(*rechit);
68 #ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
69 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
70 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] found " << gemRecHits.size() <<
" rechits in GEM Super Chamber " << chamber->
id()<<
" ::";
71 for (
auto rh=gemRecHits.begin(); rh!=gemRecHits.end(); ++rh){
72 auto gemid = (*rh)->gemId();
74 auto rhLP = (*rh)->localPosition();
78 LogTrace(
"GEMSegmentBuilder") <<
"[RecHit :: Loc x = "<<std::showpos<<std::setw(9)<<rhLP.x()
79 <<
" BX = "<<(*rh)->BunchX()<<
" -- "<<gemid.rawId()<<
" = "<<gemid<<
" ]";
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() <<
" segments in GEM Super Chamber " << mid;
100 LogTrace(
"GEMSegmentBuilder") <<
"[GEMSegmentBuilder::build] -----------------------------------------------------------------------------";
104 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.
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
T get(const Candidate &c)
void setGeometry(const GEMGeometry *g)