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 otherTypeBeforeKey=outputName+
".other_type_before",
98 otherTypeAfterKey=outputName+
".other_type_after",
99 beforeOffsetKey=outputName+
".offset_before",
100 afterOffsetKey=outputName+
".offset_after")
101 reco.addRecoAlgo(recoAlg)
102 selAcc = SelectionCA(
"MistimeMonSequence")
103 selAcc.mergeReco(reco)
106 hypoAlg = CompFactory.TrigGenericHypoAlg(
"MistimeMonJ400HypoAlg", TrigCompositeContainer=outputName)
107 selAcc.addHypoAlgo(hypoAlg)
109 return MenuSequence(flags, selAcc,
110 HypoToolGen = TrigGenericHypoToolFromDict)
113 from TrigCaloRec.TrigCaloRecConfig
import hltCaloTopoClusteringCfg
115 reco = InEventRecoCA(
'CaloClusterMonitoring' + suffix)
117 reco.merge(
hltCaloTopoClusteringCfg(flags, namePrefix=
"CaloMon", nameSuffix=
"FS" + suffix, CellsName=
"CaloCellsFS" + suffix, monitorCells=
False, clustersKey=
"HLT_MonitoringCaloClusters" + suffix) )
119 selAcc = SelectionCA(
'CaloClusterMonitoringSequence' + suffix)
121 selAcc.mergeReco(reco)
123 HypoName =
"CaloClusterMonHypoConfig"+ suffix
135 ChainConfigurationBase.__init__(self,chainDict)
142 log.debug(
"Assembling chain for %s", self.chainName)
144 monTypeList = self.chainPart.
get(
'monType')
146 raise RuntimeError(
'No monType defined in chain ' + self.chainName)
147 if len(monTypeList) > 1:
148 raise RuntimeError(
'Multiple monType values defined in chain ' + self.chainName)
149 monType = monTypeList[0]
151 if monType ==
'timeburner':
153 elif monType ==
'larsupercellmon':
155 elif monType ==
'l1topoPh1debug':
157 elif monType ==
'mistimemonj400':
159 elif monType ==
'caloclustermon':
162 raise RuntimeError(
'Unexpected monType '+monType+
' in MonitorChainConfiguration')
164 return self.buildChain(chainSteps)
170 return self.getStep(flags,
'TimeBurner',[timeBurnerCfg])
177 if (
"_FILLED" in self.chainL1Item ):
179 elif (
"_EMPTY" in self.chainL1Item ):
181 elif (
"_FIRSTEMPTY" in self.chainL1Item ):
182 appendName=
"_firstempty"
185 return self.getStep(flags,
'larsupercellmon'+appendName,[LArSuperCellMonitoringGenCfg],appendName=appendName)
192 sequenceCfg = L1TopoOnlineMonitorSequenceCfg
193 return self.getStep(flags,
'L1TopoOnlineMonitor',[sequenceCfg])
199 return self.getStep(flags,
'MistimeMon',[MistimeMonSequenceCfg])
206 if "_FILLED" in self.chainL1Item:
207 this_suffix =
"_filled"
208 elif "_EMPTY" in self.chainL1Item:
209 this_suffix =
"_empty"
210 elif "_FIRSTEMPTY" in self.chainL1Item:
211 this_suffix =
"_firstempty"
212 return self.getStep(flags,
'caloclustermon' + this_suffix, [CaloClusterMonitorCfg], suffix = this_suffix)