ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkMCTruth
src
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
9
#include "
AthenaBaseComps/AthAlgTool.h
"
10
#include "
DerivationFrameworkInterfaces/IAugmentationTool.h
"
11
12
// Types for functions. Note these are typedefs, so can't forward reference.
13
#include "
xAODTruth/TruthParticleContainer.h
"
14
#include "
StoreGate/ReadHandleKey.h
"
15
#include "
StoreGate/WriteDecorHandleKeyArray.h
"
16
17
// STL includes
18
#include <string>
19
#include <vector>
20
21
namespace
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
:
33
SG::ReadHandleKey<xAOD::IParticleContainer>
m_recoKey
{
this
,
"RecoCollection"
,
"Muons"
,
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
AthAlgTool.h
TruthParticleContainer.h
IAugmentationTool.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKeyArray.h
DerivationFramework::TruthLinkRepointTool
Definition
TruthLinkRepointTool.h:23
DerivationFramework::TruthLinkRepointTool::find_match
static int find_match(const xAOD::TruthParticle *p, const xAOD::TruthParticleContainer *c)
Definition
TruthLinkRepointTool.cxx:69
DerivationFramework::TruthLinkRepointTool::m_recoKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_recoKey
Parameter: input collection key.
Definition
TruthLinkRepointTool.h:33
DerivationFramework::TruthLinkRepointTool::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition
TruthLinkRepointTool.cxx:31
DerivationFramework::TruthLinkRepointTool::m_targetKeys
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_targetKeys
Parameter: target collection.
Definition
TruthLinkRepointTool.h:38
DerivationFramework::TruthLinkRepointTool::initialize
virtual StatusCode initialize() override final
Definition
TruthLinkRepointTool.cxx:23
DerivationFramework::TruthLinkRepointTool::m_decorKey
SG::WriteDecorHandleKey< xAOD::IParticleContainer > m_decorKey
Parameter: output decoration.
Definition
TruthLinkRepointTool.h:36
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
xAOD::TruthParticleContainer
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Definition
Event/xAOD/xAODTruth/xAODTruth/TruthParticleContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0