ATLAS Offline Software
TauExtraVariablesAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
12 
13 
14 namespace CP {
15 
17 
18  if (m_nTracksKey.contHandleKey().key() == m_nTracksKey.key()) {
19  m_nTracksKey = m_tausKey.key() + "." + m_nTracksKey.key();
20  }
21 
22  ANA_CHECK(m_tausKey.initialize());
23  ANA_CHECK(m_nTracksKey.initialize());
24 
25  return StatusCode::SUCCESS;
26  }
27 
29 
30  const EventContext& ctx = Gaudi::Hive::currentContext();
32 
34  for (const xAOD::TauJet *tau : *taus) {
35  nTracksHandle(*tau) = tau->nTracks();
36  }
37 
38  return StatusCode::SUCCESS;
39  }
40 
41 } // namespace
CurrentContext.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
CP::TauExtraVariablesAlg::m_tausKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_tausKey
Definition: TauExtraVariablesAlg.h:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
WriteDecorHandle.h
Handle class for adding a decoration to an object.
CP::TauExtraVariablesAlg::execute
virtual StatusCode execute() override
Definition: TauExtraVariablesAlg.cxx:28
CP::TauExtraVariablesAlg::m_nTracksKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_nTracksKey
Definition: TauExtraVariablesAlg.h:26
ReadHandle.h
Handle class for reading from StoreGate.
CP::TauExtraVariablesAlg::initialize
virtual StatusCode initialize() override
Definition: TauExtraVariablesAlg.cxx:16
TauExtraVariablesAlg.h