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 ANA_CHECK (m_systematicsList.initialize());
29 return StatusCode::SUCCESS;
30 }
31
32
33
34 StatusCode TauTruthMatchingAlg ::
35 execute ()
36 {
37 for (const auto& sys : m_systematicsList.systematicsVector())
38 {
39 const xAOD::TauJetContainer *taus = nullptr;
40 ANA_CHECK (m_tauHandle.retrieve (taus, sys));
41 for (const xAOD::TauJet *tau : *taus)
42 {
43 if (m_preselection.getBool (*tau, sys))
44 {
45 m_matchingTool->getTruth (*tau);
46 }
47 }
48 ANA_CHECK( m_matchingTool->lockDecorations (*taus) );
49 }
50 return StatusCode::SUCCESS;
51 }
52}
#define ANA_CHECK(EXP)
check whether the given expression was successful
static Double_t taus
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_matchingTool
the matching tool
SysReadHandle< xAOD::TauJetContainer > m_tauHandle
the tau collection we run on
SysReadSelectionHandle m_preselection
the preselection we apply to our input
SysListHandle m_systematicsList
the systematics list we run
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".