EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TransformationBoundToFree.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TransformationBoundToFree.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-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/EventData/detail/TransformationBoundToFree.hpp
"
10
11
#include "
Acts/Surfaces/Surface.hpp
"
12
#include "
Acts/Utilities/UnitVectors.hpp
"
13
14
Acts::FreeVector
Acts::detail::transformBoundToFreeParameters
(
15
const
Acts::Surface
&
surface
,
const
GeometryContext
&
geoCtx
,
16
const
Acts::BoundVector
& boundParams) {
17
// convert angles to global unit direction vector
18
Vector3D
direction =
makeDirectionUnitFromPhiTheta
(boundParams[
eBoundPhi
],
19
boundParams[
eBoundTheta
]);
20
21
// convert local position to global position vector
22
Vector2D
local(boundParams[
eBoundLoc0
], boundParams[
eBoundLoc1
]);
23
Vector3D
position
= surface.
localToGlobal
(geoCtx, local, direction);
24
25
// construct full free-vector. time and q/p stay as-is.
26
FreeVector
freeParams = FreeVector::Zero();
27
freeParams[
eFreePos0
] = position[
ePos0
];
28
freeParams[
eFreePos1
] = position[
ePos1
];
29
freeParams[
eFreePos2
] = position[
ePos2
];
30
freeParams[
eFreeTime
] = boundParams[
eBoundTime
];
31
freeParams[
eFreeDir0
] = direction[
eMom0
];
32
freeParams[
eFreeDir1
] = direction[
eMom1
];
33
freeParams[
eFreeDir2
] = direction[
eMom2
];
34
freeParams[
eFreeQOverP
] = boundParams[
eBoundQOverP
];
35
return
freeParams;
36
}
acts
blob
sPHENIX
Core
src
EventData
TransformationBoundToFree.cpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:24
using
1.8.2 with
EIC GitHub integration