ATLAS Offline Software
Loading...
Searching...
No Matches
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
21namespace 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
39 using HoughSetupForBucket = HoughEventData::HoughSetupForBucket;
47 void preProcess(const EventContext& ctx,
48 const ActsTrk::GeometryContext& gctx,
49 const SpacePointContainer & spacePoints,
50 HoughEventData & data) const;
51
54 void prepareHoughPlane(HoughEventData & data) const;
55
62 void processBucket(const EventContext& ctx,
63 HoughEventData & data,
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
80 void extendWithPhiHits(std::vector<HoughHitType> & hitList,
81 HoughSetupForBucket& bucket,
82 const double tanBeta,
83 const double interceptY) const ;
85 static bool isPrecisionHit(const HoughHitType& hit);
86
92 void visualizeBucketAccumulator(const EventContext& ctx,
93 HoughEventData& data,
94 HoughSetupForBucket& bucket,
95 const std::vector<ActsPeakFinderForMuon::Maximum>& maxima) const;
96
102 void visualizeBucketSeed(const EventContext& ctx,
103 HoughSetupForBucket& bucket,
104 const SegmentSeed& seed,
105 bool seedPassedSelection) const;
106
107
108 // target resolution in the angle
109 DoubleProperty m_targetResoTanTheta{this, "ResolutionTargetTanTheta", 0.05};
110 // target resolution in the y intercept
111 DoubleProperty m_targetResoIntercept{this, "ResolutionTargetIntercept", 10.};
112 // minimum search window half width, tan(theta)
113 // - in multiples of the target resolution
114 DoubleProperty m_minSigmasSearchTanTheta{this, "minSigmasSearchTanTheta", 2.0};
115 // minimum search window half width, intercept
116 // - in multiples of the target resolution
117 DoubleProperty m_minSigmasSearchIntercept{this, "minSigmasSearchIntercept", 2.0};
118 // Cut on the number of weighted hits on the maximum
119 DoubleProperty m_peakThreshold{this, "peakThreshold", 2.5};
120 // Minimum distance in tanBeta between two maxima
121 DoubleProperty m_minMaxDistTheta{this, "MaximumSeparationTheta", 0.};
122 // Minimum distance in the intercept between two maxima
123 DoubleProperty m_minMaxDistIntercept{this, "MaximumSeparationIntercept", 15.};
124 // Fraction of weighted counts around the peak to be associated to the maximum
125 DoubleProperty m_peakFractionCutOff{this, "PeakFractionCutOff", 0.6};
126 // How many valid precision hits have to be on the pattern
127 UnsignedIntegerProperty m_nPrecHitCut{this, "nMinPrecHits", 3};
128 // Phi strip safety margin. Phi hits are only appended if the maximum kind
129 // of crosses the strip in theory
130 DoubleProperty m_phiStripSafety{this, "PhiSafetyMargin", 15.*Gaudi::Units::cm};
131
132 // number of accumulator bins for the angle
133 IntegerProperty m_nBinsTanTheta{this, "nBinsTanTheta", 7};
134 // number of accumulator bins for the intercept
135 IntegerProperty m_nBinsIntercept{this, "nBinsIntercept", 15};
136 // Flag to steer whether space points shall be downweighted according to their instance
137 // multiplicity of the phi measurement such that it effectively contributes with weight 1
138 BooleanProperty m_downWeightMultiplePrd{this, "downWeightPrdMultiplicity", false};
140 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
141
142 // input space points from SG
143 SG::ReadHandleKey<SpacePointContainer> m_spacePointKey{this, "SpacePointContainer", "MuonSpacePoints"};
144 // output maxima for downstram processing
145 SG::WriteHandleKey<EtaHoughMaxContainer> m_maxima{this, "EtaHoughMaxContainer", "MuonHoughStationMaxima"};
146 // ACTS geometry context
147 ActsTrk::GeoContextReadKey_t m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
149 ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
150
151 };
152}
153
154
155#endif
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Algorithm to handle the eta hough transform.
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
void extendWithPhiHits(std::vector< HoughHitType > &hitList, HoughSetupForBucket &bucket, const double tanBeta, const double interceptY) const
extend a maximum with all compatible (pure) phi hits.
void fillFromSpacePoint(HoughEventData &data, const MuonR4::HoughHitType &SP) const
fill the accumulator from a given space point.
void prepareHoughPlane(HoughEventData &data) const
prepare the accumulator and the peak finder once per event
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Handle to the IdHelperSvc.
void visualizeBucketSeed(const EventContext &ctx, HoughSetupForBucket &bucket, const SegmentSeed &seed, bool seedPassedSelection) const
visualize the seed for a given bucket and its maximum
HoughEventData::HoughSetupForBucket HoughSetupForBucket
virtual StatusCode execute(const EventContext &ctx) const override
static bool isPrecisionHit(const HoughHitType &hit)
Returns whether the hit is a precision hit or not.
void preProcess(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const SpacePointContainer &spacePoints, HoughEventData &data) const
pre-processing method called once per event.
void visualizeBucketAccumulator(const EventContext &ctx, HoughEventData &data, HoughSetupForBucket &bucket, const std::vector< ActsPeakFinderForMuon::Maximum > &maxima) const
visualize the accumulator for a given bucket and its maxima
void processBucket(const EventContext &ctx, HoughEventData &data, HoughSetupForBucket &currentBucket) const
process a bucket.
bool passSeedQuality(const HoughSetupForBucket &currentBucket, const MuonR4::ActsPeakFinderForMuon::Maximum &maximum) const
apply quality cuts on a given maximum
UnsignedIntegerProperty m_nPrecHitCut
SG::WriteHandleKey< EtaHoughMaxContainer > m_maxima
virtual ~EtaHoughTransformAlg()=default
ActsTrk::GeoContextReadKey_t m_geoCtxKey
virtual StatusCode initialize() override
SG::ReadHandleKey< SpacePointContainer > m_spacePointKey
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition SegmentSeed.h:14
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
SG::ReadHandleKey< GeometryContext > GeoContextReadKey_t
Abrivate the ReadHandleKey to declare the data dependency on the Geometry context.
This header ties the generic definitions in this package.
HoughEventData_impl< ActsPeakFinderForMuon, ActsPeakFinderForMuonCfg > HoughEventData
const SpacePoint * HoughHitType
DataVector< SpacePointBucket > SpacePointContainer
Abrivation of the space point container type.