5 '''Function to configure LVL1 EfexInput algorithm in the monitoring system.'''
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from LArBadChannelTool.LArBadChannelConfig
import LArMaskedSCCfg
17 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
18 helper = L1CaloMonitorCfgHelper(flags,CompFactory.EfexInputMonitorAlgorithm,
'EfexInputMonAlg')
20 helper.defineHistogram(
'LBN,ErrorAndLocation;h_summary',title=
'EfexInput Monitoring summary;LBN;Error:TowerID',
21 path=
"Expert/Inputs/eFEX/detail",
22 hanConfig={
"description":
"TowerID format: '[E]EPPMMF', where E=eta index, P=phi index,M=module,F=fpga"},
25 xbins=1,xmin=0,xmax=1,
26 ybins=1,ymin=0,ymax=1,
27 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
30 helper.defineHistogram(
'TowerEta,TowerPhi;h_errors',title=
'EfexInput Errors (BadEMStatus,BadHadStatus);#eta;#phi',
31 path=
"Expert/Inputs/eFEX",
32 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"},
33 fillGroup=
"errors",cutmask=
'IsMonReady',
35 xbins=50,xmin=-2.5,xmax=2.5,
36 ybins=64,ymin=-math.pi,ymax=math.pi)
38 helper.defineDQAlgorithm(
"Efex_ecal_hot_etaThiMapFilled",
39 hanConfig={
"libname":
"libdqm_summaries.so",
"name":
"Bins_Equal_Threshold",
"BinThreshold":
"0."},
40 thresholdConfig={
"NBins":[0,64*50]},
42 helper.defineDQAlgorithm(
"Efex_hcal_hot_etaThiMapFilled",
43 hanConfig={
"libname":
"libdqm_summaries.so",
"name":
"Bins_Equal_Threshold",
"BinThreshold":
"0."},
44 thresholdConfig={
"NBins":[50,64*50]},
47 for layer
in [
"ecal",
"hcal"]:
48 helper.defineHistogram(f
'TowerEta,TowerPhi;h_dataTowers_{layer}_hot_EtaPhiMap',title=f
'{layer.upper()} SuperCells >= 500MeV;#eta;#phi',
50 path=
"Expert/Inputs/eFEX",
51 hanConfig={
"algorithm":f
"Efex_{layer}_hot_etaThiMapFilled",
"description":f
"Check <a href='./detail/h_dataTowers_{layer}_hot_posVsLBN'>detail plot</a> to get timeseries for each location"},
54 xbins=50,xmin=-2.5,xmax=2.5,
55 ybins=64,ymin=-math.pi,ymax=math.pi,opt=[
'kAlwaysCreate'])
57 helper.defineHistogram(f
'LBN,binNumber;h_dataTowers_{layer}_hot_posVsLBN',title=f
'{layer.upper()} SuperCells >= 500MeV;LB;50(y-1)+x',
58 path=
"Expert/Inputs/eFEX/detail",
60 hanConfig={
"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"},
63 xbins=1,xmin=0,xmax=10,
64 ybins=64*50,ymin=0.5,ymax=64*50+0.5,
65 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
66 helper.defineHistogram(f
'TowerEta,TowerPhi;h_dataTowers_{layer}_cold_EtaPhiMap',title=f
'{layer.upper()} SuperCells <= -500MeV;#eta;#phi',
68 path=
"Expert/Inputs/eFEX",
69 hanConfig={
"description":f
"Check <a href='./detail/h_dataTowers_{layer}_cold_posVsLBN'>detail plot</a> to get timeseries for each location"},
72 xbins=50,xmin=-2.5,xmax=2.5,
73 ybins=64,ymin=-math.pi,ymax=math.pi,opt=[
'kAlwaysCreate'])
75 helper.defineHistogram(f
'LBN,binNumber;h_dataTowers_{layer}_cold_posVsLBN',title=f
'{layer.upper()} SuperCells <= -500MeV;LB;50(y-1)+x',
76 path=
"Expert/Inputs/eFEX/detail",
78 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"},
81 xbins=1,xmin=0,xmax=10,
82 ybins=64*50,ymin=0.5,ymax=64*50+0.5,
83 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
85 helper.defineTree(
'LBNString,Error,EventNumber,TowerId,TowerEta,TowerPhi,TowerEmstatus,TowerHadstatus,TowerSlot,TowerCount,RefTowerCount,SlotSCID,timeSince,timeUntil;errors',
86 "lbnString/string:error/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",
87 title=
"errors tree;LBN;Error",fillGroup=
"errors")
90 result.merge(helper.result())
94 if __name__==
'__main__':
96 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
99 inputs = glob.glob(
'/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/00354311/data18_13TeV.00354311.physics_Main.recon.ESD.f1129/data18_13TeV.00354311.physics_Main.recon.ESD.f1129._lb0013._SFO-8._0001.1')
102 flags.Input.Files = inputs
103 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1_MC.root'
108 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
109 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
114 cfg.merge(EfexInputMonitorCfg)
117 cfg.printConfig(withDetails=
False, summariseProps =
True)