ATLAS Offline Software
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 
19 namespace CP
20 {
21 
23  initialize ()
24  {
25  ANA_CHECK (m_matchingTool.retrieve());
29  return StatusCode::SUCCESS;
30  }
31 
32 
33 
35  execute ()
36  {
37  for (const auto& sys : m_systematicsList.systematicsVector())
38  {
39  const xAOD::TauJetContainer *taus = nullptr;
41  for (const xAOD::TauJet *tau : *taus)
42  {
43  if (m_preselection.getBool (*tau, sys))
44  {
45  m_matchingTool->getTruth (*tau);
46  }
47  }
48  }
49  return StatusCode::SUCCESS;
50  }
51 }
CP::TauTruthMatchingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: TauTruthMatchingAlg.h:39
CP::TauTruthMatchingAlg::initialize
StatusCode initialize() override
Definition: TauTruthMatchingAlg.cxx:23
CP::TauTruthMatchingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition: TauTruthMatchingAlg.h:48
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::SysReadHandle::retrieve
::StatusCode retrieve(const T *&object, const CP::SystematicSet &sys) const
retrieve the object for the given name
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition: SysListHandle.cxx:96
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::SysReadHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle)
initialize this handle
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition: SysListHandle.cxx:69
CP::SysReadSelectionHandle::getBool
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TauTruthMatchingAlg.h
CP::TauTruthMatchingAlg::m_tauHandle
SysReadHandle< xAOD::TauJetContainer > m_tauHandle
the tau collection we run on
Definition: TauTruthMatchingAlg.h:43
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysReadSelectionHandle.cxx:34
CP::TauTruthMatchingAlg::m_matchingTool
ToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_matchingTool
the matching tool
Definition: TauTruthMatchingAlg.h:35
CP::TauTruthMatchingAlg::execute
StatusCode execute() override
Definition: TauTruthMatchingAlg.cxx:35
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30