11from ..Config.MenuComponents
import InViewRecoCA, InEventRecoCA, SelectionCA, MenuSequence
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 "_pt" in chainDict[
"chainName"]:
64 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].
strip(
"pt"))*Units.GeV
65 if "_trk" in chainDict[
"chainName"]:
66 hypo.minNtrks = int(chainDict[
"chainParts"][0][
"hypoTrkInfo"].
strip(
"trk"))
67 if "excl" in chainDict[
"chainName"]:
69 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].
strip(
"pt"))*Units.GeV
70 trk = chainDict[
"chainParts"][0][
"hypoTrkInfo"]
72 limits = trk[0:trk.index(
"trk")], trk[trk.index(
"trk")+3:]
73 hypo.minNtrks = int(limits[0])
74 hypo.maxNtrks = int(limits[1])
75 if "mb_pixsptrk" in chainDict[
"chainName"]:
76 hypo.minPt = 100*Units.MeV
77 hypo.maxZ0 = 401*Units.millimeter
110 reco = InViewRecoCA(
"SPCountingReco")
111 minBiasFlags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Trigger.InDetTracking.minBias")
113 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
114 seq = InnerTrackingTrigSequence.create(minBiasFlags,
115 minBiasFlags.Tracking.ActiveConfig.input_name,
116 rois = str(reco.inputMaker().InViewRoIs),
117 inView = str(reco.inputMaker().Views))
118 spMakingCA = seq.sequence(
"spacePointFormation")
120 reco.mergeReco(spMakingCA)
123 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVSPCountingInputs",
124 DataObjects = {(
'PixelID' ,
'DetectorStore+PixelID' ),
125 (
'SCT_ID' ,
'DetectorStore+SCT_ID' )} )
126 reco.addRecoAlgo(vdv)
128 from TrigMinBias.MinBiasCountersConfig
import SPCounterRecoAlgCfg
129 reco.mergeReco(SPCounterRecoAlgCfg(flags))
131 selAcc = SelectionCA(
"MinBiasSPCounting")
132 selAcc.mergeReco(reco)
133 spCountHypo = CompFactory.SPCountHypoAlg(SpacePointsKey=recordable(
"HLT_SpacePointCounts"))
134 selAcc.addHypoAlgo(spCountHypo)
142 recoAcc = InViewRecoCA(name=
"ZVertFinderReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
143 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVZFinderInputs",
144 DataObjects = {(
'SpacePointContainer' ,
'StoreGateSvc+PixelTrigSpacePoints'),
145 (
'PixelID' ,
'DetectorStore+PixelID' ) })
147 recoAcc.addRecoAlgo(vdv)
148 from IDScanZFinder.ZFinderAlgConfig
import MinBiasZFinderCfg
149 recoAcc.mergeReco( MinBiasZFinderCfg(flags) )
150 selAcc = SelectionCA(
"ZVertexFinderSel")
151 selAcc.mergeReco(recoAcc)
152 selAcc.addHypoAlgo( CompFactory.TrigZVertexHypoAlg(
"TrigZVertexHypoAlg", ZVertexKey=recordable(
"HLT_vtx_z")))
153 return MenuSequence(flags, selAcc, HypoToolGen = TrigZVertexHypoToolGen)
157 recoAcc = InViewRecoCA(name=
"MBTrackReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
159 from TrigInDetConfig.utils
import getFlagsForActiveConfig
160 flagsWithTrk = getFlagsForActiveConfig(flags,
"minBias", log)
162 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
163 trkSeq = InnerTrackingTrigSequence.create(flagsWithTrk,
164 flagsWithTrk.Tracking.ActiveConfig.input_name,
166 inView =
"VDVMinBiasIDTracking")
168 recoAcc.mergeReco(trkSeq.sequence(
"OfflineNoDataPrep"))
170 selAcc = SelectionCA(
"MBTrackCountSel")
171 selAcc.mergeReco(recoAcc)
172 from TrigMinBias.MinBiasCountersConfig
import TrackCounterHypoAlgCfg
173 trackCountHypoAlgo = TrackCounterHypoAlgCfg(flagsWithTrk)
174 selAcc.mergeHypo(trackCountHypoAlgo)
175 return MenuSequence(flagsWithTrk, selAcc, HypoToolGen = TrackCountHypoToolGen)
179 recoAcc = InViewRecoCA(name=
"MBPixelTrackReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
181 from TrigInDetConfig.utils
import getFlagsForActiveConfig
182 flagsWithTrk = getFlagsForActiveConfig(flags,
"minBiasPixel", log)
184 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
185 trkSeq = InnerTrackingTrigSequence.create(flagsWithTrk,
186 flagsWithTrk.Tracking.ActiveConfig.input_name,
188 inView =
"VDVMinBiasIDTracking")
190 recoAcc.mergeReco(trkSeq.sequence(
"OfflineNoDataPrep"))
192 selAcc = SelectionCA(
"MBPixelTrackCountSel")
193 selAcc.mergeReco(recoAcc)
194 from TrigMinBias.MinBiasCountersConfig
import PixelTrackCounterHypoAlgCfg
195 trackCountHypoAlgo = PixelTrackCounterHypoAlgCfg(flagsWithTrk)
196 selAcc.mergeHypo(trackCountHypoAlgo)
197 return MenuSequence(flagsWithTrk, selAcc, HypoToolGen = TrackCountHypoToolGen)
202 recoAcc = InEventRecoCA(name=
"Mbts")
204 from TrigMinBias.MbtsConfig
import MbtsFexCfg, MbtsSGInputCfg
205 recoAcc.mergeReco(MbtsSGInputCfg(flags))
207 fex = MbtsFexCfg(flags, MbtsBitsKey = recordable(
"HLT_MbtsBitsContainer"))
208 recoAcc.mergeReco(fex)
210 selAcc = SelectionCA(
"MbtsSel")
211 selAcc.mergeReco(recoAcc)
213 hypo = CompFactory.MbtsHypoAlg(
"MbtsHypoAlg", MbtsBitsKey = fex.getPrimary().MbtsBitsKey)
214 selAcc.addHypoAlgo(hypo)
216 return MenuSequence(flags,
218 HypoToolGen = MbtsHypoToolGen)