Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-02 08:53:33

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 #pragma once
0009 
0010 #include "ActsExamples/EventData/MuonSpacePoint.hpp"
0011 
0012 namespace ActsExamples {
0013 ///  @brief EDM class to store the result from the HoughTransform pattern finding step. The class takes the
0014 ///         local line parameters of the transform in the precision direction
0015 ///         (tanBeta, interceptY) if the transform, is performed to find an
0016 ///         parameter estimate in the bending direction or (tanBeta, interceptY,
0017 ///         tanAlpha, interceptX) if a second hough transform is performed on
0018 ///         top of the first transform to find the parameters in the
0019 ///         complementary direction. Further, the MuonHoughMaximum stores the
0020 ///         list of all hits associated with the maximum.
0021 class MuonHoughMaximum {
0022  public:
0023   using HitVec = std::vector<const MuonSpacePoint*>;
0024   /// @brief Constructor taking the estimated hough parameters and the associated hits
0025   /// @param tanBeta: Slope of the estimated line in precision direction
0026   /// @param interceptY: Intercept of the line along the precision direction
0027   /// @param assocHits: List of hits associated with these parameters
0028   MuonHoughMaximum(const double tanBeta, const double interceptY,
0029                    const HitVec& assocHits)
0030       : m_tanBeta{tanBeta}, m_interceptY{interceptY}, m_hits{assocHits} {}
0031   /// @brief Constructor taking the estimated hough parameters from a complementary hough transform
0032   ///       & the associated hits.
0033   /// @param tanAlpha: Slope of the estimate line in the non-bending direction
0034   /// @param interceptX: Intercept of the line along the non-bending direction
0035   /// @param tanBeta: Slope of the estimated line in precision direction
0036   /// @param interceptY: Intercept of the line along the precision direction
0037   /// @param assocHits: List of hits associated with these parameters
0038   MuonHoughMaximum(const double tanAlpha, const double interceptX,
0039                    const double tanBeta, const double interceptY,
0040                    const HitVec& assocHits)
0041       : m_tanAlpha{tanAlpha},
0042         m_interceptX{interceptX},
0043         m_tanBeta{tanBeta},
0044         m_interceptY{interceptY},
0045         m_hits{assocHits} {}
0046   /// @brief Return the slope along the non-bending direction
0047   double tanAlpha() const { return m_tanAlpha; }
0048   /// @brief Return slope along the bending direction
0049   double tanBeta() const { return m_tanBeta; }
0050   /// @brief Return the intercept in the non-precision plane
0051   double interceptX() const { return m_interceptX; }
0052   /// @brief Return the intercept in the precision plane
0053   double interceptY() const { return m_interceptY; }
0054   /// @brief Return the associated hits
0055   const HitVec& hits() const { return m_hits; }
0056 
0057  private:
0058   double m_tanAlpha{0.};
0059   double m_interceptX{0.};
0060   double m_tanBeta{0.};
0061   double m_interceptY{0.};
0062   HitVec m_hits{};
0063 };
0064 
0065 using MuonHoughMaxContainer = std::vector<MuonHoughMaximum>;
0066 }  // namespace ActsExamples