ATLAS Offline Software
Loading...
Searching...
No Matches
TauJetReaderAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: TauJetReaderAlg.cxx 632174 2014-11-29 15:23:36Z krasznaa $
6
7// EDM include(s):
9
10// Local include(s):
11#include "TauJetReaderAlg.h"
12
13namespace xAODMaker {
14
15 TauJetReaderAlg::TauJetReaderAlg( const std::string& name,
16 ISvcLocator* svcLoc )
17 : ::AthAlgorithm( name, svcLoc ) {
18 }
19
21
22 // Greet the user:
23 ATH_MSG_INFO( "Initialising" );
24 ATH_MSG_DEBUG( "SGKey = " << m_sgKey );
25
26 // Return gracefully:
27 return StatusCode::SUCCESS;
28 }
29
31
32 // Retrieve the tau container:
33 const xAOD::TauJetContainer* taus = nullptr;
34 ATH_CHECK( evtStore()->retrieve( taus, m_sgKey ) );
35
36 // Print some info about them:
37 ATH_MSG_INFO( "Number of tau jets: " << taus->size() );
38
39 // Loop over them, printing some info about each of them:
40 for( const xAOD::TauJet* tau : *taus ) {
41
42 // Print its 4-momentum:
43 ATH_MSG_DEBUG( " pt = " << tau->pt() << ", eta = " << tau->eta()
44 << ", phi = " << tau->phi() << ", m = " << tau->m() );
45
46 }
47
48 // Return gracefully:
49 return StatusCode::SUCCESS;
50 }
51
52} // namespace xAODMaker
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static Double_t taus
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode initialize()
Function initialising the algorithm.
TauJetReaderAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Gaudi::Property< std::string > m_sgKey
The StoreGate key of the container to be tested.
virtual StatusCode execute()
Function executing the algorithm.
TauJet_v3 TauJet
Definition of the current "tau version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".