ATLAS Offline Software
Loading...
Searching...
No Matches
LumiBlockMuTool Class Reference

Tool to provide interactions per crossing (mu) from reading values stored in DB. More...

#include <LumiBlockMuTool.h>

Inheritance diagram for LumiBlockMuTool:
Collaboration diagram for LumiBlockMuTool:

Public Member Functions

virtual float averageInteractionsPerCrossing (const EventContext &ctx) const override final
virtual float actualInteractionsPerCrossing (const EventContext &ctx) const override final
virtual StatusCode initialize () override

Private Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
SG::ReadDecorHandleKey< xAOD::EventInfom_rdhkActMu
SG::ReadDecorHandleKey< xAOD::EventInfom_rdhkAveMu

Detailed Description

Tool to provide interactions per crossing (mu) from reading values stored in DB.

Implementing ILumiBlockMuTool interface

Author
E.Torrence

Definition at line 28 of file LumiBlockMuTool.h.

Member Function Documentation

◆ actualInteractionsPerCrossing()

float LumiBlockMuTool::actualInteractionsPerCrossing ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 21 of file LumiBlockMuTool.cxx.

21 {
22
23 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
24 SG::ReadDecorHandle<xAOD::EventInfo,float> actMu(m_rdhkActMu, ctx);
25 float mu = actMu.isPresent() ? actMu(0) : 0.;
26 return mu;
27}
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkActMu
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey

◆ averageInteractionsPerCrossing()

float LumiBlockMuTool::averageInteractionsPerCrossing ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 30 of file LumiBlockMuTool.cxx.

30 {
31
32 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
33 SG::ReadDecorHandle<xAOD::EventInfo,float> aveMu(m_rdhkAveMu, ctx);
34 float mu = aveMu.isPresent() ? aveMu(0) : 0.;
35 return mu;
36}
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkAveMu

◆ initialize()

StatusCode LumiBlockMuTool::initialize ( )
overridevirtual

Definition at line 11 of file LumiBlockMuTool.cxx.

12{
13 ATH_MSG_DEBUG("LumiBlockMuTool::initialize() begin");
14 ATH_CHECK(m_eventInfoKey.initialize());
15 ATH_CHECK(m_rdhkActMu.initialize());
16 ATH_CHECK(m_rdhkAveMu.initialize());
17 return StatusCode::SUCCESS;
18}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LumiBlockMuTool::m_eventInfoKey
private
Initial value:
{this
,"EventInfoKey"
,"EventInfo"
,"RHK for EventInfo"}

Definition at line 46 of file LumiBlockMuTool.h.

46 {this
47 ,"EventInfoKey"
48 ,"EventInfo"
49 ,"RHK for EventInfo"};

◆ m_rdhkActMu

SG::ReadDecorHandleKey<xAOD::EventInfo> LumiBlockMuTool::m_rdhkActMu
private
Initial value:
{this
,"actualInteractionsPerCrossingKey"
,m_eventInfoKey, "actualInteractionsPerCrossing"
,"Decoration for Actual Interaction Per Crossing"}

Definition at line 51 of file LumiBlockMuTool.h.

51 {this
52 ,"actualInteractionsPerCrossingKey"
53 ,m_eventInfoKey, "actualInteractionsPerCrossing"
54 ,"Decoration for Actual Interaction Per Crossing"};

◆ m_rdhkAveMu

SG::ReadDecorHandleKey<xAOD::EventInfo> LumiBlockMuTool::m_rdhkAveMu
private
Initial value:
{this
,"averageInteractionsPerCrossingKey"
,m_eventInfoKey, "averageInteractionsPerCrossing"
,"Decoration for Average Interaction Per Crossing"}

Definition at line 56 of file LumiBlockMuTool.h.

56 {this
57 ,"averageInteractionsPerCrossingKey"
58 ,m_eventInfoKey, "averageInteractionsPerCrossing"
59 ,"Decoration for Average Interaction Per Crossing"};

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