5 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaCommon.Logging
import logging
14 InDet__CacheCreator=CompFactory.getComp(
"InDet::CacheCreator")
15 InDetCacheCreatorTrig = InDet__CacheCreator(name =
"InDetCacheCreatorTrig",
16 TRT_DriftCircleKey = flags.Trigger.InDetTracking.TRT_DriftCircleCacheKey,
17 Pixel_ClusterKey = flags.Trigger.InDetTracking.PixelClusterCacheKey,
18 SCT_ClusterKey = flags.Trigger.InDetTracking.SCTClusterCacheKey,
19 SpacePointCachePix = flags.Trigger.InDetTracking.SpacePointCachePix,
20 SpacePointCacheSCT = flags.Trigger.InDetTracking.SpacePointCacheSCT,
21 SCTRDOCacheKey = flags.Trigger.InDetTracking.SCTRDOCacheKey,
22 SCTBSErrCacheKey = flags.Trigger.InDetTracking.SCTBSErrCacheKey,
23 SCTFlaggedCondCacheKey = flags.Trigger.InDetTracking.SCTFlaggedCondCacheKey,
24 PixRDOCacheKey = flags.Trigger.InDetTracking.PixRDOCacheKey,
25 PixBSErrCacheKey = flags.Trigger.InDetTracking.PixBSErrCacheKey,
26 TRTRDOCacheKey = flags.Trigger.InDetTracking.TRTRDOCacheKey)
28 if not flags.Detector.GeometryTRT:
29 InDetCacheCreatorTrig.disableTRT =
True
31 acc.addEventAlgo( InDetCacheCreatorTrig )
38 creator = CompFactory.ActsTrk.Cache.CreatorAlg(name=
"ActsCacheCreatorTrig",
39 PixelClustersCacheKey=
"ActsPixelClusterCache_Back",
40 StripClustersCacheKey=
"ActsStripClusterCache_Back",
41 PixelSpacePointCacheKey=
"ActsPixelSpacePointCache_Back",
42 StripSpacePointCacheKey=
"ActsStripSpacePointCache_Back",
43 StripOverlapSpacePointCacheKey=
"ActsStripOverlapSpacePointCache_Back")
45 acc.addEventAlgo(creator)
56 log = logging.getLogger(
"trigInDetFastTrackingCfg")
57 from TrigInDetConfig.utils
import getFlagsForActiveConfig
60 """ Generates fast tracking config, it is a primary config function """
62 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
64 seq = InnerTrackingTrigSequence.create(flags,
65 flags.Tracking.ActiveConfig.input_name,
67 inView =
"VDVInDetFTF" if in_view
else None)
68 if patternMode==
'FTF':
69 acc = seq.sequence(
"FastTrackFinder")
70 elif patternMode==
"fastTracking":
71 acc = seq.sequence(
"offlinePattern")
80 def trigInDetLRTCfg(flags, LRTInputCollection, roisKey, in_view, extra_view_inputs=tuple()):
81 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
82 viewname =
"VDVInDetLRT" if in_view
else None
83 seq = InnerTrackingTrigSequence.create(flags,
84 flags.Tracking.ActiveConfig.input_name,
89 acc.addEventAlgo( CompFactory.AthViews.ViewDataVerifier(
90 name =
"LRTInputVDV_"+viewname +
"_" + flags.Tracking.ActiveConfig.input_name,
91 DataObjects = { (
'TrigRoiDescriptorCollection' , f
'StoreGateSvc+{roisKey}' ),
92 (
'TrackCollection' ,
'StoreGateSvc+HLT_IDTrkTrack_FS_FTF' ),
93 } |
set(extra_view_inputs) ) )
96 acc.merge(seq.viewDataVerifier(viewname))
97 acc.merge(seq.dataPreparation())
98 acc.merge(seq.spacePointFormation())
100 acc.merge(seq.fastTrackFinder(inputTracksName = LRTInputCollection))
115 """ Generates precision tracking config, it is a primary config function """
118 log = logging.getLogger(
"trigInDetPrecisionTrackingCfg")
119 from TrigInDetConfig.utils
import getFlagsForActiveConfig
124 verifier = CompFactory.AthViews.ViewDataVerifier( name =
'VDVInDetPrecision'+flags.Tracking.ActiveConfig.input_name,
125 DataObjects= {(
'xAOD::EventInfo',
'StoreGateSvc+EventInfo'),
126 (
'TrigRoiDescriptorCollection' , f
'StoreGateSvc+{rois}' ),
127 (
'TagInfo',
'DetectorStore+ProcessingTags' ),
128 ( (
'ActsTrk::TrackContainer' if "Acts" in flags.Tracking.ActiveConfig.trkTracks_FTF
else 'TrackCollection'), flags.Tracking.ActiveConfig.trkTracks_FTF )} )
130 acc.addEventAlgo(verifier)
132 from TrigInDetConfig.InnerTrackingTrigSequence
import InnerTrackingTrigSequence
134 seq = InnerTrackingTrigSequence.create(flags,
135 flags.Tracking.ActiveConfig.input_name,
136 rois = flags.Tracking.ActiveConfig.roi,
137 inView = verifier.getName()
if in_view
else '')
139 acc.merge(seq.sequenceAfterPattern(rois = rois))
151 acc.addEventAlgo( CompFactory.AthViews.ViewDataVerifier(
152 name =
"VtxVDV_" + flags.Tracking.ActiveConfig.input_name,
154 (
'ActsGeometryContext' ,
'StoreGateSvc+ActsAlignment' )
158 from InDetConfig.InDetPriVxFinderConfig
import InDetTrigPriVxFinderCfg
166 if __name__ ==
"__main__":
167 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
168 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
169 ComponentAccumulator.debugMode =
"trackCA trackPublicTool trackEventAlgo trackCondAlgo trackPrivateTool"
171 flags.Input.Files = defaultTestFiles.RAW_RUN2
172 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
176 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
178 roisKey =
"ElectronRoIs"
180 flags = flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Trigger.InDetTracking.electron")
186 acc.printConfig(withDetails=
True, summariseProps=
True)
187 acc.store(
open(
"test.pkl",
"wb") )