ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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. More...
 

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 }

◆ ~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 
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 
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 }

◆ initialize()

StatusCode EnergyInputProvider::initialize ( )
virtual

Definition at line 32 of file EnergyInputProvider.cxx.

32  {
33 
35 
36  if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
37 
38  return StatusCode::SUCCESS;
39 }

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.


The documentation for this class was generated from the following files:
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TCS::MetTOB
Definition: MetTOB.h:13
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
met
Definition: IMETSignificance.h:24
TCS::TopoInputEvent::setOverflowFromEnergyInput
void setOverflowFromEnergyInput(bool v)
Definition: TopoInputEvent.cxx:278
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::EnergyInputProvider::m_energyLocation
SG::ReadHandleKey< LVL1::EnergyTopoData > m_energyLocation
EnergyROI SG key.
Definition: EnergyInputProvider.h:31
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TrigConf::name
Definition: HLTChainList.h:35
TCS::TopoInputEvent::setMET
StatusCode setMET(const MetTOB &met)
Definition: TopoInputEvent.cxx:137
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LVL1::EnergyInputProvider::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: EnergyInputProvider.h:29
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
LVL1::TrigT1CaloDefs::EnergyTopoDataLocation
static const std::string EnergyTopoDataLocation
Definition: TrigT1CaloDefs.h:87