Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StraightLineStepper.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file StraightLineStepper.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-2020 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 
10 
13 
14 namespace Acts {
15 
16 Result<std::tuple<BoundTrackParameters, BoundMatrix, double>>
18  State& state, const Surface& surface, bool transportCov,
19  const FreeToBoundCorrection& freeToBoundCorrection) const {
20  return detail::boundState(
21  state.geoContext, state.cov, state.jacobian, state.jacTransport,
22  state.derivative, state.jacToGlobal, state.pars, state.particleHypothesis,
23  state.covTransport and transportCov, state.pathAccumulated, surface,
24  freeToBoundCorrection);
25 }
26 
27 std::tuple<CurvilinearTrackParameters, BoundMatrix, double>
30  state.cov, state.jacobian, state.jacTransport, state.derivative,
31  state.jacToGlobal, state.pars, state.particleHypothesis,
32  state.covTransport and transportCov, state.pathAccumulated);
33 }
34 
36  const BoundVector& boundParams,
37  const Covariance& covariance,
38  const Surface& surface) const {
39  state.pars = freeParams;
40  state.cov = covariance;
41  state.jacToGlobal =
42  surface.boundToFreeJacobian(state.geoContext, boundParams);
43 }
44 
46  const Vector3& udirection, double qop,
47  double time) const {
48  state.pars.template segment<3>(eFreePos0) = uposition;
49  state.pars.template segment<3>(eFreeDir0) = udirection;
50  state.pars[eFreeTime] = time;
51  state.pars[eFreeQOverP] = qop;
52 }
53 
56  state.cov, state.jacobian, state.jacTransport, state.derivative,
57  state.jacToGlobal, state.pars.template segment<3>(eFreeDir0));
58 }
59 
61  State& state, const Surface& surface,
62  const FreeToBoundCorrection& freeToBoundCorrection) const {
64  state.geoContext, state.cov, state.jacobian, state.jacTransport,
65  state.derivative, state.jacToGlobal, state.pars, surface,
66  freeToBoundCorrection);
67 }
68 
70  const BoundVector& boundParams,
71  const BoundSquareMatrix& cov,
72  const Surface& surface,
73  const double stepSize) const {
74  // Update the stepping state
75  update(state,
77  boundParams),
78  boundParams, cov, surface);
79  state.stepSize = ConstrainedStep(stepSize);
80  state.pathAccumulated = 0.;
81 
82  // Reinitialize the stepping jacobian
83  state.jacToGlobal =
84  surface.boundToFreeJacobian(state.geoContext, boundParams);
85  state.jacobian = BoundMatrix::Identity();
86  state.jacTransport = FreeMatrix::Identity();
87  state.derivative = FreeVector::Zero();
88 }
89 
90 } // namespace Acts