Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-13 08:15:52

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/EventData/CompositeSpacePoint.hpp"
0012 #include "Acts/Seeding/detail/CompSpacePointAuxiliaries.hpp"
0013 
0014 namespace Acts::Experimental {
0015 class CompositeSpacePointLineSeeder {
0016  public:
0017   using Vector = detail::CompSpacePointAuxiliaries::Vector;
0018   /// @brief Helper struct describing the line parameters that are tangential
0019   ///        to a pair of straw circles
0020   struct TwoCircleTangentPars {
0021     /// @brief Estimated angle
0022     double theta{0.};
0023     /// @brief Estimated intercept
0024     double y0{0.};
0025     /// @brief Uncertainty on the angle
0026     double dTheta{0.};
0027     /// @brief Uncertainty on the intercept
0028     double dY0{0.};
0029   };
0030   /// @brief Enumeration to pick one of the four tangent lines to
0031   ///       the straw circle pair.
0032   enum class TangentAmbi : std::uint8_t {
0033     RR = 0,  //< Both circles are on the right side
0034     RL = 1,  //< The top circle is on the right and the bottom circle on the
0035              // left < side
0036     LR = 2,  //< The top circle is  on the left and the bottom circle on the
0037              //< right side
0038     LL = 3,  //< Both circles are on the left side
0039   };
0040   /// @brief Converts the line tangent ambiguity into a string
0041   static std::string toString(const TangentAmbi ambi);
0042   /// @brief Translate the combination of two drift signs into the proper
0043   ///        tangent ambiguity enum value
0044   /// @param signTop: Left/right sign of the top straw tube
0045   /// @param signBottom: Left/right sign of the bottom straw tube
0046   static constexpr TangentAmbi encodeAmbiguity(const int signTop,
0047                                                const int signBottom);
0048   /// @brief Construct the line that is tangential to a pair of two straw circle measurements
0049   /// @param topHit: First straw hit
0050   /// @param bottomHit: Second straw hit
0051   /// @param ambi: Left right ambiguity of the bottom & top hit
0052   template <CompositeSpacePoint SpacePoint_t>
0053   static TwoCircleTangentPars constructTangentLine(
0054       const SpacePoint_t& topHit, const SpacePoint_t& bottomHit,
0055       const TangentAmbi ambi);
0056 
0057  private:
0058   static constexpr std::array<std::array<int, 2>, 4> s_signCombo{
0059       std::array{1, 1}, std::array{1, -1}, std::array{-1, 1},
0060       std::array{-1, -1}};
0061 };
0062 }  // namespace Acts::Experimental
0063 #include "Acts/Seeding/CompositeSpacePointLineSeeder.ipp"