ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TauAnalysisAlgorithms
Root
TauTruthMatchingAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
TauAnalysisAlgorithms/TauTruthMatchingAlg.h
>
14
15
//
16
// method implementations
17
//
18
19
namespace
CP
20
{
21
22
StatusCode TauTruthMatchingAlg ::
23
initialize ()
24
{
25
ANA_CHECK
(
m_matchingTool
.retrieve());
26
ANA_CHECK
(
m_tauHandle
.initialize (
m_systematicsList
));
27
ANA_CHECK
(
m_preselection
.initialize (
m_systematicsList
,
m_tauHandle
,
SG::AllowEmpty
));
28
29
// Declare output decorations for MT dependency tracking
30
// (actual writing is done by the tool, handles just register dependencies)
31
ANA_CHECK
(
m_isTruthMatchedDecor
.initialize (
m_systematicsList
,
m_tauHandle
));
32
ANA_CHECK
(
m_truthJetLinkDecor
.initialize (
m_systematicsList
,
m_tauHandle
));
33
ANA_CHECK
(
m_truthParticleLinkDecor
.initialize (
m_systematicsList
,
m_tauHandle
));
34
35
ANA_CHECK
(
m_systematicsList
.initialize());
36
return
StatusCode::SUCCESS;
37
}
38
39
40
41
StatusCode TauTruthMatchingAlg ::
42
execute (
const
EventContext& ctx)
43
{
44
for
(
const
auto
& sys :
m_systematicsList
.systematicsVector())
45
{
46
const
xAOD::TauJetContainer
*
taus
=
nullptr
;
47
ANA_CHECK
(
m_tauHandle
.retrieve (
taus
, sys, ctx));
48
for
(
const
xAOD::TauJet
*tau : *
taus
)
49
{
50
if
(
m_preselection
.getBool (*tau, sys))
51
{
52
m_matchingTool
->getTruth (*tau);
53
}
54
}
55
ANA_CHECK
(
m_matchingTool
->lockDecorations (*
taus
) );
56
}
57
return
StatusCode::SUCCESS;
58
}
59
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:325
taus
static Double_t taus
Definition
LArPhysWaveHECTool.cxx:37
TauTruthMatchingAlg.h
CP::TauTruthMatchingAlg::m_isTruthMatchedDecor
SysWriteDecorHandle< char > m_isTruthMatchedDecor
output decoration for truth matching flag
Definition
TauTruthMatchingAlg.h:56
CP::TauTruthMatchingAlg::m_matchingTool
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_matchingTool
the matching tool
Definition
TauTruthMatchingAlg.h:38
CP::TauTruthMatchingAlg::m_tauHandle
SysReadHandle< xAOD::TauJetContainer > m_tauHandle
the tau collection we run on
Definition
TauTruthMatchingAlg.h:46
CP::TauTruthMatchingAlg::m_truthParticleLinkDecor
SysWriteDecorHandle< ElementLink< xAOD::TruthParticleContainer > > m_truthParticleLinkDecor
output decoration for truth particle link
Definition
TauTruthMatchingAlg.h:68
CP::TauTruthMatchingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition
TauTruthMatchingAlg.h:51
CP::TauTruthMatchingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition
TauTruthMatchingAlg.h:42
CP::TauTruthMatchingAlg::m_truthJetLinkDecor
SysWriteDecorHandle< ElementLink< xAOD::JetContainer > > m_truthJetLinkDecor
output decoration for truth jet link
Definition
TauTruthMatchingAlg.h:62
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
TauJet.h:17
xAOD::TauJetContainer
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
Definition
TauJetContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0