5#ifndef TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
6#define TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
9#include "GaudiKernel/ServiceHandle.h"
21 using AthReentrantAlgorithm::AthReentrantAlgorithm;
25 StatusCode
execute(
const EventContext& ctx)
const override;
30 this,
"MuonTruthParticleContainerName",
"MuonTruthParticles"};
35 "container name for muon truth particles; the full handle name, including the reco muon link auxdata, is set in initialize()"};
38 this,
"MuonContainerName",
"Muons",
39 "container name for reco muon particles; the full handle name, including the reco muon link auxdata, is set in initialize()"};
43 this,
"MuonTruthParticleLink",
m_recoMuKey,
"truthParticleLink",
44 "muon truth particle link auxdata name; name will be reset in initialize() based on m_muonName"};
46 this,
"MuonTruthParticleType",
m_recoMuKey,
"truthType",
47 "muon truth type auxdata name; name will be reset in initialize() based on m_muonName"};
49 this,
"MuonTruthParticleOrigin",
m_recoMuKey,
"truthOrigin",
50 "muon truth origin auxdata name; name will be reset in initialize() based on m_muonName"};
52 this,
"MuonTruthParticleClassification",
m_recoMuKey,
"truthClassification",
53 "muon truth classification auxdata name; name will be reset in initialize() based on m_muonName"};
55 this,
"MuonTruthParticleNPrecMatched",
m_recoMuKey,
"nprecMatchedHitsPerChamberLayer",
56 "muon vector of number of precision matched hits per chamber layer auxdata name; name will be reset in initialize() based on "
59 this,
"MuonTruthParticleNPhiMatched",
m_recoMuKey,
"nphiMatchedHitsPerChamberLayer",
60 "muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
62 this,
"MuonTruthParticleNTrigEtaMatched",
m_recoMuKey,
"ntrigEtaMatchedHitsPerChamberLayer",
63 "muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
67 this,
"TrkTruthLinkKeys", {},
68 "Declare the decoration dependencies of this algorithm. Steer via TrackContainers property"};
69 Gaudi::Property<std::vector<std::string>>
m_assocTrkContainers{
this,
"TrackContainers", {
"CombinedMuonTrackParticles",
70 "ExtrapolatedMuonTrackParticles",
71 "MSOnlyExtrapolatedMuonTrackParticles"},
72 "Collection of track containers to be decorated before this alg can be scheduled. truthLink decoration exploited "};
73 Gaudi::Property<std::string>
m_recoLink{
this,
"RecoLinkName",
"recoMuonLink" ,
"Decoration to the truth particle pointing to the muon"};
74 Gaudi::Property<bool>
m_associateWithInDetTP{
this,
"AssociateWithInDetTP",
false,
"force use of ID track particles for association"};
79 std::vector<unsigned int>& nprecHitsPerChamberLayer, std::vector<unsigned int>& nphiHitsPerChamberLayer,
80 std::vector<unsigned int>& ntrigEtaHitsPerChamberLayer)
const;
81 void clear_dummys(
const std::vector<unsigned long long>& identifiers, std::vector<unsigned int>&
vec)
const;
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
StatusCode initialize() override
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_muonTruthRecoLink
Decorations for the filtered muon truth particles.
Gaudi::Property< std::vector< std::string > > m_assocTrkContainers
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleClassification
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleType
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleLink
Decorations for the reconstructed muon particles.
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