The parameters are not muon paramaters or the parameters are before the entrance parameters
The track parameters belong the same surface. Do nothing
Check whether there're measurement parameters that are closer to the target surface
272 {
273
274 const Trk::Track* cmbTrk = cmbTag.primaryTrack();
275 if (!cmbTrk){
276 ATH_MSG_WARNING(
"A combined tag without any track? Please check "<<cmbTag.toString());
277 return false;
278 }
281 std::vector<const Trk::TrackStateOnSurface*> cmbParVec{};
282
284 std::vector<MuonSystemExtension::Intersection> intersections{};
285 MuonLayerSurface lastSurf{};
286
289 const Trk::TrackStateOnSurface* msTSOS{*itr};
291
293 continue;
294 }
299 continue;
300 }
301
302
303 using namespace MuonStationIndex;
306 if (layerIdx == LayerIndex::BarrelExtended) {
307 regionIdx = DetectorRegionIndex::Barrel;
308 layerIdx = LayerIndex::Inner;
309 }
310
312
314 if (lastSurf.layerIndex == layerIdx && lastSurf.regionIndex == regionIdx && lastSurf.sector == sector) {
315 continue;
316 }
318 SurfaceVec::const_iterator surfItr = std::find_if(refSurfaces.begin(), refSurfaces.end(),
319 [&layerIdx](const MuonLayerSurface& surf){
320 return surf.layerIndex == layerIdx;
321 });
322 if (surfItr == refSurfaces.end()) {
324 <<
", sector: "<<sector <<
", layer: "<<
layerName(layerIdx)
326 continue;
327 }
328 lastSurf = (*surfItr);
329 const Trk::Surface&
target{*lastSurf.surfacePtr};
330
333 const Trk::TrackStateOnSurface * tsosInChamb{*closePars};
335
337 if (std::abs(pathAlongPars(chPars, chPars.
position() -
target.center())) >
340 break;
341 }
342 itr = closePars -1;
343 msTSOS = *itr;
344 }
345
348 if (!exPars) {
350 <<
", sector: "<<sector <<
", layer: "<<
layerName(layerIdx)
351 <<
", region index: "<<
regionName(regionIdx) <<
" to surface "<<std::endl<<target<<std::endl
352 <<
", sector: "<<lastSurf.sector <<
", layer: "<<
layerName(lastSurf.layerIndex)
353 <<
", region index: "<<
regionName(lastSurf.regionIndex)
356 continue;
357 }
358 intersections.emplace_back(std::move(exPars), lastSurf);
359
360 }
361
363
364 if (intersections.empty()) {
365 ATH_MSG_DEBUG(
"Failed to find the intersections for the combined track");
366 return false;
367 }
368 cache.candidate->setExtension(std::make_unique<MuonSystemExtension>(entryPars, std::move(intersections)));
369
370 return true;
371 }
#define ATH_MSG_WARNING(x)
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
ParametersBase< TrackParametersDim, Charged > TrackParameters