ATLAS Offline Software
EtaHoughTransformAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONR4_MUONPATTERNRECOGNITIONALGS_ETAHOUGHTRANSFORMALG__H
5 #define MUONR4_MUONPATTERNRECOGNITIONALGS_ETAHOUGHTRANSFORMALG__H
6 
9 
13 
17 
19 
20 // muon includes
21 
22 
23 namespace MuonR4{
24 
32  public:
33  EtaHoughTransformAlg(const std::string& name, ISvcLocator* pSvcLocator);
34  virtual ~EtaHoughTransformAlg() = default;
35  virtual StatusCode initialize() override;
36  virtual StatusCode execute(const EventContext& ctx) const override;
37 
38  private:
39 
43  template <class ContainerType> StatusCode retrieveContainer(const EventContext& ctx,
45  const ContainerType* & contToPush) const;
46 
54  void preProcess(const EventContext& ctx,
55  const ActsGeometryContext& gctx,
56  const SpacePointContainer & spacePoints,
57  HoughEventData & data) const;
58 
61  void prepareHoughPlane(HoughEventData & data) const;
62 
69  void processBucket(const EventContext& ctx,
71  HoughSetupForBucket& currentBucket) const;
72 
77  const MuonR4::HoughHitType & SP) const;
78 
82  void extendWithPhiHits(std::vector<HoughHitType> & hitList, HoughSetupForBucket& bucket) const ;
84  static bool isPrecisionHit(const HoughHitType& hit);
85  // target resolution in the angle
86  DoubleProperty m_targetResoTanTheta{this, "ResolutionTargetTanTheta", 0.03};
87  // target resolution in the y intercept
88  DoubleProperty m_targetResoIntercept{this, "ResolutionTargetIntercept", 15.};
89  // minimum search window half width, tan(theta)
90  // - in multiples of the target resolution
91  DoubleProperty m_minSigmasSearchTanTheta{this, "minSigmasSearchTanTheta", 1.0};
92  // minimum search window half width, intercept
93  // - in multiples of the target resolution
94  DoubleProperty m_minSigmasSearchIntercept{this, "minSigmasSearchIntercept", 1.0};
95  // Cut on the number of weighted hits on the maximum
96  DoubleProperty m_peakThreshold{this, "peakThreshold", 2.5};
97  // Minimum distance in tanTheta between two maxima
98  DoubleProperty m_minMaxDistTheta{this, "MaximumSeparationTheta", 0.};
99  // Minimum distance in the intercept between two maxima
100  DoubleProperty m_minMaxDistIntercept{this, "MaximumSeparationIntercept", 15.};
101  // Fraction of weighted counts around the peak to be associated to the maximum
102  DoubleProperty m_peakFractionCutOff{this, "PeakFractionCutOff", 0.6};
103  // How many valid precision hits have to be on the pattern
104  UnsignedIntegerProperty m_nPrecHitCut{this, "nMinPrecHits", 3};
105 
106  // number of accumulator bins for the angle
107  IntegerProperty m_nBinsTanTheta{this, "nBinsTanTheta", 5};
108  // number of accumulator bins for the intercept
109  IntegerProperty m_nBinsIntercept{this, "nBinsIntercept", 10};
110  // Flag to steer whether space points shall be downweighted according to their instance
111  // multiplicity of the phi measurement such that it effectively contributes with weight 1
112  BooleanProperty m_downWeightMultiplePrd{this, "downWeightPrdMultiplicity", false};
113 
114  // input space points from SG
115  SG::ReadHandleKey<SpacePointContainer> m_spacePointKey{this, "SpacePointContainer", "MuonSpacePoints"};
116  // output maxima for downstram processing
117  SG::WriteHandleKey<EtaHoughMaxContainer> m_maxima{this, "EtaHoughMaxContainer", "MuonHoughStationMaxima"};
118  // ACTS geometry context
119  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
121  ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
122 
123  };
124 }
125 
126 
127 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonR4::EtaHoughTransformAlg::m_minMaxDistIntercept
DoubleProperty m_minMaxDistIntercept
Definition: EtaHoughTransformAlg.h:100
MuonR4::EtaHoughTransformAlg::m_downWeightMultiplePrd
BooleanProperty m_downWeightMultiplePrd
Definition: EtaHoughTransformAlg.h:112
IPatternVisualizationTool.h
MuonR4::EtaHoughTransformAlg::m_targetResoIntercept
DoubleProperty m_targetResoIntercept
Definition: EtaHoughTransformAlg.h:88
MuonR4::EtaHoughTransformAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: EtaHoughTransformAlg.h:119
MuonR4::EtaHoughTransformAlg::~EtaHoughTransformAlg
virtual ~EtaHoughTransformAlg()=default
SG::ReadHandleKey< ContainerType >
MuonR4::EtaHoughTransformAlg
Algorithm to handle the eta hough transform.
Definition: EtaHoughTransformAlg.h:31
MuonR4::EtaHoughTransformAlg::initialize
virtual StatusCode initialize() override
Definition: EtaHoughTransformAlg.cxx:19
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchTanTheta
DoubleProperty m_minSigmasSearchTanTheta
Definition: EtaHoughTransformAlg.h:91
MuonR4::EtaHoughTransformAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: EtaHoughTransformAlg.h:121
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonR4::EtaHoughTransformAlg::m_minMaxDistTheta
DoubleProperty m_minMaxDistTheta
Definition: EtaHoughTransformAlg.h:98
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:96
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:43
MuonR4::EtaHoughTransformAlg::m_nPrecHitCut
UnsignedIntegerProperty m_nPrecHitCut
Definition: EtaHoughTransformAlg.h:104
MuonR4::EtaHoughTransformAlg::processBucket
void processBucket(const EventContext &ctx, HoughEventData &data, HoughSetupForBucket &currentBucket) const
process a bucket.
Definition: EtaHoughTransformAlg.cxx:152
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
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:18
ReadCondHandleKey.h
MuonR4::EtaHoughTransformAlg::m_nBinsIntercept
IntegerProperty m_nBinsIntercept
Definition: EtaHoughTransformAlg.h:109
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.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonR4::EtaHoughTransformAlg::EtaHoughTransformAlg
EtaHoughTransformAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: EtaHoughTransformAlg.cxx:15
MuonR4::EtaHoughTransformAlg::m_peakFractionCutOff
DoubleProperty m_peakFractionCutOff
Definition: EtaHoughTransformAlg.h:102
MuonR4::EtaHoughTransformAlg::m_maxima
SG::WriteHandleKey< EtaHoughMaxContainer > m_maxima
Definition: EtaHoughTransformAlg.h:117
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:80
MuonR4::EtaHoughTransformAlg::extendWithPhiHits
void extendWithPhiHits(std::vector< HoughHitType > &hitList, HoughSetupForBucket &bucket) const
extend a maximum with all compatible (pure) phi hits.
Definition: EtaHoughTransformAlg.cxx:253
MuonR4::EtaHoughTransformAlg::m_targetResoTanTheta
DoubleProperty m_targetResoTanTheta
Definition: EtaHoughTransformAlg.h:86
MuonR4::EtaHoughTransformAlg::m_spacePointKey
SG::ReadHandleKey< SpacePointContainer > m_spacePointKey
Definition: EtaHoughTransformAlg.h:115
HoughEventData.h
SpacePointContainer.h
MuonR4::EtaHoughTransformAlg::isPrecisionHit
static bool isPrecisionHit(const HoughHitType &hit)
Returns whether the hit is a precision hit or not.
Definition: EtaHoughTransformAlg.cxx:123
MuonR4::EtaHoughTransformAlg::m_nBinsTanTheta
IntegerProperty m_nBinsTanTheta
Definition: EtaHoughTransformAlg.h:107
MuonR4::EtaHoughTransformAlg::prepareHoughPlane
void prepareHoughPlane(HoughEventData &data) const
prepare the accumulator and the peak finder once per event
Definition: EtaHoughTransformAlg.cxx:140
MuonR4::EtaHoughTransformAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to fetch data from StoreGate.
Definition: EtaHoughTransformAlg.cxx:28
IMuonIdHelperSvc.h
MuonR4::HoughEventData_impl
Templated event data class for the phase-2 muon hough transform.
Definition: HoughEventData.h:22
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::EtaHoughTransformAlg::fillFromSpacePoint
void fillFromSpacePoint(HoughEventData &data, const MuonR4::HoughHitType &SP) const
fill the accumulator from a given space point.
Definition: EtaHoughTransformAlg.cxx:232
MuonR4::EtaHoughTransformAlg::m_minSigmasSearchIntercept
DoubleProperty m_minSigmasSearchIntercept
Definition: EtaHoughTransformAlg.h:94