ATLAS Offline Software
Loading...
Searching...
No Matches
TruthLinkRepointTool.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 DERIVATIONFRAMEWORK_TruthLinkRepointTool_H
6#define DERIVATIONFRAMEWORK_TruthLinkRepointTool_H
7
8// Interface classes
11
12// Types for functions. Note these are typedefs, so can't forward reference.
16
17// STL includes
18#include <string>
19#include <vector>
20
21namespace DerivationFramework {
22
23 class TruthLinkRepointTool : public extends<AthAlgTool, IAugmentationTool> {
24 public:
25
26 using base_class::base_class;
27
28 virtual StatusCode initialize() override final;
29 virtual StatusCode addBranches(const EventContext& ctx) const override final;
30
31 private:
34 "Name of reco collection for decoration"};
35
36 SG::WriteDecorHandleKey<xAOD::IParticleContainer> m_decorKey{this, "OutputDecoration", m_recoKey, "TruthLink", "Name of the output decoration on the reco object"};
38 SG::ReadHandleKeyArray<xAOD::TruthParticleContainer> m_targetKeys{this, "TargetCollections", {"TruthMuons","TruthPhotons","TruthElectrons"}, "Name of target truth collections"};
39
40 // Helper function for finding matching truth particle and warning consistently
41 static int find_match(const xAOD::TruthParticle* p, const xAOD::TruthParticleContainer* c) ;
42 };
43}
44
45#endif // DERIVATIONFRAMEWORK_TruthLinkRepointTool_H
Property holding a SG store/key/clid from which a ReadHandle is made.
static int find_match(const xAOD::TruthParticle *p, const xAOD::TruthParticleContainer *c)
SG::ReadHandleKey< xAOD::IParticleContainer > m_recoKey
Parameter: input collection key.
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_targetKeys
Parameter: target collection.
virtual StatusCode initialize() override final
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_decorKey
Parameter: output decoration.
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.
THE reconstruction tool.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.