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

#include <JetInputProvider.h>

Inheritance diagram for LVL1::JetInputProvider:
Collaboration diagram for LVL1::JetInputProvider:

Public Member Functions

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

Private Attributes

ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool to create online histograms"}
SG::ReadHandleKey< DataVector< JetCMXTopoData > > m_jetLocation
 Jet ROIs SG key.

Detailed Description

Definition at line 16 of file JetInputProvider.h.

Constructor & Destructor Documentation

◆ JetInputProvider()

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

Definition at line 15 of file JetInputProvider.cxx.

16 :
17 base_class(type, name, parent),
19{
20 declareInterface<LVL1::IInputTOBConverter>( this );
21 declareProperty( "JetROILocation", m_jetLocation, "Storegate key for the Jet ROIs" );
22}
SG::ReadHandleKey< DataVector< JetCMXTopoData > > m_jetLocation
Jet ROIs SG key.
static const std::string JetTopoTobLocation

◆ ~JetInputProvider()

JetInputProvider::~JetInputProvider ( )
virtual

Definition at line 24 of file JetInputProvider.cxx.

25{}

Member Function Documentation

◆ fillTopoInputEvent()

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

Definition at line 38 of file JetInputProvider.cxx.

38 {
39 // https://indico.cern.ch/conferenceDisplay.py?confId=284687
40
41
42
43 SG::ReadHandle< DataVector<JetCMXTopoData> > jettobdata (m_jetLocation);
44
45 if(!jettobdata.isValid()){
46 ATH_MSG_WARNING("No DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.key() << "' found in the event. No JET input for the L1Topo simulation.");
47 return StatusCode::RECOVERABLE;
48 }
49
50
51 ATH_MSG_DEBUG("Filling the input event. Number of jet topo data objects: " << jettobdata->size());
52 for(const JetCMXTopoData * topoData : * jettobdata) {
53
54 // fill the vector of TOBs
55 std::vector< JetTopoTOB > tobs;
56 topoData->tobs(tobs);
57
58 ATH_MSG_DEBUG("Jet topo data object has # TOBs: " << tobs.size());
59 for(const JetTopoTOB & tob: tobs) {
60
61 ATH_MSG_DEBUG( "JET TOB with : et large = " << setw(4) << tob.etLarge() << ", et small " << tob.etSmall()
62 << ", eta = " << setw(2) << tob.eta() << ", phi = " << tob.phi()
63 << ", ieta = " << setw(2) << tob.ieta() << ", iphi = " << tob.iphi()
64 << ", word = " << hex << tob.roiWord() << dec
65 );
66
67 TCS::JetTOB jet( tob.etLarge(), tob.etSmall(), tob.ieta(), tob.iphi(), tob.roiWord() );
68 jet.setEtaDouble( tob.eta() );
69 jet.setPhiDouble( tob.phi() );
70 inputEvent.addJet( jet );
71 auto mon_hPt1 = Monitored::Scalar("TOBPt1", jet.Et1());
72 auto mon_hPt2 = Monitored::Scalar("TOBPt2", jet.Et2());
73 auto mon_hPhi = Monitored::Scalar("TOBPhi", jet.phi());
74 auto mon_hEta = Monitored::Scalar("TOBEta", jet.eta());
75 Monitored::Group(m_monTool, mon_hPt1, mon_hPt2, mon_hPhi, mon_hEta);
76 }
77 if(topoData->overflow()){
78 inputEvent.setOverflowFromJetInput(true);
79 ATH_MSG_DEBUG("setOverflowFromJetInput : true");
80 }
81 }
82 return StatusCode::SUCCESS;
83}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
ToolHandle< GenericMonitoringTool > m_monTool
StatusCode addJet(const JetTOB &jet)
void setOverflowFromJetInput(bool v)

◆ initialize()

StatusCode JetInputProvider::initialize ( )
virtual

Definition at line 28 of file JetInputProvider.cxx.

28 {
29
30 CHECK(m_jetLocation.initialize());
31
32 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
33
34 return StatusCode::SUCCESS;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define CHECK(...)
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_jetLocation

SG::ReadHandleKey< DataVector<JetCMXTopoData> > LVL1::JetInputProvider::m_jetLocation
private

Jet ROIs SG key.

Definition at line 31 of file JetInputProvider.h.

◆ m_monTool

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

Definition at line 29 of file JetInputProvider.h.

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

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