ATLAS Offline Software
Functions
GfexInputMonitorAlgorithm Namespace Reference

Functions

def GfexInputMonitoringConfig (flags)
 

Function Documentation

◆ GfexInputMonitoringConfig()

def GfexInputMonitorAlgorithm.GfexInputMonitoringConfig (   flags)
Function to configure LVL1 GfexInput algorithm in the monitoring system.

Definition at line 4 of file GfexInputMonitorAlgorithm.py.

5  '''Function to configure LVL1 GfexInput algorithm in the monitoring system.'''
6 
7  # get the component factory - used for getting the algorithms
8  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9  result = ComponentAccumulator()
10 
11  # for input monitoring we will require the emulated gFexTowers (built from supercells)
12  from L1CaloFEXAlgos.FexEmulatedTowersConfig import gFexEmulatedTowersCfg
13  result.merge(gFexEmulatedTowersCfg(flags,name="L1_gFexEmulatedTowers"))
14 
15 
16  # use L1Calo's special MonitoringCfgHelper
17  from AthenaConfiguration.ComponentFactory import CompFactory
18  from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig import L1CaloMonitorCfgHelper
19  helper = L1CaloMonitorCfgHelper(flags,CompFactory.GfexInputMonitorAlgorithm,'GfexInputMonAlg')
20 
21  # add any steering
22  groupName = 'GfexInputMonitor' # the monitoring group name is also used for the package name
23  helper.alg.PackageName = groupName
24 
25 
26  # path to the expert area for gFex Monitoring Plots
27  trigPath = 'Expert/Inputs/gFEX'
28 
29 
30  import numpy as np
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):
33  eta_bins.append(eta)
34  eta_bins+= [2.2,2.5,2.7,2.9,3.1,3.25,3.3,3.5,4.1,4.9]
35 
36  helper.defineDQAlgorithm("Gfex_Tower_etaPhiMapFilled",
37  hanConfig={"libname":"libdqm_summaries.so","name":"Bins_Equal_Threshold","BinThreshold":"0."},
38  thresholdConfig={"NBins":[0,32*40]}, # 0 bins expected to be empty
39  )
40 
41 
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")
45 
46  # histograms of gFex tower variables
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",
49  type='TH2D',
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']
55  )
56 
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",
59  type='TH2F',
60  path=trigPath,
61  hanConfig={
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)
65 
66 
67 
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"},
72  type='TH2I',
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")
76 
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",
79  type='TProfile2D',
80  xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
81 
82 
83 
84 
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",
87  type='TH2F',
88  path=trigPath,
89  hanConfig={
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)
93 
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"},
98  type='TH2I',
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")
102 
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",
105  type='TProfile2D',
106  xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
107 
108 
109  helper.defineHistogram('TowerEt;h_TowerEt', title='gFex Tower Et ; Et (count x 50 MeV)',
110  fillGroup = "gTowers",
111  type='TH1I',
112  xbins= 100, xmin=-50.0, xmax=100.0)
113 
114 
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",
117  type='TProfile2D',
118  xbins=eta_bins, ybins=32,ymin=-3.2,ymax=3.2)
119 
120 
121 
122  acc = helper.result()
123  result.merge(acc)
124  return result
125 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GfexInputMonitorAlgorithm.GfexInputMonitoringConfig
def GfexInputMonitoringConfig(flags)
Definition: GfexInputMonitorAlgorithm.py:4
FexEmulatedTowersConfig.gFexEmulatedTowersCfg
def gFexEmulatedTowersCfg(flags, name="L1_gFexEmulatedTowers", writeKey="L1_gFexEmulatedTowers")
Definition: FexEmulatedTowersConfig.py:9