diff --git a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py index 939c7e73a3e2f6a143cce1766d62ba9e4ed9d68f..1579fa5ea5d471371e309991731f043f6e4e3ad5 100644 --- a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py +++ b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py @@ -195,7 +195,6 @@ def _options(opt): # @param weight Name of the variable containing the fill weight # @param cutmask Name of the boolean-castable variable that determines if the plot is filled # @param opt String or dictionary of histogram options -# @param labels Deprecated. Copies value to xlabels and/or ylabels. # @param treedef Internal use only. Use defineTree() method. # @param xlabels List of x bin labels. # @param ylabels List of y bin labels. @@ -207,7 +206,7 @@ def defineHistogram(varname, type='TH1F', path=None, xbins=100, xmin=0, xmax=1, xlabels=None, ybins=None, ymin=None, ymax=None, ylabels=None, zmin=None, zmax=None, zlabels=None, - opt=None, labels=None, convention=None, cutmask=None, + opt=None, convention=None, cutmask=None, treedef=None, merge=None): # All of these fields default to an empty string @@ -310,23 +309,6 @@ def defineHistogram(varname, type='TH1F', path=None, if zmax is not None: settings['zmax'] = zmax - # Bin labels - # First, handle the deprecated labels argument - if labels is not None: - assert xlabels is None and ylabels is None and zlabels is None,'Mixed use of \ - depricated "labels" argument with [xyz]labels arguments.' - log.warning('Histogram %s configured with deprecated "labels" argument. Please use "xlabels" and "ylabels" instead.', - settings['title']) - nLabels = len(labels) - if nLabels==xbins: - xlabels = labels - elif nLabels>xbins: - nybins = 0 if ybins is None else ybins - if nLabels > xbins+nybins: - log.warning('More labels specified for %s (%d) than there are x+y bins (%d+%d)', - settings['title'], nLabels, xbins, nybins) - xlabels = labels[:xbins] - ylabels = labels[xbins:xbins+nybins] # Then, parse the [xyz]label arguments if xlabels is not None and len(xlabels)>0: assert isinstance(xlabels, (list, tuple)),'xlabels must be list or tuple' diff --git a/DataQuality/DataQualityTools/python/DQTBackgroundMon.py b/DataQuality/DataQualityTools/python/DQTBackgroundMon.py index 844f71746ac4c37bcdfa943d97c31875ee3b7220..913478adf49301371e8ffe295997c479cd6226ac 100644 --- a/DataQuality/DataQualityTools/python/DQTBackgroundMon.py +++ b/DataQuality/DataQualityTools/python/DQTBackgroundMon.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # def DQTBackgroundMonAlgConfig(flags, isOld=False): @@ -39,19 +39,19 @@ def DQTBackgroundMonAlgConfig(flags, isOld=False): "CosmicStandAlone","CosmicStandAloneTight","CosmicCombined", "CosmicCombinedTight","BkgdResvBit1","BkgdResvBit2","BkgdResvBit3", "BkgdResvBit4","BkgdResvBit5"] - group.defineHistogram('bitSet', title=bgT, labels=bitSetLabels, + group.defineHistogram('bitSet', title=bgT, xlabels=bitSetLabels, xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels)) group.defineHistogram('bitSetFilled', weight='filled', - title=bgT+filledT, labels=bitSetLabels, + title=bgT+filledT, xlabels=bitSetLabels, xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels)) group.defineHistogram('bitSetEmpty', weight='empty', - title=bgT+emptyT, labels=bitSetLabels, + title=bgT+emptyT, xlabels=bitSetLabels, xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels)) group.defineHistogram('bitSetUnpairIso', weight='unpairIso', - title=bgT+unpairIsoT, labels=bitSetLabels, + title=bgT+unpairIsoT, xlabels=bitSetLabels, xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels)) group.defineHistogram('bitSetUnpairNonIso', weight='unpairNonIso', - title=bgT+unpairNonIsoT, labels=bitSetLabels, + title=bgT+unpairNonIsoT, xlabels=bitSetLabels, xbins=len(bitSetLabels),xmin=0,xmax=len(bitSetLabels)) # Pixel spacepoint histograms diff --git a/DataQuality/DataQualityTools/python/DQTDataFlowMonAlg.py b/DataQuality/DataQualityTools/python/DQTDataFlowMonAlg.py index daafa004825e208947a3da07b361df753f2d5abc..ff1405fcbf42ad8787112cda8c345b131d4f27c6 100644 --- a/DataQuality/DataQualityTools/python/DQTDataFlowMonAlg.py +++ b/DataQuality/DataQualityTools/python/DQTDataFlowMonAlg.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # def DQTDataFlowMonAlgConfig(flags): @@ -49,11 +49,11 @@ def _DQTDataFlowMonAlgConfigCore(helper, algConfObj, isMC): ybins=3, ymin=-0.5, ymax=2.5, - labels=(["Pixel", "SCT", "TRT", "LAr", "Tile", - "Muon", "ForwardDet", "Core", - "Background", "Lumi", "All"] - + ["OK", "Warning", "Error"]) - ) + xlabels=["Pixel", "SCT", "TRT", "LAr", "Tile", + "Muon", "ForwardDet", "Core", + "Background", "Lumi", "All"], + ylabels=["OK", "Warning", "Error"] + ) # generate release string import os @@ -69,9 +69,9 @@ def _DQTDataFlowMonAlgConfigCore(helper, algConfObj, isMC): xbins=7, xmin=-0.5, xmax=6.5, - labels=[_+'-'+releaseString for _ in - ["user", "online", "tier0", "tier0Raw", - "tier0ESD", "AOD", "altprod"]] + xlabels=[_+'-'+releaseString for _ in + ["user", "online", "tier0", "tier0Raw", + "tier0ESD", "AOD", "altprod"]] ) group.defineHistogram("environment;events_lb", @@ -80,7 +80,7 @@ def _DQTDataFlowMonAlgConfigCore(helper, algConfObj, isMC): xbins=7, xmin=-0.5, xmax=6.5, - labels=["user", "online", "tier0", "tier0Raw", - "tier0ESD", "AOD", "altprod"], + xlabels=["user", "online", "tier0", "tier0Raw", + "tier0ESD", "AOD", "altprod"], duration='lb', ) diff --git a/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py b/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py index 8c0b25b12d9c982473ace68a7bea1b093323d68f..8cf8c2dd05944fa697f9ccc85a1323658156c253 100644 --- a/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py +++ b/DataQuality/DataQualityTools/python/DQTDetSynchMonAlg.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # def DQTDetSynchMonAlgConfig(flags): from AthenaMonitoring import AthMonitorCfgHelper @@ -40,19 +40,18 @@ def _DQTDetSynchMonAlgConfigCore(helper, algConfObj, isOnline=False, run2Compat= type='TH2I', xbins=7, xmin=-0.5, xmax=6.5, ybins=7, ymin=-0.5, ymax=6.5, - labels = (["CTP", "SCT", "TRT", "LAr", + xlabels = ["CTP", "SCT", "TRT", "LAr", + "Tile", "RPC", "Pixel"], + ylabels = ["CTP", "SCT", "TRT", "LAr", "Tile", "RPC", "Pixel"] - + ["CTP", "SCT", "TRT", "LAr", - "Tile", "RPC", "Pixel"] - ) ) bcidg.defineHistogram("bcidrates_idx,bcidrates;m_BCID_rate", title="BCID subdetector rate summary", type='TH2I', xbins=6, xmin=0.5, xmax=6.5, ybins=20, ymin=0.0, ymax=1.0, - labels = ["SCT", "TRT", "LAr", - "Tile", "RPC", "Pixel"] + xlabels = ["SCT", "TRT", "LAr", + "Tile", "RPC", "Pixel"] ) l1idg.defineHistogram("diffx,diffy;m_L1ID", @@ -60,11 +59,10 @@ def _DQTDetSynchMonAlgConfigCore(helper, algConfObj, isOnline=False, run2Compat= type='TH2I', xbins=7, xmin=-0.5, xmax=6.5, ybins=7, ymin=-0.5, ymax=6.5, - labels = (["CTP", "SCT", "TRT", "LAr", + xlabels = ["CTP", "SCT", "TRT", "LAr", + "Tile", "RPC", "Pixel"], + ylabels = ["CTP", "SCT", "TRT", "LAr", "Tile", "RPC", "Pixel"] - + ["CTP", "SCT", "TRT", "LAr", - "Tile", "RPC", "Pixel"] - ) ) detlist = ['CTP', 'SCT', 'TRT', 'LAR', 'Tile', 'RPC', 'Pixel'] diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py index 5300cd578f7406b64505c0a72058828e85cf1ab6..a91bce116aa07022081c1a0053efd65897af2030 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # ''' @@ -170,12 +170,6 @@ def define2DProfHist(helper, alg, name, title, path, type='TProfile2D', doWeight fulltitle = title + ' {0}'.format(layer) + runtext + etatxt[i] + phitext layerGroup = getLayerGroup(helper, alg, layer) - # sequential list of x- and y-axis bin labels (see defineHistogram) - labels = [] - for label in LabelX[i]: - labels.append(label) - for label in LabelY[i]: - labels.append(label) fullvarstring = '{0}_{1},{0}_{2}'.format(name, 'em', 'pm') if 'Profile' in type: fullvarstring += ',{0}_{1}'.format(name, 'val') if doWeight: @@ -189,7 +183,7 @@ def define2DProfHist(helper, alg, name, title, path, type='TProfile2D', doWeight ybins=ybinsl[i], ymin=-0.5, ymax=-0.5+ybinsl[i], zmin=zmin, zmax=zmax, duration=lifecycle, - opt=opt, labels=labels) + opt=opt, xlabels=LabelX[i], ylabels=LabelY[i]) def definePP0Histos(helper, alg, name, title, path, opt=''): ''' @@ -217,16 +211,12 @@ def definePP0Histos(helper, alg, name, title, path, opt=''): fulltitle = title + ' {0}'.format(layer) + runtext + xatxt + yatxt groupname = name + '_{0}'.format(layer) layerGroup = getLayerGroup(helper, alg, layer) - # sequential list of x-axis bin labels (see defineHistogram) - labels = [] - for label in PP0LabelX[i]: - labels.append(label) fullvarstring = '{0}_{1},{0}_{2}'.format(name, 'pospp0x', 'val') fullvarstring += ';' + groupname layerGroup.defineHistogram(fullvarstring, type='TProfile', path=path, title=fulltitle, xbins=pp0xbins[i], xmin=-0.5, xmax=-0.5+pp0xbins[i], - opt=opt, labels=labels) + opt=opt, xlabels=PP0LabelX[i]) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitsNoiseMonAlg_jobOptions.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitsNoiseMonAlg_jobOptions.py index fd70cf876206288f46d462762f132b8449b130f8..1d9f55b72a60bc8f1157c237b4b6f21dc13db604 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitsNoiseMonAlg_jobOptions.py +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTHitsNoiseMonAlg_jobOptions.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # '''@file SCTHitNoiseMonAlg_jobOptions.py @@ -221,7 +221,7 @@ myMonGroupGeneral.defineHistogram(varname= "Bec_TBinFracAll,TBin_TBinFracAll;" + title= "fraction of 01X for each region" + "; ;Fraction of 01X", path= "/tbin", xbins= N_REGIONS, xmin = 0., xmax = N_REGIONS, - labels= names) + xlabels= names) diff --git a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py index dcb5d39110b2ddf27422b6c68c3a109b2ce5c9a6..90554b1b74d5f0dd1543b04b29234196fc1bcb5a 100644 --- a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py +++ b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # '''@file tauMonitorAlgorithm.py @@ -226,7 +226,7 @@ def tauMonitoringConfig(inputFlags): xbins=60, xmin=0., xmax=300.,path=folder+"Identification/BDTLoose15GeV") igroup.defineHistogram(namer('panModeEt15BDTLoose','panMode','Identification_BDTLoose15GeV',postfix), title='tau decay mode from panTau upon JetBDTSigMedium;mode', - xbins=5, xmin=0., xmax=5., path=folder+"Identification/BDTLoose15GeV", labels=["1p0n","1p1n","1pXn","3p0n","3pXn"]) + xbins=5, xmin=0., xmax=5., path=folder+"Identification/BDTLoose15GeV", xlabels=["1p0n","1p1n","1pXn","3p0n","3pXn"]) igroup.defineHistogram(namer('jetSeedEta','jetSeedEta','Calo',postfix), title='Calorimeter eta of tau candidates;Eta;Numbers of Candidates',path=folder+"Calo", xbins=50, xmin=-2.5, xmax=2.5 ) @@ -271,7 +271,7 @@ def tauMonitoringConfig(inputFlags): xbins=48, xmin=-1.1, xmax=1.1 ) igroup.defineHistogram(namer('JetBDTBkgMedium','JetBDTBkgMedium','Identification',postfix), title='Loose EleBDT',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5, labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"]) igroup.defineHistogram(namer('BDTEleScoreSigTrans','BDTEleScoreSigTrans','Identification',postfix), title=' Flattened Signal Transformed BDT for Ele Rejection;Boosted Decision Tree Score',path=folder+"Identification", xbins=24, xmin=-0.1, xmax=1.1 ) @@ -280,22 +280,22 @@ def tauMonitoringConfig(inputFlags): xbins=48, xmin=0, xmax=1.1 ) igroup.defineHistogram(namer('eleBDTMedium','eleBDTMedium','Identification',postfix), title='Medium EleBDT',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5, labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"]) igroup.defineHistogram(namer('eleBDTTight','eleBDTTight','Identification',postfix), title='Tight EleBDT',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5, labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"]) igroup.defineHistogram(namer('muonVeto','muonVeto','Identification',postfix), title='Muon Veto',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5, labels=["False","True"] ) + xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"] ) igroup.defineHistogram(namer('tauBDTLoose','tauBDTLoose','Identification',postfix), title='Identification Flag: tauBDTLoose',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5 , labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"]) igroup.defineHistogram(namer('tauBDTMedium','tauBDTMedium','Identification',postfix), title='Identification Flag: tauBDTMedium',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5 ,labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"]) igroup.defineHistogram(namer('tauBDTTight','tauBDTTight','Identification',postfix), title='Identification Flag: tauBDTTight',path=folder+"Identification", - xbins=2, xmin=-0.5, xmax=1.5, labels=["False","True"]) + xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"]) igroup.defineHistogram(namer('etHotShotWinOverPtLeadTrk','etHotShotWinOverPtLeadTrk','Identification_EleVetoBDTinputs',postfix), title='etHotShotWinOverPtLeadTrk',path=folder+"Identification/EleVetoBDTinputs", xbins=20, xmin=0, xmax=12 ) diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index 6aa34bb5f51250e085ffda1ff73d591c83db76b8..07de505bb239532a51e9b4e453ef6d674fd0edb6 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -36,7 +36,7 @@ class TrigFastTrackFinderMonitoring(GenericMonitoringTool): def addDataErrorHistograms(self): self.defineHistogram('roi_lastStageExecuted',path='EXPERT',type='TH1F',title="Last Step Successfully Executed", xbins = 8 , xmin=-0.5, xmax=7.5, - labels=["Start","GetRoI","GetSPs","ZFinder","Triplets","TrackMaker","TrackFitter","TrackConverter"]) + xlabels=["Start","GetRoI","GetSPs","ZFinder","Triplets","TrackMaker","TrackFitter","TrackConverter"]) def addTimingHistograms(self, name): if name=='Electron' or name=='Muon' or name=='TauCore' or name=='MuonIso' or name=='TauIso': @@ -369,4 +369,4 @@ class TrigFastTrackFinder_Jet(TrigFastTrackFinderBase): class TrigFastTrackFinder_MinBias(TrigFastTrackFinderBase): def __init__(self, name = "TrigFastTrackFinder_MinBias"): - TrigFastTrackFinderBase.__init__(self, "TrigFastTrackFinder_MinBias","MinBias") \ No newline at end of file + TrigFastTrackFinderBase.__init__(self, "TrigFastTrackFinder_MinBias","MinBias") diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasMonitoringMT.py b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasMonitoringMT.py index b95c3a1a71e62740bc722b5a52bd57502dc2e048..4877204e400136616b867a63408d6e217c93f433 100644 --- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasMonitoringMT.py +++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasMonitoringMT.py @@ -21,10 +21,10 @@ def TrigMinBias(configFlags): alg.triggerList = [ "HLT_mb_sptrk_L1RD0_FILLED"] length = len(alg.triggerList) mbEffAllGroup.defineHistogram( "PurityAll,whichTrigger",type = 'TEfficiency',title="PurityAll;whichTrigger" ,xbins=length, xmin=0, xmax=length) - mbEffAllGroup.defineHistogram( "PurityPassed,whichTrigger",type = 'TEfficiency',title="PurityPassed;whichTrigger",xbins=length, xmin=0, xmax=length,labels = alg.triggerList) + mbEffAllGroup.defineHistogram( "PurityPassed,whichTrigger",type = 'TEfficiency',title="PurityPassed;whichTrigger",xbins=length, xmin=0, xmax=length, xlabels = alg.triggerList) mbEffAllGroup.defineHistogram( "EfficiencyAll,whichTrigger",type = 'TEfficiency', title="EfficiencyAll;whichTrigger",xbins=length, xmin=0, xmax=length) mbEffAllGroup.defineHistogram( "EfficiencyPassed,whichTrigger",type = 'TEfficiency', title="EfficiencyPassed;whichTrigger", xbins=length, xmin=0, xmax=length) - mbEffAllGroup.defineHistogram( "EfficiencyPassed,trigNo",type = 'TEfficiency', title="EfficiencyPassed;trig No.", xbins=length, xmin=0, xmax=length,labels = alg.triggerList) + mbEffAllGroup.defineHistogram( "EfficiencyPassed,trigNo",type = 'TEfficiency', title="EfficiencyPassed;trig No.", xbins=length, xmin=0, xmax=length, xlabels = alg.triggerList) mbEffAllGroup.defineHistogram( "whichTrigger",title="count of triggers", xbins=length, xmin=0, xmax=length) mbEffAllGroup.defineHistogram( "EfficiencyPassed,trigCount",type = 'TProfile',title="EfficiencyPassed;Trigger;EfficiencyPassed", xbins=length, xmin=0, xmax=length)