ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FlavorTagDiscriminants
FlavorTagDiscriminants
SoftElectronTruthDecoratorAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ELECTRON_TRUTH_DECORATOR_ALG_HH
6
#define ELECTRON_TRUTH_DECORATOR_ALG_HH
7
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "GaudiKernel/ToolHandle.h"
10
#include "
AthContainers/AuxElement.h
"
11
#include "
StoreGate/WriteDecorHandleKey.h
"
12
#include "
StoreGate/ReadDecorHandleKey.h
"
13
14
#include "AthLinks/ElementLink.h"
15
#include "
xAODEgamma/ElectronContainer.h
"
16
#include "
xAODTruth/TruthParticleContainer.h
"
17
#include "
InDetTrackSystematicsTools/InDetTrackTruthOriginTool.h
"
18
#include "
xAODTruth/TruthEventContainer.h
"
19
20
#include <set>
21
22
namespace
FlavorTagDiscriminants
{
23
24
class
SoftElectronTruthDecoratorAlg
:
public
AthReentrantAlgorithm
{
25
public
:
26
SoftElectronTruthDecoratorAlg
(
const
std::string& name,
27
ISvcLocator* pSvcLocator );
28
29
virtual
StatusCode
initialize
()
override
;
30
virtual
StatusCode
execute
(
const
EventContext& )
const override
;
31
32
private
:
33
// Input Containers
34
SG::ReadHandleKey< xAOD::ElectronContainer >
m_ElectronContainerKey
{
35
this
,
"electronContainer"
,
"Electrons"
,
36
"Key for the input electron collection"
};
37
SG::ReadHandleKey< xAOD::TruthParticleContainer >
m_truthParticleContainerKey
{
38
this
,
"truthParticleContainer"
,
"TruthParticles"
,
39
"Key for the input truth particle container"
};
40
41
// Accessors for truth particles
42
using
RDHK
=
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >
;
43
RDHK
m_acc_origin_label
{
44
this
,
"acc_ftagTruthOriginLabel"
,
m_truthParticleContainerKey
,
"ftagTruthOriginLabel"
,
45
"Accessor for the truth origin label of the truth particle"
};
46
RDHK
m_acc_type_label
{
47
this
,
"acc_ftagTruthTypeLabel"
,
m_truthParticleContainerKey
,
"ftagTruthTypeLabel"
,
48
"Accessor for the truth type label of the truth particle"
};
49
RDHK
m_acc_source_label
{
50
this
,
"acc_ftagTruthSourceLabel"
,
m_truthParticleContainerKey
,
"ftagTruthSourceLabel"
,
51
"Accessor for the truth source label of the truth particle"
};
52
RDHK
m_acc_vertex_index
{
53
this
,
"acc_ftagTruthVertexIndex"
,
m_truthParticleContainerKey
,
"ftagTruthVertexIndex"
,
54
"Accessor for the truth vertex index of the truth particle"
};
55
RDHK
m_acc_parent_uniqueID
{
56
this
,
"acc_ftagTruthParentBarcode"
,
m_truthParticleContainerKey
,
"ftagTruthParentBarcode"
,
57
"Accessor for the truth parent uniqueID of the truth particle"
};
58
59
// Decorators for electrons
60
using
WDHK
=
SG::WriteDecorHandleKey< xAOD::ElectronContainer >
;
61
WDHK
m_dec_origin_label
{
62
this
,
"dec_ftagTruthOriginLabel"
,
m_ElectronContainerKey
,
"ftagTruthOriginLabel"
,
63
"Exclusive origin label of the electron"
};
64
WDHK
m_dec_type_label
{
65
this
,
"dec_ftagTruthTypeLabel"
,
m_ElectronContainerKey
,
"ftagTruthTypeLabel"
,
66
"Exclusive truth type label of the electron"
};
67
WDHK
m_dec_source_label
{
68
this
,
"dec_ftagTruthSourceLabel"
,
m_ElectronContainerKey
,
"ftagTruthSourceLabel"
,
69
"Exclusive truth label for the immedate parent of the truth particle"
};
70
WDHK
m_dec_vertex_index
{
71
this
,
"dec_ftagTruthVertexIndex"
,
m_ElectronContainerKey
,
"ftagTruthVertexIndex"
,
72
"Truth vertex index of the electron"
};
73
WDHK
m_dec_uniqueID
{
74
this
,
"dec_ftagTruthBarcode"
,
m_ElectronContainerKey
,
"ftagTruthBarcode"
,
75
"UniqueID of linked truth particle"
};
76
WDHK
m_dec_parent_uniqueID
{
77
this
,
"dec_ftagTruthParentBarcode"
,
m_ElectronContainerKey
,
"ftagTruthParentBarcode"
,
78
"UniqueID of parent of linked truth particle"
};
79
80
// truth origin tool
81
ToolHandle<InDet::InDetTrackTruthOriginTool>
m_trackTruthOriginTool
{
82
this
,
"trackTruthOriginTool"
,
"InDet::InDetTrackTruthOriginTool"
,
83
"track truth origin tool"
};
84
85
// Electron types are defined in
86
// PhysicsAnalysis/MCTruthClassifier/MCTruthClassifier/MCTruthClassifierDefs.h#L28
87
const
std::set<int>
m_valid_types
{1, 2, 3, 4};
88
89
// ATLASRECTS-8290: this is for backward compatability, remove eventually
90
Gaudi::Property<bool>
m_use_barcode
{
91
this
,
"useBarcode"
,
false
,
"use barcode rather than UID"
92
};
93
94
// Read accessors declared as handle keys for MT scheduling
95
SG::ReadDecorHandleKey< xAOD::ElectronContainer >
m_truthParticleLinkKey
{
96
this
,
"truthParticleLinkKey"
,
m_ElectronContainerKey
,
"truthParticleLink"
,
97
"Truth particle link on electrons"
};
98
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >
m_classifierParticleTypeKey
{
99
this
,
"classifierParticleTypeKey"
,
m_truthParticleContainerKey
,
"classifierParticleType"
,
100
"Classifier particle type on truth particles"
};
101
// ATLASRECTS-8290: this is for backward compatability, remove eventually
102
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >
m_uidKey
{
103
this
,
"uidKey"
,
m_truthParticleContainerKey
,
"uid"
,
104
"UniqueID on truth particles"
};
105
};
106
}
107
108
#endif
AthReentrantAlgorithm.h
AuxElement.h
Base class for elements of a container that can have aux data.
ElectronContainer.h
TruthParticleContainer.h
InDetTrackTruthOriginTool.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
TruthEventContainer.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::RDHK
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > RDHK
Definition
SoftElectronTruthDecoratorAlg.h:42
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_uidKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_uidKey
Definition
SoftElectronTruthDecoratorAlg.h:102
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_valid_types
const std::set< int > m_valid_types
Definition
SoftElectronTruthDecoratorAlg.h:87
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_classifierParticleTypeKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_classifierParticleTypeKey
Definition
SoftElectronTruthDecoratorAlg.h:98
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_acc_origin_label
RDHK m_acc_origin_label
Definition
SoftElectronTruthDecoratorAlg.h:43
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_ElectronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition
SoftElectronTruthDecoratorAlg.h:34
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_use_barcode
Gaudi::Property< bool > m_use_barcode
Definition
SoftElectronTruthDecoratorAlg.h:90
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_truthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
Definition
SoftElectronTruthDecoratorAlg.h:37
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_acc_vertex_index
RDHK m_acc_vertex_index
Definition
SoftElectronTruthDecoratorAlg.h:52
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::execute
virtual StatusCode execute(const EventContext &) const override
Definition
SoftElectronTruthDecoratorAlg.cxx:64
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_type_label
WDHK m_dec_type_label
Definition
SoftElectronTruthDecoratorAlg.h:64
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_uniqueID
WDHK m_dec_uniqueID
Definition
SoftElectronTruthDecoratorAlg.h:73
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_acc_parent_uniqueID
RDHK m_acc_parent_uniqueID
Definition
SoftElectronTruthDecoratorAlg.h:55
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_acc_source_label
RDHK m_acc_source_label
Definition
SoftElectronTruthDecoratorAlg.h:49
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_origin_label
WDHK m_dec_origin_label
Definition
SoftElectronTruthDecoratorAlg.h:61
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_trackTruthOriginTool
ToolHandle< InDet::InDetTrackTruthOriginTool > m_trackTruthOriginTool
Definition
SoftElectronTruthDecoratorAlg.h:81
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::WDHK
SG::WriteDecorHandleKey< xAOD::ElectronContainer > WDHK
Definition
SoftElectronTruthDecoratorAlg.h:60
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::SoftElectronTruthDecoratorAlg
SoftElectronTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
SoftElectronTruthDecoratorAlg.cxx:24
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_vertex_index
WDHK m_dec_vertex_index
Definition
SoftElectronTruthDecoratorAlg.h:70
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition
SoftElectronTruthDecoratorAlg.cxx:28
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_parent_uniqueID
WDHK m_dec_parent_uniqueID
Definition
SoftElectronTruthDecoratorAlg.h:76
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_dec_source_label
WDHK m_dec_source_label
Definition
SoftElectronTruthDecoratorAlg.h:67
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_truthParticleLinkKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_truthParticleLinkKey
Definition
SoftElectronTruthDecoratorAlg.h:95
FlavorTagDiscriminants::SoftElectronTruthDecoratorAlg::m_acc_type_label
RDHK m_acc_type_label
Definition
SoftElectronTruthDecoratorAlg.h:46
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey< xAOD::ElectronContainer >
FlavorTagDiscriminants
Definition
CaloChargedFlowDecoratorAlg.h:15
Generated on
for ATLAS Offline Software by
1.17.0