5 '''Function to configure LVL1 GfexInput algorithm in the monitoring system.'''
8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from L1CaloFEXAlgos.FexEmulatedTowersConfig
import gFexEmulatedTowersCfg
17 from AthenaConfiguration.ComponentFactory
import CompFactory
18 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
19 helper = L1CaloMonitorCfgHelper(flags,CompFactory.GfexInputMonitorAlgorithm,
'GfexInputMonAlg')
22 groupName =
'GfexInputMonitor'
23 helper.alg.PackageName = groupName
27 trigPath =
'Expert/Inputs/gFEX'
31 eta_bins= [-4.9, -4.1,-3.5,-3.25,-3.2,-3.1,-2.9,-2.7,-2.5]
32 for eta
in np.arange (-2.2,2.2,0.2):
34 eta_bins+= [2.2,2.5,2.7,2.9,3.1,3.25,3.3,3.5,4.1,4.9]
36 helper.defineDQAlgorithm(
"Gfex_Tower_etaPhiMapFilled",
37 hanConfig={
"libname":
"libdqm_summaries.so",
"name":
"Bins_Equal_Threshold",
"BinThreshold":
"0."},
38 thresholdConfig={
"NBins":[0,32*40]},
42 helper.defineTree(
'LBN,Error,EventNumber,TowerId,TowerEta,TowerPhi,TowerEt,RefTowerEt,TowerSaturationflag,RefTowerSat;errors',
43 "lbn/I:error/string:eventNumber/l:id/i:eta/F:phi/F:et/I:ref_et/I:sat/B:ref_sat/B",
44 title=
"errors tree;LBN;Error",fillGroup=
"errors")
47 helper.defineHistogram(
'LBN,NGfexTowers;h_LBN_vs_nGfexTowers', title=
'Number of gFex towers in each event with Et > 10 GeV;LBN; gTowers per event; Number of events',
48 fillGroup =
"highEtgTowers",
50 path=f
'{trigPath}/detail',
51 hanConfig={
"description":
"The y value gives the number of gTowers with Et > 10 GeV; the z value gives the number of events"},
52 xbins=1,xmin=0,xmax=1,
53 ybins=1,ymin=0,ymax=1,
54 opt=[
'kAddBinsDynamically']
57 helper.defineHistogram(
'TowerEta,TowerPhi;h_HotTower_EtaPhiMap', title=
'gFex Tower Eta vs Phi (gTowerEt > 2 GeV) ;#eta;#phi; Number of gTowers',
58 fillGroup =
"highEtgTowers",
62 "algorithm":
"Gfex_Tower_etaPhiMapFilled",
63 "description":
"Look for hot spots with unusual high statistics; Check <a href='./detail/h_HotTowers_posVsLBN'>detail plot</a> to get timeseries for each location",
"display":
"SetPalette(55),Draw=COL1Z"},
64 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
68 helper.defineHistogram(
'LBN,binNumber;h_HotTowers_posVsLBN',title=
'gFex Towers with Et > 2GeV;LB;32(x-1)+y',
69 path=f
"{trigPath}/detail",
70 fillGroup =
"highEtgTowers",
71 hanConfig={
"description":
"x and y correspond to axis bin numbers on <a href='../h_HotTower_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"},
73 xbins=1,xmin=0,xmax=10,
74 ybins=40*32,ymin=0.5,ymax=40*32+0.5,
75 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
77 helper.defineHistogram(
'TowerEta,TowerPhi,TowerEt;h_HotTower_HeatMap', title=
'gFex Tower Average Et Distribution (gTowerEt > 2 GeV) ;#eta;#phi;averageEt (count x 50 MeV)',
78 fillGroup =
"highEtgTowers",
80 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
85 helper.defineHistogram(
'TowerEta,TowerPhi;h_ColdTower_EtaPhiMap', title=
'gFex Tower Eta vs Phi (gTower Et < - 2 GeV) ;#eta;#phi;Number of gTowers',
86 fillGroup =
"lowEtgTowers",
90 "algorithm":
"Gfex_Tower_etaPhiMapFilled",
91 "description":
"Look for cold spots with unusual high statistics; Check <a href='./detail/h_ColdTowers_posVsLBN'>detail plot</a> to get timeseries for each location ",
"display":
"SetPalette(55),Draw=COL1Z"},
92 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
94 helper.defineHistogram(
'LBN,binNumber;h_ColdTowers_posVsLBN',title=
'gFex Towers with Et < -2GeV;LB;32(x-1)+y',
95 path=f
"{trigPath}/detail",
96 fillGroup =
"lowEtgTowers",
97 hanConfig={
"description":
"x and y correspond to axis bin numbers on <a href='../h_ColdTower_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"},
99 xbins=1,xmin=0,xmax=10,
100 ybins=40*32,ymin=0.5,ymax=40*32+0.5,
101 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
103 helper.defineHistogram(
'TowerEta,TowerPhi,TowerEt;h_ColdTower_HeatMap', title=
'gFex Tower Average Et Distribution (gTower Et < - 2 GeV) ;#eta;#phi;averageEt (count x 50 MeV)',
104 fillGroup =
"lowEtgTowers",
106 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
109 helper.defineHistogram(
'TowerEt;h_TowerEt', title=
'gFex Tower Et ; Et (count x 50 MeV)',
110 fillGroup =
"gTowers",
112 xbins= 100, xmin=-50.0, xmax=100.0)
115 helper.defineHistogram(
'TowerEta,TowerPhi,TowerEt;h_SaturatedTower_HeatMap', title=
'gFex Tower Average Et Distribution for Saturated gTower ;#eta;#phi;averageEt (count x 50 MeV)',
116 fillGroup =
"SatgTowers",
118 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
122 acc = helper.result()