Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NumericalTrackLinearizer.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NumericalTrackLinearizer.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2023 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
21 
22 namespace Acts {
23 
61 template <typename propagator_t,
62  typename propagator_options_t = PropagatorOptions<>>
64  public:
66 
68  struct State {
73  : fieldCache(std::move(fieldCacheIn)) {}
75  };
76 
78  struct Config {
83  Config(std::shared_ptr<const MagneticFieldProvider> bIn,
84  std::shared_ptr<const Propagator_t> prop)
85  : bField(std::move(bIn)), propagator(std::move(prop)) {}
86 
90  Config(std::shared_ptr<const Propagator_t> prop)
91  : bField{std::make_shared<NullBField>()}, propagator(std::move(prop)) {}
92 
93  std::shared_ptr<const MagneticFieldProvider> bField;
94 
95  std::shared_ptr<const Propagator_t> propagator;
96 
100 
104  };
105 
111  std::unique_ptr<const Logger> _logger =
112  getDefaultLogger("NumTrkLinProp", Logging::INFO))
113  : m_cfg(config), m_logger{std::move(_logger)} {}
114 
127  Result<LinearizedTrack> linearizeTrack(const BoundTrackParameters& params,
128  double linPointTime,
129  const Surface& perigeeSurface,
131  const Acts::MagneticFieldContext& mctx,
132  State& /*state*/) const;
133 
134  private:
135  const Config m_cfg;
136 
137  std::unique_ptr<const Logger> m_logger;
138 
139  const Logger& logger() const { return *m_logger; }
140 };
141 
142 } // namespace Acts
143