ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::EnergyInputProvider Class Reference

#include <EnergyInputProvider.h>

Inheritance diagram for LVL1::EnergyInputProvider:
Collaboration diagram for LVL1::EnergyInputProvider:

Public Member Functions

 EnergyInputProvider (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~EnergyInputProvider ()
virtual StatusCode initialize ()
virtual StatusCode fillTopoInputEvent (TCS::TopoInputEvent &) const

Private Attributes

ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
SG::ReadHandleKey< LVL1::EnergyTopoDatam_energyLocation
 EnergyROI SG key.

Detailed Description

Definition at line 16 of file EnergyInputProvider.h.

Constructor & Destructor Documentation

◆ EnergyInputProvider()

EnergyInputProvider::EnergyInputProvider ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 18 of file EnergyInputProvider.cxx.

19 :
20 base_class(type, name, parent),
22{
23 declareInterface<LVL1::IInputTOBConverter>( this );
24 declareProperty( "EnergyROILocation", m_energyLocation, "Storegate key for reading the Topo Energy ROI" );
25
26}
SG::ReadHandleKey< LVL1::EnergyTopoData > m_energyLocation
EnergyROI SG key.
static const std::string EnergyTopoDataLocation

◆ ~EnergyInputProvider()

EnergyInputProvider::~EnergyInputProvider ( )
virtual

Definition at line 28 of file EnergyInputProvider.cxx.

29{}

Member Function Documentation

◆ fillTopoInputEvent()

StatusCode EnergyInputProvider::fillTopoInputEvent ( TCS::TopoInputEvent & inputEvent) const
virtual

https://indico.cern.ch/conferenceDisplay.py?confId=284687 Energy ROI: | 0 1 0 0 | T | 0 0 0 | 8b Missing ET Sig hits (or 8*0) | XO | 15b Signed Ex | | 0 1 0 1 | T | 0 0 0 | 8b Missing ET hits | YO | 15b Signed Ey | | 0 1 1 0 | T | 0 0 0 | 8b Sum ET hits | TO | 15b Unsigned Sum ET | T = sum type: 0-normal, 1-masked O = overflow Ex, Ey, Et

Definition at line 42 of file EnergyInputProvider.cxx.

42 {
43
52
53// EnergyRoI * energyROI = 0;
54// if( ! evtStore()->retrieve(energyROI, m_energyLocation).isSuccess()) {
55// ATH_MSG_ERROR("No EnergyROI with key '" << m_energyLocation << "' found in the event. Configuration issue.");
56// return StatusCode::FAILURE;
57// }
58
59// ATH_MSG_DEBUG("Not filling the input event from EnergyROI. There is not enough information.");
60// ATH_MSG_DEBUG("EnergyROI: word0 = " << hex << energyROI->roiWord0()
61// << ", word1 = " << hex << energyROI->roiWord1()
62// << ", word2 = " << hex << energyROI->roiWord2());
63
64
65 SG::ReadHandle< EnergyTopoData > topoData (m_energyLocation);
66
67 if( !topoData.isValid()){
68 ATH_MSG_WARNING("No EnergyTopoData with SG key '" << m_energyLocation.key() << "' found in the event. No MET input for the L1Topo simulation.");
69 return StatusCode::RECOVERABLE;
70 }
71
72 ATH_MSG_DEBUG( "EnergyTopoData" << dec
73 << ": Ex = " << topoData->Ex()
74 << ", Ey = " << topoData->Ey()
75 << ", Et = " << topoData->Et()
76 << ", ExTC = " << topoData->ExTC()
77 << ", EyTC = " << topoData->EyTC()
78 );
79
80
81 TCS::MetTOB met( -(topoData->Ex()), -(topoData->Ey()), topoData->Et() );
82 inputEvent.setMET( met );
83 const bool has_overflow = (topoData->ExOverflow() or
84 topoData->EyOverflow() or
85 topoData->EtOverflow());
86 if(has_overflow) {
87 inputEvent.setOverflowFromEnergyInput(true);
88 ATH_MSG_DEBUG("setOverflowFromEnergyInput : true");
89 }
90 auto mon_hPt = Monitored::Scalar("MET", met.Et());
91 auto mon_hPhi = Monitored::Scalar("METPhi", atan2(met.Ey(),met.Ex()));
92 Monitored::Group(m_monTool, mon_hPt, mon_hPhi);
93
94 return StatusCode::SUCCESS;
95}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode setMET(const MetTOB &met)
void setOverflowFromEnergyInput(bool v)

◆ initialize()

StatusCode EnergyInputProvider::initialize ( )
virtual

Definition at line 32 of file EnergyInputProvider.cxx.

32 {
33
34 CHECK(m_energyLocation.initialize());
35
36 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
37
38 return StatusCode::SUCCESS;
39}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define CHECK(...)
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_energyLocation

SG::ReadHandleKey< LVL1::EnergyTopoData > LVL1::EnergyInputProvider::m_energyLocation
private

EnergyROI SG key.

Definition at line 31 of file EnergyInputProvider.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> LVL1::EnergyInputProvider::m_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
private

Definition at line 29 of file EnergyInputProvider.h.

29{this, "MonTool", "", "Monitoring tool to create online histograms"};

The documentation for this class was generated from the following files: