46 def L1TopoSimulationCfg(flags, doMonitoring=True, readMuCTPI=False, name="L1TopoSimulation", deactivateL1TopoMuons=False, useMuonRoIs=False, useMuonDecoder=False, writeMuonRoIs = True):
56 if flags.Trigger.L1.doMuon
and not deactivateL1TopoMuons:
57 muProvider = CompFactory.LVL1.MuonInputProvider(
"MuonInputProvider")
60 If muons coming from the decoding, we use MuonRoI, otherwise MuCTPIL1Topo
61 So here we should be adding proper flag for P1, and when input file is RAW
62 Simply, if muons are simulated, we will use MuCTPIL1Topo, if decoded MuonRoI
66 muProvider.locationMuCTPItoL1Topo =
""
67 muProvider.locationMuCTPItoL1Topo1 =
""
68 muProvider.locationMuonRoI =
"L1MuCTPItoL1TopoLocationFromMuonRoI"
69 muProvider.locationMuonRoI1 =
"L1MuCTPItoL1TopoLocationFromMuonRoI1"
71 muProvider.locationMuonRoI =
"LVL1MuonRoIs"
72 muProvider.locationMuonRoI1 =
"LVL1MuonRoIsBCp1"
74 muProvider.locationMuonRoI =
""
75 muProvider.locationMuonRoI1 =
""
78 from TrigT1MuonRecRoiTool.TrigT1MuonRecRoiToolConfig
import RPCRecRoiToolCfg, TGCRecRoiToolCfg
83 from MuonConfig.MuonBytestreamDecodeConfig
import RpcBytestreamDecodeCfg,TgcBytestreamDecodeCfg
86 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import MuonRoIByteStreamToolCfg
87 muonRoiTool = acc.popToolsAndMerge(
MuonRoIByteStreamToolCfg(flags, name=
"L1MuonBSDecoderToolInL1Topo", writeBS=
False, writeDecodedMuonRoIs = writeMuonRoIs))
88 decoderTools += [muonRoiTool]
95 if flags.Trigger.L1.doeFex:
96 emtauProvider = CompFactory.LVL1.eFexInputProvider(
"eFexInputProvider")
97 if flags.Trigger.L1.dojFex:
98 jetProvider = CompFactory.LVL1.jFexInputProvider(
"jFexInputProvider")
99 if flags.Trigger.L1.dogFex:
100 energyProvider = CompFactory.LVL1.gFexInputProvider(
"gFexInputProvider")
102 controlHistSvc = CompFactory.LVL1.ControlHistSvc(
"ControlHistSvc")
108 from L1TopoByteStream.L1TopoByteStreamConfig
import L1TopoPhase1ByteStreamToolCfg
110 decoderTools += [l1topoBSTool]
111 maybeMissingRobs += l1topoBSTool.ROBIDs
114 decoderAlg = CompFactory.L1TriggerByteStreamDecoderAlg(name=
"L1TriggerByteStreamDecoder",
115 DecoderTools=decoderTools,
116 MaybeMissingROBs=maybeMissingRobs)
118 acc.addEventAlgo(decoderAlg, sequenceName=
'AthAlgSeq')
120 if not flags.Trigger.enableL1CaloPhase1:
121 if (emtauProvider !=
""):
122 emtauProvider.eFexEMRoIKey =
""
123 emtauProvider.eFexTauRoIKey =
""
124 if (jetProvider !=
""):
125 jetProvider.jFexSRJetRoIKey =
""
126 jetProvider.jFexLRJetRoIKey =
""
127 jetProvider.jFexFwdElRoIKey =
""
128 jetProvider.jFexTauRoIKey =
""
129 jetProvider.jFexMETRoIKey =
""
130 jetProvider.jFexSumETRoIKey =
""
131 jetProvider.gMETComponentsJwojKey =
""
132 if (energyProvider !=
""):
133 energyProvider.gFexSRJetRoIKey =
""
134 energyProvider.gFexLRJetRoIKey =
""
135 energyProvider.gMETComponentsJwojKey =
""
136 energyProvider.gMHTComponentsJwojKey =
""
137 energyProvider.gMETComponentsNoiseCutKey =
""
138 energyProvider.gMETComponentsRmsKey =
""
139 energyProvider.gScalarEJwojKey =
""
140 energyProvider.gEspressoKey =
""
142 if (jetProvider !=
"")
and (energyProvider !=
""):
144 jetProvider.gMETComponentsJwojKey = energyProvider.gMETComponentsJwojKey
146 topoSimAlg = CompFactory.LVL1.L1TopoSimulation(name,
147 MuonInputProvider = muProvider,
148 EMTAUInputProvider = emtauProvider,
149 JetInputProvider = jetProvider,
150 EnergyInputProvider = energyProvider,
151 ControlHistSvc = controlHistSvc,
152 IsLegacyTopo =
False,
153 doMonitoring = doMonitoring,
154 EnableInputDump = flags.Trigger.enableL1TopoDump,
155 UseBitwise = flags.Trigger.enableL1TopoBWSimulation
157 if name!=
"L1TopoSimulation":
158 topoSimAlg.MonHistBaseDir =
"L1/OnlineL1TopoAlgorithms"
160 acc.addEventAlgo(topoSimAlg)
164 from L1TopoOnlineMonitoring
import L1TopoOnlineMonitoringConfig
as TopoMonConfig
165 if name==
"L1TopoSimulation":
166 acc.addEventAlgo(TopoMonConfig.getL1TopoPhase1OnlineMonitor(flags,
'L1/L1TopoSimDecisions',
167 doHwMon=IsData,doComp=IsData, doMultComp=IsData))
169 acc.addEventAlgo(TopoMonConfig.getL1TopoPhase1OnlineMonitor(flags,
'L1/OnlineL1TopoSimDecisions',
170 toolName=name+
"_Monitor",
171 doHwMon=IsData,doComp=IsData, doMultComp=IsData))