ATLAS Offline Software
DiTauTruthMatchingAlg.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::DiTauJetContainer *taus = nullptr;
41  for (const xAOD::DiTauJet *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::DiTauTruthMatchingAlg::execute
StatusCode execute() override
Definition: DiTauTruthMatchingAlg.cxx:35
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::DiTauTruthMatchingAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition: DiTauTruthMatchingAlg.h:48
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
CP::DiTauTruthMatchingAlg::m_matchingTool
ToolHandle< TauAnalysisTools::IDiTauTruthMatchingTool > m_matchingTool
the matching tool
Definition: DiTauTruthMatchingAlg.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CP::DiTauTruthMatchingAlg::initialize
StatusCode initialize() override
Definition: DiTauTruthMatchingAlg.cxx:23
CP::DiTauTruthMatchingAlg::m_tauHandle
SysReadHandle< xAOD::DiTauJetContainer > m_tauHandle
the tau collection we run on
Definition: DiTauTruthMatchingAlg.h:43
DiTauTruthMatchingAlg.h
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysReadSelectionHandle.cxx:34
xAOD::DiTauJet_v1
Definition: DiTauJet_v1.h:31
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
CP::DiTauTruthMatchingAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: DiTauTruthMatchingAlg.h:39