45 return StatusCode::SUCCESS;
53 std::unique_ptr<Trk::SegmentCollection> segmentContainer = std::make_unique<Trk::SegmentCollection>();
54 std::unique_ptr<Trk::SegmentCollection> nswSegmentContainer = !
m_segmentNSWCollectionKey.empty() ? std::make_unique<Trk::SegmentCollection>()
60 ATH_MSG_DEBUG(
"Processing the pattern collections with " << patternColl->size() <<
" Collections ");
72 segmentContainer->
insert(segmentContainer->
end(), std::make_move_iterator(nswCache.constructedSegs.begin()),
73 std::make_move_iterator(nswCache.constructedSegs.end()));
75 nswCache.constructedSegs.clear();
77 if (!nswSegmentContainer)
continue;
78 nswSegmentContainer->
insert(nswSegmentContainer->
end(), std::make_move_iterator(nswCache.quadSegs.begin()),
79 std::make_move_iterator(nswCache.quadSegs.end()));
80 nswCache.quadSegs.clear();
86 std::unique_ptr<MuonSegmentCombinationCollection> csc4dSegmentCombinations{};
113 return StatusCode::SUCCESS;
117 std::unique_ptr<MuonSegmentCombinationCollection>& csc4dSegmentCombinations)
const {
121 if (!cscPrds)
return StatusCode::SUCCESS;
123 std::vector<const Muon::CscPrepDataCollection*> cscCols;
125 ATH_MSG_DEBUG(
"Retrieved CscPrepDataContainer " << cscCols.size());
126 if (cscCols.empty())
return StatusCode::SUCCESS;
127 std::unique_ptr<MuonSegmentCombinationCollection> csc2dSegmentCombinations =
m_csc2dSegmentFinder->find(cscCols, ctx);
128 if (!csc2dSegmentCombinations)
return StatusCode::SUCCESS;
131 return StatusCode::SUCCESS;
135 if (!combi_coll)
return;
142 const unsigned int nstations = combi->numberOfStations();
143 const bool useEta = combi->useStripsInSegment(1);
144 const bool usePhi = combi->useStripsInSegment(0);
147 for (
unsigned int i = 0;
i < nstations; ++
i) {
151 if (!segments || segments->empty())
continue;
153 for (std::unique_ptr<Muon::MuonSegment>& seg : *segments) {
156 segmentContainer->
push_back(std::move(seg));
167 std::map<int, std::vector<std::unique_ptr<const Muon::MuonClusterOnTrack>> > clustersPerSector;
171 if (
it.prepRawDataVec().empty())
continue;
173 const Identifier id =
it.prepRawDataVec().front()->identify();
184 if (!newCluster)
continue;
185 std::vector<std::unique_ptr<const Muon::MuonClusterOnTrack>>&
clusters = clustersPerSector[sector];
189 for (
auto&[sector,
clusters] :clustersPerSector) {
201 ATH_MSG_DEBUG(
"Do not search segments in the Mdt part of the muon spectrometer");
202 return StatusCode::SUCCESS;
210 for (
const ROTRegion& region : hitsPerRegion) {
211 for (
const MdtVec& mdts : region.mdts()) {
212 if (mdts.empty())
continue;
217 std::vector<const Trk::MeasurementBase*> meas {};
218 meas.insert(meas.end(), mdts.begin(), mdts.end());
219 meas.insert(meas.end(), region.clusters().begin(), region.clusters().end());
222 <<
" nMdts: "<<mdts.size()<<
" nClusters "<<region.clusters().size()
226 m_segmentMaker->find(region.regionPos, region.regionDir, mdts, region.clusters(), hasPhiMeasurements, segs,
227 region.regionDir.mag());
229 std::vector<const Trk::RIO_OnTrack*> rios;
230 rios.insert(rios.begin(), mdts.begin(), mdts.end());
235 return StatusCode::SUCCESS;
239 const ContType* & cont_ptr)
const {
243 return StatusCode::SUCCESS;
246 if (!readHandle.isValid()) {
248 return StatusCode::FAILURE;
250 cont_ptr = readHandle.cptr();
251 return StatusCode::SUCCESS;