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>;
73 std::tuple<Amg::Vector3D, Amg::Vector3D>
smearSegment(
const Acts::GeometryContext& gctx,
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...
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
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.
ActsTrk::ContextUtility m_ctxProvider
Auxiliary class to access the magnetic field, geometry and calibration context.
Gaudi::Property< double > m_smearRange
Smear interval in terms of standard deviations.
ToolHandle< ISpacePointCalibrator > m_calibTool
Handle to the space point calibrator.
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.
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
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Tracking geometry tool.
Gx2FitterExtension_t m_fitExtension
Fitter setup.
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.
std::tuple< Amg::Vector3D, Amg::Vector3D > smearSegment(const Acts::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.
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.