ATLAS Offline Software
Loading...
Searching...
No Matches
SegmentFittingAlg.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 MUONR4_MUONPATTERNRECOGNTIONALGS_SEGMENTFITTINGALG__H
5#define MUONR4_MUONPATTERNRECOGNTIONALGS_SEGMENTFITTINGALG__H
6
7
11
12
16
20
24
25
26namespace MuonR4 {
36 public:
37 using AthReentrantAlgorithm::AthReentrantAlgorithm;
39 virtual StatusCode initialize() override;
40 virtual StatusCode execute(const EventContext& ctx) const override;
41 private:
42 using SegmentVec_t = std::vector<std::unique_ptr<Segment>>;
43
54 SegmentVec_t fitSegmentSeed(const EventContext& ctx,
55 const ActsTrk::GeometryContext& gctx,
56 const SegmentSeed* seed) const;
63 SegmentVec_t& segmentCandidates) const;
64
66 SG::ReadHandleKey<SegmentSeedContainer> m_seedKey{this, "ReadKey", "MuonHoughStationSegmentSeeds"};
67 // write handle key for the output segment seeds
68 SG::WriteHandleKey<SegmentContainer> m_outSegments{this, "OutSegmentContainer", "R4MuonSegments"};
69 // access to the ACTS geometry context
70 SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
72 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
74 ToolHandle<ISpacePointCalibrator> m_calibTool{this, "Calibrator", "" };
76 ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
77
78 Gaudi::Property<bool> m_doT0Fit{this, "fitSegmentT0", true};
79 Gaudi::Property<bool> m_recalibInFit{this, "recalibInFit" , false};
81 Gaudi::Property<bool> m_tryPatternPars{this, "tryPatternPars", false};
83 Gaudi::Property<bool> m_hessianResidual{this, "useHessianResidual", false};
85 Gaudi::Property<bool> m_doBeamspotConstraint{this, "doBeamspotConstraint", false};
86 Gaudi::Property<double> m_beamSpotR{this, "BeamSpotRadius", 30.* Gaudi::Units::cm};
87 Gaudi::Property<double> m_beamSpotL{this, "BeamSpotLength", 2. * Gaudi::Units::m};
89 Gaudi::Property<double> m_seedHitChi2{this, "ResoSeedHitAssoc", 5. };
92 Gaudi::Property<bool> m_recalibSeed{this, "SeedRecalibrate", false};
94 Gaudi::Property<double> m_outlierRemovalCut{this, "OutlierRemoval", 5.};
95 Gaudi::Property<double> m_recoveryPull{this, "RecoveryPull", 5.};
97 Gaudi::Property<unsigned> m_precHitCut{this, "PrecHitCut" , 3};
99 Gaudi::Property<bool> m_useFastFitter{this, "useFastFitter", true};
101 Gaudi::Property<bool> m_fastPreFitter{this, "useFastPreFitter", false};
103 Gaudi::Property<unsigned> m_maxIter{this, "maxIterations", 50};
105 Gaudi::Property<unsigned> m_busyLayerLimit{this, "busyLayerLimit", 2};
107 std::unique_ptr<SegmentFit::SegmentAmbiSolver> m_ambiSolver{};
109 std::unique_ptr<SegmentFit::SegmentLineFitter> m_fitter{};
111 std::unique_ptr<SegmentFit::MdtSegmentSeedGenerator> m_seeder{};
114 std::unique_ptr<SegmentFit::MdtSegmentSeedGenerator> m_seederBEE{};
115 };
116}
117
118
119#endif
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
The SegmentFittingAlg fits straight lines to the Mdt/Rpc/Tgc hits associated with the SegmentSeedPatt...
std::unique_ptr< SegmentFit::SegmentAmbiSolver > m_ambiSolver
Pointer to the ambiguity reosolution.
Gaudi::Property< unsigned > m_precHitCut
Minimum number of precision hits to accept the segment.
Gaudi::Property< bool > m_hessianResidual
Use the expliciit Hessian in the residual calculation.
virtual StatusCode initialize() override
Gaudi::Property< bool > m_recalibSeed
Toggle seed recalibration.
Gaudi::Property< double > m_seedHitChi2
Two mdt seeds are the same if their defining parameters match wihin.
Gaudi::Property< bool > m_useFastFitter
Use the fast Mdt fitter where possible.
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Gaudi::Property< double > m_beamSpotL
Gaudi::Property< bool > m_recalibInFit
SG::WriteHandleKey< SegmentContainer > m_outSegments
SegmentVec_t fitSegmentSeed(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const SegmentSeed *seed) const
Fit the hits from the pattern seed to segment candidates.
Gaudi::Property< bool > m_fastPreFitter
The fast fitter is treated as a pre fitter.
std::unique_ptr< SegmentFit::MdtSegmentSeedGenerator > m_seederBEE
Pointer to the L-R segment seeder used for the BEE chambers -> increased hit occupancy.
void resolveAmbiguities(const ActsTrk::GeometryContext &gctx, SegmentVec_t &segmentCandidates) const
Resolve the ambiguity amongst the segment candidates within a spectrometer sector.
std::unique_ptr< SegmentFit::MdtSegmentSeedGenerator > m_seeder
Pointer to the L-R segment seeder.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc.
Gaudi::Property< bool > m_doBeamspotConstraint
Add beamline constraint.
ToolHandle< ISpacePointCalibrator > m_calibTool
Handle to the space point calibrator.
std::unique_ptr< SegmentFit::SegmentLineFitter > m_fitter
Pointer to the actual segment fitter.
std::vector< std::unique_ptr< Segment > > SegmentVec_t
SegmentFit::Parameters Parameters
Gaudi::Property< bool > m_doT0Fit
SG::ReadHandleKey< SegmentSeedContainer > m_seedKey
ReadHandle of the seeds.
Gaudi::Property< double > m_recoveryPull
Gaudi::Property< double > m_beamSpotR
Gaudi::Property< unsigned > m_maxIter
Tune the number of iterations.
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Gaudi::Property< unsigned > m_busyLayerLimit
Cut on the number of hits per layer to use the layer for seeding.
Gaudi::Property< double > m_outlierRemovalCut
Cut on the segment chi2 / nDoF to launch the outlier removal.
Gaudi::Property< bool > m_tryPatternPars
Try first to fit the pattern parameters. Then proceed with the straw line tangents.
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition SegmentSeed.h:14
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
This header ties the generic definitions in this package.