6#include "GeoModelKernel/throwExcept.h"
29 Acts::Navigator navigator(std::move(navConfig),
logger->cloneWithSuffix(
"Navigator"));
31 CurvedPropagator_t::Stepper stepper{std::make_shared<ATLASMagneticFieldWrapper>()};
33 std::move(navigator),
logger->cloneWithSuffix(
"Prop")};
37 std::move(navigator),
logger->cloneWithSuffix(
"Prop")};
40 return StatusCode::SUCCESS;
43 const ActsTrk::TrackContainer::ConstTrackProxy& ,
45 const Acts::PerigeeSurface& )
const {
46 ATH_MSG_ERROR(__func__<<
"() "<<__LINE__<<
" - The method is not implemented");
47 return StatusCode::FAILURE;
49 std::unique_ptr<ActsTrk::MutableTrackContainer>
51 const Acts::BoundTrackParameters&,
52 const Acts::GeometryContext& ,
53 const Acts::MagneticFieldContext& ,
54 const Acts::CalibrationContext& ,
55 const Acts::Surface& )
const {
59 std::unique_ptr<ActsTrk::MutableTrackContainer>
60 FitterTool::fit(
const std::vector<const xAOD::UncalibratedMeasurement* > & measList,
61 const Acts::BoundTrackParameters& initialParams,
62 const Acts::GeometryContext& tgContext,
63 const Acts::MagneticFieldContext& mfContext,
64 const Acts::CalibrationContext& calContext,
65 const Acts::Surface* targetSurface)
const {
66 std::vector<Acts::SourceLink> sourceLinks{};
67 std::ranges::transform(measList, std::back_inserter(sourceLinks),
71 return fit (sourceLinks, initialParams, tgContext, mfContext, calContext, targetSurface);
74 std::unique_ptr<ActsTrk::MutableTrackContainer>
76 const Acts::BoundTrackParameters& initialParams,
77 const Acts::GeometryContext& tgContext,
78 const Acts::MagneticFieldContext& mfContext,
79 const Acts::CalibrationContext& calContext,
80 const Acts::Surface* )
const {
82 Acts::PropagatorPlainOptions propagationOption{tgContext, mfContext};
96 std::visit([&](
const auto& fitter) {
97 using Fitter_t = std::decay_t<
decltype(fitter)>;
98 if constexpr(std::is_same_v<Fitter_t, std::monostate>) {
101 ok = fitter.
fit(sourceLinks.begin(), sourceLinks.end(),
102 initialParams, options, *tracks).ok();
110 for (
auto trkProxy : *tracks) {
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
static Acts::SourceLink pack(const Ptr_t &measurement)
Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a...
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, const MutableTrackStateBackend::TrackStateProxy trackState) const
: Interface method for the Acts fitter to calibrate the trajectory track states from the source link ...
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
bool fit(const LArSamples::AbsShape &data, const AbsShape &reference, double &k, double &deltaT, double &chi2, const ScaledErrorData *sed=0) const
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")
Hash functions to pack the source link into unordered_maps / unordered_sets.
Acts::VectorMultiTrajectory MutableTrackStateBackend
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Acts::VectorTrackContainer MutableTrackBackend
This header ties the generic definitions in this package.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter or the ACTS implementation.
UncalibMeasType
Define the type of the uncalibrated measurement.
std::span< const UncalibMeasType > muonMeasurementTypes()
Returns a view on all the defined muon measurement types.
static void addFitterTypeProperty(track_container_t &tracksContainer)
add fitter column to the track container
static void setFitterType(trackproxy_t &trackProxy, xAOD::TrackFitter fitterType)
set fitter type of a track
#define THROW_EXCEPTION(MESSAGE)