28 def toAlg(self,monhelper):
29 from AthenaConfiguration.ComponentFactory
import CompFactory
31 jFexSR = self.L1JetContainer ==
'L1_jFexSRJetRoI'
32 jFexLR = self.L1JetContainer ==
'L1_jFexLRJetRoI'
33 gFexSR = self.L1JetContainer ==
'L1_gFexSRJetRoI'
34 gFexLR = self.L1JetContainer ==
'L1_gFexLRJetRoI'
36 noFex = self.L1JetContainer ==
'LVL1JetRoIs'
38 L1Fex = jFexSR
or jFexLR
or gFexSR
or gFexLR
40 assert L1Fex
or noFex,
'unsupported L1Container %s' % self.L1JetContainer
42 def container2tool_class_name():
52 'L1_jFexSRJetRoI':
'TrigL1FexJetMonitorTool_JTM_jFexSRJetRoIContainer_',
53 'L1_jFexLRJetRoI':
'TrigL1FexJetMonitorTool_JTM_jFexLRJetRoIContainer_',
54 'L1_gFexSRJetRoI':
'TrigL1FexJetMonitorTool_JTM_gFexJetRoIContainer_',
55 'L1_gFexLRJetRoI':
'TrigL1FexJetMonitorTool_JTM_gFexJetRoIContainer_',
56 'LVL1JetRoIs':
'TrigL1FexJetMonitorTool_JTM_JetRoIContainer_',
57 }[self.L1JetContainer]
59 def container2tool_inst_name():
61 return {
'L1_jFexSRJetRoI':
'jFexSRDataRetriever',
62 'L1_jFexLRJetRoI':
'jFexLRDataRetriever',
63 'L1_gFexSRJetRoI':
'gFexSRDataRetriever',
64 'L1_gFexLRJetRoI':
'gFexLRDataRetriever',
65 'LVL1JetRoIs':
'JetRoIDataRetriever',
66 }[self.L1JetContainer]
69 def container2_monitorgroup():
71 return {
'L1_jFexSRJetRoI':
'TrigL1JFexSRJetMonitor',
72 'L1_jFexLRJetRoI':
'TrigL1JFexLRJetMonitor',
73 'L1_gFexSRJetRoI':
'TrigL1GFexSRJetMonitor',
74 'L1_gFexLRJetRoI':
'TrigL1GFexLRJetMonitor',
75 'LVL1JetRoIs':
'TrigL1JetMonitor'}[self.L1JetContainer]
78 alg = monhelper.addAlgorithm(CompFactory.TrigL1FexJetMonitorAlgorithm,
80 toolClass = getattr(CompFactory, container2tool_class_name())
82 tool = toolClass(container2tool_inst_name())
83 tool.do_matching = self.matched
84 tool.offlineJetsToMatch = self.matchedOJ
85 tool.HLTJetsToMatch = self.matchedHLTJ
86 tool.l1container = self.L1JetKey
87 alg.group_name = container2_monitorgroup()
89 alg.TriggerChain = self.triggerChain
94 Path = self.L1JetContainer+
'/'
95 Path +=
'NoTriggerSelection/' if self.triggerChain ==
'' else self.triggerChain+
'/'
96 myGroup = monhelper.addGroup(alg, container2_monitorgroup(),
'HLT/JetMon/L1/')
99 myGroup.defineHistogram(
'et',title=
'et',path=Path,xbins=400,xmin=0.0,xmax=400.0)
101 myGroup.defineHistogram(
'et8x8',title=
'et8x8',path=Path,xbins=400,xmin=0.0,xmax=400.0)
104 myGroup.defineHistogram(
'eta',title=
'eta',path=Path,xbins=50,xmin=-5,xmax=5)
105 myGroup.defineHistogram(
'phi',title=
'phi',path=Path,xbins=50,xmin=-3.3,xmax=3.3)
108 for matchcoll,tag
in [ [self.matchedOJ,
'off'], [self.matchedHLTJ,
'hlt'] ]:
109 Path = self.L1JetContainer +
'/NoTriggerSelection/MatchedJets_' + matchcoll +
'/'
113 for histname
in [
'ptdiff',
'energydiff' ]:
114 myGroup.defineHistogram(tag+histname+
';'+histname,
115 title=histname, type=
"TH1F", path=Path,
116 xbins=140 , xmin=-120000., xmax=80000. ,)
118 for histname
in [
'ptresp',
'energyresp' ]:
119 myGroup.defineHistogram(tag+histname+
';'+histname,
121 type=
"TH1F", path=Path,
122 xbins=100 , xmin=-1., xmax=2. ,)
124 myGroup.defineHistogram(tag+
'ptresp,'+tag+
'ptref;ptresp_vs_ptRef',
125 title=
'ptresponse vs ptRef', type=
"TH2F", path=Path,
126 xbins=10 , xmin=-1., xmax=2.,
127 ybins=10, ymin=0., ymax=500000.,)
129 myGroup.defineHistogram(tag+
'ptresp,'+tag+
'etaref;ptresp_vs_etaRef',
130 title=
'ptresponse vs etaRef', type=
"TH2F", path=Path,
131 xbins=10, xmin=-1., xmax=2.,
132 ybins=10, ymin=-5., ymax=5.,)