3 from AthenaCommon.Logging
import logging
4 logging.getLogger().
info(
"Importing %s",__name__)
5 log = logging.getLogger(__name__)
7 from TriggerMenuMT.HLT.Config.ChainConfigurationBase
import ChainConfigurationBase
8 from TriggerMenuMT.HLT.Config.MenuComponents
import MenuSequence, SelectionCA, InEventRecoCA
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from TrigGenericAlgs.TrigGenericAlgsConfig
import TimeBurnerCfg, TimeBurnerHypoToolGen, L1CorrelationAlgCfg
11 from L1TopoOnlineMonitoring
import L1TopoOnlineMonitoringConfig
as TopoMonConfig
12 from L1TopoSimulation
import L1TopoSimulationConfig
as TopoSimConfig
13 from TrigHypoCommonTools.TrigHypoCommonTools
import TrigGenericHypoToolFromDict
14 from TrigEDMConfig.TriggerEDM
import recordable
15 from AthenaCommon.CFElements
import seqAND
16 from TriggerMenuMT.HLT.CommonSequences.RejectSequences
import RejectSequence
23 inputMaker = CompFactory.InputMakerForRoI(
"IM_TimeBurner",
24 RoITool=CompFactory.ViewCreatorInitialROITool(),
25 RoIs=
"TimeBurnerInputRoIs",
27 reco = InEventRecoCA(
'TimeBurner_reco',inputMaker=inputMaker)
29 selAcc = SelectionCA(
'TimeBurnerSequence')
30 selAcc.mergeReco(reco)
33 name=
"TimeBurnerHypo",
38 msca = MenuSequence(flags, selAcc,
39 HypoToolGen=TimeBurnerHypoToolGen)
45 from LArMonitoring.LArSuperCellMonAlg
import LArSuperCellMonConfigHLT
47 inputMaker = CompFactory.InputMakerForRoI(
"IM_LArSuperCellMon"+appendName,
48 RoITool=CompFactory.ViewCreatorInitialROITool(),
49 RoIs=
"LArSuperCellMonRoIs"+appendName,
51 reco = InEventRecoCA(
'LArSuperCellMonitoring'+appendName,inputMaker=inputMaker)
53 selAcc = SelectionCA(
'LArSuperCellMonitoringSequence'+appendName)
54 selAcc.mergeReco(reco)
55 HypoName =
"LArSuperCellMonHypoConfig"+appendName
62 inputMaker = CompFactory.InputMakerForRoI(
"IM_L1TopoOnlineMonitor")
63 inputMaker.RoITool = CompFactory.ViewCreatorInitialROITool()
64 inputMaker.RoIs=
"L1TopoOnlineMonitorInputRoIs"
66 reco = InEventRecoCA(
'L1TopoPhase1OnlineMonitor_reco',inputMaker=inputMaker)
69 if flags.Trigger.doLVL1:
70 readMuCTPI_local=
False
72 reco.addSequence(
seqAND(
'L1TopoSimSeq'))
73 reco.merge(TopoSimConfig.L1TopoSimulationCfg(flags,doMonitoring=
True,readMuCTPI=readMuCTPI_local,name=
"L1OnlineTopoSimulation"), sequenceName=
'L1TopoSimSeq')
75 selAcc = SelectionCA(
"L1TopoOnlineMonitorSequence")
76 selAcc.mergeReco(reco)
78 hypoAlg = TopoMonConfig.getL1TopoOnlineMonitorHypo(flags)
79 selAcc.addHypoAlgo(hypoAlg)
81 return MenuSequence(flags, selAcc,
82 HypoToolGen = TopoMonConfig.L1TopoOnlineMonitorHypoToolGen)
86 inputMaker = CompFactory.InputMakerForRoI(
"IM_MistimeMon",
87 RoITool = CompFactory.ViewCreatorInitialROITool(),
88 RoIs=
"MistimeMonInputRoIs",
91 outputName =
recordable(
"HLT_TrigCompositeMistimeJ400")
92 reco = InEventRecoCA(
'Mistime_reco',inputMaker=inputMaker)
93 recoAlg =
L1CorrelationAlgCfg(flags,
"MistimeMonj400", ItemList=[
'L1_J400',
'L1_gJ400p0ETA25'],
94 TrigCompositeWriteHandleKey=outputName, trigCompPassKey=outputName+
".pass",
95 l1AKey=outputName+
".l1a_type", otherTypeKey=outputName+
".other_type",
96 beforeAfterKey=outputName+
".beforeafterflag")
97 reco.addRecoAlgo(recoAlg)
98 selAcc = SelectionCA(
"MistimeMonSequence")
99 selAcc.mergeReco(reco)
102 hypoAlg = CompFactory.TrigGenericHypoAlg(
"MistimeMonJ400HypoAlg", TrigCompositeContainer=outputName)
103 selAcc.addHypoAlgo(hypoAlg)
105 return MenuSequence(flags, selAcc,
106 HypoToolGen = TrigGenericHypoToolFromDict)
109 from TrigCaloRec.TrigCaloRecConfig
import hltCaloTopoClusteringCfg
111 reco = InEventRecoCA(
'CaloClusterMonitoring' + suffix)
113 reco.merge(
hltCaloTopoClusteringCfg(flags, namePrefix=
"CaloMon", nameSuffix=
"FS" + suffix, CellsName=
"CaloCellsFS" + suffix, monitorCells=
False, clustersKey=
"HLT_MonitoringCaloClusters" + suffix) )
115 selAcc = SelectionCA(
'CaloClusterMonitoringSequence' + suffix)
117 selAcc.mergeReco(reco)
119 HypoName =
"CaloClusterMonHypoConfig"+ suffix
131 ChainConfigurationBase.__init__(self,chainDict)
138 log.debug(
"Assembling chain for %s", self.chainName)
140 monTypeList = self.chainPart.
get(
'monType')
142 raise RuntimeError(
'No monType defined in chain ' + self.chainName)
143 if len(monTypeList) > 1:
144 raise RuntimeError(
'Multiple monType values defined in chain ' + self.chainName)
145 monType = monTypeList[0]
147 if monType ==
'timeburner':
149 elif monType ==
'larsupercellmon':
151 elif monType ==
'l1topoPh1debug':
153 elif monType ==
'mistimemonj400':
155 elif monType ==
'caloclustermon':
158 raise RuntimeError(
'Unexpected monType '+monType+
' in MonitorChainConfiguration')
160 return self.buildChain(chainSteps)
166 return self.getStep(flags,
'TimeBurner',[timeBurnerCfg])
173 if (
"_FILLED" in self.chainL1Item ):
175 elif (
"_EMPTY" in self.chainL1Item ):
177 elif (
"_FIRSTEMPTY" in self.chainL1Item ):
178 appendName=
"_firstempty"
181 return self.getStep(flags,
'larsupercellmon'+appendName,[LArSuperCellMonitoringGenCfg],appendName=appendName)
188 sequenceCfg = L1TopoOnlineMonitorSequenceCfg
189 return self.getStep(flags,
'L1TopoOnlineMonitor',[sequenceCfg])
195 return self.getStep(flags,
'MistimeMon',[MistimeMonSequenceCfg])
202 if "_FILLED" in self.chainL1Item:
203 this_suffix =
"_filled"
204 elif "_EMPTY" in self.chainL1Item:
205 this_suffix =
"_empty"
206 elif "_FIRSTEMPTY" in self.chainL1Item:
207 this_suffix =
"_firstempty"
208 return self.getStep(flags,
'caloclustermon' + this_suffix, [CaloClusterMonitorCfg], suffix = this_suffix)