ATLAS Offline Software
Loading...
Searching...
No Matches
xAODSegmentCnvAlg.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_XAODSEGMENTCNVALG_H
5#define MUONSEGMENTCNV_XAODSEGMENTCNVALG_H
6
7
12
15
18
21
25
29
30
31namespace MuonR4{
46 public:
47 using AthReentrantAlgorithm::AthReentrantAlgorithm;
48
49 virtual StatusCode initialize() override final;
50 virtual StatusCode execute(const EventContext& ctx) const override final;
51
52 private:
59 using PrdLinkVec_t = std::vector<PrdLink_t>;
60
89
92 struct Counter{
93 std::uint8_t precision{0};
94 std::uint8_t triggerPhi{0};
95 std::uint8_t triggerEta{0};
96 };
97
108 StatusCode linkMeasurements(const ActsTrk::GeometryContext& gctx,
109 const Segment& inSegment,
110 xAOD::MuonSegment& targetSegment,
111 PrepDataCollectorShip& ship) const;
112
117 void evaluateSummary(const EventContext& ctx,
118 xAOD::MuonSegment& segment) const;
119
131 void findHoles(const EventContext& ctx,
132 const Acts::BoundTrackParameters& startPars,
133 const Acts::Surface* target,
134 const std::unordered_set<Identifier>& geoIdsWithHits,
135 Counter& holeCounter) const;
136
139 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
140
141 SG::ReadHandleKeyArray<SegmentContainer> m_readKeys{this, "InSegmentKeys", {"R4MuonSegments"}};
143 SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_writeKey{this, "OutSegmentKey", "MuonSegmentsFromR4"};
145 ActsTrk::GeoContextReadKey_t m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
147 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
149 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool", ""};
150
154 DecorKey_t m_prdLinkKey{this, "PrdLinkKey", m_writeKey, "prdLinks" };
156 DecorKey_t m_prdStateKey{this, "PrdStateKey", m_writeKey, "prdState"};
158 DecorKey_t m_localSegParKey{this, "LocalSegParKey", m_writeKey, "localSegPars"};
160 DecorKey_t m_localSegCovKey{this, "LocalCovParKey", m_writeKey, "localSegCov"};
162 DecorKey_t m_parentSegKey{this, "ParentSegmentKey", m_writeKey, "parentSegment"};
164 SG::WriteHandleKey<xAOD::CombinedMuonStripContainer> m_combMeasKey{this, "combinedPrdKey", "CombinedMuonPrds"};
170 Gaudi::Property<bool> m_convertBeamSpot{this, "convertBeamSpot", false};
172 Gaudi::Property<bool> m_estimateHoles{this, "estimateHoles", true};
174 Gaudi::Property<double> m_extraHolePath{this, "extraHolePath", 20.*Gaudi::Units::cm};
175 };
176}
177#endif
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.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
Helper struct to create a new pseudo measurement.
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 -...
An algorithm that can be simultaneously executed in multiple threads.
Placeholder for what will later be the muon segment EDM representation.
The xAODSegmentCnvAlg takes MuonR4::Segments and converts them into a single xAOD::MuonSegmentContain...
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...
DecorKey_t m_prdStateKey
Decoration to the PrdLink state (I.e.
DecorKey_t m_localSegParKey
Decoration of the local segment parameters.
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.
DecorKey_t m_localSegCovKey
Decoration of the local fit covariance parameters.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Tracking geometry tool to search for holes.
DecorKey_t m_parentSegKey
Decoration of the original segment.
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_writeKey
Output segment container key.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Acts extrapolation tool to search for holes.
StatusCode linkMeasurements(const ActsTrk::GeometryContext &gctx, const Segment &inSegment, xAOD::MuonSegment &targetSegment, PrepDataCollectorShip &ship) const
Decorate the prd links onto the output muon segment.
std::vector< PrdLink_t > PrdLinkVec_t
Abrivation of a collection of Prd links.
SG::WriteHandleKey< xAOD::CombinedMuonStripContainer > m_combMeasKey
Auxiliary container to model two measurements in the same gas gap as a single track state.
Gaudi::Property< double > m_extraHolePath
Extra path length for the propagation after the last surface was crossed.
xAOD::UncalibratedMeasurementContainer PrdCont_t
Abrivation to call an uncalibrated measurement container.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > DecorKey_t
Abrivation of the extra declared auxVariables.
DecorKey_t m_prdLinkKey
Decoration to the links to the associated Uncalibrated measurements.
virtual StatusCode execute(const EventContext &ctx) const override final
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc for Identifier printing & manipulation.
virtual StatusCode initialize() override final
Gaudi::Property< bool > m_convertBeamSpot
Flag to convert the beamspot constaint as well.
ActsTrk::AuxiliaryMeasurementHandler m_auxMeasProv
Handler to parse the auxiliary beam spot constaint.
ActsTrk::ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
SG::ReadHandleKeyArray< SegmentContainer > m_readKeys
Input segment container key.
ActsTrk::GeoContextReadKey_t m_geoCtxKey
Alignment container key.
ElementLink< PrdCont_t > PrdLink_t
Abrivation to call the link to an element inside an uncalibrated measurement container.
Gaudi::Property< bool > m_estimateHoles
Flag to tell whether the hole summary shall be written.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
SG::ReadHandleKey< GeometryContext > GeoContextReadKey_t
Abrivate the ReadHandleKey to declare the data dependency on the Geometry context.
SG::WriteDecorHandle< ContType, dType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const dType &defValue=dType{})
This header ties the generic definitions in this package.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
CombinedMuonStripAuxContainer_v1 CombinedMuonStripAuxContainer
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
CombinedMuonStripContainer_v1 CombinedMuonStripContainer
Helper struct to keep track of the number of precision, trigger phi and trigger eta hits.
SG::WriteDecorHandle< xAOD::MuonSegmentContainer, PrdLinkVec_t > dec_prdLinks
List of element links to the associated measurements.
xAOD::FillContainer< xAOD::CombinedMuonStripContainer, xAOD::CombinedMuonStripAuxContainer > prdCombContainer
Container handle to create the combined measurements of Rpc/Tgc/sTgc.
Acts::Result< ActsTrk::AuxiliaryMeasurementHandler::MeasurementProvider, ActsTrk::AuxiliaryMeasurementHandler::HandleStatus > beamSpotMeasCreator
Container handle to create the beamspot measurement, if needed.
PrepDataCollectorShip(const xAODSegmentCnvAlg &parent, const EventContext &ctx, const Acts::GeometryContext &tgContext)
Constructor to initialize the ship.
const xAOD::UncalibratedMeasurement * beamSpot
Pointer to the commonly shared beamspot measurement.
SG::WriteDecorHandle< xAOD::MuonSegmentContainer, std::vector< char > > dec_prdStates
Flag indicating whether each measurement is valid or an outlier.