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, MenuSequenceCA
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"))
45 return int(sv[0])+0.1*
int(sv[1])
49 hypo = CompFactory.TrackCountHypoTool(chainDict[
"chainName"])
50 if "hmt" in chainDict[
"chainName"]:
51 hypo.minNtrks =
int(chainDict[
"chainParts"][0][
"hypoTrkInfo"].strip(
"trk"))
52 hypo.minPt = 200*Units.MeV
53 if "pusup" in chainDict[
"chainName"]:
54 hypo.maxVertexZ = 10*Units.mm
55 if "mb_sptrk" in chainDict[
"chainName"]:
56 hypo.minPt = 100*Units.MeV
57 hypo.maxZ0 = 401*Units.millimeter
58 if "mb_sptrk_pt" in chainDict[
"chainName"]:
59 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].strip(
"pt"))*Units.GeV
60 hypo.maxZ0 = 401*Units.millimeter
61 if "excl" in chainDict[
"chainName"]:
63 hypo.minPt = ptToGeV(chainDict[
"chainParts"][0][
"hypoPtInfo"].strip(
"pt"))*Units.GeV
64 trk = chainDict[
"chainParts"][0][
"hypoTrkInfo"]
66 limits = trk[0:trk.index(
"trk")], trk[trk.index(
"trk")+3:]
67 hypo.minNtrks =
int(limits[0])
68 hypo.maxNtrks =
int(limits[1])
74 hypo = CompFactory.MbtsHypoTool(chainDict[
"chainName"])
75 if chainDict[
"chainParts"][0][
"extra"]
in [
"vetombts2in",
"vetospmbts2in"]:
79 if '_all_' in chainDict[
"chainName"]:
81 if "mbMon:online" in chainDict[
"monGroups"]:
90 hypo = CompFactory.TrigZVertexHypoTool(chainDict[
"chainName"])
91 if "pusup" in chainDict[
"chainName"]:
92 hypo.minWeight =
int(chainDict[
"chainParts"][0][
"pileupInfo"].removeprefix(
"pusup"))
101 reco = InViewRecoCA(
"SPCountingReco")
102 minBiasFlags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Trigger.InDetTracking.minBias")
104 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
105 seq = InnerTrackingTrigSequence.create(minBiasFlags,
106 minBiasFlags.Tracking.ActiveConfig.input_name,
107 rois =
str(reco.inputMaker().InViewRoIs),
108 inView =
str(reco.inputMaker().Views))
109 spMakingCA = seq.sequence(
"spacePointFormation")
111 reco.mergeReco(spMakingCA)
114 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVSPCountingInputs",
115 DataObjects = {(
'PixelID' ,
'DetectorStore+PixelID' ),
116 (
'SCT_ID' ,
'DetectorStore+SCT_ID' )} )
117 reco.addRecoAlgo(vdv)
119 from TrigMinBias.MinBiasCountersConfig
import SPCounterRecoAlgCfg
122 selAcc = SelectionCA(
"MinBiasSPCounting")
123 selAcc.mergeReco(reco)
124 spCountHypo = CompFactory.SPCountHypoAlg(SpacePointsKey=
recordable(
"HLT_SpacePointCounts"))
125 selAcc.addHypoAlgo(spCountHypo)
130 return MenuSequenceCA(flags, selAcc, HypoToolGen = SPCountHypoToolGen)
133 recoAcc = InViewRecoCA(name=
"ZVertFinderReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
134 vdv = CompFactory.AthViews.ViewDataVerifier(
"VDVZFinderInputs",
135 DataObjects = {(
'SpacePointContainer' ,
'StoreGateSvc+PixelTrigSpacePoints'),
136 (
'PixelID' ,
'DetectorStore+PixelID' ) })
138 recoAcc.addRecoAlgo(vdv)
139 from IDScanZFinder.ZFinderAlgConfig
import MinBiasZFinderCfg
141 selAcc = SelectionCA(
"ZVertexFinderSel")
142 selAcc.mergeReco(recoAcc)
143 selAcc.addHypoAlgo( CompFactory.TrigZVertexHypoAlg(
"TrigZVertexHypoAlg", ZVertexKey=
recordable(
"HLT_vtx_z")))
144 return MenuSequenceCA(flags, selAcc, HypoToolGen = TrigZVertexHypoToolGen)
148 recoAcc = InViewRecoCA(name=
"MBTrackReco", InViewRoIs=
"InputRoI", RequireParentView=
True)
150 from TrigInDetConfig.utils
import getFlagsForActiveConfig
153 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
154 trkSeq = InnerTrackingTrigSequence.create(flagsWithTrk,
155 flagsWithTrk.Tracking.ActiveConfig.input_name,
157 inView =
"VDVMinBiasIDTracking")
158 recoAcc.mergeReco(trkSeq.sequence(
"OfflineNoDataPrep"))
160 selAcc = SelectionCA(
"MBTrackCountSel")
161 selAcc.mergeReco(recoAcc)
162 from TrigMinBias.MinBiasCountersConfig
import TrackCounterHypoAlgCfg
164 selAcc.mergeHypo(trackCountHypoAlgo)
165 return MenuSequenceCA(flagsWithTrk, selAcc, HypoToolGen = TrackCountHypoToolGen)
168 recoAcc = InEventRecoCA(name=
"Mbts")
169 from TrigMinBias.MbtsConfig
import MbtsFexCfg, MbtsSGInputCfg
171 recoAcc.mergeReco(fex)
172 selAcc = SelectionCA(
"MbtsSel")
173 hypo = CompFactory.MbtsHypoAlg(
"MbtsHypoAlg", MbtsBitsKey = fex.getPrimary().MbtsBitsKey)
174 selAcc.mergeReco(recoAcc)
175 selAcc.addHypoAlgo(hypo)
177 return MenuSequenceCA(flags,
179 HypoToolGen = MbtsHypoToolGen,
183 if __name__ ==
"__main__":
184 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
188 zf.ca.printConfig(withDetails=
True)