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

Utilities: move dependent parameter matrix/vector types

parent 935cb3b2
No related branches found
No related tags found
1 merge request!785Clean up the parameter definitions
......@@ -7,12 +7,16 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
#include <type_traits>
#include "Acts/Utilities/Definitions.hpp"
#ifdef ACTS_PARAMETER_DEFINITIONS_PLUGIN
#include ACTS_PARAMETER_DEFINITIONS_PLUGIN
#endif
/// testing requirements on parameter definitions
#include <type_traits>
namespace Acts {
/// typedefs for parameter identifier and parameter value must be present
static_assert(std::is_enum<Acts::ParID_t>::value,
......@@ -51,4 +55,64 @@ static_assert(Acts::eLOC_Z0 == Acts::eLOC_0 or Acts::eLOC_Z0 == Acts::eLOC_1,
/// check for par_type_t definition
static_assert(sizeof(Acts::par_type_t<Acts::eLOC_0>) > 0,
"'par_type_t' is not defined");
\ No newline at end of file
"'par_type_t' is not defined");
// Matrix and vector types related to bound track parameters.
using BoundVector = ActsVector<BoundParametersScalar, eBoundParametersSize>;
using BoundRowVector =
ActsRowVector<BoundParametersScalar, eBoundParametersSize>;
using BoundMatrix = ActsMatrix<BoundParametersScalar, eBoundParametersSize,
eBoundParametersSize>;
using BoundSymMatrix =
ActsSymMatrix<BoundParametersScalar, eBoundParametersSize>;
// Matrix and vector types related to free track parameters.
using FreeVector = ActsVector<FreeParametersScalar, eFreeParametersSize>;
using FreeRowVector = ActsRowVector<FreeParametersScalar, eFreeParametersSize>;
using FreeMatrix =
ActsMatrix<FreeParametersScalar, eFreeParametersSize, eFreeParametersSize>;
using FreeSymMatrix = ActsSymMatrix<FreeParametersScalar, eFreeParametersSize>;
// Matrix and vector types related to space points.
using SpacePointVector = ActsVector<SpacePointScalar, eSpacePointSize>;
using SpacePointRowVector = ActsRowVector<SpacePointScalar, eSpacePointSize>;
using SpacePointSymMatrix =
ActsMatrix<SpacePointScalar, eSpacePointSize, eSpacePointSize>;
using SpacePointSymMatrix = ActsSymMatrix<SpacePointScalar, eSpacePointSize>;
// Mapping to bound track parameters.
//
// Assumes that matrices represent maps from another space into the space of
// bound track parameters. Thus, the bound parameters scalar type is sufficient
// to retain accuracy.
using FreeToBoundMatrix = ActsMatrix<BoundParametersScalar,
eBoundParametersSize, eFreeParametersSize>;
using SpacePointToBoundMatrix =
ActsMatrix<BoundParametersScalar, eBoundParametersSize, eSpacePointSize>;
// Mapping to free track parameters.
//
// Assumes that matrices represent maps from another space into the space of
// free track parameters. Thus, the free parameters scalar type is sufficient
// to retain accuracy.
using BoundToFreeMatrix =
ActsMatrix<FreeParametersScalar, eFreeParametersSize, eBoundParametersSize>;
using SpacePointToFreeMatrix =
ActsMatrix<FreeParametersScalar, eFreeParametersSize, eSpacePointSize>;
// Mapping to space points.
//
// Assumes that matrices represent maps from another space into the space point
// space. Thus, the space point scalar type is sufficient to retain accuracy.
using BoundToSpacePointMatrix =
ActsMatrix<SpacePointScalar, eSpacePointSize, eBoundParametersSize>;
using FreeToSpacePointMatrix =
ActsMatrix<SpacePointScalar, eSpacePointSize, eFreeParametersSize>;
} // namespace Acts
......@@ -7,11 +7,9 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
// STL include(s)
#include <cmath>
// Acts includes
#include "Acts/Utilities/Definitions.hpp"
#include "Acts/Utilities/ParameterTypes.hpp"
namespace Acts {
......@@ -131,60 +129,7 @@ using SpacePointScalar = double;
using ParDef = BoundParametersIndices;
using ParID_t = BoundParametersIndices;
using ParValue_t = double;
///
/// Type namings with bound parameters
///
/// Vector of bound parameters
using BoundVector = ActsVector<ParValue_t, BoundParsDim>;
/// Row vector of bound parameters
using BoundRowVector = ActsRowVector<ParValue_t, BoundParsDim>;
/// Matrix of bound-to-bound parameters
using BoundMatrix = ActsMatrix<ParValue_t, BoundParsDim, BoundParsDim>;
/// Symmetrical matrix of bound-to-bound parameters
using BoundSymMatrix = ActsSymMatrix<ParValue_t, BoundParsDim>;
///
/// Type naming with free parameters
///
/// Vector of free track parameters
using FreeVector = ActsVector<ParValue_t, FreeParsDim>;
/// Matrix of free-to-free parameters
using FreeMatrix = ActsMatrix<ParValue_t, FreeParsDim, FreeParsDim>;
/// Symmetrical matrix of free-to-free parameters
using FreeSymMatrix = ActsSymMatrix<ParValue_t, FreeParsDim>;
///
/// Type namings with bound & free parameters
///
/// Matrix of bound-to-free parameters
using BoundToFreeMatrix = ActsMatrix<ParValue_t, FreeParsDim, BoundParsDim>;
/// Matrix of free-to-bound parameters
using FreeToBoundMatrix = ActsMatrix<ParValue_t, BoundParsDim, FreeParsDim>;
///
/// Type namings with space points
///
/// Vector with space point parameters
using SpacePointVector = ActsVector<ParValue_t, SpacePointDim>;
/// Symmetrical matrix of space point-to-space point
using SpacePointSymMatrix = ActsSymMatrix<ParValue_t, SpacePointDim>;
///
/// Type namings with space points & bound parameters
///
/// Matrix of space point-to-bound parameters
using SpacePointToBoundMatrix =
ActsMatrix<ParValue_t, BoundParsDim, SpacePointDim>;
/// Matrix with bound parameters-to-space point
using BoundToSpacePointMatrix =
ActsMatrix<ParValue_t, SpacePointDim, BoundParsDim>;
using ParValue_t = BoundParametersScalar;
template <ParID_t>
struct par_type;
......@@ -225,4 +170,5 @@ template <>
struct par_type<ParDef::eT> {
using type = unbound_parameter;
};
} // 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