Skip to content
Snippets Groups Projects
Commit c0243d93 authored by Iskander Ibragimov's avatar Iskander Ibragimov Committed by Edward Moyse
Browse files

re-enabling FE status histograms (pixel monitoring)

parent fb3ddd68
No related branches found
No related tags found
No related merge requests found
#
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
'''
......@@ -33,25 +33,20 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs):
title = 'Modules Status Reset (0=Active+Good, 1=Active+Bad, 2=Inactive)'
define2DProfHist(helper, alg, histoGroupName, title, path, type='TProfile2D', zmin=0, zmax=2, opt='kLBNHistoryDepth=2', histname='MapOfModulesStatusMon')
if doLumiBlock:
title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfModulesStatusLB')
### disabled for the moment - filling code requires more testing
if doFEPlots:
histoGroupName = 'MapOfFEsStatus'
title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
define2DProfPerFEHist(helper, alg, histoGroupName, title, path, type='TProfile2D')
# if doFEPlots:
# histoGroupName = 'MapOfFEsStatus'
# title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
# histlbname = 'MapOfFEsStatusLB'
# define2DProfPerFEHist(helper, alg, histoGroupName, title, path, type='TProfile2D')
#
# if doLumiBlock:
# if not doFEPlots:
# title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
# define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfModulesStatusLB')
# else:
# title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
# define2DProfPerFEHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfFEsStatusLB')
if doLumiBlock:
if not doFEPlots:
histoGroupName = 'MapOfModulesStatus'
title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfModulesStatusLB')
else:
histoGroupName = 'MapOfFEsStatus'
title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)'
define2DProfPerFEHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfFEsStatusLB')
histoGroupName = 'BadModulesPerLumi'
title = 'Number of bad modules (bad+active) per event per LB'
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "PixelAthClusterMonAlg.h"
......@@ -109,23 +109,27 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons
// Per FE Status
//
/*
// code requires testing w/ different pixel conditions - could cause segfault!
if (m_doFEPlots) {
int nFE = getNumberOfFEs(pixlayer, m_pixelid->eta_module(waferID));
for (int iFE=0; iFE<nFE; iFE++) {
Identifier pixelID = m_pixelCablingSvc->getPixelIdfromHash(id_hash, iFE, 1, 1);
if (m_pixelCondSummaryTool->isActive(id_hash, pixelID) == true && m_pixelCondSummaryTool->isGood(id_hash) == true) {
index = 0; // active and good FE
} else if (m_pixelCondSummaryTool->isActive(id_hash, pixelID) == false) {
index = 2; // inactive or bad FE
if (pixelID.is_valid()) {
if (m_pixelCondSummaryTool->isActive(id_hash, pixelID) == true && m_pixelCondSummaryTool->isGood(id_hash, pixelID) == true) {
index = 0; // active and good FE
} else if (m_pixelCondSummaryTool->isActive(id_hash, pixelID) == false) {
index = 2; // inactive or bad FE
} else {
index = 1; // active and bad FE
}
Map_Of_FEs_Status.add(pixlayer, waferID, m_pixelid, iFE, index);
} else {
index = 1; // active and bad FE
ATH_MSG_ERROR("PixelMonitoring: got invalid pixelID " << pixelID << " from id_hash " << id_hash << " with FE#"<< iFE << ".");
}
Map_Of_FEs_Status.add(pixlayer, waferID, m_pixelid, iFE, index);
}
}
*/
} // end of pixelid wafer loop
fill2DProfLayerAccum( Map_Of_Modules_Status );
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "PixelAthErrorMonAlg.h"
......@@ -247,35 +247,38 @@ StatusCode PixelAthErrorMonAlg::fillHistograms( const EventContext& ctx ) const
if (pixlayer == PixLayers::kIBL) {
pixID = m_pixelCablingSvc->getPixelIdfromHash(modHash, iFE, 1, 1);
}
for (int i = 0; i < ErrorCategoryRODMOD::COUNT; i++) {
if (nerrors_cat_rodmod[i][iFE]) {
if (getErrorCategory(i+1)!=99) has_err_cat[getErrorCategory(i+1)][iFE] = true;
num_errormodules_per_cat_rodmod[i][pixlayer]++;
if (!m_doOnline) {
all_errors_maps.add(pixlayer, pixID, m_pixelid, nerrors_cat_rodmod[i][iFE]);
if (i<ErrorCategoryRODMOD::kTruncROD+1) {
error_maps_per_cat_rodmod[i].add(pixlayer, pixID, m_pixelid, 1.0);
if (i==0) modsync_errors_maps.add(pixlayer, pixID, m_pixelid, 1.0);
if (i==1) rodsync_errors_maps.add(pixlayer, pixID, m_pixelid, 1.0);
if (pixID.is_valid()) {
for (int i = 0; i < ErrorCategoryRODMOD::COUNT; i++) {
if (nerrors_cat_rodmod[i][iFE]) {
if (getErrorCategory(i+1)!=99) has_err_cat[getErrorCategory(i+1)][iFE] = true;
num_errormodules_per_cat_rodmod[i][pixlayer]++;
if (!m_doOnline) {
all_errors_maps.add(pixlayer, pixID, m_pixelid, nerrors_cat_rodmod[i][iFE]);
if (i<ErrorCategoryRODMOD::kTruncROD+1) {
error_maps_per_cat_rodmod[i].add(pixlayer, pixID, m_pixelid, 1.0);
if (i==0) modsync_errors_maps.add(pixlayer, pixID, m_pixelid, 1.0);
if (i==1) rodsync_errors_maps.add(pixlayer, pixID, m_pixelid, 1.0);
}
}
}
}
}
for (int i = 0; i < ErrorCategory::COUNT; i++) {
if (has_err_cat[i][iFE]) {
num_errormodules_per_cat[i][pixlayer]++;
if (!m_doOnline) {
error_maps_per_cat[i].add(pixlayer, pixID, m_pixelid, 1.0);
for (int i = 0; i < ErrorCategory::COUNT; i++) {
if (has_err_cat[i][iFE]) {
num_errormodules_per_cat[i][pixlayer]++;
if (!m_doOnline) {
error_maps_per_cat[i].add(pixlayer, pixID, m_pixelid, 1.0);
}
}
}
}
// filling nActive modules per layer for later normalization
// for IBL (and DBM) normalization isdone by number of FEI4
if ( (pixlayer != PixLayers::kIBL && m_pixelCondSummaryTool->isActive(modHash) == true) ||
(pixlayer == PixLayers::kIBL && m_pixelCondSummaryTool->isActive(modHash, pixID) == true) ) {
nActive_layer[pixlayer]++;
// filling nActive modules per layer for later normalization
// for IBL (and DBM) normalization isdone by number of FEI4
if ( (pixlayer != PixLayers::kIBL && m_pixelCondSummaryTool->isActive(modHash) == true) ||
(pixlayer == PixLayers::kIBL && m_pixelCondSummaryTool->isActive(modHash, pixID) == true) ) {
nActive_layer[pixlayer]++;
}
} else {
ATH_MSG_ERROR("PixelMonitoring: got invalid pixID " << pixID);
}
} // loop over FEs
......
......@@ -291,10 +291,12 @@ int PixelAthMonitoringBase::getPixLayersID(int ec, int ld) const {
///
int PixelAthMonitoringBase::getNumberOfFEs(int pixlayer, int etaMod) const {
int nFE(16);
if (pixlayer == PixLayers::kIBL || pixlayer == PixLayers::kDBMC || pixlayer == PixLayers::kDBMA) {
if (pixlayer == PixLayers::kIBL) {
nFE = 1; // IBL 3D
if (etaMod>-7 && etaMod<6) nFE = 2; // IBL Planar
} else if (pixlayer == PixLayers::kDBMC || pixlayer == PixLayers::kDBMA) {
nFE = 1;
if (etaMod>-7 && etaMod<6) nFE = 2; //IBL Planar
}
}
return nFE;
}
//////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment