Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /acts/Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/EventData/TrackContainer.hpp"
0010 #include "Acts/Propagator/Navigator.hpp"
0011 #include "Acts/Propagator/Propagator.hpp"
0012 #include "Acts/Propagator/SympyStepper.hpp"
0013 #include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
0014 #include "Acts/Utilities/Logger.hpp"
0015 #include "ActsExamples/EventData/Track.hpp"
0016 #include "ActsExamples/TrackFinding/TrackFindingAlgorithm.hpp"
0017 
0018 #include <memory>
0019 #include <utility>
0020 
0021 namespace {
0022 
0023 using Stepper = Acts::SympyStepper;
0024 using Navigator = Acts::Navigator;
0025 using Propagator = Acts::Propagator<Stepper, Navigator>;
0026 using CKF =
0027     Acts::CombinatorialKalmanFilter<Propagator, ActsExamples::TrackContainer>;
0028 
0029 struct TrackFinderFunctionImpl
0030     : public ActsExamples::TrackFindingAlgorithm::TrackFinderFunction {
0031   CKF trackFinder;
0032 
0033   explicit TrackFinderFunctionImpl(CKF&& f) : trackFinder(std::move(f)) {}
0034 
0035   ActsExamples::TrackFindingAlgorithm::TrackFinderResult operator()(
0036       const ActsExamples::TrackParameters& initialParameters,
0037       const ActsExamples::TrackFindingAlgorithm::TrackFinderOptions& options,
0038       ActsExamples::TrackContainer& tracks,
0039       ActsExamples::TrackProxy rootBranch) const override {
0040     return trackFinder.findTracks(initialParameters, options, tracks,
0041                                   rootBranch);
0042   }
0043 };
0044 
0045 }  // namespace
0046 
0047 std::shared_ptr<ActsExamples::TrackFindingAlgorithm::TrackFinderFunction>
0048 ActsExamples::TrackFindingAlgorithm::makeTrackFinderFunction(
0049     std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
0050     std::shared_ptr<const Acts::MagneticFieldProvider> magneticField,
0051     const Acts::Logger& logger) {
0052   Stepper stepper(std::move(magneticField));
0053   Navigator::Config cfg{std::move(trackingGeometry)};
0054   cfg.resolvePassive = false;
0055   cfg.resolveMaterial = true;
0056   cfg.resolveSensitive = true;
0057   Navigator navigator(cfg, logger.cloneWithSuffix("Navigator"));
0058   Propagator propagator(std::move(stepper), std::move(navigator),
0059                         logger.cloneWithSuffix("Propagator"));
0060   CKF trackFinder(std::move(propagator), logger.cloneWithSuffix("Finder"));
0061 
0062   // build the track finder functions. owns the track finder object.
0063   return std::make_shared<TrackFinderFunctionImpl>(std::move(trackFinder));
0064 }