ATLAS Offline Software
Loading...
Searching...
No Matches
MsTrackFindingAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONTRACKFINIDNGALGS_MSTRACKFINIDNGALG_H
5#define MUONTRACKFINIDNGALGS_MSTRACKFINIDNGALG_H
6
8
9
13
17
20
25
30
31
35#include "GaudiKernel/SystemOfUnits.h"
36
37
38namespace MuonR4{
40 public:
41 using AthReentrantAlgorithm::AthReentrantAlgorithm;
42
46 virtual StatusCode initialize() override final;
48 virtual StatusCode execute(const EventContext& ctx) const override final;
49
50 using OptBoundPars_t = Acts::Result<Acts::BoundTrackParameters>;
51 using MeasVec_t = std::vector<const xAOD::UncalibratedMeasurement*>;
52 private:
58 const xAOD::MuonSegmentContainer& segments) const;
59
68 bool fitSeedCandidate(const Acts::GeometryContext& gCtx,
69 const Acts::MagneticFieldContext& mCtx,
70 const Acts::CalibrationContext& cCtx,
71 const MsTrackSeed& seed,
72 ActsTrk::MutableTrackContainer& outContainer) const;
73
80 std::pair<OptBoundPars_t, MeasVec_t> prepareFit(const Acts::GeometryContext& tgContext,
81 const Acts::MagneticFieldContext& mfContext,
82 const Acts::CalibrationContext& calContext,
83 const MsTrackSeed& seed) const;
84
86
89 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segmentKey{this, "SegmentContainer", "MuonSegmentsFromR4" };
91 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
95 SG::WriteHandleKey<MsTrackSeedContainer> m_msTrkSeedKey{this, "MsTrkSeedKey", "MsTrackSeeds"};
97 ToolHandle<ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
99 ToolHandle<ActsTrk::IFitterTool> m_trackFitTool{this, "FittingTool", ""};
101 ToolHandle<ISpacePointCalibrator> m_calibTool{this, "Calibrator", ""};
103 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
105 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool" ,"" };
107 ToolHandle<MuonValR4::ITrackVisualizationTool> m_visualizationTool{this, "VisualizationTool", ""};
109 Gaudi::Property<double> m_seedHalfLength{this, "SeedHalfLength", 50.*Gaudi::Units::cm};
111 SG::WriteHandleKey<ActsTrk::TrackContainer> m_writeKey{this, "TrackWriteKey", "MsTracks"};
113 Gaudi::Property<bool> m_useMlSeeder{this, "UseMlSeeder", false, "Use segment-edge ML candidate ids to split seeding"};
115 Gaudi::Property<std::string> m_mlCandidateDecoration{this, "MlCandidateDecoration", "trackCandidateIds", "Segment vector<unsigned> decoration with ML track-candidate ids"};
116 Gaudi::Property<unsigned> m_mlMinSegmentsPerCandidate{this, "MlMinSegmentsPerCandidate", 2};
118 this, "MlFallbackToBaselineIfUndecorated", true,
119 "Run baseline seeder if the input segment container has no ML decoration"};
121 this, "MlFallbackToBaselineIfNoCandidates", false,
122 "Run baseline seeder if ML grouping produced no seed candidates"};
123 Gaudi::Property<bool> m_mlRunCandidatesInParallel{
124 this, "MlRunCandidatesInParallel", true,
125 "Run baseline seeding independently for ML candidate groups in parallel"};
127 this, "MlCandidateDecorationKey", "", "Scheduler dependency on ML candidate decoration"};
128
129 std::unique_ptr<MsTrackSeeder> m_seeder{};
131 std::unique_ptr<MlMsTrackSeeder> m_mlSeeder{};
132 };
133}
134
135#endif
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< unsigned > m_mlMinSegmentsPerCandidate
Gaudi::Property< bool > m_mlRunCandidatesInParallel
Acts::Result< Acts::BoundTrackParameters > OptBoundPars_t
Gaudi::Property< double > m_seedHalfLength
Maximum search window to search segments for.
Gaudi::Property< bool > m_mlFallbackToBaselineIfNoCandidates
Gaudi::Property< bool > m_mlFallbackToBaselineIfUndecorated
std::unique_ptr< MsTrackSeedContainer > findTrackSeeds(const EventContext &ctx, const xAOD::MuonSegmentContainer &segments) const
Iterates over the search tree and combines close-by segments to a track seed.
std::vector< const xAOD::UncalibratedMeasurement * > MeasVec_t
SG::WriteHandleKey< ActsTrk::TrackContainer > m_writeKey
Key to the output track container.
std::unique_ptr< MsTrackSeeder > m_seeder
Pointer to the actual seeder implementation.
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
virtual StatusCode execute(const EventContext &ctx) const override final
Standard algorithm execution hook.
std::unique_ptr< MlMsTrackSeeder > m_mlSeeder
Optional ML-wrapper seeder implementation.
ToolHandle< ISpacePointCalibrator > m_calibTool
Calibration tool to fill the track states.
const MsTrackSeeder & baselineSeeder() const
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool
Visualization tool to debug the track finding.
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the MuonDetectorManager.
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
virtual StatusCode initialize() override final
Standard algorithm hook to setup the extrapolator, retrieve the tools and declare algorithm's data de...
ToolHandle< ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
std::pair< OptBoundPars_t, MeasVec_t > prepareFit(const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed) const
Prepares the input by the fit by collecting the measurements on the segment &.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Gaudi::Property< bool > m_useMlSeeder
Use ML-guided segment grouping before baseline seeding.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment contai...
Gaudi::Property< std::string > m_mlCandidateDecoration
Segment decoration containing vector<unsigned> candidate IDs.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_mlCandidateDecorKey
bool fitSeedCandidate(const Acts::GeometryContext &gCtx, const Acts::MagneticFieldContext &mCtx, const Acts::CalibrationContext &cCtx, const MsTrackSeed &seed, ActsTrk::MutableTrackContainer &outContainer) const
Attempts to fit the track seed candidate to a full track and returns whether the fit succeeded.
Helper class to group muon sgements that may belong to a muon trajectory.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
STL class.
STL class.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
This header ties the generic definitions in this package.
std::vector< MsTrackSeed > MsTrackSeedContainer
Definition MsTrackSeed.h:63
Forward declaration.
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private