18 LogDebug(
"ME0SegmentBuilder")<<
"ME0SegmentBuilder algorithm name: " <<
algoName;
32 LogDebug(
"ME0SegmentBuilder")<<
"Total number of rechits in this event: " << recHits->size();
38 std::map<uint32_t, std::vector<ME0RecHit*> > ensembleRH;
47 ME0DetId id(it2->me0Id().region(),1,it2->me0Id().chamber(),it2->me0Id().roll());
49 ensembleRH[
id.rawId()].push_back(it2->clone());
52 std::map<uint32_t, std::vector<ME0Segment> > ensembleSeg;
54 for(
auto enIt=ensembleRH.begin(); enIt != ensembleRH.end(); ++enIt) {
57 std::map<uint32_t,const ME0EtaPartition* > ens;
61 for(
auto rechit = enIt->second.begin(); rechit != enIt->second.end(); ++rechit) {
62 me0RecHits.push_back(*rechit);
69 LogDebug(
"ME0SegmentBuilder") <<
"found " << me0RecHits.size() <<
" rechits in etapart " << mid;
73 std::vector<ME0Segment> segv =
algo->run(ensemble, me0RecHits);
76 LogDebug(
"ME0SegmentBuilder") <<
"found " << segv.size() <<
" segments in etapart " << mid;
85 ensembleSeg[midch.
rawId()].insert(ensembleSeg[midch.
rawId()].end(), segv.begin(), segv.end());
88 for(
auto segIt=ensembleSeg.begin(); segIt != ensembleSeg.end(); ++segIt) {
91 oc.put(midch, segIt->second.begin(), segIt->second.end());
T getParameter(std::string const &) const
ME0DetId chamberId() const
Return the corresponding ChamberId (mask layers)
std::pair< const ME0Chamber *, std::map< uint32_t, const ME0EtaPartition * > > ME0Ensemble
ME0SegmentBuilder(const edm::ParameterSet &)
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
uint32_t rawId() const
get the raw id
void setGeometry(const ME0Geometry *g)
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
void build(const ME0RecHitCollection *rechits, ME0SegmentCollection &oc)
~ME0SegmentBuilder()
Destructor.
std::unique_ptr< ME0SegmentAlgorithmBase > algo
const ME0Geometry * geom_
T get(const Candidate &c)