From 3b2259b7d3320a732d93d4e01025f600c32e216b Mon Sep 17 00:00:00 2001 From: Siarhei Harkusha Date: Thu, 12 Dec 2019 19:34:07 +0100 Subject: [PATCH] TileMonitoring: Make luminosity aware Tile histograms extensible Tile monitoring histograms with monitored value vs luminosity block have been made extensible. --- .../python/TileCellMonitorAlgorithm.py | 20 +++++++++++-------- .../python/TileDQFragMonitorAlgorithm.py | 7 ++++--- .../python/TileMBTSMonitorAlgorithm.py | 5 +++-- .../python/TileMonitoringCfgHelper.py | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/TileCalorimeter/TileMonitoring/python/TileCellMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileCellMonitorAlgorithm.py index fa4d7637bfa..67c32c912d4 100644 --- a/TileCalorimeter/TileMonitoring/python/TileCellMonitorAlgorithm.py +++ b/TileCalorimeter/TileMonitoring/python/TileCellMonitorAlgorithm.py @@ -172,32 +172,36 @@ def TileCellMonitoringConfig(flags, **kwargs): titleMaskOnFlyLB += ';LumiBlock;Number of masked channels' addTile1DHistogramsArray(helper, tileCellMonAlg, name = 'TileMaskChannelOnFlyLB', path = 'Tile/Cell', xvalue = 'lumiBlock', value= 'nMaskedChannelsOnFly', title = titleMaskOnFlyLB, - xbins = 1000, xmin = 0., xmax = 1000., type = 'TProfile', run = run, triggers = [], - perPartition = True, perSample = False, perGain = False, subDirectory = False) + xbins = 1000, xmin = -0.5, xmax = 999.5, type = 'TProfile', run = run, triggers = [], + perPartition = True, perSample = False, perGain = False, subDirectory = False, + opt = 'kAddBinsDynamically') # 17) Configure histograms with number of masked Tile cells on the fly vs lumi block per partition titleMaskCellLB = 'Number of masked cells on the fly' titleMaskCellLB += ';LumiBlock;Number of masked cells' addTile1DHistogramsArray(helper, tileCellMonAlg, name = 'TileMaskCellLB', path = 'Tile/Cell', xvalue = 'lumiBlock', value = 'nMaskedCells', title = titleMaskCellLB, - xbins = 1000, xmin = 0., xmax = 1000., type='TProfile', run = run, triggers = [], - subDirectory = False, perPartition = True, perSample = False, perGain = False) + xbins = 1000, xmin = -0.5, xmax = 999.5, type='TProfile', run = run, triggers = [], + subDirectory = False, perPartition = True, perSample = False, perGain = False, + opt = 'kAddBinsDynamically') # 18) Configure histograms with number of masked Tile channels on the fly due to bad DQ status vs lumi block per partition titleMaskDueDQ = 'Number of masked channels on the fly due to bad DQ status' titleMaskDueDQ += ';LumiBlock;Number of masked channels' addTile1DHistogramsArray(helper, tileCellMonAlg, name = 'TileMaskChannelDueDQvsLB', path = 'Tile/Cell', xvalue = 'lumiBlock', value = 'nMaskedChannelsDueDQ', title = titleMaskDueDQ, - xbins = 1000, xmin = 0., xmax = 1000., type='TProfile', run = run, triggers = [], - subDirectory = False, perPartition = True, perSample = False, perGain = False) + xbins = 1000, xmin = -0.5, xmax = 999.5, type='TProfile', run = run, triggers = [], + subDirectory = False, perPartition = True, perSample = False, perGain = False, + opt = 'kAddBinsDynamically') # 19) Configure histograms with number of masked Tile cells on the fly due to bad DQ status vs lumi block per partition titleMaskCellDueDQ = 'Number of masked cells on the fly due to bad DQ status' titleMaskCellDueDQ += ';LumiBlock;Number of masked cells' addTile1DHistogramsArray(helper, tileCellMonAlg, name = 'TileMaskedCellDueDQvsLB', path = 'Tile/Cell', xvalue = 'lumiBlock', value = 'nMaskedCellsDueDQ', title = titleMaskCellDueDQ, - xbins = 1000, xmin = 0., xmax = 1000., type='TProfile', run = run, triggers = [], - subDirectory = False, perPartition = True, perSample = False, perGain = False) + xbins = 1000, xmin = -0.5, xmax = 999.5, type='TProfile', run = run, triggers = [], + subDirectory = False, perPartition = True, perSample = False, perGain = False, + opt = 'kAddBinsDynamically') # 20) Configure histograms with energy difference between Tile cells' PMTs per partition and sample addTile1DHistogramsArray(helper, tileCellMonAlg, name = 'TileCellEneDiff', xvalue = 'energyDiff', diff --git a/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py index ff9043fc61f..4dd5956d38a 100644 --- a/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py +++ b/TileCalorimeter/TileMonitoring/python/TileDQFragMonitorAlgorithm.py @@ -106,7 +106,7 @@ def _TileDQFragMonitoringCore(helper, runNumber, **kwargs): errorStateGroup = helper.addGroup(tileDQFragMonAlg, 'TileEventsWithErrEventInfoLB', 'Tile/DMUErrors') errorStateGroup.defineHistogram('lumiBlock;TileEventsWithErrEventInfo', path = 'BadDrawers', type='TH1F', title = '# events with Tile error state in EventInfo;LumiBlock;# events with error', - xbins = 1000, xmin = -0.5, xmax = 999.5) + xbins = 1000, xmin = -0.5, xmax = 999.5, opt = 'kAddBinsDynamically') # 3) Configure histogram with number of consecutive bad Tile modules consecutiveBadGroup = helper.addGroup(tileDQFragMonAlg, 'TileConsecutiveBadModules', 'Tile/DMUErrors') @@ -118,7 +118,8 @@ def _TileDQFragMonitoringCore(helper, runNumber, **kwargs): consecutiveBadLBGroup = helper.addGroup(tileDQFragMonAlg, 'TileConsecutiveBadModulesLB', 'Tile/DMUErrors') consecutiveBadLBGroup.defineHistogram('lumiBlock,TileConsecutiveBad;TileConsecutiveBadLB', path = 'BadDrawers', type='TH2F', title = 'Max # Tile consecutive bad modules;LumiBlock;# consecutive bad modules', - xbins = 1000, xmin = -0.5, xmax = 999.5, ybins = 17, ymin = -0.5, ymax = 16.5) + xbins = 1000, xmin = -0.5, xmax = 999.5, ybins = 17, ymin = -0.5, ymax = 16.5, + opt = 'kAddBinsDynamically') from TileMonitoring.TileMonitoringCfgHelper import getPartitionName @@ -187,7 +188,7 @@ def _TileDQFragMonitoringCore(helper, runNumber, **kwargs): name = 'lumiBlock,fractionOfBadDMUs;FracTileDigiErrors' + moduleName tool.defineHistogram(name, title = title, path = 'DMUErrors', type = 'TProfile', - xbins = 1000, xmin = -0.5, xmax = 999.5) + xbins = 1000, xmin = -0.5, xmax = 999.5, opt = 'kAddBinsDynamically') diff --git a/TileCalorimeter/TileMonitoring/python/TileMBTSMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileMBTSMonitorAlgorithm.py index ea93f19b318..5d40788126f 100644 --- a/TileCalorimeter/TileMonitoring/python/TileMBTSMonitorAlgorithm.py +++ b/TileCalorimeter/TileMonitoring/python/TileMBTSMonitorAlgorithm.py @@ -140,7 +140,8 @@ def _TileMBTSMonitoringConfigCore(helper, runNumber, **kwargs): timeDifferenceLBGroup.defineHistogram('lumiBlock,TimeDifference;TimeDiff_A-C_LB', path = 'MBTS/Cell', type='TH2F', title = ('Run ' + run + ': Time difference between MBTS on A and C sides vs LumiBlock' + ';Luminosity Block;Time difference A-side - C-side [ns]'), - xbins = 1000, xmin = -0.5, xmax = 999.5, ybins = 151, ymin = -75.5, ymax = 75.5) + xbins = 1000, xmin = -0.5, xmax = 999.5, ybins = 151, ymin = -75.5, ymax = 75.5, + opt = 'kAddBinsDynamically') # 9) Configure histogram with coincident Hits (energy) between two MBTS counters labelsCoincidentMBTS = labelsMBTS + labelsMBTS @@ -187,7 +188,7 @@ def _TileMBTSMonitoringConfigCore(helper, runNumber, **kwargs): title = 'Run ' + run + ': Energy of ' + mbtsName + ' per lumiblock;Lumiblocks;Energy [pC]' name = 'lumiBlock,Energy;EnergyLB_' + mbtsName tool.defineHistogram(name, title = title, type = 'TProfile', path = 'Cell', - xbins = 1000, xmin = -0.5, xmax = 999.5) + xbins = 1000, xmin = -0.5, xmax = 999.5, opt = 'kAddBinsDynamically') # 13) Configure histogram with MBTS counter time timeArray = helper.addArray([numberOfMBTS], tileMBTSMonAlg, 'TileTimeMBTS', topPath = 'Tile/MBTS') diff --git a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py index 71080893bc1..90b6b95f8e1 100644 --- a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py +++ b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py @@ -494,7 +494,7 @@ def addTileEtaPhiMapsArray(helper, algorithm, name, title, path, weight = '', ty def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = '', title = '', path = '', xbins = 0, xmin = 0, xmax = 0, type = 'TH1D', run = '', triggers = [], - subDirectory = False, perPartition = True, perSample = False, + subDirectory = False, perPartition = True, perSample = False, opt = '', perGain = False, labels = (), allPartitions = False, separator = '_' ): ''' This function configures 1D histograms with Tile monitored value per L1 trigger, partition, sample, gain. @@ -540,7 +540,7 @@ def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = fullTitle = getTileHistogramTitle(title = title, run = run, **kwargs) tool.defineHistogram( fullName, path = fullPath, type = type, title = fullTitle, - labels = labels, xbins = xbins, xmin = xmin, xmax = xmax) + labels = labels, xbins = xbins, xmin = xmin, xmax = xmax, opt = opt) return array -- GitLab