Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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
9
#include "
Acts/Propagator/StraightLineStepper.hpp
"
10
11
#include "
Acts/EventData/detail/TransformationBoundToFree.hpp
"
12
#include "
Acts/Propagator/detail/CovarianceEngine.hpp
"
13
14
namespace
Acts {
15
16
Result<std::tuple<BoundTrackParameters, BoundMatrix, double>>
17
StraightLineStepper::boundState
(
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>
28
StraightLineStepper::curvilinearState
(
State
&
state
,
bool
transportCov)
const
{
29
return
detail::curvilinearState
(
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
35
void
StraightLineStepper::update
(
State
&
state
,
const
FreeVector
& freeParams,
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
45
void
StraightLineStepper::update
(
State
&
state
,
const
Vector3
& uposition,
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
54
void
StraightLineStepper::transportCovarianceToCurvilinear
(
State
&
state
)
const
{
55
detail::transportCovarianceToCurvilinear
(
56
state.
cov
, state.
jacobian
, state.
jacTransport
, state.
derivative
,
57
state.
jacToGlobal
, state.
pars
.template segment<3>(
eFreeDir0
));
58
}
59
60
void
StraightLineStepper::transportCovarianceToBound
(
61
State
&
state
,
const
Surface
&
surface
,
62
const
FreeToBoundCorrection
& freeToBoundCorrection)
const
{
63
detail::transportCovarianceToBound
(
64
state.
geoContext
, state.
cov
, state.
jacobian
, state.
jacTransport
,
65
state.
derivative
, state.
jacToGlobal
, state.
pars
, surface,
66
freeToBoundCorrection);
67
}
68
69
void
StraightLineStepper::resetState
(
State
&
state
,
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,
76
detail::transformBoundToFreeParameters
(surface, state.
geoContext
,
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
acts
blob
sPHENIX
Core
src
Propagator
StraightLineStepper.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration