ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
15//
16// method implementations
17//
18
19namespace CP
20{
21
22 StatusCode TauTruthMatchingAlg ::
23 initialize ()
24 {
25 ANA_CHECK (m_matchingTool.retrieve());
28
29 // Declare output decorations for MT dependency tracking
30 // (actual writing is done by the tool, handles just register dependencies)
34
35 ANA_CHECK (m_systematicsList.initialize());
36 return StatusCode::SUCCESS;
37 }
38
39
40
41 StatusCode TauTruthMatchingAlg ::
42 execute ()
43 {
44 for (const auto& sys : m_systematicsList.systematicsVector())
45 {
46 const xAOD::TauJetContainer *taus = nullptr;
47 ANA_CHECK (m_tauHandle.retrieve (taus, sys));
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}
#define ANA_CHECK(EXP)
check whether the given expression was successful
static Double_t taus
SysWriteDecorHandle< char > m_isTruthMatchedDecor
output decoration for truth matching flag
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_matchingTool
the matching tool
SysReadHandle< xAOD::TauJetContainer > m_tauHandle
the tau collection we run on
SysWriteDecorHandle< ElementLink< xAOD::TruthParticleContainer > > m_truthParticleLinkDecor
output decoration for truth particle link
SysReadSelectionHandle m_preselection
the preselection we apply to our input
SysListHandle m_systematicsList
the systematics list we run
SysWriteDecorHandle< ElementLink< xAOD::JetContainer > > m_truthJetLinkDecor
output decoration for truth jet link
Select isolated Photons, Electrons and Muons.
TauJet_v3 TauJet
Definition of the current "tau version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".