19 std::vector<edm::ParameterSet> algoPSets = ps.
getParameter<std::vector<edm::ParameterSet> >(
"algo_psets");
23 LogDebug(
"ME0SegmentBuilder")<<
"ME0SegmentBuilder algorithm name: " <<
algoName;
33 LogDebug(
"ME0SegmentBuilder")<<
"Total number of rechits in this event: " << recHits->size();
36 std::map<ME0DetId, bool> foundChambers;
38 const auto chId = it->me0Id().chamberId();
39 auto chIt = foundChambers.find(chId);
40 if(chIt != foundChambers.end())
continue;
41 foundChambers[chId] =
true;
45 if(it2->me0Id().chamberId() != chId)
continue;
50 hitAndPositions.emplace_back(&(*it2),nLoc,glb,hitAndPositions.size());
53 LogDebug(
"ME0Segment|ME0") <<
"found " << hitAndPositions.size() <<
" rechits in chamber " << *chIt;
55 auto getLayer =[&](
int iL) ->
const ME0Layer* {
56 for (
auto layer : chamber->
layers()){
57 if (layer->id().layer()==iL)
63 float z6 = getLayer(6)->position().z();
70 std::vector<ME0Segment> segv =
algo->run(chamber, hitAndPositions);
72 LogDebug(
"ME0Segment|ME0") <<
"found " << segv.size() <<
" segments in chamber " << *chIt;
76 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
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.
T get(const Candidate &c)