4 from TrigEDMConfig.TriggerEDM
import recordable
6 from TrigMinBias.TrigMinBiasMonitoring
import MbtsHypoToolMonitoring
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
11 from ..Config.MenuComponents
import InViewRecoCA, InEventRecoCA, SelectionCA, MenuSequence
13 from AthenaCommon.Logging
import logging
14 log = logging.getLogger(__name__)
18 hypo = CompFactory.SPCountHypoTool(chainDict[
"chainName"])
19 if "hmt" in chainDict[
"chainName"]:
20 hypo.sctSP =
int(chainDict[
"chainParts"][0][
"hypoSPInfo"].strip(
"sp"))
21 if "mb_sptrk_" in chainDict[
"chainName"]
or "mb_sp_" in chainDict[
"chainName"]:
24 if "mb_excl" in chainDict[
"chainName"]:
27 if "sp_pix" in chainDict[
"chainName"]:
28 hypo.pixCL =
int(chainDict[
"chainParts"][0][
"hypoSPInfo"].removeprefix(
"pix"))
29 if "sp_vpix" in chainDict[
"chainName"]:
32 hypo.pixCLMax =
int(chainDict[
"chainParts"][0][
"hypoSPInfo"].removeprefix(
"vpix"))
33 if "nototpix" in chainDict[
"chainName"]:
36 hypo.pixCLnoToT =
int(chainDict[
"chainParts"][0][
"hypoSPInfo"].removeprefix(
"nototpix"))
37 if "q2" in chainDict[
"chainName"]:
39 if "mb_pixsptrk_" in chainDict[
"chainName"]:
50 return int(sv[0])+0.1*
int(sv[1])
54 hypo = CompFactory.TrackCountHypoTool(chainDict[
"chainName"])
55 if "hmt" in chainDict[
"chainName"]:
56 hypo.minNtrks =
int(chainDict[
"chainParts"][0][
"hypoTrkInfo"].strip(
"trk"))
57 hypo.minPt = 200*Units.MeV
58 if "pusup" in chainDict[
"chainName"]:
59 hypo.maxVertexZ = 10*Units.mm
60 if "mb_sptrk" in chainDict[
"chainName"]:
61 hypo.minPt = 100*Units.MeV
62 hypo.maxZ0 = 401*Units.millimeter
63 if "mb_sptrk_pt" in chainDict[
"chainName"]:
64 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].strip(
"pt"))*Units.GeV
65 hypo.maxZ0 = 401*Units.millimeter
66 if "excl" in chainDict[
"chainName"]:
68 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].strip(
"pt"))*Units.GeV
69 trk = chainDict[
"chainParts"][0][
"hypoTrkInfo"]
71 limits = trk[0:trk.index(
"trk")], trk[trk.index(
"trk")+3:]
72 hypo.minNtrks =
int(limits[0])
73 hypo.maxNtrks =
int(limits[1])
74 if "mb_pixsptrk" in chainDict[
"chainName"]:
75 hypo.minPt = 100*Units.MeV
76 hypo.maxZ0 = 401*Units.millimeter
82 hypo = CompFactory.MbtsHypoTool(chainDict[
"chainName"])
83 if chainDict[
"chainParts"][0][
"extra"]
in [
"vetombts2in",
"vetospmbts2in"]:
87 if '_all_' in chainDict[
"chainName"]:
89 if "mbMon:online" in chainDict[
"monGroups"]:
98 hypo = CompFactory.TrigZVertexHypoTool(chainDict[
"chainName"])
99 if "pusup" in chainDict[
"chainName"]:
100 hypo.minWeight =
int(chainDict[
"chainParts"][0][
"pileupInfo"].removeprefix(
"pusup"))
109 reco = InViewRecoCA(
"SPCountingReco")
110 minBiasFlags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Trigger.InDetTracking.minBias")
112 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
113 seq = InnerTrackingTrigSequence.create(minBiasFlags,
114 minBiasFlags.Tracking.ActiveConfig.input_name,
115 rois =
str(reco.inputMaker().InViewRoIs),
116 inView =
str(reco.inputMaker().Views))
117 spMakingCA = seq.sequence(
"spacePointFormation")
119 reco.mergeReco(spMakingCA)
122 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVSPCountingInputs",
123 DataObjects = {(
'PixelID' ,
'DetectorStore+PixelID' ),
124 (
'SCT_ID' ,
'DetectorStore+SCT_ID' )} )
125 reco.addRecoAlgo(vdv)
127 from TrigMinBias.MinBiasCountersConfig
import SPCounterRecoAlgCfg
130 selAcc = SelectionCA(
"MinBiasSPCounting")
131 selAcc.mergeReco(reco)
132 spCountHypo = CompFactory.SPCountHypoAlg(SpacePointsKey=
recordable(
"HLT_SpacePointCounts"))
133 selAcc.addHypoAlgo(spCountHypo)
138 return MenuSequence(flags, selAcc, HypoToolGen = SPCountHypoToolGen)
141 recoAcc = InViewRecoCA(name=
"ZVertFinderReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
142 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVZFinderInputs",
143 DataObjects = {(
'SpacePointContainer' ,
'StoreGateSvc+PixelTrigSpacePoints'),
144 (
'PixelID' ,
'DetectorStore+PixelID' ) })
146 recoAcc.addRecoAlgo(vdv)
147 from IDScanZFinder.ZFinderAlgConfig
import MinBiasZFinderCfg
149 selAcc = SelectionCA(
"ZVertexFinderSel")
150 selAcc.mergeReco(recoAcc)
151 selAcc.addHypoAlgo( CompFactory.TrigZVertexHypoAlg(
"TrigZVertexHypoAlg", ZVertexKey=
recordable(
"HLT_vtx_z")))
152 return MenuSequence(flags, selAcc, HypoToolGen = TrigZVertexHypoToolGen)
156 recoAcc = InViewRecoCA(name=
"MBTrackReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
158 from TrigInDetConfig.utils
import getFlagsForActiveConfig
161 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
162 trkSeq = InnerTrackingTrigSequence.create(flagsWithTrk,
163 flagsWithTrk.Tracking.ActiveConfig.input_name,
165 inView =
"VDVMinBiasIDTracking")
167 recoAcc.mergeReco(trkSeq.sequence(
"OfflineNoDataPrep"))
169 selAcc = SelectionCA(
"MBTrackCountSel")
170 selAcc.mergeReco(recoAcc)
171 from TrigMinBias.MinBiasCountersConfig
import TrackCounterHypoAlgCfg
173 selAcc.mergeHypo(trackCountHypoAlgo)
174 return MenuSequence(flagsWithTrk, selAcc, HypoToolGen = TrackCountHypoToolGen)
178 recoAcc = InViewRecoCA(name=
"MBPixelTrackReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
180 from TrigInDetConfig.utils
import getFlagsForActiveConfig
183 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
184 trkSeq = InnerTrackingTrigSequence.create(flagsWithTrk,
185 flagsWithTrk.Tracking.ActiveConfig.input_name,
187 inView =
"VDVMinBiasIDTracking")
189 recoAcc.mergeReco(trkSeq.sequence(
"OfflineNoDataPrep"))
191 selAcc = SelectionCA(
"MBPixelTrackCountSel")
192 selAcc.mergeReco(recoAcc)
193 from TrigMinBias.MinBiasCountersConfig
import PixelTrackCounterHypoAlgCfg
195 selAcc.mergeHypo(trackCountHypoAlgo)
196 return MenuSequence(flagsWithTrk, selAcc, HypoToolGen = TrackCountHypoToolGen)
201 recoAcc = InEventRecoCA(name=
"Mbts")
203 from TrigMinBias.MbtsConfig
import MbtsFexCfg, MbtsSGInputCfg
207 recoAcc.mergeReco(fex)
209 selAcc = SelectionCA(
"MbtsSel")
210 selAcc.mergeReco(recoAcc)
212 hypo = CompFactory.MbtsHypoAlg(
"MbtsHypoAlg", MbtsBitsKey = fex.getPrimary().MbtsBitsKey)
213 selAcc.addHypoAlgo(hypo)
215 return MenuSequence(flags,
217 HypoToolGen = MbtsHypoToolGen)
220 if __name__ ==
"__main__":
221 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
225 zf.ca.printConfig(withDetails=
True)