File indexing completed on 2024-11-16 09:01:28
0001
0002
0003
0004 #include "Acts/MagneticField/MagneticFieldProvider.hpp"
0005 #include "Acts/Propagator/EigenStepper.hpp"
0006 #include "Acts/Propagator/Navigator.hpp"
0007 #include "Acts/Propagator/Propagator.hpp"
0008 #include "Acts/TrackFitting/GainMatrixSmoother.hpp"
0009 #include "Acts/TrackFitting/GainMatrixUpdater.hpp"
0010
0011 #if 0
0012 #include "Acts/Propagator/EigenStepper.hpp"
0013 #include "Acts/Propagator/Navigator.hpp"
0014 #include "Acts/Propagator/Propagator.hpp"
0015 #include "Acts/TrackFitting/GainMatrixSmoother.hpp"
0016 #include "Acts/TrackFitting/GainMatrixUpdater.hpp"
0017 #endif
0018
0019 #include "CKFTracking.h"
0020
0021 #include "JugBase/BField/DD4hepBField.h"
0022
0023
0024 #include <random>
0025 #include <stdexcept>
0026
0027 namespace {
0028 using Updater = Acts::GainMatrixUpdater;
0029 using Smoother = Acts::GainMatrixSmoother;
0030
0031 using Stepper = Acts::EigenStepper<>;
0032 using Navigator = Acts::Navigator;
0033 using Propagator = Acts::Propagator<Stepper, Navigator>;
0034 using CKF =
0035 Acts::CombinatorialKalmanFilter<Propagator, Acts::VectorMultiTrajectory>;
0036
0037
0038
0039
0040
0041 struct CKFTrackingFunctionImpl
0042 : public Jug::Reco::CKFTracking::CKFTrackingFunction {
0043 CKF trackFinder;
0044
0045 CKFTrackingFunctionImpl(CKF&& f) : trackFinder(std::move(f)) {}
0046
0047 Jug::Reco::CKFTracking::TrackFinderResult
0048 operator()(const Jug::TrackParametersContainer& initialParameters,
0049 const Jug::Reco::CKFTracking::TrackFinderOptions& options)
0050 const override
0051 {
0052 return trackFinder.findTracks(initialParameters, options);
0053 };
0054 };
0055
0056 }
0057
0058 namespace Jug::Reco {
0059
0060 std::shared_ptr<CKFTracking::CKFTrackingFunction>
0061 CKFTracking::makeCKFTrackingFunction(
0062 std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
0063 std::shared_ptr<const Acts::MagneticFieldProvider> magneticField)
0064 {
0065 Stepper stepper(std::move(magneticField));
0066 Navigator::Config cfg{trackingGeometry};
0067 cfg.resolvePassive = false;
0068 cfg.resolveMaterial = true;
0069 cfg.resolveSensitive = true;
0070 Navigator navigator(cfg);
0071
0072 Propagator propagator(std::move(stepper), std::move(navigator));
0073 CKF trackFinder(std::move(propagator));
0074
0075
0076 return std::make_shared<CKFTrackingFunctionImpl>(std::move(trackFinder));
0077 }
0078
0079 }