ATLAS Offline Software
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 
34 #include "GaudiKernel/SystemOfUnits.h"
35 
36 
37 namespace MuonR4{
39  public:
40  using AthReentrantAlgorithm::AthReentrantAlgorithm;
41 
42  virtual ~MsTrackFindingAlg();
45  virtual StatusCode initialize() override final;
47  virtual StatusCode execute(const EventContext& ctx) const override final;
48 
49  using OptBoundPars_t = Acts::Result<Acts::BoundTrackParameters>;
51  private:
56  std::unique_ptr<MsTrackSeedContainer> findTrackSeeds(const EventContext& ctx,
58 
67  bool fitSeedCandidate(const Acts::GeometryContext& gCtx,
68  const Acts::MagneticFieldContext& mCtx,
69  const Acts::CalibrationContext& cCtx,
70  const MsTrackSeed& seed,
71  ActsTrk::MutableTrackContainer& outContainer) const;
72 
79  std::pair<OptBoundPars_t, MeasVec_t> prepareFit(const Acts::GeometryContext& tgContext,
80  const Acts::MagneticFieldContext& mfContext,
81  const Acts::CalibrationContext& calContext,
82  const MsTrackSeed& seed) const;
83 
84  void visualizeObj(const Acts::GeometryContext& tgContext,
85  const Acts::CalibrationContext& calContext,
86  const MsTrackSeed& seed,
87  const OptBoundPars_t& parsToExt) const;
88 
91  SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segmentKey{this, "SegmentContainer", "MuonSegmentsFromR4" };
93  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
97  SG::WriteHandleKey<MsTrackSeedContainer> m_msTrkSeedKey{this, "MsTrkSeedKey", "MsTrackSeeds"};
99  ToolHandle<ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
101  ToolHandle<ActsTrk::IFitterTool> m_trackFitTool{this, "FittingTool", ""};
102 
103  ToolHandle<ISpacePointCalibrator> m_calibTool{this, "Calibrator", ""};
105  PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
107  ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool" ,"" };
109  ToolHandle<MuonValR4::ITrackVisualizationTool> m_visualizationTool{this, "VisualizationTool", ""};
111  Gaudi::Property<double> m_seedHalfLength{this, "SeedHalfLength", 50.*Gaudi::Units::cm};
113  SG::WriteHandleKey<ActsTrk::TrackContainer> m_writeKey{this, "TrackWriteKey", "MsTracks"};
115  Gaudi::Property<bool> m_drawEvent{this , "drawEvent", false };
116 
118  std::unique_ptr<MsTrackSeeder> m_seeder{};
119  };
120 }
121 
122 #endif
ReadHandleKeyArray.h
MuonR4::MsTrackFindingAlg
Definition: MsTrackFindingAlg.h:38
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:62
MuonR4::MsTrackFindingAlg::m_msTrkSeedKey
SG::WriteHandleKey< MsTrackSeedContainer > m_msTrkSeedKey
Temporary container write handle to push the seeds to store gate for later efficiency analysis.
Definition: MsTrackFindingAlg.h:97
MuonR4::MsTrackSeed
Definition: MsTrackSeed.h:18
MuonR4::MsTrackFindingAlg::m_trackFitTool
ToolHandle< ActsTrk::IFitterTool > m_trackFitTool
Track fitting tool.
Definition: MsTrackFindingAlg.h:101
MsTrackSeeder.h
ActsTrk::MutableTrackContainer
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Definition: TrackContainer.h:27
xAOD::UncalibratedMeasurement
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
Definition: UncalibratedMeasurement.h:13
MuonR4::MsTrackFindingAlg::initialize
virtual StatusCode initialize() override final
Standard algorithm hook to setup the extrapolator, retrieve the tools and declare algorithm's data de...
Definition: MsTrackFindingAlg.cxx:30
IExtrapolationTool.h
ISpacePointCalibrator.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ITrackVisualizationTool.h
MuonR4::MsTrackFindingAlg::MeasVec_t
std::vector< const xAOD::UncalibratedMeasurement * > MeasVec_t
Definition: MsTrackFindingAlg.h:50
MuonSegmentContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
MuonR4::MsTrackFindingAlg::visualizeObj
void visualizeObj(const Acts::GeometryContext &tgContext, const Acts::CalibrationContext &calContext, const MsTrackSeed &seed, const OptBoundPars_t &parsToExt) const
Definition: MsTrackFindingAlg.cxx:191
MuonR4::MsTrackFindingAlg::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
Definition: MsTrackFindingAlg.h:105
MuonR4::MsTrackFindingAlg::fitSeedCandidate
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.
Definition: MsTrackFindingAlg.cxx:216
MuonR4::MsTrackFindingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Standard algorithm execution hook.
Definition: MsTrackFindingAlg.cxx:57
SG::WriteHandleKey< MsTrackSeedContainer >
Acts
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
MuonR4::MsTrackFindingAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the MuonDetectorManager.
Definition: MsTrackFindingAlg.h:95
MuonR4::MsTrackFindingAlg::~MsTrackFindingAlg
virtual ~MsTrackFindingAlg()
ISegmentSelectionTool.h
MuonPatternContainer.h
MsTrackSeed.h
MuonDetectorManager.h
MuonR4::MsTrackFindingAlg::m_segmentKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment contai...
Definition: MsTrackFindingAlg.h:91
MuonR4::MsTrackFindingAlg::findTrackSeeds
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.
Definition: MsTrackFindingAlg.cxx:102
MuonR4::MsTrackFindingAlg::m_seedHalfLength
Gaudi::Property< double > m_seedHalfLength
Maximum search window to search segments for.
Definition: MsTrackFindingAlg.h:111
MuonR4::MsTrackFindingAlg::m_calibTool
ToolHandle< ISpacePointCalibrator > m_calibTool
Definition: MsTrackFindingAlg.h:103
xAOD::MuonSegmentContainer
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
Definition: MuonSegmentContainer.h:14
ReadCondHandleKey.h
AthReentrantAlgorithm.h
MuonR4::MsTrackFindingAlg::m_writeKey
SG::WriteHandleKey< ActsTrk::TrackContainer > m_writeKey
Key to the output track container.
Definition: MsTrackFindingAlg.h:113
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonR4::MsTrackFindingAlg::OptBoundPars_t
Acts::Result< Acts::BoundTrackParameters > OptBoundPars_t
Definition: MsTrackFindingAlg.h:49
MuonR4::MsTrackFindingAlg::prepareFit
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 &.
Definition: MsTrackFindingAlg.cxx:114
Result
Definition: fbtTestBasics.cxx:50
MuonR4::MsTrackFindingAlg::m_drawEvent
Gaudi::Property< bool > m_drawEvent
Dump the segments & the pre estimated track parameters.
Definition: MsTrackFindingAlg.h:115
MuonR4::MsTrackFindingAlg::m_extrapolationTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Definition: MsTrackFindingAlg.h:107
IFitterTool.h
MuonR4::MsTrackFindingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Definition: MsTrackFindingAlg.h:93
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::MsTrackFindingAlg::m_visualizationTool
ToolHandle< MuonValR4::ITrackVisualizationTool > m_visualizationTool
Visualization tool to debug the track finding.
Definition: MsTrackFindingAlg.h:109
MuonR4::MsTrackSeedContainer
std::vector< MsTrackSeed > MsTrackSeedContainer
Definition: MsTrackSeed.h:63
ITrackingGeometryTool.h
private
#define private
Definition: xAODTruthCnvAlg.h:20
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
TrackContainerHandlesHelper.h
TrackContainer.h
MuonR4::MsTrackFindingAlg::m_seeder
std::unique_ptr< MsTrackSeeder > m_seeder
Pointer to the actual seeder implementation.
Definition: MsTrackFindingAlg.h:118
MuonR4::MsTrackFindingAlg::m_segSelector
ToolHandle< ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
Definition: MsTrackFindingAlg.h:99
TrackParticleContainer.h
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >