18 std::vector<edm::ParameterSet> algoPSets = ps.
getParameter<std::vector<edm::ParameterSet> >(
"algo_psets");
22 LogDebug(
"ME0SegmentBuilder") <<
"ME0SegmentBuilder algorithm name: " <<
algoName;
31 LogDebug(
"ME0SegmentBuilder") <<
"Total number of rechits in this event: " <<
recHits->size();
33 std::map<ME0DetId, bool> foundChambers;
35 const auto chId =
it->me0Id().chamberId();
36 auto chIt = foundChambers.find(chId);
37 if (chIt != foundChambers.end())
39 foundChambers[chId] =
true;
43 if (it2->me0Id().chamberId() != chId)
49 hitAndPositions.emplace_back(&(*it2), nLoc,
glb, hitAndPositions.size());
52 LogDebug(
"ME0Segment|ME0") <<
"found " << hitAndPositions.size() <<
" rechits in chamber " << chId;
56 if (
layer->id().layer() == iL)
62 float z6 =
getLayer(6)->position().z();
65 hitAndPositions.end(),
70 hitAndPositions.end(),
75 std::vector<ME0Segment> segv =
algo->run(
chamber, hitAndPositions);
77 LogDebug(
"ME0Segment|ME0") <<
"found " << segv.size() <<
" segments in chamber " << chId;
81 oc.put(chId, segv.begin(), segv.end());
T getParameter(std::string const &) const
ME0SegmentBuilder(const edm::ParameterSet &)
std::vector< HitAndPosition > HitAndPositionContainer
C::const_iterator const_iterator
constant access iterator type
constexpr uint8_t getLayer(uint32_t detId)
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.
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
std::unique_ptr< ME0SegmentAlgorithmBase > algo
const ME0Geometry * geom_