ATLAS Offline Software
Loading...
Searching...
No Matches
TruthSegToTruthPartAssocAlg.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 MUONTRUTHSEGMENTMAKER_TruthSegToTruthPartAssocAlg_H
5#define MUONTRUTHSEGMENTMAKER_TruthSegToTruthPartAssocAlg_H
6
8
13
20
21
22namespace MuonR4{
29 public:
30 using AthReentrantAlgorithm::AthReentrantAlgorithm;
31
32 virtual StatusCode initialize() override final;
33 virtual StatusCode execute(const EventContext& ctx) const override final;
34 private:
37 using TruthSegLinkVec_t = std::vector<ElementLink<xAOD::MuonSegmentContainer>>;
39
47 void matchPileupSegments(const EventContext& ctx,
48 const std::vector<const xAOD::TruthParticle*>& pileUpMuons,
49 const std::vector<const xAOD::MuonSegment*>& pileUpSegments,
50 TruthPartDecor_t& truthPartDecor,
51 TruthSegLinkDecor_t& truthSegDecor) const;
53 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
55 SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthKey{this, "TruthKey", "MuonTruthParticles"};
57 Gaudi::Property<std::vector<std::string>> m_simHitIds{this, "SimHitIds", {}};
61 SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> m_segLinkKey{this, "SegmentToPartKey", m_truthKey, "truthSegmentLinks"};
63 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segmentKey{this, "SegmentKey", "MuonTruthSegments"};
67 Gaudi::Property<bool> m_includePileUpObjs{this, "includePileUpObjs", false};
69 Gaudi::Property<double> m_pileUpObjDPhiCut{this,"deltaPhiSegBkgMuon", 10.*Gaudi::Units::deg};
71 Gaudi::Property<double> m_pileUpObjExtpDxCut{this,"BkgMatchingExtpX0", 10.*Gaudi::Units::cm};
73 Gaudi::Property<double> m_pileUpObjExtpDyCut{this,"BkgMatchingExtpY0", 10.*Gaudi::Units::mm};
75 Gaudi::Property<double> m_pileUpObjExtpDthetaCut{this,"BkgMatchingExtpTheta", 0.5*Gaudi::Units::deg};
77 Gaudi::Property<double> m_pileUpObjExtpDphiCut{this,"BkgMatchingExtpPhi", 5.*Gaudi::Units::deg};
78
80 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
82 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool" ,"" };
85
86 };
87}
88#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.
An algorithm that can be simultaneously executed in multiple threads.
The TruthSegToTruthPartAssocAlg associates the TruthSegments with the primary TruthParticle from the ...
Gaudi::Property< std::vector< std::string > > m_simHitIds
List of simHit id decorations to read from the truth particle.
Gaudi::Property< bool > m_includePileUpObjs
Property checking whether a pile-up muons shall be matched to pile-up segments.
const MuonGMR4::MuonDetectorManager * m_detMgr
Pointer to the muon detector manager.
SG::WriteDecorHandleKey< xAOD::MuonSegmentContainer > m_truthLinkKey
Key of the truthParticleLink decorated onto the segment.
SG::WriteDecorHandle< xAOD::TruthParticleContainer, TruthSegLinkVec_t > TruthSegLinkDecor_t
ElementLink< xAOD::TruthParticleContainer > TruthPartLink_t
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
virtual StatusCode initialize() override final
Gaudi::Property< double > m_pileUpObjExtpDthetaCut
Cut on the delta theta between the bkg segment and the extrapolated parameters.
std::vector< ElementLink< xAOD::MuonSegmentContainer > > TruthSegLinkVec_t
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthKey
Key to the truth particle container to associate.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_segLinkKey
Declaration of the segmentLink to the truth particle.
Gaudi::Property< double > m_pileUpObjDPhiCut
Delta phi cut between particle momentum & segment position to start the extrapolation.
Gaudi::Property< double > m_pileUpObjExtpDyCut
Cut on the delta y0 between the bkg segment and the extrapolated parameters.
void matchPileupSegments(const EventContext &ctx, const std::vector< const xAOD::TruthParticle * > &pileUpMuons, const std::vector< const xAOD::MuonSegment * > &pileUpSegments, TruthPartDecor_t &truthPartDecor, TruthSegLinkDecor_t &truthSegDecor) const
Match truth muons without any HEPMC link with truth segments reconstructed in the MS.
virtual StatusCode execute(const EventContext &ctx) const override final
Gaudi::Property< double > m_pileUpObjExtpDphiCut
Cut on the delta phi between the bkg segment and the extrapolated parameters.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Key to the truth segment container to associate.
SG::ReadDecorHandleKeyArray< xAOD::TruthParticleContainer > m_simHitKeys
Declaration of the dependency on the simHit decorations.
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
SG::WriteDecorHandle< xAOD::MuonSegmentContainer, TruthPartLink_t > TruthPartDecor_t
Gaudi::Property< double > m_pileUpObjExtpDxCut
Cut on the delta x0 between the bkg segment and the extrapolated parameters.
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.
This header ties the generic definitions in this package.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray