ATLAS Offline Software
Loading...
Searching...
No Matches
TrkSegmentCnvAlg.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 MUONSEGMENTCNV_TRKSEGMENTCNVALG_H
5#define MUONSEGMENTCNV_TRKSEGMENTCNVALG_H
6
10
15
20
21namespace MuonR4{
26 public:
27
28 using AthReentrantAlgorithm::AthReentrantAlgorithm;
29
30 StatusCode initialize() override final;
31 StatusCode execute(const EventContext& ctx) const override final;
32
33 private:
38 StatusCode convert(const EventContext& ctx,
39 const MuonR4::Segment& segment,
40 Trk::SegmentCollection& outContainer) const;
41 /*** @brief Fetches a MuonPrepData object from the PrepData container by matching the parsed Identifier.
42 * Nullptr is returned if the object does not exist and an error message is printed
43 * @param prdId: Identifier of the measurement to fetch
44 * @param prdContainer: Pointer to the MuonPrepData container to fetch the object from. */
45 template <class PrdType>
46 const PrdType* fetchPrd(const Identifier& prdId,
47 const Muon::MuonPrepDataContainerT<PrdType>* prdContainer) const;
52 template <class PrdType>
53 const PrdType* fetchPrd(const xAOD::MuonMeasurement& meas,
54 const std::string& accName) const;
55
56 using RotVec = std::vector<std::unique_ptr<Trk::RIO_OnTrack>>;
66 template <class PrdType>
67 StatusCode convertMeasurement(const MuonR4::Segment& segment,
68 const CalibratedSpacePoint& spacePoint,
69 const Muon::MuonPrepDataContainerT<PrdType>* prdContainer,
70 RotVec& convMeasVec,
71 const std::string& accName ="") const;
72
74 "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
75
76 PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "printerTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
78 SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc{this, "TgcKey", "TGC_MeasurementsAllBCs"};
79 SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc{this, "RpcKey", "RPC_Measurements"};
80 SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt{this, "MdtKey", "MDT_DriftCircles"};
81 SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_keysTgc{this, "sTgcKey", "STGC_Measurements"};
82 SG::ReadHandleKey<Muon::MMPrepDataContainer> m_keyMM{this, "MmKey", "MM_Measurements"};
83
84 // ACTS geometry context
85 ActsTrk::GeoContextReadKey_t m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
86
87
88 SG::ReadHandleKeyArray<SegmentContainer> m_readKeys{this, "ReadSegments", {"R4MuonSegments"}};
89
90 SG::WriteHandleKey<Trk::SegmentCollection> m_writeKey{this, "WriteKey", "TrackMuonSegmentsR4"};
91
92
93 ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> m_mdtCreator{this,"MdtRotCreator",""}; //<! pointer to mdt rio ontrack creator
94 ToolHandle<Muon::IMuonClusterOnTrackCreator> m_clusterCreator{this,"ClusterRotCreator",""};
95
96 ToolHandle<Muon::IMuonCompetingClustersOnTrackCreator> m_compClusterCreator{this, "CompetingRotCreator", ""}; //<! competing clusters rio ontrack creator
97
98 };
99
100}
101
102#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 calibrated Space point is created during the calibration process.
Placeholder for what will later be the muon segment EDM representation.
The TrkSegmentCnvAlg converts the SegmentSeeds produced by the R4 pattern recognition chain into the ...
SG::WriteHandleKey< Trk::SegmentCollection > m_writeKey
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_clusterCreator
ActsTrk::GeoContextReadKey_t m_geoCtxKey
StatusCode execute(const EventContext &ctx) const override final
StatusCode convert(const EventContext &ctx, const MuonR4::Segment &segment, Trk::SegmentCollection &outContainer) const
Convert the R4 segment and fill the converted segment into the SegmentCollection.
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_keyRpc
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreator
std::vector< std::unique_ptr< Trk::RIO_OnTrack > > RotVec
StatusCode initialize() override final
StatusCode convertMeasurement(const MuonR4::Segment &segment, const CalibratedSpacePoint &spacePoint, const Muon::MuonPrepDataContainerT< PrdType > *prdContainer, RotVec &convMeasVec, const std::string &accName="") const
Convert the calibrated space point of interest to a Trk::Measurement.
const PrdType * fetchPrd(const Identifier &prdId, const Muon::MuonPrepDataContainerT< PrdType > *prdContainer) const
SG::ReadHandleKeyArray< SegmentContainer > m_readKeys
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_keyMdt
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_keyTgc
Prep data container keys.
ToolHandle< Muon::IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_keyMM
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_keysTgc
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.
SG::ReadHandleKey< GeometryContext > GeoContextReadKey_t
Abrivate the ReadHandleKey to declare the data dependency on the Geometry context.
This header ties the generic definitions in this package.
MuonPrepDataContainer< MuonPrepDataCollection< PrdType > > MuonPrepDataContainerT
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
DataVector< Trk::Segment > SegmentCollection
MuonMeasurement_v1 MuonMeasurement