ATLAS Offline Software
SegmentCnvAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONSEGMENTCNV_SEGMENTCNVALG_H
5 #define MUONSEGMENTCNV_SEGMENTCNVALG_H
6 
11 
16 
21 
22 namespace MuonR4{
27  public:
28 
30 
31  StatusCode initialize() override final;
32 
33  StatusCode execute(const EventContext& ctx) const override final;
34 
35  private:
40  StatusCode convert(const EventContext& ctx,
41  const MuonR4::Segment& segment,
42  Trk::SegmentCollection& outContainer) const;
48  template <class ContType>
49  StatusCode retrieveContainer(const EventContext& ctx,
51  const ContType*& contPtr) const;
52  /*** @brief Fetches a MuonPrepData object from the PrepData container by matching the parsed Identifier.
53  * Nullptr is returned if the object does not exist and an error message is printed
54  * @param prdId: Identifier of the measurement to fetch
55  * @param prdContainer: Pointer to the MuonPrepData container to fetch the object from. */
56  template <class PrdType>
57  const PrdType* fetchPrd(const Identifier& prdId,
58  const Muon::MuonPrepDataContainerT<PrdType>* prdContainer) const;
59 
60  using RotVec = std::vector<std::unique_ptr<Trk::RIO_OnTrack>>;
61  template <class PrdType>
63  const CalibratedSpacePoint& spacePoint,
64  const Muon::MuonPrepDataContainerT<PrdType>* prdContainer,
65  RotVec& convMeasVec) const;
66 
68  "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
69 
70  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{this, "printerTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};
72  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_keyTgc{this, "TgcKey", "TGC_MeasurementsAllBCs"};
73  SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_keyRpc{this, "RpcKey", "RPC_Measurements"};
74  SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_keyMdt{this, "MdtKey", "MDT_DriftCircles"};
75  SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_keysTgc{this, "sTgcKey", "STGC_Measurements"};
76  SG::ReadHandleKey<Muon::MMPrepDataContainer> m_keyMM{this, "MmKey", "MM_Measurements"};
77 
78  // ACTS geometry context
79  SG::ReadHandleKey<ActsGeometryContext> m_geoCtxKey{this, "AlignmentKey", "ActsAlignment", "cond handle key"};
80 
81 
82  SG::ReadHandleKeyArray<SegmentContainer> m_readKeys{this, "Segments", {"R4MuonSegments"}};
83 
84  SG::WriteHandleKey<Trk::SegmentCollection> m_writeKey{this, "WriteKey", "TrackMuonSegmentsR4"};
85 
86 
87  ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> m_mdtCreator{this,"MdtRotCreator",""}; //<! pointer to mdt rio ontrack creator
88  ToolHandle<Muon::IMuonClusterOnTrackCreator> m_clusterCreator{this,"ClusterRotCreator",""};
89 
90  ToolHandle<Muon::IMuonCompetingClustersOnTrackCreator> m_compClusterCreator{this, "CompetingRotCreator", ""}; //<! competing clusters rio ontrack creator
91 
92  };
93 
94 }
95 
96 #endif
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonR4::SegmentCnvAlg::fetchPrd
const PrdType * fetchPrd(const Identifier &prdId, const Muon::MuonPrepDataContainerT< PrdType > *prdContainer) const
Definition: SegmentCnvAlg.cxx:65
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
MuonR4::SegmentCnvAlg::m_keysTgc
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_keysTgc
Definition: SegmentCnvAlg.h:75
MuonEDMPrinterTool.h
MuonR4::SegmentCnvAlg::m_compClusterCreator
ToolHandle< Muon::IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
Definition: SegmentCnvAlg.h:90
MuonR4::Segment
Placeholder for what will later be the muon segment EDM representation.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:19
MuonR4::SegmentCnvAlg::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: SegmentCnvAlg.h:70
MuonR4::SegmentCnvAlg::convertMeasurement
StatusCode convertMeasurement(const MuonR4::Segment &segment, const CalibratedSpacePoint &spacePoint, const Muon::MuonPrepDataContainerT< PrdType > *prdContainer, RotVec &convMeasVec) const
IMuonCompetingClustersOnTrackCreator.h
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
MuonR4::SegmentCnvAlg::m_mdtCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: SegmentCnvAlg.h:87
MuonPrepDataContainer.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonR4::SegmentCnvAlg
The SegmentCnvAlg converts the SegmentSeeds produced by the R4 pattern recognition chain into the seg...
Definition: SegmentCnvAlg.h:26
MuonR4::SegmentCnvAlg::m_readKeys
SG::ReadHandleKeyArray< SegmentContainer > m_readKeys
Definition: SegmentCnvAlg.h:82
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MuonR4::SegmentCnvAlg::m_keyRpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_keyRpc
Definition: SegmentCnvAlg.h:73
MuonR4::SegmentCnvAlg::m_writeKey
SG::WriteHandleKey< Trk::SegmentCollection > m_writeKey
Definition: SegmentCnvAlg.h:84
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::SegmentCnvAlg::RotVec
std::vector< std::unique_ptr< Trk::RIO_OnTrack > > RotVec
Definition: SegmentCnvAlg.h:60
IMuonClusterOnTrackCreator.h
MuonPatternContainer.h
MuonR4::SegmentCnvAlg::m_keyTgc
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_keyTgc
Prep data container keys.
Definition: SegmentCnvAlg.h:72
DataVector< Trk::Segment >
MuonR4::SegmentCnvAlg::m_keyMdt
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_keyMdt
Definition: SegmentCnvAlg.h:74
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
MuonR4::SegmentCnvAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: SegmentCnvAlg.h:79
MuonR4::SegmentCnvAlg::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, const ContType *&contPtr) const
Loads a container from the StoreGate and returns whether the retrieval is successful.
IMdtDriftCircleOnTrackCreator.h
MuonR4::SegmentCnvAlg::initialize
StatusCode initialize() override final
Definition: SegmentCnvAlg.cxx:15
MuonR4::SegmentCnvAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: SegmentCnvAlg.h:67
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::SegmentCnvAlg::execute
StatusCode execute(const EventContext &ctx) const override final
Definition: SegmentCnvAlg.cxx:47
MuonR4::SegmentCnvAlg::convert
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.
Definition: SegmentCnvAlg.cxx:130
MuonR4::CalibratedSpacePoint
The calibrated Space point is created during the calibration process.
Definition: CalibratedSpacePoint.h:15
IMuonIdHelperSvc.h
SegmentCollection.h
MuonR4::SegmentCnvAlg::m_keyMM
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_keyMM
Definition: SegmentCnvAlg.h:76
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
ServiceHandle< Muon::IMuonIdHelperSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::SegmentCnvAlg::m_clusterCreator
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_clusterCreator
Definition: SegmentCnvAlg.h:88
Identifier
Definition: IdentifierFieldParser.cxx:14