ATLAS Offline Software
LumiBlockMuTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LumiBlockMuTool.h"
7 
8 //--------------------------------------------------
9 
11  const std::string& name,
12  const IInterface* parent)
13  : base_class(type, name, parent)
14 {
15  declareInterface<ILumiBlockMuTool>(this);
16 }
17 
20 {
21  ATH_MSG_DEBUG("LumiBlockMuTool::initialize() begin");
23  ATH_CHECK(m_rdhkActMu.initialize());
24  ATH_CHECK(m_rdhkAveMu.initialize());
25  return StatusCode::SUCCESS;
26 }
27 
28 float
29 LumiBlockMuTool::actualInteractionsPerCrossing(const EventContext& ctx) const {
30 
33  float mu = actMu.isPresent() ? actMu(0) : 0.;
34  return mu;
35 }
36 
37 float
38 LumiBlockMuTool::averageInteractionsPerCrossing(const EventContext& ctx) const{
39 
42  float mu = aveMu.isPresent() ? aveMu(0) : 0.;
43  return mu;
44 }
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LumiBlockMuTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LumiBlockMuTool.h:48
LumiBlockMuTool::averageInteractionsPerCrossing
virtual float averageInteractionsPerCrossing(const EventContext &ctx) const override final
Definition: LumiBlockMuTool.cxx:38
SG::ReadDecorHandle::isPresent
bool isPresent() const
Is the referenced container present in SG?
LumiBlockMuTool::m_rdhkActMu
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkActMu
Definition: LumiBlockMuTool.h:53
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LumiBlockMuTool::initialize
virtual StatusCode initialize() override
Definition: LumiBlockMuTool.cxx:19
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LumiBlockMuTool::m_rdhkAveMu
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkAveMu
Definition: LumiBlockMuTool.h:58
LumiBlockMuTool::actualInteractionsPerCrossing
virtual float actualInteractionsPerCrossing(const EventContext &ctx) const override final
Definition: LumiBlockMuTool.cxx:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ReadDecorHandle.h
Handle class for reading a decoration on an object.
LumiBlockMuTool.h
LumiBlockMuTool::LumiBlockMuTool
LumiBlockMuTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LumiBlockMuTool.cxx:10
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53