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
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/Definitions/Algebra.hpp
"
12
#include "
Acts/Definitions/Common.hpp
"
13
#include "
Acts/Surfaces/Surface.hpp
"
14
#include "
Acts/Utilities/UnitVectors.hpp
"
15
16
#include <algorithm>
17
18
Acts::FreeVector
Acts::detail::transformBoundToFreeParameters
(
19
const
Acts::Surface
&
surface
,
const
GeometryContext
&
geoCtx
,
20
const
Acts::BoundVector
& boundParams) {
21
// convert angles to global unit direction vector
22
Vector3
direction =
makeDirectionFromPhiTheta
(boundParams[
eBoundPhi
],
23
boundParams[
eBoundTheta
]);
24
25
// convert local position to global position vector
26
Vector2
local(boundParams[
eBoundLoc0
], boundParams[
eBoundLoc1
]);
27
Vector3
position
= surface.
localToGlobal
(geoCtx, local, direction);
28
29
// construct full free-vector. time and q/p stay as-is.
30
FreeVector
freeParams = FreeVector::Zero();
31
freeParams[
eFreePos0
] = position[
ePos0
];
32
freeParams[
eFreePos1
] = position[
ePos1
];
33
freeParams[
eFreePos2
] = position[
ePos2
];
34
freeParams[
eFreeTime
] = boundParams[
eBoundTime
];
35
freeParams[
eFreeDir0
] = direction[
eMom0
];
36
freeParams[
eFreeDir1
] = direction[
eMom1
];
37
freeParams[
eFreeDir2
] = direction[
eMom2
];
38
freeParams[
eFreeQOverP
] = boundParams[
eBoundQOverP
];
39
return
freeParams;
40
}
acts
blob
sPHENIX
Core
src
EventData
TransformationBoundToFree.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:35
using
1.8.2 with
sPHENIX GitHub integration