5 '''Function to configure LVL1 JfexInput algorithm in the monitoring system.'''
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
10 from AthenaConfiguration.Enums
import Format
14 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
15 helper = L1CaloMonitorCfgHelper(flags,CompFactory.JfexInputMonitorAlgorithm,
'JfexInputMonAlg')
19 if flags.Input.Format==Format.BS:
22 from L1CaloFEXAlgos.L1CaloFEXAlgosConfig
import L1CalojFEXDecoratorCfg
26 from L1CaloFEXAlgos.FexEmulatedTowersConfig
import jFexEmulatedTowersCfg
31 JfexInputMonAlg = helper.alg
34 groupName =
'JfexInputMonitor'
35 JfexInputMonAlg.Grouphist = groupName
38 trigPath =
'Developer/JfexInput/'
39 Calosource_names = [
"Barrel",
"Tile",
"EMEC",
"HEC",
"FCAL1",
"FCAL2",
"FCAL3"]
40 FPGA_names = [
"U1",
"U2",
"U4",
"U3"]
46 phi = (-pi- pi/32) + pi/32*i
55 'xbins': 100,
'xmin': -5,
'xmax': 5,
59 helper.defineHistogram(
'genLocation,genType;h_jFEX_Errors', path=
"Developer/JfexInput", type=
'TH2I',
60 fillGroup=groupName+
"Gen",
61 title=
'jFEX generic monitoring for shifters;Location;Type',
62 xbins=4, xmin=0, xmax=4, xlabels=[
"Sim_DataTowers",
"Sim_EmulatedTowers",
"Input_Mismatch",
"Input_Invalids"],
63 ybins=4, ymin=0, ymax=4, ylabels=[
"TOB",
"global TOB",
"EM layer",
"HAD layer" ],
68 helper.defineHistogram(
'EventType,Decision;h_summary',title=
'JfexInput Monitoring summary;Event Type;Decision',
70 type=
'TH2I',path=trigPath,
71 xbins=1,xmin=0,xmax=1,xlabels=[
"Normal"],
72 ybins=1,ymin=0,ymax=1,ylabels=[
"AllOk"],
73 opt=[
'kCanRebin'],merge=
"merge")
76 decorGroup = groupName+
"_decorated"
77 decorAllGroup = groupName+
"_decorated_all"
78 emulatedGroup = groupName+
"_emulated"
81 fillGroup = groupName+
"_details_"+
str(i)
84 helper.defineHistogram(
'DataEt_Tile,EmulatedEt_Tile;h_SumSCell_vs_Data_'+Calosource_names[i], title=
'Data Et vs Tile Et ('+ Calosource_names[i]+
'); Data Et [GeV]; Tile Et [GeV]',
86 type=
'TH2F',path=trigPath+
"expert/", xbins=200,xmin=0,xmax=100,ybins=200,ymin=0,ymax=100)
89 helper.defineHistogram(
'DataEt,EmulatedEt;h_SumSCell_vs_Data_'+Calosource_names[i], title=
'Data vs SCell Sum Et ('+ Calosource_names[i]+
'); Data Et [MeV]; SCell Sum Et [MeV]',
91 type=
'TH2F',path=trigPath+
"expert/", xbins=160,xmin=-2000,xmax=2000,ybins=160,ymin=-2000,ymax=2000)
95 helper.defineHistogram(
'region,type;h_DataErrors', title=
'jFEX Data mismatches per region; Region; Type',
96 type=
'TH2F',path=trigPath, xbins=7,xmin=0,xmax=7,ybins=2,ymin=0,ymax=2,xlabels=Calosource_names,ylabels=[
"Invalid codes",
"Data mismatch"])
98 helper.defineHistogram(
'TowerEtaInvalid,TowerPhiInvalid;h_2Dmap_InvalidCodes', title=
'jFex DataTower Invalid Et codes (4095); #eta; #phi',
99 type=
'TH2F',path=trigPath, **eta_phi_bins)
101 helper.defineHistogram(
'TowerEtaEmpty,TowerPhiEmpty;h_2Dmap_EmptyCodes', title=
'jFex DataTower Empty Et codes (0); #eta; #phi',
102 type=
'TH2F',path=trigPath, **eta_phi_bins)
104 helper.defineHistogram(
'TowerEta,TowerPhi;h_2Dmap_MismatchedEts', title=
'jFex DataTower mismatches (no invalid codes); #eta; #phi',
105 fillGroup=decorGroup,
106 type=
'TH2F',path=trigPath, **eta_phi_bins)
108 helper.defineHistogram(
'DataEt,SCellSum;h_SumSCell_vs_Data_Mismatched', title=
'Data vs SCell Sum Et (unmatching); Data Et [MeV]; SCell Sum Et [MeV]',
109 fillGroup=decorGroup,
110 type=
'TH2F',path=trigPath, xbins=160,xmin=-2000,xmax=2000,ybins=160,ymin=-2000,ymax=2000)
112 helper.defineHistogram(
'DataEt,SCellSum;h_SumSCell_vs_Data_all', title=
'Data vs SCell Sum Et (all Towers); Data Et [MeV]; SCell Sum Et [MeV]',
113 fillGroup=decorAllGroup,
114 type=
'TH2F',path=trigPath, xbins=160,xmin=-2000,xmax=2000,ybins=160,ymin=-2000,ymax=2000)
116 helper.defineHistogram(
'DataEt,frac_SCellSum;h_frac_SumSCell_vs_Data', title=
'Data vs (Et_{SCell}-Et_{Data})/Et_{Data} (no invalid codes); Data Et [MeV]; (Et_{SCell}-Et_{Data})/Et_{Data}',
117 fillGroup=decorGroup,
118 type=
'TH2F',path=trigPath, xbins=160,xmin=-2000,xmax=2000,ybins=100,ymin=-20,ymax=20)
120 helper.defineHistogram(
'TowerEta,TowerPhi;h_2Dmap_DataVsEmulated', title=
'Input Data vs Emulated data; #eta; #phi',
121 fillGroup=emulatedGroup,
122 type=
'TH2F',path=trigPath, **eta_phi_bins)
123 helper.defineHistogram(
'TowerEtaDeco,TowerPhiDeco;h_2Dmap_EmulatedVsDecorated', title=
'Emulated vs Decorated data; #eta; #phi',
124 fillGroup=emulatedGroup,
125 type=
'TH2F',path=trigPath, **eta_phi_bins)
128 helper.defineHistogram(
'NJfexTowers;h_nJfexTowers', title=
'Number of jFex towers',
129 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=2000,xmin=0,xmax=20000)
131 helper.defineHistogram(
'TowerEta;h_TowerEta', title=
'jFex Tower Eta',
132 fillGroup=groupName,type=
'TH1F', path=trigPath+
"Content/", xbins=100,xmin=-5.0,xmax=5.0)
134 helper.defineHistogram(
'TowerPhi;h_TowerPhi', title=
'jFex Tower Phi',
135 fillGroup=groupName,type=
'TH1F', path=trigPath+
"Content/", **phi_bins)
137 helper.defineHistogram(
'TowerEta,TowerPhi;h_TowerEtaPhiMap', title=
'jFex Tower Eta vs Phi',
138 fillGroup=groupName,type=
'TH2F',path=trigPath+
"Content/", **eta_phi_bins)
140 helper.defineHistogram(
'TowerGlobalEta;h_TowerGlobalEta', title=
'jFex Tower Global Eta',
141 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=100,xmin=-50,xmax=50)
143 helper.defineHistogram(
'TowerGlobalPhi;h_TowerGlobalPhi', title=
'jFex Tower Global Phi',
144 fillGroup=groupName,type=
'TH1F', path=trigPath+
"Content/", xbins=67,xmin=-1,xmax=65)
146 helper.defineHistogram(
'TowerGlobalEta,TowerGlobalPhi;h_TowerGlobalEtaPhiMap', title=
'jFex Tower Global Eta vs Phi',
147 fillGroup=groupName,type=
'TH2I',path=trigPath+
"Content/", xbins=100,xmin=-50,xmax=50,ybins=67,ymin=-1,ymax=65)
149 helper.defineHistogram(
'TowerModule;h_TowerModule', title=
'jFex Tower Module Number',
150 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=6,xmin=0,xmax=6)
152 helper.defineHistogram(
'TowerFpga;h_TowerFpga', title=
'jFex Tower FPGA Number',
153 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4,xmin=0,xmax=4,xlabels=FPGA_names)
155 helper.defineHistogram(
'TowerChannel;h_TowerChannel', title=
'jFex Tower Channel Number',
156 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=60,xmin=0,xmax=60)
158 helper.defineHistogram(
'TowerDataID;h_TowerDataID', title=
'jFex Tower Data ID',
159 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=16,xmin=0,xmax=16)
161 helper.defineHistogram(
'TowerSimulationID;h_TowerSimulationID', title=
'jFex Tower Simulation ID',
162 fillGroup=groupName,type=
'TH1F', path=trigPath+
"Content/", xbins=1000,xmin=0,xmax=1500000.0)
164 helper.defineHistogram(
'TowerCalosource;h_TowerCalosource', title=
'jFex Tower Calo Source',
165 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=7,xmin=0,xmax=7,xlabels=Calosource_names)
167 helper.defineHistogram(
'TowerEtcount_barrel;h_TowerEtcount_barrel', title=
'jFex Tower Et Barrel',
168 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
170 helper.defineHistogram(
'TowerEtcount_tile;h_TowerEtcount_tile', title=
'jFex Tower Et Tile',
171 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
173 helper.defineHistogram(
'TowerEtcount_emec;h_TowerEtcount_emec', title=
'jFex Tower Et EMEC',
174 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
176 helper.defineHistogram(
'TowerEtcount_hec;h_TowerEtcount_hec', title=
'jFex Tower Et HEC',
177 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
179 helper.defineHistogram(
'TowerEtcount_fcal1;h_TowerEtcount_fcal1', title=
'jFex Tower Et FCAL1',
180 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
182 helper.defineHistogram(
'TowerEtcount_fcal2;h_TowerEtcount_fcal2', title=
'jFex Tower Et FCAL2',
183 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
185 helper.defineHistogram(
'TowerEtcount_fcal3;h_TowerEtcount_fcal3', title=
'jFex Tower Et FCAL3',
186 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=4096,xmin=0,xmax=4096)
188 helper.defineHistogram(
'TowerSaturationflag;h_TowerSaturationflag', title=
'jFex Tower Saturation FLag',
189 fillGroup=groupName,type=
'TH1I', path=trigPath+
"Content/", xbins=2,xmin=0,xmax=2)
192 acc = helper.result()