ATLAS Offline Software
EtaHoughTransformAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONR4_MUONPATTERNRECOGNITIONALGS_ETAHOUGHTRANSFORMALG__H
5 #define MUONR4_MUONPATTERNRECOGNITIONALGS_ETAHOUGHTRANSFORMALG__H
6 
9 
11 
15 
17 
18 // muon includes
19 
20 
21 namespace MuonR4{
22 
30  public:
31  using AthReentrantAlgorithm::AthReentrantAlgorithm;
32 
33  virtual ~EtaHoughTransformAlg() = default;
34  virtual StatusCode initialize() override;
35  virtual StatusCode execute(const EventContext& ctx) const override;
36 
37  private:
38 
47  void preProcess(const EventContext& ctx,
48  const ActsGeometryContext& gctx,
50  HoughEventData & data) const;
51 
54  void prepareHoughPlane(HoughEventData & data) const;
55 
62  void processBucket(const EventContext& ctx,
64  HoughSetupForBucket& currentBucket) const;
65 
70  const MuonR4::HoughHitType & SP) const;
71 
73  bool passSeedQuality (const HoughSetupForBucket& currentBucket, const MuonR4::ActsPeakFinderForMuon::Maximum & maximum) const;
74 
78  void extendWithPhiHits(std::vector<HoughHitType> & hitList, HoughSetupForBucket& bucket) const ;
80  static bool isPrecisionHit(const HoughHitType& hit);
81  // target resolution in the angle
82  DoubleProperty m_targetResoTanTheta{this, "ResolutionTargetTanTheta", 0.05};
83  // target resolution in the y intercept
84  DoubleProperty m_targetResoIntercept{this, "ResolutionTargetIntercept", 10.};
85  // minimum search window half width, tan(theta)
86  // - in multiples of the target resolution
87  DoubleProperty m_minSigmasSearchTanTheta{this, "minSigmasSearchTanTheta", 2.0};
88  // minimum search window half width, intercept
89  // - in multiples of the target resolution
90  DoubleProperty m_minSigmasSearchIntercept{this, "minSigmasSearchIntercept", 2.0};
91  // Cut on the number of weighted hits on the maximum
92  DoubleProperty m_peakThreshold{this, "peakThreshold", 2.5};
93  // Minimum distance in tanTheta between two maxima
94  DoubleProperty m_minMaxDistTheta{this, "MaximumSeparationTheta", 0.};
95  // Minimum distance in the intercept between two maxima
96  DoubleProperty m_minMaxDistIntercept{this, "MaximumSeparationIntercept", 15.};
97  // Fraction of weighted counts around the peak to be associated to the maximum
98  DoubleProperty m_peakFractionCutOff{this, "PeakFractionCutOff", 0.6};
99  // How many valid precision hits have to be on the pattern
100  UnsignedIntegerProperty m_nPrecHitCut{this, "nMinPrecHits", 3};
101 
102  // number of accumulator bins for the angle
103  IntegerProperty m_nBinsTanTheta{this, "nBinsTanTheta", 7};
104  // number of accumulator bins for the intercept
105  IntegerProperty m_nBinsIntercept{this, "nBinsIntercept", 15};
106  // Flag to steer whether space points shall be downweighted according to their instance
107  // multiplicity of the phi measurement such that it effectively contributes with weight 1
108  BooleanProperty m_downWeightMultiplePrd{this, "downWeightPrdMultiplicity", false};
110  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
111 
112  // input space points from SG
113  SG::ReadHandleKey<SpacePointContainer> m_spacePointKey{this, "SpacePointContainer", "MuonSpacePoints"};
114  // output maxima for downstram processing
115  SG::WriteHandleKey<EtaHoughMaxContainer> m_maxima{this, "EtaHoughMaxContainer", "MuonHoughStationMaxima"};
116  // ACTS geometry context
117  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
119  ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
120 
121  };
122 }
123 
124 
125 #endif
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonR4::EtaHoughTransformAlg::m_minMaxDistIntercept
DoubleProperty m_minMaxDistIntercept
Definition: EtaHoughTransformAlg.h:96
MuonR4::EtaHoughTransformAlg::m_downWeightMultiplePrd
BooleanProperty m_downWeightMultiplePrd
Definition: EtaHoughTransformAlg.h:108
IPatternVisualizationTool.h
MuonR4::EtaHoughTransformAlg::m_targetResoIntercept
DoubleProperty m_targetResoIntercept
Definition: EtaHoughTransformAlg.h:84
MuonR4::EtaHoughTransformAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: EtaHoughTransformAlg.h:117
MuonR4::EtaHoughTransformAlg::~EtaHoughTransformAlg
virtual ~EtaHoughTransformAlg()=default
MuonR4::EtaHoughTransformAlg::passSeedQuality
bool passSeedQuality(const HoughSetupForBucket &currentBucket, const MuonR4::ActsPeakFinderForMuon::Maximum &maximum) const
apply quality cuts on a given maximum
Definition: EtaHoughTransformAlg.cxx:182
SG::ReadHandleKey< SpacePointContainer >
MuonR4::EtaHoughTransformAlg
Algorithm to handle the eta hough transform.
Definition: EtaHoughTransformAlg.h:29
MuonR4::EtaHoughTransformAlg::initialize
virtual StatusCode initialize() override
Definition: EtaHoughTransformAlg.cxx:64
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchTanTheta
DoubleProperty m_minSigmasSearchTanTheta
Definition: EtaHoughTransformAlg.h:87
MuonR4::EtaHoughTransformAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: EtaHoughTransformAlg.h:119
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
MuonR4::EtaHoughTransformAlg::m_minMaxDistTheta
DoubleProperty m_minMaxDistTheta
Definition: EtaHoughTransformAlg.h:94
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonR4::EtaHoughTransformAlg::m_peakThreshold
DoubleProperty m_peakThreshold
Definition: EtaHoughTransformAlg.h:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonPatternContainer.h
MuonR4::EtaHoughTransformAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: EtaHoughTransformAlg.cxx:72
MuonR4::EtaHoughTransformAlg::m_nPrecHitCut
UnsignedIntegerProperty m_nPrecHitCut
Definition: EtaHoughTransformAlg.h:100
MuonR4::EtaHoughTransformAlg::processBucket
void processBucket(const EventContext &ctx, HoughEventData &data, HoughSetupForBucket &currentBucket) const
process a bucket.
Definition: EtaHoughTransformAlg.cxx:292
F600IntegrationConfig.spacePoints
spacePoints
Definition: F600IntegrationConfig.py:122
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:19
MuonR4::EtaHoughTransformAlg::m_nBinsIntercept
IntegerProperty m_nBinsIntercept
Definition: EtaHoughTransformAlg.h:105
AthReentrantAlgorithm.h
MuonR4::HoughEventData_impl::HoughSetupForBucket
Hough transform configuration for one bucket of the search space.
Definition: HoughEventData.h:40
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonR4::EtaHoughTransformAlg::m_peakFractionCutOff
DoubleProperty m_peakFractionCutOff
Definition: EtaHoughTransformAlg.h:98
MuonR4::EtaHoughTransformAlg::m_maxima
SG::WriteHandleKey< EtaHoughMaxContainer > m_maxima
Definition: EtaHoughTransformAlg.h:115
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::EtaHoughTransformAlg::preProcess
void preProcess(const EventContext &ctx, const ActsGeometryContext &gctx, const SpacePointContainer &spacePoints, HoughEventData &data) const
pre-processing method called once per event.
Definition: EtaHoughTransformAlg.cxx:109
MuonR4::EtaHoughTransformAlg::extendWithPhiHits
void extendWithPhiHits(std::vector< HoughHitType > &hitList, HoughSetupForBucket &bucket) const
extend a maximum with all compatible (pure) phi hits.
Definition: EtaHoughTransformAlg.cxx:470
MuonR4::EtaHoughTransformAlg::m_targetResoTanTheta
DoubleProperty m_targetResoTanTheta
Definition: EtaHoughTransformAlg.h:82
MuonR4::EtaHoughTransformAlg::m_spacePointKey
SG::ReadHandleKey< SpacePointContainer > m_spacePointKey
Definition: EtaHoughTransformAlg.h:113
HoughEventData.h
SpacePointContainer.h
MuonR4::EtaHoughTransformAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Handle to the IdHelperSvc.
Definition: EtaHoughTransformAlg.h:110
MuonR4::EtaHoughTransformAlg::isPrecisionHit
static bool isPrecisionHit(const HoughHitType &hit)
Returns whether the hit is a precision hit or not.
Definition: EtaHoughTransformAlg.cxx:152
MuonR4::EtaHoughTransformAlg::m_nBinsTanTheta
IntegerProperty m_nBinsTanTheta
Definition: EtaHoughTransformAlg.h:103
MuonR4::EtaHoughTransformAlg::prepareHoughPlane
void prepareHoughPlane(HoughEventData &data) const
prepare the accumulator and the peak finder once per event
Definition: EtaHoughTransformAlg.cxx:170
IMuonIdHelperSvc.h
MuonR4::HoughEventData_impl
Templated event data class for the phase-2 muon hough transform.
Definition: HoughEventData.h:22
ServiceHandle< Muon::IMuonIdHelperSvc >
MuonR4::EtaHoughTransformAlg::fillFromSpacePoint
void fillFromSpacePoint(HoughEventData &data, const MuonR4::HoughHitType &SP) const
fill the accumulator from a given space point.
Definition: EtaHoughTransformAlg.cxx:440
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchIntercept
DoubleProperty m_minSigmasSearchIntercept
Definition: EtaHoughTransformAlg.h:90