ECCE @ EIC 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 
11 
12 namespace Acts {
13 
14 std::tuple<BoundParameters, BoundMatrix, double>
17  parameters << state.pos[0], state.pos[1], state.pos[2], state.t, state.dir[0],
18  state.dir[1], state.dir[2], state.q / state.p;
19  return detail::boundState(state.geoContext, state.cov, state.jacobian,
20  state.jacTransport, state.derivative,
21  state.jacToGlobal, parameters, state.covTransport,
22  state.pathAccumulated, surface);
23 }
24 
25 std::tuple<CurvilinearParameters, BoundMatrix, double>
28  parameters << state.pos[0], state.pos[1], state.pos[2], state.t, state.dir[0],
29  state.dir[1], state.dir[2], state.q / state.p;
31  state.cov, state.jacobian, state.jacTransport, state.derivative,
32  state.jacToGlobal, parameters, state.covTransport, state.pathAccumulated);
33 }
34 
36  const BoundParameters& pars) const {
37  const auto& mom = pars.momentum();
38  state.pos = pars.position();
39  state.dir = mom.normalized();
40  state.p = mom.norm();
41  state.t = pars.time();
42 
43  if (pars.covariance()) {
44  state.cov = (*(pars.covariance()));
45  }
46 }
47 
48 void StraightLineStepper::update(State& state, const Vector3D& uposition,
49  const Vector3D& udirection, double up,
50  double time) const {
51  state.pos = uposition;
52  state.dir = udirection;
53  state.p = up;
54  state.t = time;
55 }
56 
59  state.derivative, state.jacToGlobal, state.dir);
60 }
61 
63  const Surface& surface) const {
65  parameters << state.pos[0], state.pos[1], state.pos[2], state.t, state.dir[0],
66  state.dir[1], state.dir[2], state.q / state.p;
68  state.jacTransport, state.derivative,
69  state.jacToGlobal, parameters, surface);
70 }
71 } // namespace Acts