ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12
13namespace CP {
14
16
17 if (m_nTracksChargedKey.contHandleKey().key() == m_nTracksChargedKey.key()) {
19 }
20
21 ANA_CHECK(m_tausKey.initialize());
22 ANA_CHECK(m_nTracksChargedKey.initialize());
23
24 // register type for output
25 SG::ConstAccessor<int> (m_nTracksChargedKey.key().substr (m_nTracksChargedKey.key().find_last_of(".") + 1));
26
27 return StatusCode::SUCCESS;
28 }
29
30 StatusCode TauExtraVariablesAlg::execute(const EventContext &ctx) const {
31
33
35 for (const xAOD::TauJet *tau : *taus) {
36 nTracksChargedHandle(*tau) = tau->nTracksCharged();
37 }
38
39 return StatusCode::SUCCESS;
40 }
41
42} // namespace
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
#define ANA_CHECK(EXP)
check whether the given expression was successful
static Double_t taus
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_nTracksChargedKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_tausKey
Helper class to provide constant type-safe access to aux data.
Handle class for adding a decoration to an object.
Select isolated Photons, Electrons and Muons.
TauJet_v3 TauJet
Definition of the current "tau version".