ATLAS Offline Software
Loading...
Searching...
No Matches
SegmentActsRefitAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONPATTERNRECOGNITIONALGS_SEGMENTACTSREFITALG_H
5#define MUONPATTERNRECOGNITIONALGS_SEGMENTACTSREFITALG_H
6
10
14
15
20
23
26
29
30
31#include "Acts/Propagator/Navigator.hpp"
32#include "Acts/Propagator/Propagator.hpp"
33#include "Acts/Propagator/StraightLineStepper.hpp"
34#include "Acts/TrackFitting/GlobalChiSquareFitter.hpp"
35
36
37namespace CLHEP{
38 class HepRandomEngine;
39}
44namespace MuonR4{
46 public:
47 using AthReentrantAlgorithm::AthReentrantAlgorithm;
48 virtual StatusCode initialize() override final;
49 virtual StatusCode execute(const EventContext& ctx) const override final;
50
51
53 using Propagator_t = Acts::Propagator<Acts::StraightLineStepper, Acts::Navigator>;
54 using Fitter_t = Acts::Experimental::Gx2Fitter<Propagator_t, ActsTrk::MutableTrackStateBackend>;
55
57 using Gx2FitterOptions_t = Acts::Experimental::Gx2FitterOptions<ActsTrk::MutableTrackStateBackend>;
59 using Gx2FitterExtension_t = Acts::Experimental::Gx2FitterExtensions<ActsTrk::MutableTrackStateBackend>;
60
61 private:
66 const Acts::Surface* portalSurface(const xAOD::UncalibratedMeasurement* measurement,
67 bool entrance) const;
73 std::tuple<Amg::Vector3D, Amg::Vector3D> smearSegment(const ActsTrk::GeometryContext& gctx,
74 const MuonR4::Segment& segment,
75 CLHEP::HepRandomEngine* engine) const;
77 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_readKey{this, "SegmentContainer", "MuonSegmentsFromR4"};
79 SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_writeKey{this, "OutContainer", "ActsRefitSegments"};
86
88 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
90 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
92 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool" ,"" };
94 ToolHandle<MuonR4::ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
96 ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};
98 Gaudi::Property<double> m_smearRange{this, "SmearRange", 1.};
100 ToolHandle<ISpacePointCalibrator> m_calibTool{this, "Calibrator", "" };
102 Gaudi::Property<bool> m_drawEvent{this , "drawEvent", false };
103
107
108 Gaudi::Property<bool> m_smearSegPars{this, "smearSegPars", true};
110 Gaudi::Property<unsigned> m_maxPropSteps{this,"maxPropagationSteps", 100000};
112 Gaudi::Property<unsigned> m_maxTargetSurfSkip{this, "maxTargetSurfSkip", 100000};
114 Gaudi::Property<unsigned> m_maxIter{this, "maxIter", 50};
116 Gaudi::Property<bool> m_doJacobianCorr{this,"freeToBoundJacobian", true};
117
122
123 std::unique_ptr<Fitter_t> m_fitter{};
124
125
126
127 };
128}
129
130#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Utility class to handle the creation of the Auxiliary measurement used in an Acts track fit This clas...
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
An algorithm that can be simultaneously executed in multiple threads.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Range service to smear the segment parameters.
virtual StatusCode execute(const EventContext &ctx) const override final
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_localParsKey
Decorate directly the local segment parameters on to the object.
const MuonGMR4::MuonDetectorManager * m_detMgr
Detector manager to access the spectrometer sector surfaces.
Gaudi::Property< double > m_smearRange
Smear interval in terms of standard deviations.
ToolHandle< ISpacePointCalibrator > m_calibTool
Handle to the space point calibrator.
std::tuple< Amg::Vector3D, Amg::Vector3D > smearSegment(const ActsTrk::GeometryContext &gctx, const MuonR4::Segment &segment, CLHEP::HepRandomEngine *engine) const
Smear the segment's position and direction by one sigma defined by the segment's covariance.
ActsTrk::detail::xAODUncalibMeasSurfAcc m_surfAccessor
Surface accessor delegate for xAOD::UncalibratedMeasurement objects.
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_writeKey
Declare the key for the refitted segment container.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_seedParsKey
Decorate the seed parameters entering the fit.
Acts::Propagator< Acts::StraightLineStepper, Acts::Navigator > Propagator_t
Type erased track fitter function.
ToolHandle< MuonR4::ISegmentSelectionTool > m_segSelector
Segment selection tool to pick the good quality segments.
std::unique_ptr< Fitter_t > m_fitter
Gaudi::Property< bool > m_drawEvent
Dump the segment line in obj files.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_linkKey
Construct a link from the refitted segment to the input segment.
Gaudi::Property< unsigned > m_maxPropSteps
Maximum number of propagation steps.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_readKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container.
Gaudi::Property< bool > m_smearSegPars
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv
Gaudi::Property< unsigned > m_maxTargetSurfSkip
Maximum number of target surfaces.
Acts::Experimental::Gx2Fitter< Propagator_t, ActsTrk::MutableTrackStateBackend > Fitter_t
Acts::Experimental::Gx2FitterExtensions< ActsTrk::MutableTrackStateBackend > Gx2FitterExtension_t
Abbrivation of the fitter extensions.
Acts::Experimental::Gx2FitterOptions< ActsTrk::MutableTrackStateBackend > Gx2FitterOptions_t
Abbrivation of the configuration to launch the fit.
Gaudi::Property< bool > m_doJacobianCorr
Free to bound Jacobian correction.
virtual StatusCode initialize() override final
Gx2FitterExtension_t m_fitExtension
Fitter setup.
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
const Acts::Surface * portalSurface(const xAOD::UncalibratedMeasurement *measurement, bool entrance) const
Returns the entrance / exit portal surface of the tracking volume associated with the measurement sur...
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Gaudi::Property< unsigned > m_maxIter
Maximum number of iterations.
Placeholder for what will later be the muon segment EDM representation.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
This header ties the generic definitions in this package.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.