ATLAS Offline Software
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 
11 
14 
20 
21 #include <span>
22 #include <vector>
23 
24 
25 namespace MuonR4{
26 
29 using HitLaySpan = std::span<const HitVec,std::dynamic_extent>;
30 
31 enum class HitWindow{
32  tooLow = 0,
33 
34  inside,
35 
36  tooHigh
37 };
38 
40 
41  public:
42  using AthReentrantAlgorithm::AthReentrantAlgorithm;
43  virtual ~CombinatorialNSWSeedFinderAlg() = default;
44  virtual StatusCode initialize() override;
45  virtual StatusCode execute(const EventContext& ctx) const override;
46 
47  private:
48  // read handle key for the input maxima (from a previous eta-transform)
49  SG::ReadHandleKey<EtaHoughMaxContainer> m_etaKey{this, "CombinatorialReadKey", "MuonHoughNswMaxima"};
50 
51  // write handle key for the otuput
52  SG::WriteHandleKey<SegmentSeedContainer> m_writeKey{this, "CombinatorialPhiWriteKey", "MuonHoughNswSegmentSeeds"};
53 
54  // access to the ACTS geometry context
55  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
56 
57  // access to the Muon Id Helper
58  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
59 
60  // access to the Muon Detector Manager
62 
63  std::unique_ptr<SegmentSeed> buildSegmentSeed(HitVec& hits, const AmgSymMatrix(2)& bMatrix, const HoughMaximum& max,
64  const HitLayVec& extensionLayers) const;
65 
66  //extend the seed with compatilbe hits using extrapolation to the layers
67  HitVec extendHits(const Amg::Vector3D& startPos,
68  const Amg::Vector3D& direction,
69  const HitLayVec& stripHitsLayers) const;
70 
71  //build and return seeds from the same eta maximum
72  std::vector<std::unique_ptr<SegmentSeed>> findSeedsFromMaximum(const HoughMaximum& max, const ActsGeometryContext& gctx) const;
73 
75  const HitLayVec& combinatoricLayers) const;
76 
77  HitWindow findHitInWindow(const Amg::Vector3D& startPos,
78  const SpacePoint* testHit,
79  const Amg::Vector3D& dirEstUp,
80  const Amg::Vector3D& dirEstDn) const;
81 
82  //the window in theta to search for hits in the seed extension
83  DoubleProperty m_windowTheta {this, "m_windowTheta", 0.5 * Gaudi::Units::deg};
84 
85  //apply a cut threshold in the pulls during the hit extension
86  DoubleProperty m_minPullThreshold{this, "m_minPullThreshold", 5.};
87 
89  ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
90 
91 
92 
93 
94 
95 };
96 
97 }
98 
99 #endif
MuonR4::CombinatorialNSWSeedFinderAlg::findHitInWindow
HitWindow findHitInWindow(const Amg::Vector3D &startPos, const SpacePoint *testHit, const Amg::Vector3D &dirEstUp, const Amg::Vector3D &dirEstDn) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:49
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:33
MuonR4::CombinatorialNSWSeedFinderAlg::findCombinatoricHits
HitLayVec findCombinatoricHits(const Amg::Vector3D &beamSpot, const HitLayVec &combinatoricLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:89
MuonR4::SpacePointPerLayerSplitter::HitLayVec
std::vector< HitVec > HitLayVec
Definition: SpacePointPerLayerSplitter.h:19
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonR4::HitWindow::tooLow
@ tooLow
MuonR4::CombinatorialNSWSeedFinderAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: CombinatorialNSWSeedFinderAlg.h:89
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
MuonR4::SpacePointPerLayerSplitter::HitVec
std::vector< const SpacePoint * > HitVec
Definition: SpacePointPerLayerSplitter.h:18
MuonR4::CombinatorialNSWSeedFinderAlg
Definition: CombinatorialNSWSeedFinderAlg.h:39
MuonR4::CombinatorialNSWSeedFinderAlg::extendHits
HitVec extendHits(const Amg::Vector3D &startPos, const Amg::Vector3D &direction, const HitLayVec &stripHitsLayers) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:151
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
MuonR4::CombinatorialNSWSeedFinderAlg::~CombinatorialNSWSeedFinderAlg
virtual ~CombinatorialNSWSeedFinderAlg()=default
SpacePointPerLayerSplitter.h
MuonR4::CombinatorialNSWSeedFinderAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: CombinatorialNSWSeedFinderAlg.h:55
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::HitWindow
HitWindow
Definition: CombinatorialNSWSeedFinderAlg.h:31
MuonPatternContainer.h
MuonDetectorManager.h
MuonR4::CombinatorialNSWSeedFinderAlg::m_writeKey
SG::WriteHandleKey< SegmentSeedContainer > m_writeKey
Definition: CombinatorialNSWSeedFinderAlg.h:52
MmIdHelper.h
MuonR4::HitLaySpan
std::span< const HitVec, std::dynamic_extent > HitLaySpan
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:83
MuonR4::HitWindow::inside
@ inside
MuonR4::HitVec
SpacePointPerLayerSplitter::HitVec HitVec
Definition: SpacePointPerLayerSplitter.cxx:11
MuonR4::CombinatorialNSWSeedFinderAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: CombinatorialNSWSeedFinderAlg.cxx:336
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonR4::CombinatorialNSWSeedFinderAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CombinatorialNSWSeedFinderAlg.h:58
MuonR4::CombinatorialNSWSeedFinderAlg::m_etaKey
SG::ReadHandleKey< EtaHoughMaxContainer > m_etaKey
Definition: CombinatorialNSWSeedFinderAlg.h:49
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
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:200
MuonR4::CombinatorialNSWSeedFinderAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: CombinatorialNSWSeedFinderAlg.h:61
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::findSeedsFromMaximum
std::vector< std::unique_ptr< SegmentSeed > > findSeedsFromMaximum(const HoughMaximum &max, const ActsGeometryContext &gctx) const
Definition: CombinatorialNSWSeedFinderAlg.cxx:245
MuonR4::HitLayVec
SpacePointPerLayerSplitter::HitLayVec HitLayVec
Definition: CombinatorialNSWSeedFinderAlg.h:28
ServiceHandle< Muon::IMuonIdHelperSvc >
MuonR4::CombinatorialNSWSeedFinderAlg::m_minPullThreshold
DoubleProperty m_minPullThreshold
Definition: CombinatorialNSWSeedFinderAlg.h:86