ATLAS Offline Software
Loading...
Searching...
No Matches
TruthNavigationDecorator.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_TRUTHNAVIGATIONDECORATOR_H
6#define DERIVATIONFRAMEWORK_TRUTHNAVIGATIONDECORATOR_H
7
8// Interface classes
11
12// Handles
16
17// EDM includes -- typedefs, so can't just be forward declared
20
21// STL includes
22#include <string>
23#include <vector>
24#include <map>
25
26namespace DerivationFramework {
27
28 class TruthNavigationDecorator : public extends<AthAlgTool, IAugmentationTool> {
29 public:
30
31 using base_class::base_class;
32
33 virtual StatusCode initialize() override final;
34 virtual StatusCode addBranches(const EventContext& ctx) const override final;
35
36 private:
39 {this, "InputCollections", {}, "Input truth particle collection keys"};
41 {this, "TruthEventKey", "TruthEvents", "SG key for the TruthEvent container"};
42
47
48 void find_parents( const xAOD::TruthParticle* part ,
49 std::vector<ElementLink<xAOD::TruthParticleContainer> >& parents ,
50 std::map<int,ElementLink<xAOD::TruthParticleContainer> >& linkMap ,
51 std::vector<int>& seen_particles ) const;
53 void find_children( const xAOD::TruthParticle* part ,
54 std::vector<ElementLink<xAOD::TruthParticleContainer> >& parents ,
55 std::map<int,ElementLink<xAOD::TruthParticleContainer> >& linkMap ,
56 std::vector<int>& seen_particles ) const;
57 };
58}
59
60#endif // DERIVATIONFRAMEWORK_TRUTHNAVIGATIONDECORATOR_H
Property holding a SG store/key/clid from which a ReadHandle is made.
void find_parents(const xAOD::TruthParticle *part, std::vector< ElementLink< xAOD::TruthParticleContainer > > &parents, std::map< int, ElementLink< xAOD::TruthParticleContainer > > &linkMap, std::vector< int > &seen_particles) const
Helper function for finding all the parents of a particle.
void find_children(const xAOD::TruthParticle *part, std::vector< ElementLink< xAOD::TruthParticleContainer > > &parents, std::map< int, ElementLink< xAOD::TruthParticleContainer > > &linkMap, std::vector< int > &seen_particles) const
Helper function for finding all the children of a particle.
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_inputKeys
Parameter: input particle collections.
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
SG::WriteDecorHandleKeyArray< xAOD::TruthParticleContainer, std::vector< ElementLink< xAOD::TruthParticleContainer > > > m_childLinksDecorKeys
SG::WriteDecorHandleKeyArray< xAOD::TruthParticleContainer, std::vector< ElementLink< xAOD::TruthParticleContainer > > > m_parentLinksDecorKeys
Decor keys.
Property holding a SG store/key/clid from which a ReadHandle is made.
THE reconstruction tool.
DecorHandleKeyArray< WriteDecorHandle< T, S >, WriteDecorHandleKey< T >, Gaudi::DataHandle::Writer > WriteDecorHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
TruthParticle_v1 TruthParticle
Typedef to implementation.