ATLAS Offline Software
MuonPhiHoughTransformAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONR4__PHIHOUGHTRANSFORMALG__H
6 #define MUONR4__PHIHOUGHTRANSFORMALG__H
7 
9 
11 #include "GaudiKernel/ToolHandle.h"
21 #include "Gaudi/Property.h"
22 
23 // muon includes
24 
25 
26 namespace MuonR4{
27 
37  public:
38  MuonPhiHoughTransformAlg(const std::string& name, ISvcLocator* pSvcLocator);
39  virtual ~MuonPhiHoughTransformAlg() = default;
40  virtual StatusCode initialize() override;
41  virtual StatusCode execute(const EventContext& ctx) const override;
42 
43  private:
44 
47  template <class ContainerType> StatusCode retrieveContainer(const EventContext& ctx,
49  const ContainerType* & contToPush) const;
50 
56 
63 
70 
77  std::vector<MuonR4::ActsPeakFinderForMuon::Maximum> findRankedSegmentSeeds (MuonHoughEventData & data, const MuonR4::HoughMaximum & maximum) const;
78 
83  int countIncompatibleEtaHits(const MuonR4::ActsPeakFinderForMuon::Maximum & phiMaximum, const MuonR4::HoughMaximum & etaMaximum) const;
84 
91  MuonR4::HoughSegmentSeed buildSegmentSeed(const HoughMaximum & etaMax, const MuonR4::ActsPeakFinderForMuon::Maximum & phiMax) const;
92 
93  // read handle key for the input maxima (from a previous eta-transform)
94  SG::ReadHandleKey<StationHoughMaxContainer> m_maxima{this, "StationHoughMaxContainer", "MuonHoughStationMaxima"};
95  // write handle key for the output segment seeds
96  SG::WriteHandleKey<StationHoughSegmentSeedContainer> m_segmentSeeds{this, "StationHoughSegmentSeedContainer", "MuonHoughStationSegmentSeeds"};
97 
98  // access to the ACTS geometry context
99  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
100 
101  // steers the target resolution in tan(phi)
102  DoubleProperty m_targetResoTanPhi{this, "ResolutionTargetTanAngle", 0.01};
103  // steers the target resolution in the x-axis intercept
104  DoubleProperty m_targetResoIntercept{this, "ResolutionTargetIntercept", 10.};
105  // minimum search window half width, tan(phi)
106  // - in multiples of the target resolution
107  DoubleProperty m_minSigmasSearchTanPhi{this, "minSigmasSearchTanPhi", 3.};
108  // minimum search window half width, intercept
109  // - in multiples of the target resolution
110  DoubleProperty m_minSigmasSearchIntercept{this, "minSigmasSearchIntercept", 3.};
111 
112  // number of accumulator bins in tan(phi)
113  // target resolution in the angle
114  IntegerProperty m_nBinsTanPhi{this, "nBinsTanAngle", 15};
115  // number of accumulator bins in the x-axis intercept
116  IntegerProperty m_nBinsIntercept{this, "nBinsIntercept", 100};
117  // maximum number of eta measurements allowed to be discarded by
118  // a valid phi-extension
119  IntegerProperty m_maxEtaHolesOnMax{this, "maxEtaHoles", 1};
120  // flag to steer whether to recover maxima with a single phi measurement
121  // using a beam spot projection. Should not be used in splashes or cosmics.
122  BooleanProperty m_recoverSinglePhiWithBS{this, "recoverSinglePhiHitsWithBS", true};
123 
124  };
125 }
126 
127 
128 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonR4::MuonPhiHoughTransformAlg::findRankedSegmentSeeds
std::vector< MuonR4::ActsPeakFinderForMuon::Maximum > findRankedSegmentSeeds(MuonHoughEventData &data, const MuonR4::HoughMaximum &maximum) const
perform a hough search for the most promising phi extension of an eta-maximum Performs a local hough ...
Definition: MuonPhiHoughTransformAlg.cxx:141
MuonR4::MuonPhiHoughTransformAlg::preProcessMaximum
StatusCode preProcessMaximum(MuonHoughEventData &data, const MuonR4::HoughMaximum &maximum) const
pre-processing for a given input eta-maximum Counts potential phi-hits and defines the search space
Definition: MuonPhiHoughTransformAlg.cxx:96
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonR4::MuonPhiHoughTransformAlg::m_targetResoIntercept
DoubleProperty m_targetResoIntercept
Definition: MuonPhiHoughTransformAlg.h:104
MuonR4::MuonPhiHoughTransformAlg::m_nBinsIntercept
IntegerProperty m_nBinsIntercept
Definition: MuonPhiHoughTransformAlg.h:116
MuonR4::MuonPhiHoughTransformAlg::buildSegmentSeed
MuonR4::HoughSegmentSeed buildSegmentSeed(const HoughMaximum &etaMax, const MuonR4::ActsPeakFinderForMuon::Maximum &phiMax) const
constructs a segment seed from an eta maximum and a phi-extension.
Definition: MuonPhiHoughTransformAlg.cxx:81
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
MuonR4::MuonPhiHoughTransformAlg::m_segmentSeeds
SG::WriteHandleKey< StationHoughSegmentSeedContainer > m_segmentSeeds
Definition: MuonPhiHoughTransformAlg.h:96
SG::ReadHandleKey< ContainerType >
MuonR4::MuonPhiHoughTransformAlg::m_recoverSinglePhiWithBS
BooleanProperty m_recoverSinglePhiWithBS
Definition: MuonPhiHoughTransformAlg.h:122
RpcStripContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonR4::MuonPhiHoughTransformAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: MuonPhiHoughTransformAlg.h:99
MuonR4::MuonPhiHoughTransformAlg::initialize
virtual StatusCode initialize() override
Definition: MuonPhiHoughTransformAlg.cxx:18
MuonR4::MuonPhiHoughTransformAlg::m_minSigmasSearchTanPhi
DoubleProperty m_minSigmasSearchTanPhi
Definition: MuonPhiHoughTransformAlg.h:107
MuonR4::MuonPhiHoughTransformAlg
Algorithm to handle the phi hough transform.
Definition: MuonPhiHoughTransformAlg.h:36
SG::WriteHandleKey< StationHoughSegmentSeedContainer >
MuonR4::MuonHoughEventData_impl
Templated event data class for the phase-2 muon hough transform.
Definition: MuonHoughEventData.h:34
MuonR4::MuonPhiHoughTransformAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to fetch data from StoreGate.
Definition: MuonPhiHoughTransformAlg.cxx:27
TgcStripContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadCondHandleKey.h
AthReentrantAlgorithm.h
MdtDriftCircleContainer.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonHoughDefs.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonR4::MuonPhiHoughTransformAlg::recoverSinglePhiMax
HoughSegmentSeed recoverSinglePhiMax(MuonHoughEventData &data, const MuonR4::HoughMaximum &maximum) const
extend an eta maximum with just a single attached phi measurement.
Definition: MuonPhiHoughTransformAlg.cxx:175
MuonR4::MuonPhiHoughTransformAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MuonPhiHoughTransformAlg.cxx:187
MuonR4::MuonPhiHoughTransformAlg::prepareHoughPlane
StatusCode prepareHoughPlane(MuonHoughEventData &data) const
prepare the hough plane once per event.
Definition: MuonPhiHoughTransformAlg.cxx:42
MuonR4
The CsvMuonSimHitDumper reads a Simulation Hit container for muons and dumps information to csv files...
Definition: MuonSpacePoint.h:11
MuonR4::MuonPhiHoughTransformAlg::m_minSigmasSearchIntercept
DoubleProperty m_minSigmasSearchIntercept
Definition: MuonPhiHoughTransformAlg.h:110
MuonR4::MuonPhiHoughTransformAlg::~MuonPhiHoughTransformAlg
virtual ~MuonPhiHoughTransformAlg()=default
MuonR4::HoughMaximum_impl
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:16
MuonR4::MuonPhiHoughTransformAlg::m_nBinsTanPhi
IntegerProperty m_nBinsTanPhi
Definition: MuonPhiHoughTransformAlg.h:114
MuonSpacePointContainer.h
MuonR4::MuonPhiHoughTransformAlg::m_targetResoTanPhi
DoubleProperty m_targetResoTanPhi
Definition: MuonPhiHoughTransformAlg.h:102
MuonR4::MuonPhiHoughTransformAlg::MuonPhiHoughTransformAlg
MuonPhiHoughTransformAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonPhiHoughTransformAlg.cxx:14
MuonR4::MuonPhiHoughTransformAlg::m_maxima
SG::ReadHandleKey< StationHoughMaxContainer > m_maxima
Definition: MuonPhiHoughTransformAlg.h:94
StationHoughMaxContainer.h
MuonR4::HoughSegmentSeed_impl
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: HoughSegmentSeed.h:13
MuonR4::MuonPhiHoughTransformAlg::countIncompatibleEtaHits
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...
Definition: MuonPhiHoughTransformAlg.cxx:59
MuonR4::MuonPhiHoughTransformAlg::m_maxEtaHolesOnMax
IntegerProperty m_maxEtaHolesOnMax
Definition: MuonPhiHoughTransformAlg.h:119
IMuonIdHelperSvc.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37