ATLAS Offline Software
Loading...
Searching...
No Matches
Run2JetElementMaker.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ================================================
6// Run2JetElementMaker class Implementation
7// ================================================
8//
9//
10//
11
12
13// This algorithm includes
14#include "Run2JetElementMaker.h"
15
16
17namespace LVL1 {
18
19Run2JetElementMaker::Run2JetElementMaker( const std::string& name, ISvcLocator* pSvcLocator )
20 : AthAlgorithm( name, pSvcLocator ),
21 m_JetElementTool("LVL1::L1JetElementTools/L1JetElementTools")
22{
23}
24
25
29{
30 ATH_CHECK( m_JetElementTool.retrieve() );
31 ATH_CHECK(m_triggerTowerKey.initialize());
32 ATH_CHECK(m_jetElementKey.initialize());
33 return StatusCode::SUCCESS ;
34}
35
36
44
45
47{
48 ATH_MSG_DEBUG ( "Executing" ) ;
49
50 // Vectors to store JetElements in
51 auto jetElements = SG::makeHandle(m_jetElementKey);
52 auto vectorOfJEs = std::make_unique<JECollection>();
53 auto jeAuxVector = std::make_unique<JEAuxCollection>();
54 vectorOfJEs->setStore(jeAuxVector.get());
55
56 // Retrieve TriggerTowers from StoreGate
57 auto vectorOfTTs = SG::makeHandle(m_triggerTowerKey);
58 ATH_CHECK(vectorOfTTs.isValid());
59 // Fill a DataVector of JetElements using L1JetElementTools
60 m_JetElementTool->makeJetElements(vectorOfTTs.get(), vectorOfJEs.get());
61 ATH_MSG_DEBUG( vectorOfJEs->size()<<" JetElements have been generated") ;
62 ATH_CHECK(jetElements.record(std::move(vectorOfJEs), std::move(jeAuxVector)));
63
64 return StatusCode::SUCCESS;
65}//end execute
66
67} // end of namespace bracket
68
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
StatusCode initialize()
the initialise() method is called at the start of processing, so we set up any histograms etc.
ToolHandle< LVL1::IL1JetElementTools > m_JetElementTool
SG::WriteHandleKey< JECollection > m_jetElementKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
Run2JetElementMaker(const std::string &name, ISvcLocator *pSvcLocator)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())