ATLAS Offline Software
Loading...
Searching...
No Matches
xAODSegmentCnvTool.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 MUONSEGMENTCNV_XAODSEGMENTCNVTOOL_H
5#define MUONSEGMENTCNV_XAODSEGMENTCNVTOOL_H
6
9
12
15
16namespace MuonR4{
18 class xAODSegmentCnvTool: public extends<AthAlgTool, IxAODSegmentCnvTool> {
19 public:
20 using base_class::base_class;
22
23 StatusCode initialize() override;
24
26 xAOD::MuonSegment* convertSegment(const EventContext& ctx,
27 const MuonR4::Segment& inSegment,
28 DataShip& ship) const override;
29
30 private:
33 struct Counter{
34 std::uint8_t precision{0};
35 std::uint8_t triggerPhi{0};
36 std::uint8_t triggerEta{0};
38 inline friend std::ostream& operator<<(std::ostream& ostr, const Counter& c) {
39 return ostr<<std::format("nPrecision: {:}, nTriggerPhi: {:}, nTriggerEta: {:}", c.precision, c.triggerPhi, c.triggerEta);
40 }
41 };
42
53 StatusCode linkMeasurements(const Acts::GeometryContext& tgContext,
54 const Segment& inSegment,
55 xAOD::MuonSegment& targetSegment,
56 DataShip& ship) const;
57
62 void evaluateSummary(const EventContext& ctx,
63 xAOD::MuonSegment& segment) const;
64
76 void findHoles(const EventContext& ctx,
77 const Acts::BoundTrackParameters& startPars,
78 const Acts::Surface* target,
79 const std::unordered_set<Identifier>& geoIdsWithHits,
80 Counter& holeCounter) const;
81
84 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
85
88 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
90 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", ""};
93
95 Gaudi::Property<bool> m_estimateHoles{this, "estimateHoles", true};
97 Gaudi::Property<double> m_extraHolePath{this, "extraHolePath", 20.*Gaudi::Units::cm};
98 };
99}
100
101
102#endif
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 -...
Placeholder for what will later be the muon segment EDM representation.
The xAODSegmentCnvTool takes a MuonR4::Segment and converts it into a xAOD::MuonSegment.
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv
Handler to parse the auxiliary beam spot constaint.
void evaluateSummary(const EventContext &ctx, xAOD::MuonSegment &segment) const
Calculate the number of hits, outliers and holes on the segment and set the hit summary fields of the...
xAOD::MuonSegment * convertSegment(const EventContext &ctx, const MuonR4::Segment &inSegment, DataShip &ship) const override
Convert a MuonR4::Segment to an xAOD::MuonSegment and decorate it with the necessary information.
StatusCode initialize() override
ActsTrk::ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
Gaudi::Property< double > m_extraHolePath
Extra path length for the propagation after the last surface was crossed.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc for Identifier printing & manipulation.
StatusCode linkMeasurements(const Acts::GeometryContext &tgContext, const Segment &inSegment, xAOD::MuonSegment &targetSegment, DataShip &ship) const
Decorate the prd links onto the output muon segment.
Gaudi::Property< bool > m_estimateHoles
Flag to tell whether the hole summary shall be written.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Tracking geometry tool to search for holes.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Acts extrapolation tool to search for holes.
void findHoles(const EventContext &ctx, const Acts::BoundTrackParameters &startPars, const Acts::Surface *target, const std::unordered_set< Identifier > &geoIdsWithHits, Counter &holeCounter) const
Find potential sensitive surfaces crossed by the segment but without contributing measurements.
This header ties the generic definitions in this package.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Helper struct to keep track of the number of precision, trigger phi and trigger eta hits.
friend std::ostream & operator<<(std::ostream &ostr, const Counter &c)
stream the counter to ostream