Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ITkTrigSequence.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from TrigInDetConfig.InnerTrackerTrigSequence import InnerTrackerTrigSequence
4 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 
8 from AthenaCommon.Logging import logging
9 
10 class ITkTrigSequence(InnerTrackerTrigSequence):
11  def __init__(self, flags : AthConfigFlags, signature : str, rois : str, inView : str):
12  super().__init__(flags, signature,rois,inView)
13  self.log = logging.getLogger("ITkTrigSequence")
14  self.log.info(f"signature: {self.signature} rois: {self.rois} inview: {self.inView}")
15 
16 
17  def viewDataVerifier(self, viewVerifier='IDViewDataVerifier') -> ComponentAccumulator:
18 
19  acc = ComponentAccumulator()
20 
21  ViewDataVerifier = CompFactory.AthViews.ViewDataVerifier(
22  name = viewVerifier + "_" + self.signature,
23  DataObjects= {('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
24  ('InDet::PixelClusterContainerCache', self.flags.Trigger.ITkTracking.PixelClusterCacheKey),
25  ('PixelRDO_Cache', self.flags.Trigger.ITkTracking.PixRDOCacheKey),
26  ('InDet::SCT_ClusterContainerCache', self.flags.Trigger.ITkTracking.SCTClusterCacheKey),
27  ('SCT_RDO_Cache', self.flags.Trigger.ITkTracking.SCTRDOCacheKey),
28  ('IDCInDetBSErrContainer_Cache' , self.flags.Trigger.ITkTracking.PixBSErrCacheKey ),
29  ('IDCInDetBSErrContainer_Cache' , self.flags.Trigger.ITkTracking.SCTBSErrCacheKey ),
30  ('IDCInDetBSErrContainer_Cache' , self.flags.Trigger.ITkTracking.SCTFlaggedCondCacheKey ),
31  ('SpacePointCache', self.flags.Trigger.ITkTracking.SpacePointCachePix),
32  ('SpacePointCache', self.flags.Trigger.ITkTracking.SpacePointCacheSCT),
33  ('InDet::SiDetectorElementStatus' , 'StoreGateSvc+ITkPixelDetectorElementStatus' ),
34  ('InDet::SiDetectorElementStatus' , 'StoreGateSvc+ITkStripDetectorElementStatus' ),
35  ('xAOD::EventInfo', 'EventInfo'),
36  ('TrigRoiDescriptorCollection', str(self.rois)),
37  ('TagInfo' , 'DetectorStore+ProcessingTags' )} )
38 
39  if self.flags.Input.isMC:
40  ViewDataVerifier.DataObjects |= {( 'PixelRDO_Container' , 'StoreGateSvc+ITkPixelRDOs' ),
41  ( 'SCT_RDO_Container' , 'StoreGateSvc+ITkStripRDOs' ),
42  ( 'InDetSimDataCollection' , 'ITkPixelSDO_Map')}
43  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
44  sgil_load = [( 'PixelRDO_Container' , 'StoreGateSvc+ITkPixelRDOs' ),
45  ( 'SCT_RDO_Container' , 'StoreGateSvc+ITkStripRDOs' ),
46  ( 'InDetSimDataCollection' , 'ITkPixelSDO_Map')]
47  acc.merge(SGInputLoaderCfg(self.flags, Load=sgil_load))
48 
49  acc.addEventAlgo(ViewDataVerifier)
50  return acc
51 
52  def dataPreparation(self) -> ComponentAccumulator:
53 
54  signature = self.flags.Tracking.ActiveConfig.input_name
55 
56  acc = ComponentAccumulator()
57 
58  self.log.info(f"DataPrep signature: {self.signature} rois: {self.rois} inview: {self.inView}")
59 
60  if not self.inView:
61  from SGComps.SGInputLoaderConfig import SGInputLoaderCfg
62  loadRDOs = [( 'PixelRDO_Container' , 'StoreGateSvc+ITkPixelRDOs' ),
63  ( 'SCT_RDO_Container' , 'StoreGateSvc+ITkStripRDOs' ),
64  ( 'InDetSimDataCollection' , 'ITkPixelSDO_Map') ]
65  acc.merge(SGInputLoaderCfg(self.flags, Load=loadRDOs))
66 
67  #Clusterisation
68  from InDetConfig.InDetPrepRawDataFormationConfig import ITkTrigPixelClusterizationCfg, ITkTrigStripClusterizationCfg
69  acc.merge(ITkTrigPixelClusterizationCfg(self.flags, roisKey=self.rois, signature=signature))
70  acc.merge(ITkTrigStripClusterizationCfg(self.flags, roisKey=self.rois, signature=signature))
71  return acc
72 
73  def viewDataVerifierAfterPattern(self, viewVerifier='IDViewDataVerifierForAmbi') -> ComponentAccumulator:
74 
75  acc = ComponentAccumulator()
76 
77  dataObjects = [
78  ( 'InDet::PixelGangedClusterAmbiguities' , self.flags.Trigger.ITkTracking.ClusterAmbiguitiesMap),
79  ( 'InDetSimDataCollection' , 'ITkPixelSDO_Map')
80  ]
81  from TrigInDetConfig.TrigInDetConfig import InDetExtraDataObjectsFromDataPrep
82  InDetExtraDataObjectsFromDataPrep(self.flags,dataObjects)
83 
84  ViewDataVerifier = \
85  CompFactory.AthViews.ViewDataVerifier(
86  name = viewVerifier + "_" + self.signature,
87  DataObjects = dataObjects
88  )
89  from TrigInDetConfig.TrigInDetConfig import InDetExtraDataObjectsFromDataPrep
90 
91  acc.addEventAlgo(ViewDataVerifier)
92  return acc
93 
94 
95  def spacePointFormation(self) -> ComponentAccumulator:
96 
97  signature = self.flags.Tracking.ActiveConfig.input_name
98  acc = ComponentAccumulator()
99 
100  from InDetConfig.SiSpacePointFormationConfig import ITkTrigSiTrackerSpacePointFinderCfg
101  acc.merge(ITkTrigSiTrackerSpacePointFinderCfg(self.flags, signature=signature))
102  return acc
103 
104  def fastTrackFinder(self,
105  extraFlags : AthConfigFlags = None,
106  inputTracksName : str = None) -> ComponentAccumulator:
107  acc = self.fastTrackFinderBase(extraFlags, inputTracksName)
108  signature = self.flags.Tracking.ActiveConfig.input_name
109 
110  if not self.flags.Tracking.ActiveConfig.doZFinderOnly:
111  self.lastTrkCollection = self.flags.Tracking.ActiveConfig.trkTracks_FTF
112  from xAODTrackingCnv.xAODTrackingCnvConfig import ITkTrackParticleCnvAlgCfg
113  acc.merge(ITkTrackParticleCnvAlgCfg(self.flags,
114  name = "ITkTrigTrackParticleCnvAlg"+signature,
115  TrackContainerName = self.lastTrkCollection,
116  xAODTrackParticlesFromTracksContainerName = self.flags.Tracking.ActiveConfig.tracks_FTF))
117 
118  return acc
119 
120  def ambiguitySolver(self) -> ComponentAccumulator:
121 
122  acc = ComponentAccumulator()
123 
124  if self.inView:
125  acc.merge(self.viewDataVerifierAfterPattern())
126 
127  from TrkConfig.TrkAmbiguitySolverConfig import TrigITkTrkAmbiguityScoreCfg
128  acc.merge(
130  self.flags,
131  name = f"{self.ambiPrefix}Score_{self.flags.Tracking.ActiveConfig.input_name}",
132  TrackInput = [self.lastTrkCollection],
133  AmbiguityScoreProcessor = None
134  )
135  )
136 
137  from TrkConfig.TrkAmbiguitySolverConfig import TrkAmbiguitySolver_Trig_Cfg
138  acc.merge(
140  self.flags,
141  name = f"{self.ambiPrefix}guitySolver_{self.flags.Tracking.ActiveConfig.input_name}",
142  )
143  )
144  self.lastTrkCollection = self.flags.Tracking.ActiveConfig.trkTracks_IDTrig+"_Amb"
145  return acc
146 
147  def xAODParticleCreation(self) -> ComponentAccumulator:
148 
149  acc = ComponentAccumulator()
150 
151  from xAODTrackingCnv.xAODTrackingCnvConfig import ITkTrackParticleCnvAlgCfg
152  prefix = "ITk"
153  acc.merge(ITkTrackParticleCnvAlgCfg(
154  self.flags,
155  name = prefix+'xAODParticleCreatorAlg'+self.flags.Tracking.ActiveConfig.input_name+'_IDTrig',
156  TrackContainerName = self.lastTrkCollection,
157  xAODTrackParticlesFromTracksContainerName = self.flags.Tracking.ActiveConfig.tracks_IDTrig,
158  ))
159  return acc
160 
161  def offlinePattern(self) -> ComponentAccumulator:
162 
163  ca = ComponentAccumulator()
164 
165  from InDetConfig.SiSPSeededTrackFinderConfig import TrigITkSiSPSeededTrackFinderCfg
166 
167  self.lastTrkCollection = self.flags.Tracking.ActiveConfig.trkTracks_IDTrig
168  ca.merge(TrigITkSiSPSeededTrackFinderCfg(self.flags,
169  name = 'EFsiSPSeededTrackFinder'+self.flags.Tracking.ActiveConfig.input_name,
170  TracksLocation = self.lastTrkCollection,
171  ))
172 
173  self.ambiPrefix = "EFAmbi"
174 
175  return ca
grepfile.info
info
Definition: grepfile.py:38
python.ITkTrigSequence.ITkTrigSequence.xAODParticleCreation
ComponentAccumulator xAODParticleCreation(self)
Definition: ITkTrigSequence.py:147
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ITkTrigSequence.ITkTrigSequence.ambiguitySolver
ComponentAccumulator ambiguitySolver(self)
Definition: ITkTrigSequence.py:120
python.ITkTrigSequence.ITkTrigSequence.viewDataVerifierAfterPattern
ComponentAccumulator viewDataVerifierAfterPattern(self, viewVerifier='IDViewDataVerifierForAmbi')
Definition: ITkTrigSequence.py:73
python.ITkTrigSequence.ITkTrigSequence.offlinePattern
ComponentAccumulator offlinePattern(self)
Definition: ITkTrigSequence.py:161
python.InDetPrepRawDataFormationConfig.ITkTrigStripClusterizationCfg
def ITkTrigStripClusterizationCfg(flags, name="ITkTrigStripClusterization", roisKey="", signature="", **kwargs)
Definition: InDetPrepRawDataFormationConfig.py:245
python.InDetPrepRawDataFormationConfig.ITkTrigPixelClusterizationCfg
def ITkTrigPixelClusterizationCfg(flags, name="ITkTrigPixelClusterization", roisKey="", signature="", **kwargs)
Definition: InDetPrepRawDataFormationConfig.py:140
xAODTrackingCnvConfig.ITkTrackParticleCnvAlgCfg
def ITkTrackParticleCnvAlgCfg(flags, name="ITkTrackParticleCnvAlg", ClusterSplitProbabilityName="", AssociationMapName="", bool isActsAmbi=False, **kwargs)
Definition: xAODTrackingCnvConfig.py:287
python.ITkTrigSequence.ITkTrigSequence.lastTrkCollection
lastTrkCollection
Definition: ITkTrigSequence.py:109
python.TrigInDetConfig.InDetExtraDataObjectsFromDataPrep
def InDetExtraDataObjectsFromDataPrep(flags, dataObjects)
Definition: TrigInDetConfig.py:10
python.ITkTrigSequence.ITkTrigSequence.__init__
def __init__(self, AthConfigFlags flags, str signature, str rois, str inView)
Definition: ITkTrigSequence.py:11
SGInputLoaderConfig.SGInputLoaderCfg
def SGInputLoaderCfg(flags, Load=None, **kwargs)
Definition: SGInputLoaderConfig.py:7
python.ITkTrigSequence.ITkTrigSequence.log
log
Definition: ITkTrigSequence.py:13
python.ITkTrigSequence.ITkTrigSequence.ambiPrefix
ambiPrefix
Definition: ITkTrigSequence.py:173
python.ITkTrigSequence.ITkTrigSequence.fastTrackFinder
ComponentAccumulator fastTrackFinder(self, AthConfigFlags extraFlags=None, str inputTracksName=None)
Definition: ITkTrigSequence.py:104
python.TrkAmbiguitySolverConfig.TrigITkTrkAmbiguityScoreCfg
def TrigITkTrkAmbiguityScoreCfg(flags, name='InDetTrig_SeededAmbiguityScore', **kwargs)
Definition: TrkAmbiguitySolverConfig.py:108
python.TrkAmbiguitySolverConfig.TrkAmbiguitySolver_Trig_Cfg
def TrkAmbiguitySolver_Trig_Cfg(flags, name='InDetTrig_SeededAmbiguitySolver', **kwargs)
Definition: TrkAmbiguitySolverConfig.py:177
python.ITkTrigSequence.ITkTrigSequence
Definition: ITkTrigSequence.py:10
str
Definition: BTagTrackIpAccessor.cxx:11
python.SiSpacePointFormationConfig.ITkTrigSiTrackerSpacePointFinderCfg
def ITkTrigSiTrackerSpacePointFinderCfg(flags, name="ITkTrigSiTrackerSpacePointFinder", signature="", **kwargs)
Definition: SiSpacePointFormationConfig.py:184
python.ITkTrigSequence.ITkTrigSequence.viewDataVerifier
ComponentAccumulator viewDataVerifier(self, viewVerifier='IDViewDataVerifier')
Definition: ITkTrigSequence.py:17
python.ITkTrigSequence.ITkTrigSequence.spacePointFormation
ComponentAccumulator spacePointFormation(self)
Definition: ITkTrigSequence.py:95
python.ITkTrigSequence.ITkTrigSequence.dataPreparation
ComponentAccumulator dataPreparation(self)
Definition: ITkTrigSequence.py:52