ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TauAnalysisAlgorithms
Root
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
7
#include <
TauAnalysisAlgorithms/TauExtraVariablesAlg.h
>
8
9
#include <
AsgDataHandles/ReadHandle.h
>
10
#include <
AsgDataHandles/WriteDecorHandle.h
>
11
12
13
namespace
CP
{
14
15
StatusCode
TauExtraVariablesAlg::initialize
() {
16
17
if
(
m_nTracksChargedKey
.contHandleKey().key() ==
m_nTracksChargedKey
.key()) {
18
m_nTracksChargedKey
=
m_tausKey
.key() +
"."
+
m_nTracksChargedKey
.key();
19
}
20
21
ANA_CHECK
(
m_tausKey
.initialize());
22
ANA_CHECK
(
m_nTracksChargedKey
.initialize());
23
24
return
StatusCode::SUCCESS;
25
}
26
27
StatusCode
TauExtraVariablesAlg::execute
(
const
EventContext &ctx)
const
{
28
29
SG::ReadHandle<xAOD::TauJetContainer>
taus
(
m_tausKey
, ctx);
30
31
SG::WriteDecorHandle<xAOD::TauJetContainer, int>
nTracksChargedHandle(
m_nTracksChargedKey
, ctx);
32
for
(
const
xAOD::TauJet
*tau : *
taus
) {
33
nTracksChargedHandle(*tau) = tau->nTracksCharged();
34
}
35
36
return
StatusCode::SUCCESS;
37
}
38
39
}
// namespace
ReadHandle.h
Handle class for reading from StoreGate.
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
taus
static Double_t taus
Definition
LArPhysWaveHECTool.cxx:37
TauExtraVariablesAlg.h
CP::TauExtraVariablesAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
TauExtraVariablesAlg.cxx:27
CP::TauExtraVariablesAlg::initialize
virtual StatusCode initialize() override
Definition
TauExtraVariablesAlg.cxx:15
CP::TauExtraVariablesAlg::m_nTracksChargedKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_nTracksChargedKey
Definition
TauExtraVariablesAlg.h:26
CP::TauExtraVariablesAlg::m_tausKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_tausKey
Definition
TauExtraVariablesAlg.h:25
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
Event/xAOD/xAODTau/xAODTau/TauJet.h:17
Generated on
for ATLAS Offline Software by
1.14.0