ATLAS Offline Software
Loading...
Searching...
No Matches
RecoToTruthAssociationAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
6#define TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
7
9#include "GaudiKernel/ServiceHandle.h"
15
16
17namespace Muon {
19public:
20 // Constructor with parameters:
21 using AthReentrantAlgorithm::AthReentrantAlgorithm;
22
23 // Basic algorithm methods:
24 StatusCode initialize() override;
25 StatusCode execute(const EventContext& ctx) const override;
26
27private:
30 this, "MuonTruthParticleContainerName", "MuonTruthParticles"};
31
33 this, "MuonContainerName", "Muons",
34 "container name for muon truth particles; the full handle name, including the reco muon link auxdata, is set in initialize()"};
35
37 this, "MuonTruthParticleRecoLink", m_truthMuKey, "",
38 "container name for muon truth particles; the full handle name, including the reco muon link auxdata, is set in initialize()"};
40 this, "MuonTruthParticleLink", m_recoMuKey, "truthParticleLink",
41 "muon truth particle link auxdata name; name will be reset in initialize() based on m_muonName"};
43 this, "MuonTruthParticleType", m_recoMuKey, "truthType",
44 "muon truth type auxdata name; name will be reset in initialize() based on m_muonName"};
46 this, "MuonTruthParticleOrigin", m_recoMuKey, "truthOrigin",
47 "muon truth origin auxdata name; name will be reset in initialize() based on m_muonName"};
49 this, "MuonTruthParticleNPrecMatched", m_recoMuKey, "nprecMatchedHitsPerChamberLayer",
50 "muon vector of number of precision matched hits per chamber layer auxdata name; name will be reset in initialize() based on "
51 "m_muonName"};
53 this, "MuonTruthParticleNPhiMatched", m_recoMuKey, "nphiMatchedHitsPerChamberLayer",
54 "muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
56 this, "MuonTruthParticleNTrigEtaMatched", m_recoMuKey, "ntrigEtaMatchedHitsPerChamberLayer",
57 "muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
58
59
61 this, "TrkTruthLinkKeys", {},
62 "Declare the decoration dependencies of this algorithm. Steer via TrackContainers property"};
63 Gaudi::Property<std::vector<std::string>> m_assocTrkContainers{this, "TrackContainers", {"CombinedMuonTrackParticles",
64 "ExtrapolatedMuonTrackParticles",
65 "MSOnlyExtrapolatedMuonTrackParticles"},
66 "Collection of track containers to be decorated before this alg can be scheduled. truthLink decoration exploited "};
67 Gaudi::Property<std::string> m_recoLink{this, "RecoLinkName", "recoMuonLink" , "Decoration to the truth particle pointing to the muon"};
68 Gaudi::Property<bool> m_associateWithInDetTP{this, "AssociateWithInDetTP", false, "force use of ID track particles for association"};
69
70 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
71
72 void count_chamber_layers(const xAOD::IParticle* truth_particle, const Trk::Track* ptrk,
73 std::vector<unsigned int>& nprecHitsPerChamberLayer, std::vector<unsigned int>& nphiHitsPerChamberLayer,
74 std::vector<unsigned int>& ntrigEtaHitsPerChamberLayer) const;
75 void clear_dummys(const std::vector<unsigned long long>& identifiers, std::vector<unsigned int>& vec) const;
76
77};
78}
79#endif // TRUTHPARTICLEALGS_MUONTRUTHDECORATIONALG_H
std::vector< size_t > vec
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.
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_inputDecorKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleOrigin
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPhiMatched
Gaudi::Property< bool > m_associateWithInDetTP
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_muonTruthRecoLink
Gaudi::Property< std::vector< std::string > > m_assocTrkContainers
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleType
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleLink
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNTrigEtaMatched
void count_chamber_layers(const xAOD::IParticle *truth_particle, const Trk::Track *ptrk, std::vector< unsigned int > &nprecHitsPerChamberLayer, std::vector< unsigned int > &nphiHitsPerChamberLayer, std::vector< unsigned int > &ntrigEtaHitsPerChamberLayer) const
void clear_dummys(const std::vector< unsigned long long > &identifiers, std::vector< unsigned int > &vec) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< std::string > m_recoLink
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuKey
Key to the filtered muon truth particles.
StatusCode execute(const EventContext &ctx) const override
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPrecMatched
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.
Class providing the definition of the 4-vector interface.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray