ATLAS Offline Software
Loading...
Searching...
No Matches
python.HLT.Tau.TauMenuSequences Namespace Reference

Functions

MenuSequence tauCaloMVASequenceGenCfg (AthConfigFlags flags, bool is_probe_leg=False)
MenuSequence tauCaloHitsSequenceGenCfg (AthConfigFlags orig_flags, str seq_name, str precision_seq_name, tuple[str, float]|None hitz_config=None, bool is_probe_leg=False)
MenuSequence tauFTFCoreSequenceGenCfg (AthConfigFlags orig_flags, str|None calohits_seq_name=None, bool do_lrt=False, bool is_probe_leg=False)
 tauFTFIsoSequenceGenCfg (AthConfigFlags orig_flags, str|None calohits_seq_name=None, bool is_probe_leg=False)
MenuSequence tauPrecTrackSequenceGenCfg (AthConfigFlags orig_flags, str|None calohits_seq_name=None, bool do_lrt=False, bool is_probe_leg=False)
MenuSequence tauPrecisionSequenceGenCfg (AthConfigFlags orig_flags, str seq_name, str|None calohits_seq_name=None, str|None output_name=None, bool do_lrt=False, bool is_probe_leg=False)

Variables

 log = logging.getLogger(__name__)

Function Documentation

◆ tauCaloHitsSequenceGenCfg()

MenuSequence tauCaloHitsSequenceGenCfg ( AthConfigFlags orig_flags,
str seq_name,
str precision_seq_name,
tuple[str, float] | None hitz_config = None,
bool is_probe_leg = False )
Calorimeter+Hits RoI updating and preselection hypothesis

Definition at line 87 of file TauMenuSequences.py.

87def tauCaloHitsSequenceGenCfg(orig_flags: AthConfigFlags, seq_name: str, precision_seq_name: str, hitz_config: tuple[str, float] | None = None, is_probe_leg: bool = False) -> MenuSequence:
88 '''Calorimeter+Hits RoI updating and preselection hypothesis'''
89
90 tracking_cfg = f'tauHits{seq_name}'
91 next_tracking_cfg = f'tauCore{seq_name}'
92
93 flags = getFlagsForActiveConfig(orig_flags, tracking_cfg, log)
94
95 # Create new RoIs from 'UpdatedCaloRoI', resized to the HitZ RoI before running the HitZ and other inference algorithms
96 newRoITool = CompFactory.ViewCreatorFetchFromViewROITool(
97 RoisWriteHandleKey=recordable(flags.Tracking.ActiveConfig.roi),
98 InViewRoIs='UpdatedCaloRoI',
99 doResize=True,
100 RoIEtaWidth=flags.Tracking.ActiveConfig.etaHalfWidth,
101 RoIPhiWidth=flags.Tracking.ActiveConfig.phiHalfWidth,
102 RoIZedWidth=flags.Tracking.ActiveConfig.zedHalfWidth,
103 )
104
105
106 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
107 # in parallel whenever possible, according to their data dependencies.
108 # Create the EventViews from the resized RoIs, based on the 'UpdatedCaloRoI' created in the CaloMVA step
109 recoAcc = InViewRecoCA(
110 name=f'tauCaloHits_{seq_name}',
111 RoITool=newRoITool,
112 ViewFallThrough=True,
113 RequireParentView=True,
114 mergeUsingFeature=True,
115 isProbe=is_probe_leg
116 )
117 RoIs = recoAcc.inputMaker().InViewRoIs
118
119
120 # VDV with all the required collections/objects in the View
121 # (the VDV checks are disabled unless running with -l DEBUG)
122 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
123 name=f'{recoAcc.name}RecoVDV',
124 DataObjects={
125 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
126 ('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
127 ('xAOD::TauJetContainer', 'StoreGateSvc+HLT_TrigTauRecMerged_CaloMVAOnly'),
128 ('xAOD::TauTrackContainer', 'StoreGateSvc+HLT_tautrack_dummy'),
129 }
130 ))
131
132
133 # Reconstruction tools/algorithms:
134
135 # Construct ID space-points in the View
136 from TrigInDetConfig.TrigInDetConfig import trigInDetSPFormationCfg
137 recoAcc.mergeReco(trigInDetSPFormationCfg(flags, roisKey=RoIs, signatureName=tracking_cfg))
138
139 # Create the high-level xAOD::TrackParticleValidation container from the SPs
140 if flags.Detector.GeometryITk:
141 from InDetConfig.InDetPrepRawDataToxAODConfig import ITkPixelPrepDataToxAODCfg as PixelPrepDataToxAODCfg
142 pixel_cluster_container = 'ITkTrigPixelClusters'
143 else:
144 from InDetConfig.InDetPrepRawDataToxAODConfig import InDetPixelPrepDataToxAODCfg as PixelPrepDataToxAODCfg
145 pixel_cluster_container = 'PixelTrigClusters'
146
147 recoAcc.mergeReco(PixelPrepDataToxAODCfg(
148 flags,
149 SiClusterContainer=pixel_cluster_container, # From the FTF SP reco
150 OutputClusterContainer='PixelClusters', # Output xAOD::TrackParticleValidation container
151 WriteNNinformation=False,
152 UseTruthInfo=False,
153 ))
154
155 # Get the BeamSpot from the conditions database
156 from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
157 recoAcc.mergeReco(BeamSpotCondAlgCfg(flags))
158
159 # Construct the calo+hits TauJet, and run the HitZ inference algorithms
160 from TrigTauRec.TrigTauRecConfig import trigTauRecMergedCaloHitsCfg
161 from .TauConfigurationTools import getHitZAlgs, getCaloHitsPreselAlgs
162 recoAcc.mergeReco(trigTauRecMergedCaloHitsCfg(
163 flags,
164 seq_name,
165 hitz_algs=getHitZAlgs(flags, f'{precision_seq_name}_{seq_name}', precision_seq_name),
166 presel_algs=getCaloHitsPreselAlgs(flags, f'{precision_seq_name}_{seq_name}', precision_seq_name),
167 input_rois=RoIs,
168 ))
169
170
171 if hitz_config:
172 # Create new RoIs with an updated position, based on the central axis of the clusters
173 from TrigTauRec.TrigTauRoIToolsConfig import tauHitZRoiUpdaterCfg
174 recoAcc.mergeReco(tauHitZRoiUpdaterCfg(
175 flags,
176 inputRoIs=RoIs,
177 outputRoIs=f'UpdatedCaloHits{seq_name}RoI',
178 taus='HLT_TrigTauRecMerged_CaloHits',
179 hitz_alg=hitz_config[0],
180 max_pt=1000e3,
181 max_sigma=hitz_config[1],
182 tracking_cfg=next_tracking_cfg,
183 ))
184
185
186 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
187 # the reco CA (with all the reco algs) second, and the Hypo alg. at last
188 selAcc = SelectionCA(f'tauCaloHits_{seq_name}', isProbe=is_probe_leg)
189 selAcc.mergeReco(recoAcc)
190
191
192 # Hypothesis:
193 # The Hypotools in the Hypo algorithm will execute the BRT-calibrated Tau pT cut
194 selAcc.addHypoAlgo(CompFactory.TrigTauJetHypoAlg(f'TauCaloHitsHypoAlg_{seq_name}', TauJetsKey='HLT_TrigTauRecMerged_CaloHits'))
195
196
197 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
198 # based on the partDict for each chain tau leg
199 from TrigTauHypo.TrigTauHypoTool import TrigTauCaloHitsHypoToolFromDict
200 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauCaloHitsHypoToolFromDict)
201
202 return menuSeq
203
204
205
206#================================================================
207# 1st FTF step: FTFCore / FTFLRT
208#================================================================
209
210@AccumulatorCache

◆ tauCaloMVASequenceGenCfg()

MenuSequence tauCaloMVASequenceGenCfg ( AthConfigFlags flags,
bool is_probe_leg = False )
Calorimeter-only reconstruction and hypothesis (BRT-calibrated pT cut)

Definition at line 22 of file TauMenuSequences.py.

22def tauCaloMVASequenceGenCfg(flags: AthConfigFlags, is_probe_leg: bool = False) -> MenuSequence:
23 '''Calorimeter-only reconstruction and hypothesis (BRT-calibrated pT cut)'''
24
25 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
26 # in parallel whenever possible, according to their data dependencies.
27 # Create the EventViews based on the HLTSeeding RoIs (from the input L1 TOBs)
28 recoAcc = InViewRecoCA(name='tauCaloMVA', InViewRoIs='CaloMVA_RoIs', isProbe=is_probe_leg)
29 RoIs = recoAcc.inputMaker().InViewRoIs
30
31
32 # VDV with all the required collections/objects in the View
33 # (the VDV checks are disabled unless running with -l DEBUG)
34 Objects={
35 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
36 ('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
37 ('SG::AuxElement', 'StoreGateSvc+EventInfo.actualInteractionsPerCrossing'),
38 ('SG::AuxElement', 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing'),
39 ('CaloBCIDAverage', 'StoreGateSvc+CaloBCIDAverage')
40 }
41 if ( not flags.Input.isMC ):
42 Objects.add( ('LArDeadOTXFromSC' , 'StoreGateSvc+DeadOTXFromSC' ) )
43 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
44 name=f'{recoAcc.name}RecoVDV',
45 DataObjects=Objects
46 ))
47
48
49 # Reconstruction tools/algorithms:
50
51 # Topo-clustering
52 from TrigCaloRec.TrigCaloRecConfig import tauTopoClusteringCfg
53 recoAcc.mergeReco(tauTopoClusteringCfg(flags, RoIs=RoIs))
54
55 # Create new RoIs with an updated position, based on the central axis of the clusters
56 from TrigTauRec.TrigTauRoIToolsConfig import tauCaloRoiUpdaterCfg
57 recoAcc.mergeReco(tauCaloRoiUpdaterCfg(flags, inputRoIs=RoIs, clusters='HLT_TopoCaloClustersLC'))
58
59 # Construct the calo-only TauJet (with BRT calibration)
60 from TrigTauRec.TrigTauRecConfig import trigTauRecMergedCaloMVACfg
61 recoAcc.mergeReco(trigTauRecMergedCaloMVACfg(flags))
62
63 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
64 # the reco CA (with all the reco algs) second, and the Hypo alg. at last
65 selAcc = SelectionCA('tauCalo', isProbe=is_probe_leg)
66 selAcc.mergeReco(recoAcc)
67
68
69 # Hypothesis:
70 # The Hypotools in the Hypo algorithm will execute the BRT-calibrated Tau pT cut
71 selAcc.addHypoAlgo(CompFactory.TrigTauJetHypoAlg('TauCaloMVAHypoAlg', TauJetsKey='HLT_TrigTauRecMerged_CaloMVAOnly'))
72
73
74 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
75 # based on the partDict for each chain tau leg
76 from TrigTauHypo.TrigTauHypoTool import TrigTauCaloMVAHypoToolFromDict
77 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauCaloMVAHypoToolFromDict)
78
79 return menuSeq
80
81
82
83#================================================================
84# Calo + Hits step: HitZ + Calo+Hits preselection
85#================================================================
86@AccumulatorCache

◆ tauFTFCoreSequenceGenCfg()

MenuSequence tauFTFCoreSequenceGenCfg ( AthConfigFlags orig_flags,
str | None calohits_seq_name = None,
bool do_lrt = False,
bool is_probe_leg = False )
1st FTF step sequence, for both the tauCore(Hits) and tauLRT RoIs

Definition at line 211 of file TauMenuSequences.py.

211def tauFTFCoreSequenceGenCfg(orig_flags: AthConfigFlags, calohits_seq_name: str | None = None, do_lrt: bool = False, is_probe_leg: bool = False) -> MenuSequence:
212 '''1st FTF step sequence, for both the tauCore(Hits) and tauLRT RoIs'''
213
214 if do_lrt:
215 name = 'LRT'
216 tracking_cfg = next_tracking_cfg = 'tauLRT'
217 output_rois = 'UpdatedTrackLRTRoI'
218 else:
219 name = 'Core'
220 tracking_cfg = 'tauCore'
221 next_tracking_cfg = 'tauIso'
222 output_rois = 'UpdatedTrackRoI'
223
224 if calohits_seq_name:
225 tracking_cfg += calohits_seq_name
226 next_tracking_cfg += calohits_seq_name
227
228 # Retrieve tracking configuration
229 flags = getFlagsForActiveConfig(orig_flags, tracking_cfg, log)
230
231 # Source-dependent configuration
232 if calohits_seq_name:
233 name += f'_{calohits_seq_name}'
234 input_rois = f'UpdatedCaloHits{calohits_seq_name}RoI'
235 output_rois = f'{output_rois[:-3]}{calohits_seq_name}RoI'
236 else:
237 input_rois = 'UpdatedCaloRoI'
238
239
240 # Create new RoIs from 'UpdatedCaloRoI' or 'UpdatedCaloHitsRoI, resized to 'tauCore/LRT'
241 # before running the FTF algorithms.
242 newRoITool = CompFactory.ViewCreatorFetchFromViewROITool(
243 RoisWriteHandleKey=recordable(flags.Tracking.ActiveConfig.roi),
244 InViewRoIs=input_rois,
245 doResize=not calohits_seq_name, # Do not resize if we're using the CaloHits RoI, which is already resized to the correct size for the FTF step
246 RoIEtaWidth=flags.Tracking.ActiveConfig.etaHalfWidth,
247 RoIPhiWidth=flags.Tracking.ActiveConfig.phiHalfWidth,
248 RoIZedWidth=flags.Tracking.ActiveConfig.zedHalfWidth,
249 )
250
251
252 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
253 # in parallel whenever possible, according to their data dependencies.
254 # Create the EventViews from the resized RoIs, based on the upstream RoI created in the CaloMVA or CaloHits steps
255 recoAcc = InViewRecoCA(
256 f'tauFastTrack{name}',
257 RoITool=newRoITool,
258 ViewFallThrough=True,
259 RequireParentView=True,
260 mergeUsingFeature=True,
261 isProbe=is_probe_leg
262 )
263 RoIs = recoAcc.inputMaker().InViewRoIs
264
265
266 # VDV with all the required collections/objects in the View
267 # (the VDV checks are disabled unless running with -l DEBUG)
268 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
269 name=f'{recoAcc.name}RecoVDV',
270 DataObjects={
271 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
272 }
273 ))
274
275
276 # Reconstruction tools/algorithms:
277
278 # Fast Track Finder (FTF) sequence (the main point of this step)
279 from TrigInDetConfig.TrigInDetConfig import trigInDetFastTrackingCfg
280 recoAcc.mergeReco(trigInDetFastTrackingCfg(flags, roisKey=RoIs, signatureName=tracking_cfg))
281
282 # Create new RoIs for the next tracking steps (FTFIso and PrecTrack), based on the found tracks
283 TrackCollection = flags.Tracking.ActiveConfig.tracks_FTF
284
285
286 from TrigTauRec.TrigTauRoIToolsConfig import tauTrackRoiUpdaterCfg
287 recoAcc.mergeReco(tauTrackRoiUpdaterCfg(
288 flags,
289 inputRoIs=RoIs,
290 outputRoIs=output_rois,
291 tracks=TrackCollection,
292
293 # Only pass the next tracking config if it's different from the current one (ActiveConfig),
294 tracking_cfg=next_tracking_cfg if next_tracking_cfg != tracking_cfg else None,
295 ))
296
297
298 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
299 # the reco CA (with all the reco algs) second, and the Hypo alg. at last
300 selAcc = SelectionCA(f'tauFTF{name}', isProbe=is_probe_leg)
301 selAcc.mergeReco(recoAcc)
302
303
304 # Hypothesis:
305 # The hypothesis algorithm/tool does not perform any action (online monitoring of tracks only)
306 selAcc.addHypoAlgo(CompFactory.TrigTauTrackingHypoAlg(
307 f'TauFastTrackHypoAlg_PassBy{name}',
308 RoIKey='UpdatedTrackLRTRoI' if do_lrt else '',
309 TracksKey=TrackCollection,
310 ))
311
312
313 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
314 # based on the partDict for each chain tau leg
315 from TrigTauHypo.TrigTauHypoTool import TrigTauTrackingHypoToolFromDict
316 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauTrackingHypoToolFromDict)
317
318 return menuSeq
319
320
321
322#================================================================
323# 2nd FTF step: FTFIso
324#================================================================
325
326@AccumulatorCache

◆ tauFTFIsoSequenceGenCfg()

tauFTFIsoSequenceGenCfg ( AthConfigFlags orig_flags,
str | None calohits_seq_name = None,
bool is_probe_leg = False )
2nd FTF step sequence, for the tauIso RoI

Definition at line 327 of file TauMenuSequences.py.

327def tauFTFIsoSequenceGenCfg(orig_flags: AthConfigFlags, calohits_seq_name: str | None = None, is_probe_leg: bool = False):
328 '''2nd FTF step sequence, for the tauIso RoI'''
329
330 name = 'Iso'
331
332 # Retrieve tracking configuration
333 previous_tracking_cfg = 'tauCore'
334 tracking_cfg = 'tauIso'
335 if calohits_seq_name:
336 tracking_cfg += calohits_seq_name
337 previous_tracking_cfg += calohits_seq_name
338
339 flags = getFlagsForActiveConfig(orig_flags, tracking_cfg, log)
340
341
342 # Source-dependent configuration
343 if calohits_seq_name:
344 name += f'_{calohits_seq_name}'
345 input_rois = f'UpdatedTrack{calohits_seq_name}RoI'
346 else:
347 input_rois = 'UpdatedTrackRoI'
348
349
350 # Create new RoIs from , resized to 'tauCore/LRT' before running the FTF algorithms
351 newRoITool = CompFactory.ViewCreatorFetchFromViewROITool(
352 RoisWriteHandleKey=recordable(flags.Tracking.ActiveConfig.roi),
353 InViewRoIs=input_rois,
354 )
355
356
357 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
358 # in parallel whenever possible, according to their data dependencies.
359 # Create the EventViews based on the RoIs created in the previous step
360 recoAcc = InViewRecoCA(
361 f'tauFastTrack{name}',
362 RoITool=newRoITool,
363 RequireParentView=True,
364 ViewFallThrough=True,
365 isProbe=is_probe_leg
366 )
367 RoIs = recoAcc.inputMaker().InViewRoIs
368
369
370 # VDV with all the required collections/objects in the View
371 # (the VDV checks are disabled unless running with -l DEBUG)
372 previous_step_flags = getFlagsForActiveConfig(orig_flags, previous_tracking_cfg, log)
373 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
374 name=f'{recoAcc.name}RecoVDV',
375 DataObjects={
376 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
377 ('xAOD::TrackParticleContainer', f'StoreGateSvc+{previous_step_flags.Tracking.ActiveConfig.tracks_FTF}'),
378 }
379 ))
380
381
382 # Reconstruction tools/algorithms:
383
384 # Fast Track Finder (FTF) sequence (the main point of this step)
385 from TrigInDetConfig.TrigInDetConfig import trigInDetFastTrackingCfg
386 recoAcc.mergeReco(trigInDetFastTrackingCfg(flags, roisKey=RoIs, signatureName=tracking_cfg))
387
388 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
389 # the reco CA (with all the reco algs) second, and the Hypo alg. at last
390 selAcc = SelectionCA(f'tauFTF{name}', isProbe=is_probe_leg)
391 selAcc.mergeReco(recoAcc)
392
393
394 # Hypothesis:
395 # The hypothesis algorithm/tool does not perform any action (debug logging of number of tracks only)
396 selAcc.addHypoAlgo(CompFactory.TrigTauTrackingHypoAlg(
397 f'TauFastTrackHypoAlg_PassBy{name}',
398 TracksKey=flags.Tracking.ActiveConfig.tracks_FTF,
399 ))
400
401
402 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
403 # based on the partDict for each chain tau leg
404 from TrigTauHypo.TrigTauHypoTool import TrigTauTrackingHypoToolFromDict
405 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauTrackingHypoToolFromDict)
406
407 return menuSeq
408
409
410
411#================================================================
412# Precision Tracking step
413#================================================================
414
415@AccumulatorCache

◆ tauPrecisionSequenceGenCfg()

MenuSequence tauPrecisionSequenceGenCfg ( AthConfigFlags orig_flags,
str seq_name,
str | None calohits_seq_name = None,
str | None output_name = None,
bool do_lrt = False,
bool is_probe_leg = False )
Precision Tau step sequence, for all ID and reconstruction settings

Definition at line 501 of file TauMenuSequences.py.

501def tauPrecisionSequenceGenCfg(orig_flags: AthConfigFlags, seq_name: str, calohits_seq_name: str | None = None, output_name: str | None = None, do_lrt: bool = False, is_probe_leg: bool = False) -> MenuSequence:
502 '''Precision Tau step sequence, for all ID and reconstruction settings'''
503
504 orig_seq_name = seq_name
505 if output_name is None: output_name = orig_seq_name
506
507 if do_lrt:
508 tracking_cfg = 'tauLRT'
509 input_rois = 'tauFastTrackLRT'
510 else:
511 tracking_cfg = 'tauIso'
512 input_rois = 'tauFastTrackIso'
513
514 if calohits_seq_name:
515 seq_name += f'_{calohits_seq_name}'
516 tracking_cfg += calohits_seq_name
517 input_rois += f'_{calohits_seq_name}'
518 input_taus = 'HLT_TrigTauRecMerged_CaloHits'
519 input_tau_tracks = 'HLT_tautrack_CaloHits_dummy'
520 else:
521 input_taus = 'HLT_TrigTauRecMerged_CaloMVAOnly'
522 input_tau_tracks = 'HLT_tautrack_dummy'
523
524 # Retrieve tracking configuration
525 flags = getFlagsForActiveConfig(orig_flags, tracking_cfg, log)
526
527
528 # Get the list of TauIDs to execute
529 from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getPrecisionSequenceTauIDs
530 tau_ids = getPrecisionSequenceTauIDs(flags, seq_name, orig_seq_name)
531
532
533 # Get the list of the decorated variables from the previous step taus to be copied to the new precision taus
534 decors_to_copy = []
535 from .TauConfigurationTools import getHitZAlgs, getHitZVariables, getCaloHitsPreselAlgs, getTauIDScoreVariables
536 if calohits_seq_name:
537 decors_to_copy += [var for alg in getHitZAlgs(flags, seq_name, orig_seq_name) for var in getHitZVariables(alg)]
538 decors_to_copy += [var for alg in getCaloHitsPreselAlgs(flags, seq_name, orig_seq_name) for var in getTauIDScoreVariables(alg)]
539
540
541 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
542 # in parallel whenever possible, according to their data dependencies.
543 # Create the EventViews based on the RoIs created in the previous steps (tauIso and tauLRT)
544 recoAcc = InViewRecoCA(
545 name=f'tauPrecisionReco_{seq_name}',
546 RoITool=CompFactory.ViewCreatorPreviousROITool(),
547 InViewRoIs=input_rois,
548 RequireParentView=True,
549 ViewFallThrough=True,
550 isProbe=is_probe_leg,
551 )
552 RoIs = recoAcc.inputMaker().InViewRoIs
553
554
555 # VDV with all the required collections/objects in the View
556 # (the VDV checks are disabled unless running with -l DEBUG)
557 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
558 name=f'{recoAcc.name}RecoVDV',
559 DataObjects={
560 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
561 ('SG::AuxElement', 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing'),
562 ('xAOD::VertexContainer', f'StoreGateSvc+{flags.Tracking.ActiveConfig.vertex}'),
563 ('xAOD::TrackParticleContainer', f'StoreGateSvc+{flags.Tracking.ActiveConfig.tracks_IDTrig}'),
564 ('xAOD::TauTrackContainer', f'StoreGateSvc+{input_tau_tracks}'),
565 ('xAOD::TauJetContainer', f'StoreGateSvc+{input_taus}'),
566 } | {
567 ('xAOD::TauJetContainer', f'StoreGateSvc+{input_taus}.{var}')
568 for var in decors_to_copy
569 }
570 ))
571
572
573 # Reconstruction tools/algorithms:
574
575 # Precision TauJet reconstruction sequence
576 from TrigTauRec.TrigTauRecConfig import trigTauRecMergedPrecisionMVACfg
577 recoAcc.mergeReco(trigTauRecMergedPrecisionMVACfg(
578 flags,
579 seq_name,
580 tau_ids=tau_ids,
581 input_rois=RoIs,
582 input_tracks=flags.Tracking.ActiveConfig.tracks_IDTrig,
583 input_taus=input_taus,
584 input_tau_tracks=input_tau_tracks,
585 output_name=output_name,
586 decors_to_copy=decors_to_copy,
587 ))
588
589
590 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
591 # the reco CA (with all the reco algs) after, and the Hypo alg. at last
592 selAcc = SelectionCA(f'tauPrecision_{seq_name}', isProbe=is_probe_leg)
593 selAcc.mergeReco(recoAcc)
594
595
596 # Hypothesis:
597 # The Hypotools in the Hypo algorithm will execute the calibrated Tau pT cut,
598 # NTrack cut, NWideTrack cut, and ID WP selections (or meson variable cuts)
599 selAcc.addHypoAlgo(CompFactory.TrigTauJetHypoAlg(
600 f'TauPrecisionHypoAlg_{seq_name}',
601 TauJetsKey=f'HLT_TrigTauRecMerged_{output_name}'
602 ))
603
604
605 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
606 # based on the partDict for each chain tau leg
607 from TrigTauHypo.TrigTauHypoTool import TrigTauPrecisionHypoToolFromDict
608 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauPrecisionHypoToolFromDict)
609
610 return menuSeq

