Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 07:47:58

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Utilities/PointerTraits.hpp"
0013 
0014 #include <type_traits>
0015 
0016 namespace Acts::Experimental {
0017 /// @brief Concept definition of the station space points. They're primarily used in composite detectors,
0018 ///        like the Muon stations in side the ATLAS experiment. The stations
0019 ///        usually consist of few layers of straw tubes which maybe sandwiched
0020 ///        by strip detector layers. The straws are used to measure the passage
0021 ///        of the particle in the bending plane, while the strips may supplement
0022 ///        the track measurement by providing coordinates along the straw. The
0023 ///        CompositeSpacePoint assumes an orthogonal coordinate system, where
0024 ///           x-axis: Is parallel to the straw wires
0025 ///           y-axis: Points to the next straw in a layer
0026 ///           z-axis: Points outwards from the experiment
0027 template <typename SpacePointType>
0028 concept CompositeSpacePoint = requires(const SpacePointType sp) {
0029   ///  @brief Local position of the space point measurement. It's either the position of the wire
0030   ///         or the position of the fired strip in the station
0031   { sp.localPosition() } -> std::same_as<const Vector3&>;
0032   /// @brief Orientation of the sensor, which is either the wire orientation or the strip orientation.
0033   ///        Distortions along the sensor direction do not alter the track
0034   ///        residual
0035   { sp.sensorDirection() } -> std::same_as<const Vector3&>;
0036   /// @brief Unit vector pointing to the next strip/straw in the plane or
0037   ///        in case of a combined measurement, the complementary strip
0038   ///        direction
0039   { sp.toNextSensor() } -> std::same_as<const Vector3&>;
0040   /// @brief Normal vector on the strip-plane spanned by `sensorDirection()` & `toNextSensor()`.
0041   { sp.planeNormal() } -> std::same_as<const Vector3&>;
0042   /// @brief Radius of the straw-tube measurement. The returned value is zero for strip measurements
0043   { sp.driftRadius() } -> std::same_as<double>;
0044   /// @brief Recorded time of the measurement, if provided by the technology
0045   { sp.time() } -> std::same_as<double>;
0046   /// @brief Measurement covariance array. It's composed of the individual strip covariances, making up
0047   ///        the composite space point and the covariance on time, if provided
0048   { sp.covariance() } -> std::same_as<const std::array<double, 3>&>;
0049 
0050   /// @brief Return whether the space point represents a straw measurement
0051   { sp.isStraw() } -> std::same_as<bool>;
0052   /// @brief Return whether the space point provides a direct time constraint
0053   { sp.hasTime() } -> std::same_as<bool>;
0054   /// @brief Returns whether the station space point measures the 0-th coordinate
0055   ///        and hence constrains the track parameters in the non-bending
0056   ///        direction
0057   { sp.measuresLoc0() } -> std::same_as<bool>;
0058   /// @brief Returns whether the station space point measures the 1-st coordinate
0059   ///        and hence constrains the track parameters in the bending direction
0060   { sp.measuresLoc1() } -> std::same_as<bool>;
0061 };
0062 
0063 /// @brief Define the Space Point pointer concept as an ordinary / smart pointer
0064 ///        over space points
0065 template <typename SpacePoint_t>
0066 concept CompositeSpacePointPtr =
0067     PointerConcept<SpacePoint_t> &&
0068     CompositeSpacePoint<typename RemovePointer<SpacePoint_t>::type>;
0069 
0070 /// @brief A station space point container is any std::container over space points
0071 template <typename ContType_t>
0072 concept CompositeSpacePointContainer =
0073     requires(ContType_t mCont, const ContType_t cCont) {
0074       { mCont.begin() } -> std::same_as<typename ContType_t::iterator>;
0075       { mCont.end() } -> std::same_as<typename ContType_t::iterator>;
0076       { cCont.begin() } -> std::same_as<typename ContType_t::const_iterator>;
0077       { cCont.end() } -> std::same_as<typename ContType_t::const_iterator>;
0078       { cCont.size() } -> std::same_as<typename ContType_t::size_type>;
0079       { cCont.empty() } -> std::same_as<bool>;
0080       requires CompositeSpacePointPtr<typename ContType_t::value_type>;
0081     };
0082 
0083 }  // namespace Acts::Experimental