Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-01 07:33:14

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