◆ tauPrecTrackSequenceGenCfg()

MenuSequence tauPrecTrackSequenceGenCfg ( AthConfigFlags orig_flags,
str | None calohits_seq_name = None,
bool do_lrt = False,
bool is_probe_leg = False )
Precision Tracking step sequence, for both the tauIso and tauLRT RoIs

Definition at line 416 of file TauMenuSequences.py.

416def tauPrecTrackSequenceGenCfg(orig_flags: AthConfigFlags, calohits_seq_name: str | None = None, do_lrt: bool = False, is_probe_leg: bool = False) -> MenuSequence:
417 '''Precision Tracking step sequence, for both the tauIso and tauLRT RoIs'''
418
419 if do_lrt:
420 name = 'LRT'
421 tracking_cfg = 'tauLRT'
422 else:
423 name = 'Iso'
424 tracking_cfg = 'tauIso'
425
426 if calohits_seq_name:
427 name += f'_{calohits_seq_name}'
428 tracking_cfg += calohits_seq_name
429 input_rois = f'tauFastTrack{name}_{calohits_seq_name}'
430 else:
431 input_rois = f'tauFastTrack{name}'
432
433 # Retrieve tracking configuration
434 flags = getFlagsForActiveConfig(orig_flags, tracking_cfg, log)
435
436
437 # Reconstruction sequence CA (parOR), executting all reco algorithms within the View (from the RoI)
438 # in parallel whenever possible, according to their data dependencies.
439 # Create the EventViews based on the RoIs created in the previous steps (tauIso and tauLRT)
440 recoAcc = InViewRecoCA(
441 name=f'tauPrecTrack{name}',
442 RoITool=CompFactory.ViewCreatorPreviousROITool(),
443 InViewRoIs=input_rois,
444 RequireParentView=True,
445 ViewFallThrough=True,
446 isProbe=is_probe_leg,
447 )
448 RoIs = recoAcc.inputMaker().InViewRoIs
449
450
451 # VDV with all the required collections/objects in the View
452 # (the VDV checks are disabled unless running with -l DEBUG)
453 recoAcc.addRecoAlgo(CompFactory.AthViews.ViewDataVerifier(
454 name=f'{recoAcc.name}RecoVDV',
455 DataObjects={
456 ('TrigRoiDescriptorCollection', f'StoreGateSvc+{RoIs}'),
457 ('SG::AuxElement', 'StoreGateSvc+EventInfo.averageInteractionsPerCrossing'),
458 }
459 ))
460
461
462 # Reconstruction tools/algorithms:
463
464 # Precision Tracking sequence (track extension to the TRT and refitting)
465 from TrigInDetConfig.TrigInDetConfig import trigInDetPrecisionTrackingCfg
466 recoAcc.mergeReco(trigInDetPrecisionTrackingCfg(flags, rois=RoIs, signatureName=tracking_cfg))
467
468 # Vertexing sequence
469 from TrigInDetConfig.TrigInDetConfig import trigInDetVertexingCfg
470 recoAcc.mergeReco(trigInDetVertexingCfg(flags, flags.Tracking.ActiveConfig.tracks_IDTrig, flags.Tracking.ActiveConfig.vertex))
471
472
473 # Selection sequence CA (seqAND), executing the recoAcc view creation alg. first,
474 # the reco CA (with all the reco algs) after, and the Hypo alg. at last
475 selAcc = SelectionCA(f'tauPT{name}', isProbe=is_probe_leg)
476 selAcc.mergeReco(recoAcc)
477
478
479 # Hypothesis:
480 # The hypothesis algorithm/tool does not perform any action (debug logging of number of tracks only)
481 selAcc.addHypoAlgo(CompFactory.TrigTauTrackingHypoAlg(
482 f'TauPrecTrackHypoAlg_PassBy{name}',
483 TracksKey=flags.Tracking.ActiveConfig.tracks_IDTrig,
484 ))
485
486
487 # Menu sequence, connecting everything internally for the step, and configuring the tools for the Hypo alg.
488 # based on the partDict for each chain tau leg
489 from TrigTauHypo.TrigTauHypoTool import TrigTauTrackingHypoToolFromDict
490 menuSeq = MenuSequence(flags, selAcc, HypoToolGen=TrigTauTrackingHypoToolFromDict)
491
492 return menuSeq
493
494
495
496#================================================================
497# Precision Tau step
498#================================================================
499
500@AccumulatorCache

Variable Documentation

◆ log

python.HLT.Tau.TauMenuSequences.log = logging.getLogger(__name__)

Definition at line 11 of file TauMenuSequences.py.