Configure the fit extensions for Trk::MeasuremenBase pass through fits.
31 {
32
38
39
41 if (trkGeo->geometryVersion() == Acts::TrackingGeometry::GeometryVersion::Gen3) {
44 case Acts::toUnderlying(
ITkExit):
46 const Acts::TrackingVolume* volume = m_trackingGeometrySvc
47 ->getEnvelope(
static_cast<SystemEnvelope>(m_envelopeConstraint.value()));
49 m_endOfWorldId = volume->motherVolume()->geometryId().volume();
50 break;
51 } case Acts::toUnderlying(MsExit) : {
52 break;
53 } default: {
54 ATH_MSG_ERROR(
"Invalid configuration "<<m_envelopeConstraint);
55 return StatusCode::FAILURE;
56 }
57 }
58 ATH_MSG_DEBUG(
"Abort propagation if "<<m_envelopeConstraint<<
" is reached");
59
60 }
61 auto field = std::make_shared<ATLASMagneticFieldWrapper>();
62
63
64 Acts::SympyStepper stepper(field);
65 if (m_useDirectNavigation) {
66
67 Acts::DirectNavigator directNavigator(
logger().cloneWithSuffix(
"DirectNavigator") );
68 Acts::Propagator<Acts::SympyStepper, Acts::DirectNavigator> directPropagator(std::move(stepper),
69 std::move(directNavigator),
70 logger().cloneWithSuffix(
"DirectPropagator"));
71
72 m_directFitter = std::make_unique<DirectFitter>(std::move(directPropagator),
73 logger().cloneWithSuffix(
"DirectKalmanFitter"));
74
75 } else {
76 Acts::Navigator navigator( Acts::Navigator::Config{trkGeo},
77 logger().cloneWithSuffix(
"Navigator"));
78 Acts::Propagator<Acts::SympyStepper, Acts::Navigator> propagator(stepper,
79 std::move(navigator),
80 logger().cloneWithSuffix(
"Prop"));
81
82 m_fitter = std::make_unique<Fitter>(std::move(propagator),
83 logger().cloneWithSuffix(
"KalmanFitter"));
84 }
85
87 m_outlierFinder.StateChiSquaredPerNumberDoFCut = m_option_outlierChi2Cut;
88 m_reverseFilteringLogic.momentumMax = m_option_ReverseFilteringPt;
89
90 FitterExtension_t extensionTemplate{};
91 extensionTemplate.outlierFinder.connect<&detail::FitterHelperFunctions::ATLASOutlierFinder::operator()<
MutableTrackStateBackend>>(&m_outlierFinder);
92 extensionTemplate.reverseFilteringLogic.connect<&detail::FitterHelperFunctions::ReverseFilteringLogic::operator()<
MutableTrackStateBackend>>(&m_reverseFilteringLogic);
93 extensionTemplate.updater.connect<&detail::FitterHelperFunctions::gainMatrixUpdate<MutableTrackStateBackend>>();
94 extensionTemplate.smoother.connect<&detail::FitterHelperFunctions::mbfSmoother<MutableTrackStateBackend>>();
95
97 {
98 m_trkSurfAcc = detail::TrkMeasSurfaceAccessor{m_geometryConvTool.get()};
99
100 FitterExtension_t& configureMe = m_kfExtensions[Acts::toUnderlying(detail::SourceLinkType::TrkMeasurement)];
101 configureMe = extensionTemplate;
102 configureMe.calibrator.connect<&detail::TrkMeasurementCalibrator::calibrate<TrackState_t>>(&m_trkCalibrator);
103 configureMe.surfaceAccessor.connect<&detail::TrkMeasSurfaceAccessor::operator()>(&m_trkSurfAcc);
104 }
106 {
107 m_prdSurfAcc = detail::TrkPrepRawDataSurfaceAcc{m_geometryConvTool.get()};
108 m_prdCalibrator = detail::TrkPrepRawDataCalibrator{m_geometryConvTool.get(), m_ROTcreator.get()};
109
110 FitterExtension_t& configureMe = m_kfExtensions[Acts::toUnderlying(detail::SourceLinkType::TrkPrepRawData)];
111 configureMe = extensionTemplate;
112 configureMe.calibrator.connect<&detail::TrkPrepRawDataCalibrator::calibrate<TrackState_t>>(&m_prdCalibrator);
113 configureMe.surfaceAccessor.connect<&detail::TrkPrepRawDataSurfaceAcc::operator()>(&m_prdSurfAcc);
114 }
116 {
117 m_unalibMeasSurfAcc = detail::xAODUncalibMeasSurfAcc{m_trackingGeometrySvc.get()};
118
119
120 m_idCalibrator = xAODItkCalibrator_t::NoCalibration(m_trackingGeometrySvc.get());
121
124 if (m_muonCalibrator.isEnabled()) {
127 }
128 }
130 m_uncalibMeasCalibrator.connect<&xAODItkCalibrator_t::calibrate>(idType, &m_idCalibrator);
131 }
132
133 FitterExtension_t& configureMe = m_kfExtensions[Acts::toUnderlying(detail::SourceLinkType::xAODUnCalibMeas)];
134 configureMe = extensionTemplate;
135 configureMe.surfaceAccessor.connect<&detail::xAODUncalibMeasSurfAcc::operator()>(&m_unalibMeasSurfAcc);
136 configureMe.calibrator.connect<&detail::xAODUncalibMeasCalibrator::calibrate>(&m_uncalibMeasCalibrator);
137 }
138 return StatusCode::SUCCESS;
139}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
virtual void calibrateSourceLink(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackStateBackend::TrackStateProxy state) const =0
Function that's hooked to the calibration delegate of the implemented Acts fitters.
static Root::TMsgLogger logger("iLumiCalc")
SystemEnvelope
Define an enumeration to retrieve the envelope tracking volume from.
UncalibMeasType
Define the type of the uncalibrated measurement.