ATLAS Offline Software
SegmentFittingAlg.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 MUONR4_MUONPATTERNRECOGNTIONALGS_SEGMENTFITTINGALG__H
5 #define MUONR4_MUONPATTERNRECOGNTIONALGS_SEGMENTFITTINGALG__H
6 
7 
11 
12 
16 
20 
23 
25 
26 
27 #include <set>
28 
29 
30 namespace MuonR4 {
35  public:
36  using AthReentrantAlgorithm::AthReentrantAlgorithm;
37  virtual ~SegmentFittingAlg();
38  virtual StatusCode initialize() override;
39  virtual StatusCode execute(const EventContext& ctx) const override;
40  private:
42 
43  std::vector<std::unique_ptr<Segment>> fitSegmentSeed(const EventContext& ctx,
44  const ActsTrk::GeometryContext& gctx,
45  const SegmentSeed* seed) const;
46 
48  std::vector<std::unique_ptr<Segment>>& segmentCandidates) const;
49 
51  SG::ReadHandleKey<SegmentSeedContainer> m_seedKey{this, "ReadKey", "MuonHoughStationSegmentSeeds"};
52  // write handle key for the output segment seeds
53  SG::WriteHandleKey<SegmentContainer> m_outSegments{this, "OutSegmentContainer", "R4MuonSegments"};
54  // access to the ACTS geometry context
55  SG::ReadHandleKey<ActsTrk::GeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
57  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
59  ToolHandle<ISpacePointCalibrator> m_calibTool{this, "Calibrator", "" };
61  ToolHandle<MuonValR4::IPatternVisualizationTool> m_visionTool{this, "VisualizationTool", ""};
62 
63  Gaudi::Property<bool> m_doT0Fit{this, "fitSegmentT0", true};
64  Gaudi::Property<bool> m_recalibInFit{this, "recalibInFit" , false};
66  Gaudi::Property<bool> m_tryPatternPars{this, "tryPatternPars", false};
68  Gaudi::Property<bool> m_hessianResidual{this, "useHessianResidual", false};
70  Gaudi::Property<bool> m_doBeamspotConstraint{this, "doBeamspotConstraint", false};
71  Gaudi::Property<double> m_beamSpotR{this, "BeamSpotRadius", 30.* Gaudi::Units::cm};
72  Gaudi::Property<double> m_beamSpotL{this, "BeamSpotLength", 2. * Gaudi::Units::m};
73 
74 
76  Gaudi::Property<double> m_seedHitChi2{this, "ResoSeedHitAssoc", 5. };
79  Gaudi::Property<bool> m_recalibSeed{this, "SeedRecalibrate", false};
81  Gaudi::Property<double> m_outlierRemovalCut{this, "OutlierRemoval", 5.};
82  Gaudi::Property<double> m_recoveryPull{this, "RecoveryPull", 5.};
84  Gaudi::Property<unsigned> m_precHitCut{this, "PrecHitCut" , 3};
86  Gaudi::Property<bool> m_useFastFitter{this, "useFastFitter", true};
88  Gaudi::Property<unsigned> m_maxIter{this, "maxIterations", 50};
90  std::unique_ptr<SegmentFit::SegmentAmbiSolver> m_ambiSolver{};
92  std::unique_ptr<SegmentFit::SegmentLineFitter> m_fitter{};
93 
94  };
95 }
96 
97 
98 #endif
MuonR4::SegmentFittingAlg::m_outlierRemovalCut
Gaudi::Property< double > m_outlierRemovalCut
Cut on the segment chi2 / nDoF to launch the outlier removal.
Definition: SegmentFittingAlg.h:81
MuonR4::SegmentFittingAlg::m_outSegments
SG::WriteHandleKey< SegmentContainer > m_outSegments
Definition: SegmentFittingAlg.h:53
MuonR4::SegmentFittingAlg::m_tryPatternPars
Gaudi::Property< bool > m_tryPatternPars
Try first to fit the pattern parameters. Then proceed with the straw line tangents.
Definition: SegmentFittingAlg.h:66
IPatternVisualizationTool.h
MuonR4::SegmentFittingAlg::m_recoveryPull
Gaudi::Property< double > m_recoveryPull
Definition: SegmentFittingAlg.h:82
MuonR4::SegmentFittingAlg::m_beamSpotL
Gaudi::Property< double > m_beamSpotL
Definition: SegmentFittingAlg.h:72
MuonR4::SegmentFittingAlg::fitSegmentSeed
std::vector< std::unique_ptr< Segment > > fitSegmentSeed(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const SegmentSeed *seed) const
Definition: SegmentFittingAlg.cxx:119
MuonR4::SegmentFittingAlg::m_beamSpotR
Gaudi::Property< double > m_beamSpotR
Definition: SegmentFittingAlg.h:71
MuonR4::SegmentFittingAlg::initialize
virtual StatusCode initialize() override
Definition: SegmentFittingAlg.cxx:27
MuonR4::SegmentFittingAlg::m_doT0Fit
Gaudi::Property< bool > m_doT0Fit
Definition: SegmentFittingAlg.h:63
ISpacePointCalibrator.h
MuonR4::SegmentFittingAlg::resolveAmbiguities
void resolveAmbiguities(const ActsTrk::GeometryContext &gctx, std::vector< std::unique_ptr< Segment >> &segmentCandidates) const
Definition: SegmentFittingAlg.cxx:158
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
MuonR4::SegmentFittingAlg::m_ambiSolver
std::unique_ptr< SegmentFit::SegmentAmbiSolver > m_ambiSolver
Pointer to the ambiguity reosolution.
Definition: SegmentFittingAlg.h:90
MuonR4::SegmentFittingAlg::Parameters
SegmentFit::Parameters Parameters
Definition: SegmentFittingAlg.h:41
MuonR4::SegmentFittingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc.
Definition: SegmentFittingAlg.h:57
MuonSegmentContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
MuonR4::SegmentFittingAlg::m_recalibInFit
Gaudi::Property< bool > m_recalibInFit
Definition: SegmentFittingAlg.h:64
CalibratedSpacePoint.h
MuonR4::SegmentFittingAlg::m_calibTool
ToolHandle< ISpacePointCalibrator > m_calibTool
Handle to the space point calibrator.
Definition: SegmentFittingAlg.h:59
MuonR4::SegmentFittingAlg::m_precHitCut
Gaudi::Property< unsigned > m_precHitCut
Minimum number of precision hits to accept the segment.
Definition: SegmentFittingAlg.h:84
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonR4::SegmentFittingAlg::m_seedHitChi2
Gaudi::Property< double > m_seedHitChi2
Two mdt seeds are the same if their defining parameters match wihin.
Definition: SegmentFittingAlg.h:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonPatternContainer.h
MuonR4::SegmentFit::Parameters
Acts::Experimental::CompositeSpacePointLineFitter::ParamVec_t Parameters
Definition: MuonHoughDefs.h:46
MuonR4::SegmentFittingAlg::m_hessianResidual
Gaudi::Property< bool > m_hessianResidual
Use the expliciit Hessian in the residual calculation.
Definition: SegmentFittingAlg.h:68
ActsTrk::GeometryContext
Definition: GeometryContext.h:28
MuonR4::SegmentFittingAlg::m_recalibSeed
Gaudi::Property< bool > m_recalibSeed
Toggle seed recalibration.
Definition: SegmentFittingAlg.h:79
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonHoughDefs.h
MuonR4::SegmentFittingAlg::m_doBeamspotConstraint
Gaudi::Property< bool > m_doBeamspotConstraint
Add beamline constraint.
Definition: SegmentFittingAlg.h:70
MuonR4::SegmentFittingAlg::m_fitter
std::unique_ptr< SegmentFit::SegmentLineFitter > m_fitter
Pointer to the actual segment fitter.
Definition: SegmentFittingAlg.h:92
MuonR4::SegmentFittingAlg::m_seedKey
SG::ReadHandleKey< SegmentSeedContainer > m_seedKey
ReadHandle of the seeds.
Definition: SegmentFittingAlg.h:51
MuonR4::SegmentFittingAlg::m_maxIter
Gaudi::Property< unsigned > m_maxIter
Tune the number of iterations.
Definition: SegmentFittingAlg.h:88
MuonR4::SegmentFittingAlg
Algorithm to handle segment fits
Definition: SegmentFittingAlg.h:34
SegmentAmbiSolver.h
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::SegmentFittingAlg::m_geoCtxKey
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Definition: SegmentFittingAlg.h:55
SegmentLineFitter.h
SegmentFitterEventData.h
MuonR4::SegmentSeed
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: SegmentSeed.h:14
MuonR4::SegmentFittingAlg::m_useFastFitter
Gaudi::Property< bool > m_useFastFitter
Use the fast Mdt fitter where possible.
Definition: SegmentFittingAlg.h:86
MuonR4::SegmentFittingAlg::m_visionTool
ToolHandle< MuonValR4::IPatternVisualizationTool > m_visionTool
Pattern visualization tool.
Definition: SegmentFittingAlg.h:61
MuonR4::SegmentFittingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SegmentFittingAlg.cxx:59
ReadDecorHandleKeyArray.h
MuonR4::SegmentFittingAlg::~SegmentFittingAlg
virtual ~SegmentFittingAlg()
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
ServiceHandle< Muon::IMuonIdHelperSvc >