3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
6 from TrigEDMConfig.TriggerEDM
import recordable
7 from TrigT2CaloCalibration.EgammaCalibrationConfig
import (EgammaHitsCalibrationBarrelConfig,
8 EgammaHitsCalibrationEndcapConfig,
9 EgammaGapCalibrationConfig,
10 EgammaTransitionRegionsConfig,
11 EgammaSshapeCalibrationBarrelConfig,
12 EgammaSshapeCalibrationEndcapConfig)
14 _T2CaloEgamma_ExtraInputs = {
15 (
'IRegSelLUTCondData',
'ConditionStore+RegSelLUTCondData_TTEM'),
16 (
'IRegSelLUTCondData',
'ConditionStore+RegSelLUTCondData_TTHEC'),
17 (
'IRegSelLUTCondData',
'ConditionStore+RegSelLUTCondData_TILE'),
18 (
'IRegSelLUTCondData',
'ConditionStore+RegSelLUTCondData_FCALEM'),
19 (
'IRegSelLUTCondData',
'ConditionStore+RegSelLUTCondData_FCALHAD'),
20 (
'LArBadChannelCont' ,
'ConditionStore+LArBadChannel')
24 from HLTSeeding.HLTSeedingConfig
import mapThresholdToL1RoICollection
28 ClustersName="HLT_FastCaloEMClusters",**kwargs):
30 from TrigT2CaloEgamma.RingerConstants
import Layer
31 from TrigT2CaloEgamma.RingerConstants
import DETID
as det
34 monTool.defineHistogram(
"TIME_total", title=
"Total Time;time [us]",xbins=100, xmin=0, xmax=500,type=
'TH1F', path=
'EXPERT')
35 monTool.defineHistogram(
"TIME_load_cells", title=
"Load Cells Time;time [us]",xbins=50, xmin=0, xmax=100,type=
'TH1F', path=
'EXPERT')
39 ringer = CompFactory.RingerReFex(
41 EtaBins = [0.0000, 2.500],
42 RingerKey = RingerKey,
43 ClustersName = ClustersName,
45 EtaSearchWindowSize = 0.1,
46 PhiSearchWindowSize = 0.1,
47 NRings = [8, 64, 8, 8, 4, 4, 4],
48 DeltaEta = [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.1],
49 DeltaPhi = [0.098174770424681, 0.098174770424681, 0.024543692606170, 0.024543692606170,
50 0.098174770424681, 0.098174770424681, 0.098174770424681],
52 Detectors = [ [det.TTEM], [det.TTEM], [det.TTEM], [det.TTEM], [det.TTHEC, det.TILE],
53 [det.TTHEC, det.TTHEC, det.TILE], [det.TTHEC, det.TILE] ],
54 Samplings = [ [0] , [1] , [2] , [3] , [0 , -1 ],
55 [1 , 2 , -1 ] , [3 , -1 ] ],
56 Samples = [ [ Layer.PreSamplerB,Layer.PreSamplerE ],
57 [ Layer.EMB1, Layer.EME1 ],
58 [ Layer.EMB2, Layer.EME2 ],
59 [ Layer.EMB3, Layer.EME3 ],
60 [ Layer.HEC0, Layer.TileBar0, Layer.TileGap2, Layer.TileExt0 ],
61 [ Layer.HEC1, Layer.HEC2, Layer.TileBar1, Layer.TileGap0, Layer.TileExt1 ],
62 [ Layer.HEC3, Layer.TileBar2, Layer.TileGap1, Layer.TileExt2 ]
64 DumpCells = flags.Trigger.egamma.dumpCellsFastCaloInfo,
65 DoNoiseThrRings = flags.Trigger.egamma.doNoiseThrRings,
66 NoiseFactor = flags.Trigger.egamma.sigmaNoiseFactor,
67 DoQuarter = [flags.Trigger.egamma.doQuarterRings]*_lenNRings,
68 DoEtaAxesDivision = [
True]*_lenNRings,
69 DoPhiAxesDivision = [
True]*_lenNRings,
71 for k, v
in kwargs.items():
79 ringer.DoQuarter = [
True]*len(ringer.NRings),
84 def t2CaloEgamma_AllCfg(flags, name="T2CaloEgamma_All",RoIs=inputEDM,ExtraInputs=set(), ClustersName=
"HLT_FastCaloEMClusters"):
86 tool = CompFactory.EgammaAllFex(
"EgammaAllFex",
88 ExtraInputs={(
'TileEMScale',
'ConditionStore+TileEMScale'),
89 (
'TileBadChannels',
'ConditionStore+TileBadChannels')})
90 alg = CompFactory.T2CaloEgammaReFastAlgo(name,
91 IReAlgToolList= [tool],
94 ExtraInputs = _T2CaloEgamma_ExtraInputs)
96 alg.ExtraInputs |= ExtraInputs
104 def t2CaloEgamma_AllEmCfg(flags, name="T2CaloEgamma_AllEm", RoIs=inputEDM, ExtraInputs=set(), ClustersName=
"HLT_FastCaloEMClusters"):
106 tool = CompFactory.EgammaAllFex(
"EgammaAllEmFex",
107 ExtraInputs={(
'TileEMScale',
'ConditionStore+TileEMScale'),
108 (
'TileBadChannels',
'ConditionStore+TileBadChannels')})
110 alg = CompFactory.T2CaloEgammaReFastAlgo(name,
111 IReAlgToolList= [tool],
114 ExtraInputs = _T2CaloEgamma_ExtraInputs)
116 alg.ExtraInputs |= ExtraInputs
118 acc.addEventAlgo(alg)
124 doRinger=False, RingerKey="HLT_FastCaloRinger", RoIs=inputEDM, ExtraInputs=set()):
127 samp2 = CompFactory.EgammaReSamp2Fex(
"ReFaAlgoSamp2FexConfig",
128 MaxDetaHotCell=0.15, MaxDphiHotCell=0.15 )
129 samp1 = CompFactory.EgammaReSamp1Fex(
"ReFaAlgoSamp1FexConfig")
130 sampe = CompFactory.EgammaReEmEnFex(
"ReFaAlgoEmEnFexConfig")
131 samph = CompFactory.EgammaReHadEnFex(
"ReFaAlgoHadEnFexConfig",
132 ExtraInputs={(
'TileEMScale',
'ConditionStore+TileEMScale'),
133 (
'TileBadChannels',
'ConditionStore+TileBadChannels')})
135 monTool.defineHistogram(
'TrigEMCluster_eT', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma E_T; E_T [ GeV ] ; Nclusters", xbins=80, xmin=0.0, xmax=140.0)
136 monTool.defineHistogram(
'TrigEMCluster_had1', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma had E_T samp1; had E_T samp1 [ GeV ] ; Nclusters", xbins=80, xmin=0.0, xmax=8.0)
137 monTool.defineHistogram(
'TrigEMCluster_eta', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma #eta; #eta ; Nclusters", xbins=100, xmin=-2.5, xmax=2.5)
138 monTool.defineHistogram(
'TrigEMCluster_phi', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma #phi; #phi ; Nclusters", xbins=128, xmin=-3.2, xmax=3.2)
139 monTool.defineHistogram(
'TrigEMCluster_eta,TrigEMCluster_phi', path=
'EXPERT', type=
'TH2F', title=
"T2Calo Egamma Number of Clusters; #eta ; #phi ; Number of Clusters", xbins=100, xmin=-2.5, xmax=2.5, ybins=128, ymin=-3.2, ymax=3.2)
140 monTool.defineHistogram(
'TrigEMCluster_rEta', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma rEta; rEta (e237/e277) ; Nclusters", xbins=140, xmin=-0.2, xmax=1.2)
141 monTool.defineHistogram(
'TIME_exec', path=
'EXPERT', type=
'TH1F', title=
"T2Calo Egamma time; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=8000.0)
142 monTool.defineHistogram(
'TrigEMCluster_eta,TIME_exec', path=
'EXPERT', type=
'TH2F', title=
"T2Calo Egamma time vs #eta ; #eta ; time [ us ]", xbins=100, xmin=-2.5, xmax=2.5, ybins=80, ymin=0.0, ymax=8000.0)
143 monTool.defineHistogram(
'TrigEMCluster_eta,TrigEMCluster_eT', path=
'EXPERT', type=
'TH2F', title=
"Egamma E_T vs #eta ; #eta; E_T", xbins=100, xmin=-2.5, xmax=2.5)
144 monTool.defineHistogram(
'TrigEMCluster_eta,TrigEMCluster_et_rings', path=
'EXPERT', type=
'TH2F', title=
"Egamma E_T[calib] vs #eta ; #eta; E_T", xbins=100, xmin=-2.5, xmax=2.5)
145 monTool.defineHistogram(
'Resolution_et', path=
'EXPERT', type=
'TH1F', title=
"Egamma Resolution E_T; (E_T[calib] - E_T)/ E_T ; Nclusters", xbins=80, xmin=-10.0, xmax=10.0)
146 monTool.defineHistogram(
'TrigEMCluster_et_rings', path=
'EXPERT', type=
'TH1F', title=
"Egamma E_T [calib]; E_T [ GeV ] ; Nclusters", xbins=80, xmin=0.0, xmax=140.0)
148 alg = CompFactory.T2CaloEgammaReFastAlgo(
150 IReAlgToolList = [ samp2, samp1, sampe, samph ],
151 ExtraInputs = _T2CaloEgamma_ExtraInputs,
155 CalibListBarrel = [EgammaSshapeCalibrationBarrelConfig(),
156 EgammaHitsCalibrationBarrelConfig(),
157 EgammaGapCalibrationConfig(),
158 EgammaTransitionRegionsConfig()],
159 CalibListEndcap = [EgammaSshapeCalibrationEndcapConfig(),
160 EgammaHitsCalibrationEndcapConfig(),
161 EgammaGapCalibrationConfig()])
165 RingerKey= RingerKey,
166 ClustersName = ClustersName)
167 alg.IReAlgToolList += [ringer]
169 if flags.Trigger.egamma.fastCaloETCalibration:
170 ringerCalib = CompFactory.TrigFastCalibWithRings(name=
"FastCalibRingsTool",
171 CalibPath = flags.Trigger.egamma.fastCaloETCalibrationVersion, RingerKey=
"HLT_FastCaloRinger")
172 alg.CalibWRingsTool = ringerCalib
173 alg.DoCalibWithRings =
True
179 alg.ExtraInputs |= ExtraInputs
181 acc.addEventAlgo(alg)
187 ClustersName="HLT_FWDFastCaloEMClusters",
188 doRinger=False, RingerKey="HLT_FWDFastCaloRinger", RoIs=inputEDM, ExtraInputs=set()):
191 alg = CompFactory.T2CaloEgammaForwardReFastAlgo(name,
193 ExtraInputs = _T2CaloEgamma_ExtraInputs,
197 alg.ExtraInputs |= ExtraInputs
199 acc.addEventAlgo(alg)
205 if __name__ ==
'__main__':
206 from AthenaConfiguration.AllConfigFlags
import initConfigFlags