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;
54 auto getLayer = [&](
int iL) ->
const ME0Layer* {
55 for (
auto layer : chamber->
layers()) {
56 if (layer->id().layer() == iL)
62 float z6 = getLayer(6)->position().z();
64 std::sort(hitAndPositions.begin(),
65 hitAndPositions.end(),
69 std::sort(hitAndPositions.begin(),
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
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
ME0SegmentBuilder(const edm::ParameterSet &)
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
std::vector< HitAndPosition > HitAndPositionContainer
C::const_iterator const_iterator
constant access iterator type
const Surface::PositionType & position() const
The position (origin of the R.F.)
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_
const std::vector< const ME0Layer * > & layers() const
Return the layers.