5 '''Function to configure LVL1 GfexInput algorithm in the monitoring system.'''
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
13 from AthenaConfiguration.ComponentFactory
import CompFactory
14 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
15 helper = L1CaloMonitorCfgHelper(flags,CompFactory.GfexInputMonitorAlgorithm,
'GfexInputMonAlg')
18 groupName =
'GfexInputMonitor'
19 helper.alg.PackageName = groupName
23 trigPath =
'Expert/Inputs/gFEX'
27 eta_bins= [-4.9, -4.1,-3.5,-3.25,-3.2,-3.1,-2.9,-2.7,-2.5]
28 for eta
in np.arange (-2.2,2.2,0.2):
30 eta_bins+= [2.2,2.5,2.7,2.9,3.1,3.25,3.3,3.5,4.1,4.9]
32 helper.defineDQAlgorithm(
"Gfex_Tower_etaPhiMapFilled",
33 hanConfig={
"libname":
"libdqm_summaries.so",
"name":
"Bins_Equal_Threshold",
"BinThreshold":
"0."},
34 thresholdConfig={
"NBins":[0,32*40]},
39 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',
40 fillGroup =
"highEtgTowers",
42 path=f
'{trigPath}/detail',
43 hanConfig={
"description":
"The y value gives the number of gTowers with Et > 10 GeV; the z value gives the number of events"},
44 xbins=1,xmin=0,xmax=1,
45 ybins=1,ymin=0,ymax=1,
46 opt=[
'kAddBinsDynamically']
49 helper.defineHistogram(
'TowerEta,TowerPhi;h_HotTower_EtaPhiMap', title=
'gFex Tower Eta vs Phi (gTowerEt > 2 GeV) ;#eta;#phi; Number of gTowers',
50 fillGroup =
"highEtgTowers",
54 "algorithm":
"Gfex_Tower_etaPhiMapFilled",
55 "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"},
56 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
60 helper.defineHistogram(
'LBN,binNumber;h_HotTowers_posVsLBN',title=
'gFex Towers with Et > 2GeV;LB;40(y-1)+x',
61 path=f
"{trigPath}/detail",
62 fillGroup =
"highEtgTowers",
63 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"},
65 xbins=1,xmin=0,xmax=10,
66 ybins=40*32,ymin=0.5,ymax=40*32+0.5,
67 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
77 helper.defineHistogram(
'TowerEta,TowerPhi;h_ColdTower_EtaPhiMap', title=
'gFex Tower Eta vs Phi (gTower Et < - 2 GeV) ;#eta;#phi;Number of gTowers',
78 fillGroup =
"lowEtgTowers",
82 "algorithm":
"Gfex_Tower_etaPhiMapFilled",
83 "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"},
84 xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
86 helper.defineHistogram(
'LBN,binNumber;h_ColdTowers_posVsLBN',title=
'gFex Towers with Et < -2GeV;LB;40(y-1)+x',
87 path=f
"{trigPath}/detail",
88 fillGroup =
"lowEtgTowers",
89 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"},
91 xbins=1,xmin=0,xmax=10,
92 ybins=40*32,ymin=0.5,ymax=40*32+0.5,
93 opt=[
'kAddBinsDynamically',
'kAlwaysCreate'],merge=
"merge")
102 helper.defineHistogram(
'TowerEt;h_TowerEt', title=
'gFex Tower Et ; Et (count x 50 MeV)',
103 fillGroup =
"gTowers",
105 path=
'Developer/gFexInput',
106 hanConfig={
"description":
""},
107 xbins= 1000, xmin=-500.0, xmax=500.0)
109 helper.defineHistogram(
'TowerSaturationflag;h_TowerSaturationflag', title=
'gFex Tower Saturation FLag',
110 fillGroup =
"gTowers",
112 path=
'Developer/gFexInput',
113 xbins=3,xmin=0.0,xmax=3.0)
116 acc = helper.result()
120 if __name__==
'__main__':
122 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
125 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')
128 flags.Input.Files = inputs
129 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1_MC.root'
134 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
135 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
140 cfg.merge(GfexInputMonitorCfg)
143 cfg.printConfig(withDetails=
False, summariseProps =
True)