Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CombinatorialNSWSeedFinderAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONR4_MUONPATTERNRECOGNITIONALGS_COMBINATORIALNSWSEEDFINDERALG_H
6 #define MUONR4_MUONPATTERNRECOGNITIONALGS_COMBINATORIALNSWSEEDFINDERALG_H
7 
12 
15 
21 
22 #include <span>
23 #include <vector>
24 
25 
26 namespace MuonR4{
27 
30 using HitLaySpan = std::span<const HitVec,std::dynamic_extent>;
31 
32 enum class HitWindow{
33  tooLow = 0,
34 
35  inside,
36 
37  tooHigh
38 };
39 
41 
42  public:
43  using AthReentrantAlgorithm::AthReentrantAlgorithm;
44  virtual ~CombinatorialNSWSeedFinderAlg() = default;
45  virtual StatusCode initialize() override;
46  virtual StatusCode execute(const EventContext& ctx) const override;
47 
48  private:
49 
52  template <class ContainerType> StatusCode retrieveContainer(const EventContext& ctx,
54  const ContainerType* & contToPush) const;
55 
56 
57  // read handle key for the input maxima (from a previous eta-transform)
58  SG::ReadHandleKey<EtaHoughMaxContainer> m_etaKey{this, "CombinatorialReadKey", "MuonHoughNswMaxima"};
59 
60  // write handle key for the otuput
61  SG::WriteHandleKey<SegmentSeedContainer> m_writeKey{this, "CombinatorialPhiWriteKey", "MuonHoughNswSegmentSeeds"};
62 
63  // access to the ACTS geometry context
64  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
65 
66  // access to the Muon Id Helper
67  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
68 
69  // access to the Muon Detector Manager
71 
72  std::unique_ptr<SegmentSeed> buildSegmentSeed(HitVec& hits, const AmgSymMatrix(2)& bMatrix, const HoughMaximum& max,
73  const HitLayVec& extensionLayers) const;
74 
75  //extend the seed with compatilbe hits using extrapolation to the layers
76  HitVec extendHits(const Amg::Vector3D& startPos,
77  const Amg::Vector3D& direction,
78  const HitLayVec& stripHitsLayers) const;
79 
80  //build and return seeds from the same eta maximum
81  std::vector<std::unique_ptr<SegmentSeed>> findSeedsFromMaximum(const HoughMaximum& max, const ActsGeometryContext& gctx) const;
82 
84  const HitLayVec& combinatoricLayers) const;
85 
86  HitWindow findHitInWindow(const Amg::Vector3D& startPos,
87  const SpacePoint* testHit,
88  const Amg::Vector3D& dirEstUp,
89  const Amg::Vector3D& dirEstDn) const;
90 
91  //the window in theta to search for hits in the seed extension
92  DoubleProperty m_windowTheta {this, "m_windowTheta", 0.5 * Gaudi::Units::deg};
93 
94  //apply a cut threshold in the pulls during the hit extension
95  DoubleProperty m_minPullThreshold{this, "m_minPullThreshold", 5.};
96 
98  ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
99 
100 
101 
102 
103 
104 };
105 
106 }
107 
108 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonR4::CombinatorialNSWSeedFinderAlg::findHitInWindow
HitWindow findHitInWindow(const Amg::Vector3D &startPos, const SpacePoint *testHit, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:63
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
IPatternVisualizationTool.h
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonR4::CombinatorialNSWSeedFinderAlg::initialize
virtual StatusCode initialize() override
Definition: CombinatorialNSWSeedFinderAlg.cxx:32
MuonR4::CombinatorialNSWSeedFinderAlg::findCombinatoricHits
HitLayVec findCombinatoricHits(const Amg::Vector3D &beamSpot, const HitLayVec &combinatoricLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:103
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonR4::HitVec
SpacePointPerLayerSorter::HitVec HitVec
Definition: SpacePointPerLayerSorter.cxx:9
MuonR4::HitWindow::tooLow
@ tooLow
MuonR4::CombinatorialNSWSeedFinderAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: CombinatorialNSWSeedFinderAlg.h:98
SG::ReadHandleKey< ContainerType >
MuonR4::CombinatorialNSWSeedFinderAlg
Definition: CombinatorialNSWSeedFinderAlg.h:40
MuonR4::CombinatorialNSWSeedFinderAlg::extendHits
HitVec extendHits(const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLayVec &stripHitsLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:165
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
MuonR4::CombinatorialNSWSeedFinderAlg::~CombinatorialNSWSeedFinderAlg
virtual ~CombinatorialNSWSeedFinderAlg()=default
MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: CombinatorialNSWSeedFinderAlg.h:64
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonR4::SpacePointPerLayerSorter::HitVec
std::vector< const SpacePoint * > HitVec
Definition: SpacePointPerLayerSorter.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::HitWindow
HitWindow
Definition: CombinatorialNSWSeedFinderAlg.h:32
MuonPatternContainer.h
MuonDetectorManager.h
MuonR4::CombinatorialNSWSeedFinderAlg::m_writeKey
SG::WriteHandleKey< SegmentSeedContainer > m_writeKey
Definition: CombinatorialNSWSeedFinderAlg.h:61
MmIdHelper.h
MuonR4::HitLaySpan
std::span< const HitVec, std::dynamic_extent > HitLaySpan
Definition: CombinatorialNSWSeedFinderAlg.h:30
MuonR4::HitLayVec
SpacePointPerLayerSorter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:29
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
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonHoughDefs.h
MuonR4::CombinatorialNSWSeedFinderAlg::m_windowTheta
DoubleProperty m_windowTheta
Definition: CombinatorialNSWSeedFinderAlg.h:92
MuonR4::HitWindow::inside
@ inside
MuonR4::CombinatorialNSWSeedFinderAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: CombinatorialNSWSeedFinderAlg.cxx:350
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CombinatorialNSWSeedFinderAlg.h:67
MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey
SG::ReadHandleKey< EtaHoughMaxContainer > m_etaKey
Definition: CombinatorialNSWSeedFinderAlg.h:58
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::HoughMaximum
Data class to represent an eta maximum in hough space.
Definition: HoughMaximum.h:14
MuonR4::SpacePointPerLayerSorter::HitLayVec
std::vector< HitVec > HitLayVec
Definition: SpacePointPerLayerSorter.h:17
SpacePointContainer.h
MuonR4::CombinatorialNSWSeedFinderAlg::buildSegmentSeed
std::unique_ptr< SegmentSeed > buildSegmentSeed(HitVec &hits, const AmgSymMatrix(2)&bMatrix, const HoughMaximum &max, const HitLayVec &extensionLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:214
MuonR4::CombinatorialNSWSeedFinderAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: CombinatorialNSWSeedFinderAlg.h:70
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:455
MuonR4::HitWindow::tooHigh
@ tooHigh
MuonR4::AmgSymMatrix
const AmgSymMatrix(2) &SpacePoint
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/src/SpacePoint.cxx:150
MuonR4::CombinatorialNSWSeedFinderAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContainerType > &key, const ContainerType *&contToPush) const
Helper method to fetch data from StoreGate.
Definition: CombinatorialNSWSeedFinderAlg.cxx:49
SpacePointPerLayerSorter.h
MuonR4::CombinatorialNSWSeedFinderAlg::findSeedsFromMaximum
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum(const HoughMaximum &max, const ActsGeometryContext &gctx) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:259
ServiceHandle< Muon::IMuonIdHelperSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold
DoubleProperty m_minPullThreshold
Definition: CombinatorialNSWSeedFinderAlg.h:95