Skip to content
Snippets Groups Projects
Commit 0190a968 authored by Moritz Kiehn's avatar Moritz Kiehn Committed by Fabian Klimpel
Browse files

Utilities: add free parameters index enum

parent 99ee92eb
No related branches found
No related tags found
1 merge request!785Clean up the parameter definitions
......@@ -34,8 +34,33 @@ enum ParDef : unsigned int {
BoundParsDim /// < The local dimensions
};
/// The dimensions of tracks in free coordinates
constexpr unsigned int FreeParsDim = 8;
/// Components of a free track parameters vector.
///
/// To be used to access components by named indices instead of just numbers.
/// This must be a regular `enum` and not a scoped `enum class` to allow
/// implicit conversion to an integer. The enum value are thus visible directly
/// in `namespace Acts` and are prefixed to avoid naming collisions.
enum FreeParametersIndices : unsigned int {
// Spatial position
// The spatial position components must be stored as one continous block.
eFreePos0 = 0u,
eFreePos1 = eFreePos0 + 1u,
eFreePos2 = eFreePos0 + 2u,
// Time
eFreeTime = 3u,
// (Unit) direction
// The direction components must be stored as one continous block.
eFreeDir0 = 4u,
eFreeDir1 = eFreeDir0 + 1u,
eFreeDir2 = eFreeDir0 + 2u,
// Global inverse-momentum-like parameter, i.e. q/p or 1/p
// See BoundParametersIndices for further information
eFreeQOverP = 7u,
// Last uninitialized value contains the total number of components
eFreeParametersSize,
// For backward compatibility
FreeParsDim = eFreeParametersSize,
};
/// The dimension of a space point
constexpr unsigned int SpacePointDim = 4;
......@@ -135,4 +160,4 @@ template <>
struct par_type<ParDef::eT> {
using type = unbound_parameter;
};
} // namespace Acts
\ No newline at end of file
} // namespace Acts
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment