ATLAS Offline Software
Loading...
Searching...
No Matches
PhiHoughTransformAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONR4_MUONPATTERNRECOGNITIONALGS_PHIHOUGHTRANSFORMALG__H
5#define MUONR4_MUONPATTERNRECOGNITIONALGS_PHIHOUGHTRANSFORMALG__H
6
9
12
16
19
20// muon includes
21
22
23namespace MuonR4{
24
34 public:
35 using AthReentrantAlgorithm::AthReentrantAlgorithm;
36 virtual ~PhiHoughTransformAlg() = default;
37 virtual StatusCode initialize() override;
38 virtual StatusCode execute(const EventContext& ctx) const override;
39
40 private:
46
54 const MuonR4::HoughMaximum & maximum,
55 HoughEventData & data) const;
56
62 std::unique_ptr<SegmentSeed> recoverSinglePhiMax(HoughEventData & data, const MuonR4::HoughMaximum & maximum) const;
63
71 std::vector<MuonR4::ActsPeakFinderForMuon::Maximum> findRankedSegmentSeeds(const EventContext& ctx,
73 const MuonR4::HoughMaximum & maximum) const;
74
79 int countIncompatibleEtaHits(const MuonR4::ActsPeakFinderForMuon::Maximum & phiMaximum, const MuonR4::HoughMaximum & etaMaximum) const;
80
87 std::unique_ptr<SegmentSeed> buildSegmentSeed(const HoughMaximum& etaMax,
88 const MuonR4::ActsPeakFinderForMuon::Maximum & phiMax) const;
89
90
94 std::unique_ptr<SegmentSeed> buildPhiLessSeed(const ActsTrk::GeometryContext& gctx,
95 const HoughMaximum& etaMax) const;
97 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
98
99 // read handle key for the input maxima (from a previous eta-transform)
100 SG::ReadHandleKey<EtaHoughMaxContainer> m_maxima{this, "ReadKey", "MuonHoughStationMaxima"};
101 // write handle key for the output segment seeds
102 SG::WriteHandleKey<SegmentSeedContainer> m_segmentSeeds{this, "WriteKey", "MuonHoughStationSegmentSeeds"};
103 // access to the ACTS geometry context
104 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
106 ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
107 // steers the target resolution in tan(phi)
108 DoubleProperty m_targetResoTanPhi{this, "ResolutionTargetTanAngle", 0.04};
109 // steers the target resolution in the x-axis intercept
110 DoubleProperty m_targetResoIntercept{this, "ResolutionTargetIntercept", 30.};
111 // minimum search window half width, tan(phi)
112 // - in multiples of the target resolution
113 DoubleProperty m_minSigmasSearchTanPhi{this, "minSigmasSearchTanPhi", 1.};
114 // minimum search window half width, intercept
115 // - in multiples of the target resolution
116 DoubleProperty m_minSigmasSearchIntercept{this, "minSigmasSearchIntercept", 1.};
117
118 // number of accumulator bins in tan(phi)
119 // target resolution in the angle
120 IntegerProperty m_nBinsTanPhi{this, "nBinsTanAngle", 5};
121 // number of accumulator bins in the x-axis intercept
122 IntegerProperty m_nBinsIntercept{this, "nBinsIntercept", 10};
123 // maximum number of eta measurements allowed to be discarded by
124 // a valid phi-extension
125 IntegerProperty m_maxEtaHolesOnMax{this, "maxEtaHoles", 1};
126 // flag to steer whether to recover maxima with a single phi measurement
127 // using a beam spot projection. Should not be used in splashes or cosmics.
128 BooleanProperty m_recoverSinglePhiWithBS{this, "recoverSinglePhiHitsWithBS", true};
131 BooleanProperty m_refinePhiLessWithBS{this, "refinePhiLessSeedsWithBS", true};
132 // Flag to steer whether space points shall be downweighted according to their instance
133 // multiplicity of the phi measurement such that it effectively contributes with weight 1
134 BooleanProperty m_downWeightMultiplePrd{this, "downWeightPrdMultiplicity", false};
135 };
136}
137
138
139#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
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.
An algorithm that can be simultaneously executed in multiple threads.
Data class to represent an eta maximum in hough space.
Algorithm to handle the phi hough transform.
std::unique_ptr< SegmentSeed > buildPhiLessSeed(const ActsTrk::GeometryContext &gctx, const HoughMaximum &etaMax) const
Constructs the segment seed without phi hits.
SG::ReadHandleKey< EtaHoughMaxContainer > m_maxima
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Handle to the IdHelperSvc.
BooleanProperty m_refinePhiLessWithBS
Flag to steer whether the phi parameters of the seeds without phi hits are refined using the beamspot...
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
virtual StatusCode initialize() override
SG::WriteHandleKey< SegmentSeedContainer > m_segmentSeeds
virtual ~PhiHoughTransformAlg()=default
void preProcessMaximum(const ActsTrk::GeometryContext &gctx, const MuonR4::HoughMaximum &maximum, HoughEventData &data) const
pre-processing for a given input eta-maximum Counts potential phi-hits and defines the search space
void prepareHoughPlane(HoughEventData &data) const
prepare the hough plane once per event.
std::unique_ptr< SegmentSeed > buildSegmentSeed(const HoughMaximum &etaMax, const MuonR4::ActsPeakFinderForMuon::Maximum &phiMax) const
constructs a segment seed from an eta maximum and a phi-extension.
std::unique_ptr< SegmentSeed > recoverSinglePhiMax(HoughEventData &data, const MuonR4::HoughMaximum &maximum) const
extend an eta maximum with just a single attached phi measurement.
std::vector< MuonR4::ActsPeakFinderForMuon::Maximum > findRankedSegmentSeeds(const EventContext &ctx, HoughEventData &data, const MuonR4::HoughMaximum &maximum) const
perform a hough search for the most promising phi extension of an eta-maximum Performs a local hough ...
int countIncompatibleEtaHits(const MuonR4::ActsPeakFinderForMuon::Maximum &phiMaximum, const MuonR4::HoughMaximum &etaMaximum) const
helper to count the number of eta measurements that would be discarded for a given phi extension cand...
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
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.
This header ties the generic definitions in this package.
HoughEventData_impl< ActsPeakFinderForMuon, ActsPeakFinderForMuonCfg > HoughEventData