Commit bee57db4 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

TrigT1Monitoring: cabling optimization

Fetch LArOnOffIdMapping and pass it to hasMissingFEB/matchCell2Tower,
to avoid having to do the conditions lookup for each trigger tower.
parent 09a746db
......@@ -380,7 +380,7 @@ StatusCode L1CaloHVScalesMon::fillHistograms()
Identifier ttId1(0);
Identifier ttId2(0);
m_cells2tt->matchCell2Tower(caloCell, ttId1, ttId2);
m_cells2tt->matchCell2Tower(**cabling, caloCell, ttId1, ttId2);
if (ttId1 != invalidId) {
const double eta = m_ttIdTools->IDeta(ttId1);
......@@ -505,7 +505,7 @@ StatusCode L1CaloHVScalesMon::fillHistograms()
if (m_ttTool->disabledChannel(em_coolId)) {
m_histTool->fillPPMEmEtaVsPhi(m_h_emDisabled, eta, phi);
}
if (m_larEnergy->hasMissingFEB(em_ident)) {
if (m_larEnergy->hasMissingFEB(**cabling, em_ident)) {
m_histTool->fillPPMEmEtaVsPhi(m_h_emFEB, eta, phi);
}
if (absEta > 1.5) {
......@@ -514,7 +514,7 @@ StatusCode L1CaloHVScalesMon::fillHistograms()
if (m_ttTool->disabledChannel(had_coolId)) {
m_histTool->fillPPMHadEtaVsPhi(m_h_hadDisabled, eta, phi);
}
if (m_larEnergy->hasMissingFEB(had_ident)) {
if (m_larEnergy->hasMissingFEB(**cabling, had_ident)) {
m_histTool->fillPPMHadEtaVsPhi(m_h_hadFEB, eta, phi);
}
}
......
......@@ -15,6 +15,7 @@
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/StatusCode.h"
#include "StoreGate/ReadCondHandle.h"
#include "LWHists/TH2F_LW.h"
......@@ -138,6 +139,8 @@ StatusCode L1CaloPMTScoresMon:: initialize()
return sc;
}
ATH_CHECK( m_cablingKey.initialize() );
return StatusCode::SUCCESS;
}
......@@ -212,6 +215,8 @@ StatusCode L1CaloPMTScoresMon::fillHistograms()
{
if (m_events > 0) return StatusCode::SUCCESS;
SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey);
const bool debug = msgLvl(MSG::DEBUG);
if (debug) msg(MSG::DEBUG) << "in fillHistograms()" << endmsg;
......@@ -260,7 +265,7 @@ StatusCode L1CaloPMTScoresMon::fillHistograms()
Identifier ttId1(0);
Identifier ttId2(0);
m_cells2tt->matchCell2Tower(caloCell, ttId1, ttId2);
m_cells2tt->matchCell2Tower(**cabling, caloCell, ttId1, ttId2);
if (ttId1 != invalidId) {
const double eta = m_ttIdTools->IDeta(ttId1);
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
......@@ -18,6 +18,8 @@
#include <vector>
#include "GaudiKernel/ToolHandle.h"
#include "LArCabling/LArOnOffIdMapping.h"
#include "StoreGate/ReadCondHandleKey.h"
#include "AthenaMonitoring/ManagedMonitorToolBase.h"
......@@ -154,6 +156,9 @@ private:
/// Root histograms directory
std::string m_PathInRootFile;
SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey
{ this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object" };
/// Event counter
int m_events;
/// Histograms booked flag
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment