Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HelicalTrackLinearizer.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HelicalTrackLinearizer.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-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 
44 template <typename propagator_t,
45  typename propagator_options_t = PropagatorOptions<>>
47  public:
49 
51  struct State {
56  : fieldCache(std::move(fieldCacheIn)) {}
59  };
60 
62  struct Config {
67  Config(std::shared_ptr<const MagneticFieldProvider> bIn,
68  std::shared_ptr<const Propagator_t> prop)
69  : bField(std::move(bIn)), propagator(std::move(prop)) {}
70 
74  Config(std::shared_ptr<const Propagator_t> prop)
75  : bField{std::make_shared<NullBField>()}, propagator(std::move(prop)) {}
76 
77  // The magnetic field
78  std::shared_ptr<const MagneticFieldProvider> bField;
79  // The propagator
80  std::shared_ptr<const Propagator_t> propagator;
81 
85  };
86 
92  std::unique_ptr<const Logger> _logger =
93  getDefaultLogger("HelTrkLinProp", Logging::INFO))
94  : m_cfg(config), m_logger{std::move(_logger)} {}
95 
109  Result<LinearizedTrack> linearizeTrack(const BoundTrackParameters& params,
110  double linPointTime,
111  const Surface& perigeeSurface,
113  const Acts::MagneticFieldContext& mctx,
114  State& state) const;
115 
116  private:
118  const Config m_cfg;
119 
120  std::unique_ptr<const Logger> m_logger;
121 
122  const Logger& logger() const { return *m_logger; }
123 };
124 
125 } // namespace Acts
126