4#ifndef MUONPATTERNRECOGNITIONALGS_SEGMENTACTSREFITALG_H
5#define MUONPATTERNRECOGNITIONALGS_SEGMENTACTSREFITALG_H
31#include "Acts/Propagator/Navigator.hpp"
32#include "Acts/Propagator/Propagator.hpp"
33#include "Acts/Propagator/StraightLineStepper.hpp"
34#include "Acts/TrackFitting/GlobalChiSquareFitter.hpp"
38 class HepRandomEngine;
47 using AthReentrantAlgorithm::AthReentrantAlgorithm;
48 virtual StatusCode
initialize()
override final;
49 virtual StatusCode
execute(
const EventContext& ctx)
const override final;
53 using Propagator_t = Acts::Propagator<Acts::StraightLineStepper, Acts::Navigator>;
54 using Fitter_t = Acts::Experimental::Gx2Fitter<Propagator_t, ActsTrk::MutableTrackStateBackend>;
57 using Gx2FitterOptions_t = Acts::Experimental::Gx2FitterOptions<ActsTrk::MutableTrackStateBackend>;
75 CLHEP::HepRandomEngine* engine)
const;
94 ToolHandle<MuonR4::ISegmentSelectionTool>
m_segSelector{
this,
"SegmentSelectionTool" ,
"" };
100 ToolHandle<ISpacePointCalibrator>
m_calibTool{
this,
"Calibrator",
"" };
114 Gaudi::Property<unsigned>
m_maxIter{
this,
"maxIter", 50};
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.