Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RiddersPropagator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RiddersPropagator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2019 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 
13 
14 namespace Acts {
15 
33 template <typename propagator_t>
37 
42 
52  template <typename parameters_t, typename action_list_t>
59  template <typename... args>
60  using this_result_type = PropagatorResult<parameters_t, args...>;
61 
63  using type = typename action_list_t::template result_type<this_result_type>;
64  };
65 
72  template <typename parameters_t, typename action_list_t>
75 
76  public:
77  struct Config {
79  std::vector<double> deviations = {-4e-4, -2e-4, 2e-4, 4e-4};
81  std::vector<double> deviationsDisc = {-3e-5, -1e-5, 1e-5, 3e-5};
82  };
83 
89  : m_propagator(propagator), m_config(std::move(config)) {}
90 
99  template <typename stepper_t, typename navigator_t = detail::VoidNavigator>
100  RiddersPropagator(stepper_t stepper, navigator_t navigator = navigator_t(),
101  Config config = {})
102  : m_propagator(Propagator(stepper, navigator)),
104 
114  template <typename parameters_t, typename propagator_options_t>
115  Result<
117  typename propagator_options_t::action_list_type>>
118  propagate(const parameters_t& start,
119  const propagator_options_t& options) const;
120 
133  template <typename parameters_t, typename propagator_options_t>
134  Result<action_list_t_result_t<
135  BoundTrackParameters, typename propagator_options_t::action_list_type>>
136  propagate(const parameters_t& start, const Surface& target,
137  const propagator_options_t& options) const;
138 
139  private:
147  template <typename propagator_options_t, typename parameters_t,
148  typename result_t>
149  Jacobian wiggleAndCalculateJacobian(const propagator_options_t& options,
150  const parameters_t& start,
151  result_t& nominalResult) const;
152 
162  static bool inconsistentDerivativesOnDisc(
163  const std::vector<BoundVector>& derivatives);
164 
180  template <typename propagator_options_t, typename parameters_t>
181  std::vector<BoundVector> wiggleParameter(
182  const propagator_options_t& options, const parameters_t& start,
183  unsigned int param, const Surface& target, const BoundVector& nominal,
184  const std::vector<double>& deviations) const;
185 
193  const std::vector<double>& deviations,
194  const std::array<std::vector<BoundVector>, eBoundSize>& derivatives);
195 
203  static BoundVector fitLinear(const std::vector<double>& deviations,
204  const std::vector<BoundVector>& derivatives);
205 
208 };
209 } // namespace Acts
210