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
TrackParametrization.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackParametrization.hpp
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
#pragma once
10
11
#include "
Acts/Definitions/Algebra.hpp
"
12
13
#include <type_traits>
14
15
// The user can override the track parameters ordering. If the preprocessor
16
// variable is defined, it must point to a header file that contains the same
17
// enum definitions for bound and free track parameters as given below.
18
#ifdef ACTS_PARAMETER_DEFINITIONS_HEADER
19
#include ACTS_PARAMETER_DEFINITIONS_HEADER
20
#else
21
22
namespace
Acts {
23
24
// Note:
25
// The named indices are used to access raw data vectors and matrices at the
26
// lowest level. Since the interpretation of some components, e.g. local
27
// position and the inverse-momentum-like component, depend on additional
28
// information the names have some ambiguity. This can only be resolved at a
29
// higher logical level and no attempt is made to resolve it here.
30
37
enum
BoundIndices
:
unsigned
int
{
38
// Local position on the reference surface.
39
// This is intentionally named different from the position components in
40
// the other data vectors, to clarify that this is defined on a surface
41
// while the others are defined in free space.
42
eBoundLoc0
= 0,
43
eBoundLoc1
= 1,
44
// Direction angles
45
eBoundPhi
= 2,
46
eBoundTheta
= 3,
47
// Global inverse-momentum-like parameter, i.e. q/p or 1/p
48
// The naming is inconsistent for the case of neutral track parameters where
49
// the value is interpreted as 1/p not as q/p. This is intentional to avoid
50
// having multiple aliases for the same element and for lack of an acceptable
51
// common name.
52
eBoundQOverP
= 4,
53
eBoundTime
= 5,
54
// Last uninitialized value contains the total number of components
55
eBoundSize
,
56
};
57
64
enum
FreeIndices
:
unsigned
int
{
65
// Spatial position
66
// The spatial position components must be stored as one continuous block.
67
eFreePos0
= 0
u
,
68
eFreePos1
=
eFreePos0
+ 1
u
,
69
eFreePos2
=
eFreePos0
+ 2
u
,
70
// Time
71
eFreeTime
= 3
u
,
72
// (Unit) direction
73
// The direction components must be stored as one continuous block.
74
eFreeDir0
= 4
u
,
75
eFreeDir1
=
eFreeDir0
+ 1
u
,
76
eFreeDir2
=
eFreeDir0
+ 2
u
,
77
// Global inverse-momentum-like parameter, i.e. q/p or 1/p
78
// See BoundIndices for further information
79
eFreeQOverP
= 7
u
,
80
// Last uninitialized value contains the total number of components
81
eFreeSize
,
82
};
83
84
}
// namespace Acts
85
#endif
86
87
namespace
Acts {
88
89
// Ensure bound track parameters definition is valid.
90
static_assert(std::is_enum_v<BoundIndices>,
91
"'BoundIndices' must be an enum type"
);
92
static_assert(std::is_convertible_v<BoundIndices, size_t>,
93
"'BoundIndices' must be convertible to size_t"
);
94
// Only the order can be user-defined
95
static_assert(
BoundIndices::eBoundSize
== 6
u
,
96
"Bound track parameters must have six components"
);
97
98
// Ensure free track parameters definition is valid.
99
static_assert(std::is_enum_v<FreeIndices>,
100
"'FreeIndices' must be an enum type"
);
101
static_assert(std::is_convertible_v<FreeIndices, size_t>,
102
"'FreeIndices' must be convertible to size_t"
);
103
// Only the order can be user-defined
104
static_assert(
FreeIndices::eFreeSize
== 8
u
,
105
"Free track parameters must have eight components"
);
106
107
// Ensure bound track parameter indices are consistently defined.
108
static_assert(
eBoundLoc0
!=
eBoundLoc1
,
"Local parameters must be different"
);
109
110
// Ensure free track parameter indices are consistently defined.
111
static_assert(
eFreePos1
==
eFreePos0
+ 1
u
,
"Position must be continuous"
);
112
static_assert(
eFreePos2
==
eFreePos0
+ 2
u
,
"Position must be continuous"
);
113
static_assert(
eFreeDir1
==
eFreeDir0
+ 1
u
,
"Direction must be continuous"
);
114
static_assert(
eFreeDir2
==
eFreeDir0
+ 2
u
,
"Direction must be continuous"
);
115
116
// Shorthand vector/matrix types related to bound track parameters.
117
using
BoundVector
=
ActsVector<eBoundSize>
;
118
using
BoundMatrix
=
ActsMatrix<eBoundSize, eBoundSize>
;
119
using
BoundSquareMatrix
=
ActsSquareMatrix<eBoundSize>
;
120
// Mapping from bound track parameters.
121
using
BoundToFreeMatrix
=
ActsMatrix<eFreeSize, eBoundSize>
;
122
123
// Shorthand vector/matrix types related to free track parameters.
124
using
FreeVector
=
ActsVector<eFreeSize>
;
125
using
FreeMatrix
=
ActsMatrix<eFreeSize, eFreeSize>
;
126
using
FreeSquareMatrix
=
ActsSquareMatrix<eFreeSize>
;
127
// Mapping from free track parameters.
128
using
FreeToBoundMatrix
=
ActsMatrix<eBoundSize, eFreeSize>
;
129
using
FreeToPathMatrix
=
ActsMatrix<1, eFreeSize>
;
130
131
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Definitions
TrackParametrization.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:32
using
1.8.2 with
sPHENIX GitHub integration