ATLAS Offline Software
Loading...
Searching...
No Matches
RecoSegToTruthAssocAlg.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 MUONTRUTHALGSR4_RECOSEGTOTRUTHASSOCALG_H
5#define MUONTRUTHALGSR4_RECOSEGTOTRUTHASSOCALG_H
6
8
13
18
19namespace MuonR4{
23 public:
24 using AthReentrantAlgorithm::AthReentrantAlgorithm;
25 virtual StatusCode initialize() override final;
26 virtual StatusCode execute(const EventContext& ctx) const override final;
27 private:
31 const xAOD::MuonSegment* segment{nullptr};
33 std::unordered_set<const xAOD::MuonSimHit*> hits{};
34 };
35 using SegWithTruthVec_t = std::vector<SegmentWithTruth>;
37 std::vector<SegmentWithTruth> matchSimHits(const xAOD::MuonSegmentContainer& segments) const;
39 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_truthSegKey{this, "TruthSegKey", "MuonTruthSegments"};
51 Gaudi::Property<std::string> m_simLink{this, "SimHitLink", "simHitLink"};
56 };
57}
58#endif
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
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.
An algorithm that can be simultaneously executed in multiple threads.
Algorithm to match the reconstructed muon segment with the truth segment & with the truth particle.
std::vector< SegmentWithTruth > matchSimHits(const xAOD::MuonSegmentContainer &segments) const
Loops over the segment container and fetches the segments with truth matched hits.
virtual StatusCode initialize() override final
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_measKeys
Key to the prd containers in the event.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegKey
Key to the truth segment container.
std::vector< SegmentWithTruth > SegWithTruthVec_t
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_segTruthLinkKey
Output key to the associated truth particle decoration.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Key to the reconstructed segment container to truth match.
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_segPrdLinkKey
Key to the associated uncalibrated measurement decoration.
Gaudi::Property< std::string > m_simLink
Decoration key of the prd -> simHit association.
SG::ReadDecorHandleKey< xAOD::MuonSegmentContainer > m_truthSegLinkKey
Key to the truth segment -> truth particle association.
SG::ReadDecorHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_prdLinkKeys
Dependency on the sim hit decoration.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_segTruthSegLinkKey
Output key to the associated truth segment link decoration.
virtual StatusCode execute(const EventContext &ctx) const override final
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
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.
This header ties the generic definitions in this package.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Helper struct of segments with simHits & associated spectrometer sector.
const xAOD::MuonSegment * segment
segment pointer of interest
std::unordered_set< const xAOD::MuonSimHit * > hits
list of associated sim hits