45 '''Function to configure LVL1 EfexInput algorithm in the monitoring system.'''
48 from AthenaConfiguration.ComponentFactory
import CompFactory
49 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
52 from LArBadChannelTool.LArBadChannelConfig
import LArMaskedSCCfg
57 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
58 helper = L1CaloMonitorCfgHelper(flags,CompFactory.EfexInputMonitorAlgorithm,
'EfexInputMonAlg')
60 helper.defineHistogram(
'LBN,ErrorAndLocation;h_summary',title=
'EfexInput Monitoring summary;LBN;Error:TowerID',
61 path=
"Expert/Inputs/eFEX/detail",
62 hanConfig={
"description":
"TowerID format: '[E]EPPMMF', where E=eta index, P=phi index,M=module,F=fpga"},
65 xbins=1,xmin=0,xmax=1,
66 ybins=1,ymin=0,ymax=1,
67 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
70 helper.defineHistogram(
'TowerEta,TowerPhi;h_errors',title=
'EfexInput Errors;#eta;#phi',
71 path=
"Expert/Inputs/eFEX",
72 hanConfig={
"algorithm":
"Histogram_Empty",
"description":
"Locations of any non-zero em or hadronic status flags. Check <a href='./detail/h_summary'>detail/h_summary</a> for more detail if there are entries"},
73 fillGroup=
"errors",cutmask=
'IsMonReady',
75 xbins=50,xmin=-2.5,xmax=2.5,
76 ybins=64,ymin=-math.pi,ymax=math.pi)
82 commonAlgConfig = {
"libname":
"libdqm_summaries.so",
83 "name":
"L1Calo_BinsDiffFromStripMedian",
85 hotCuts = {
"ColdCut":-3.5,
"WarmCut":9,
"HotCut":20}
86 coldCuts = {
"ColdCut":-4,
"WarmCut":5,
"HotCut":10}
88 commonThresholdConfig = {
89 "NWrongKnown":[0,100],
95 "NConsecUnlikelyStrip":[2,5],
98 helper.defineDQAlgorithm(
"Efex_ecal_hot_etaPhiMapOutliers",
99 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotEcal,
100 thresholdConfig=commonThresholdConfig
103 helper.defineDQAlgorithm(
"Efex_hcal_hot_etaPhiMapOutliers",
104 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotHcal,
105 thresholdConfig=commonThresholdConfig
108 helper.defineDQAlgorithm(
"Efex_ecal_hot_etaPhiLBMapOutliers_Shifter",
109 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotEcal|{
"NBinsY":64,
"LiveMode":1},
110 thresholdConfig=commonThresholdConfig
113 helper.defineDQAlgorithm(
"Efex_hcal_hot_etaPhiLBMapOutliers_Shifter",
114 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotHcal|{
"NBinsY":64,
"LiveMode":1},
115 thresholdConfig=commonThresholdConfig
118 helper.defineDQAlgorithm(
"Efex_ecal_hot_etaPhiLBMapOutliers",
119 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotEcal|{
"NBinsY":64,
"LiveMode":0},
120 thresholdConfig=commonThresholdConfig
123 helper.defineDQAlgorithm(
"Efex_hcal_hot_etaPhiLBMapOutliers",
124 hanConfig=commonAlgConfig|hotCuts|knownAnomalies_hotHcal|{
"NBinsY":64,
"LiveMode":0},
125 thresholdConfig=commonThresholdConfig
128 helper.defineDQAlgorithm(
"Efex_ecal_cold_etaPhiMapOutliers",
129 hanConfig=commonAlgConfig|coldCuts|knownAnomalies_coldEcal,
130 thresholdConfig=commonThresholdConfig
133 helper.defineDQAlgorithm(
"Efex_hcal_cold_etaPhiMapOutliers",
134 hanConfig=commonAlgConfig|coldCuts|knownAnomalies_coldHcal,
135 thresholdConfig=commonThresholdConfig|{
"NDeadStrip":[30,30]}
138 for layer
in [
"ecal",
"hcal"]:
139 helper.defineHistogram(f
'TowerEta,TowerPhi;h_dataTowers_{layer}_hot_EtaPhiMap',title=f
'{layer.upper()} SuperCells >= 500MeV;#eta;#phi',
141 paths=[
"Expert/Inputs/eFEX/detail",
"Shifter/Inputs/eFEX"],
142 hanConfig={
"algorithm":f
"Efex_{layer}_hot_etaPhiMapOutliers",
"description":f
"Check <a href='./detail/h_dataTowers_{layer}_hot_posVsLBN'>detail plot</a> to get timeseries for each location"},
145 xbins=50,xmin=-2.5,xmax=2.5,
146 ybins=64,ymin=-math.pi,ymax=math.pi,opt=[
'kAlwaysCreate'])
148 helper.defineHistogram(f
'LBN,binNumber;h_dataTowers_{layer}_hot_posVsLBN',title=f
'{layer.upper()} SuperCells >= 500MeV;LB;64(x-1)+y',
149 paths=[
"Expert/Inputs/eFEX/detail",
"Shifter/Inputs/eFEX"],
151 hanConfig={
"Expert/algorithm":f
"Efex_{layer}_hot_etaPhiLBMapOutliers",
"Shifter/algorithm":f
"Efex_{layer}_hot_etaPhiLBMapOutliers_Shifter",
152 "description":f
"x and y correspond to axis bin numbers on <a href='../h_dataTowers_{layer}_hot_EtaPhiMap'/>eta-phi plot</a>. Use this plot to check if hotspot/coldspots affected whole or part of run: turn on Projection X1 to see 1D hist of individual locations"},
155 xbins=1,xmin=0,xmax=10,
156 ybins=64*50,ymin=0.5,ymax=64*50+0.5,
157 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
158 helper.defineHistogram(f
'TowerEta,TowerPhi;h_dataTowers_{layer}_cold_EtaPhiMap',title=f
'{layer.upper()} SuperCells <= -500MeV;#eta;#phi',
160 path=
"Expert/Inputs/eFEX/detail",
161 hanConfig={
"algorithm":f
"Efex_{layer}_cold_etaPhiMapOutliers",
"description":f
"Check <a href='./detail/h_dataTowers_{layer}_cold_posVsLBN'>detail plot</a> to get timeseries for each location"},
164 xbins=50,xmin=-2.5,xmax=2.5,
165 ybins=64,ymin=-math.pi,ymax=math.pi,opt=[
'kAlwaysCreate'])
167 helper.defineHistogram(f
'LBN,binNumber;h_dataTowers_{layer}_cold_posVsLBN',title=f
'{layer.upper()} SuperCells <= -500MeV;LB;64(x-1)+y',
168 path=
"Expert/Inputs/eFEX/detail",
170 hanConfig={
"description":f
"x and y correspond to axis bin numbers on <a href='../h_dataTowers_{layer}_cold_EtaPhiMap'/>eta-phi plot</a>. Use this plot to check if hotspot/coldspots affected whole or part of run: turn on Projection X1 to see 1D hist of individual locations"},
173 xbins=1,xmin=0,xmax=10,
174 ybins=64*50,ymin=0.5,ymax=64*50+0.5,
175 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
177 helper.defineTree(
'LBN,Error,LBNString,EventNumber,TowerId,TowerEta,TowerPhi,TowerEmstatus,TowerHadstatus,TowerSlot,TowerCount,RefTowerCount,SlotSCID,timeSince,timeUntil;errors',
178 "lbn/I:error/string:lbnString/string:eventNumber/l:id/I:eta/F:phi/F:em_status/i:had_status/i:slot/I:count/I:ref_count/I:scid/string:timeSince/I:timeUntil/I",
179 title=
"errors tree;LBN;Error",fillGroup=
"errors")
182 result.merge(helper.result())