ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloSim
src
Run2CPMTowerMaker.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
// Run2CPMTowerMaker class Implementation
7
// ================================================
8
//
9
//
10
//
11
12
#include <cmath>
13
14
// This algorithm includes
15
#include "
Run2CPMTowerMaker.h
"
16
#include "
TrigT1CaloEvent/CPMTower_ClassDEF.h
"
17
18
19
20
namespace
LVL1
{
21
22
Run2CPMTowerMaker::Run2CPMTowerMaker
(
const
std::string&
name
, ISvcLocator* pSvcLocator )
23
:
AthAlgorithm
(
name
, pSvcLocator ),
24
m_CPMTowerTool
(
"LVL1::L1CPMTowerTools/L1CPMTowerTools"
) {}
25
26
29
StatusCode
Run2CPMTowerMaker::initialize
()
30
{
31
ATH_CHECK
(
m_CPMTowerTool
.retrieve() );
32
ATH_CHECK
(
m_triggerTowerKey
.initialize());
33
ATH_CHECK
(
m_cpmTowerKey
.initialize());
34
return
StatusCode::SUCCESS ;
35
}
36
37
47
48
49
StatusCode
Run2CPMTowerMaker::execute
(
const
EventContext& ctx)
50
{
51
ATH_MSG_DEBUG
(
"Executing"
) ;
52
53
// Vectors to store CPMTs in
54
auto
CPMTs =
SG::makeHandle
(
m_cpmTowerKey
, ctx);
55
auto
vectorOfCPMTs = std::make_unique<CPMTCollection>();
56
auto
cpmtAuxVector = std::make_unique<CPMTAuxCollection>();
57
vectorOfCPMTs->setStore(cpmtAuxVector.get());
58
59
// Retrieve TriggerTowers from StoreGate
60
auto
vectorOfTTs =
SG::makeHandle
(
m_triggerTowerKey
, ctx);
61
ATH_CHECK
(vectorOfTTs.isValid());
62
// Fill a DataVector of CPMTowers using L1CPMTowerTools
63
m_CPMTowerTool
->makeCPMTowers(vectorOfTTs.get(), vectorOfCPMTs.get(),
true
);
64
ATH_MSG_DEBUG
( vectorOfCPMTs->size()<<
" CPMTowers have been generated"
) ;
65
66
if
(
msgLvl
(MSG::DEBUG)) {
67
ATH_MSG_DEBUG
(
"Formed "
<< vectorOfCPMTs->size() <<
" CPM Towers "
) ;
68
69
CPMTCollection::const_iterator
itCPMT;
70
for
(itCPMT = vectorOfCPMTs->begin(); itCPMT != vectorOfCPMTs->end(); ++itCPMT)
71
ATH_MSG_DEBUG
(
"CPMT has coords ("
<< (*itCPMT)->eta() <<
", "
<< (*itCPMT)->phi() <<
") and energies : "
72
<< (*itCPMT)->emEnergy() <<
", "
<< (*itCPMT)->hadEnergy() <<
" (Em,Had)"
);
73
}
74
ATH_CHECK
(CPMTs.record(std::move(vectorOfCPMTs), std::move(cpmtAuxVector)));
75
76
return
StatusCode::SUCCESS;
77
78
}
//end execute
79
80
}
// end of namespace bracket
81
82
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CPMTower_ClassDEF.h
Run2CPMTowerMaker.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition
AthCommonMsg.h:30
DataVector< xAOD::CPMTower_v2 >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
LVL1::Run2CPMTowerMaker::m_cpmTowerKey
SG::WriteHandleKey< CPMTCollection > m_cpmTowerKey
Definition
Run2CPMTowerMaker.h:82
LVL1::Run2CPMTowerMaker::execute
StatusCode execute(const EventContext &ctx)
Definition
Run2CPMTowerMaker.cxx:49
LVL1::Run2CPMTowerMaker::Run2CPMTowerMaker
Run2CPMTowerMaker(const std::string &name, ISvcLocator *pSvcLocator)
Definition
Run2CPMTowerMaker.cxx:22
LVL1::Run2CPMTowerMaker::initialize
StatusCode initialize()
the initialise() method is called at the start of processing, so we set up any histograms etc.
Definition
Run2CPMTowerMaker.cxx:29
LVL1::Run2CPMTowerMaker::m_CPMTowerTool
ToolHandle< LVL1::IL1CPMTowerTools > m_CPMTowerTool
Definition
Run2CPMTowerMaker.h:78
LVL1::Run2CPMTowerMaker::m_triggerTowerKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
locations within the TES to store collections of JEs
Definition
Run2CPMTowerMaker.h:81
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
TrigConf::name
Definition
HLTChainList.h:35
Generated on
for ATLAS Offline Software by
1.17.0