ATLAS Offline Software
DJTriggerConfiguration.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon.CFElements import (parOR,seqAND)
4 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequence, SelectionCA, InEventRecoCA, InViewRecoCA
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 
8 from AthenaCommon.Logging import logging
9 
10 from TrigEDMConfig.TriggerEDM import recordable
11 from TrigInDetConfig.utils import cloneFlagsToActiveConfig
12 from TrigInDetConfig.TrigInDetConfig import trigInDetLRTCfg
13 
14 logging.getLogger().info("Importing %s",__name__)
15 log = logging.getLogger(__name__)
16 
18  from TrigLongLivedParticlesHypo.TrigDJHypoConfig import TrigDJHypoPromptToolFromDict
19 
20 
21  hypo_alg = CompFactory.DisplacedJetPromptHypoAlg(
22  "DJTrigPromptHypoAlg",
23  min_trk_pt = 1.0,
24  stdTracksKey = flags.Tracking.ActiveConfig.tracks_FTF, #fullScan
25  vtxKey = flags.Tracking.ActiveConfig.vertex_jet,
26  jetContainerKey = recordable("HLT_AntiKt4EMTopoJets_subjesIS"),
27  countsKey = "DispJetTrigger_Counts",
28  )
29 
30  #run at the event level
31  im_alg = CompFactory.InputMakerForRoI( "IM_DJTRIG_Prompt" )
32  im_alg.RoITool = CompFactory.ViewCreatorInitialROITool()
33 
34  selAcc = SelectionCA('DJTrigPromptSeq')
35  reco = InEventRecoCA('DJTrigPromptStep',inputMaker=im_alg)
36  selAcc.mergeReco(reco)
37  selAcc.addHypoAlgo(hypo_alg)
38 
39  return MenuSequence(flags,
40  selAcc,
41  HypoToolGen = TrigDJHypoPromptToolFromDict,
42  )
43 
44 def DJDispFragment(flags):
45 
46  roiTool = CompFactory.ViewCreatorCentredOnIParticleROITool(
47  'ViewCreatorDJRoI',
48  RoisWriteHandleKey = recordable(flags.Trigger.InDetTracking.DJetLRT.roi),
49  RoIEtaWidth = flags.Trigger.InDetTracking.DJetLRT.etaHalfWidth,
50  RoIPhiWidth = flags.Trigger.InDetTracking.DJetLRT.phiHalfWidth,
51  RoIZedWidth = flags.Trigger.InDetTracking.DJetLRT.zedHalfWidth,
52  UseZedPosition = False)
53 
54  InViewRoIs = "InViewRoIs"
55 
56  im_alg = CompFactory.EventViewCreatorAlgorithm("IM_DJRoIFTF", mergeUsingFeature = True, RoITool = roiTool, Views = "DJRoIViews", InViewRoIs = InViewRoIs,
57  RequireParentView = False, ViewFallThrough = True, ViewNodeName="DJRoIInViews")
58 
59  reco = InViewRecoCA("DJRoIFTF", im_alg)
60 
61  acc = ComponentAccumulator()
62  reco_seq = seqAND('UncTrkrecoSeqDJTrigDispRecoSeq')
63  acc.addSequence(reco_seq)
64 
65  flagsWithTrk = cloneFlagsToActiveConfig(flags, flags.Trigger.InDetTracking.DJetLRT.input_name)
66 
67  lrt_algs = trigInDetLRTCfg(flagsWithTrk,
68  flags.Tracking.ActiveConfig.trkTracks_FTF,
69  InViewRoIs,
70  in_view=True,
71  )
72 
73  acc.merge(lrt_algs)
74 
75  from TrigGenericAlgs.TrigGenericAlgsConfig import ROBPrefetchingAlgCfg_Si
76  robPrefetchAlg = ROBPrefetchingAlgCfg_Si(flags, nameSuffix=reco.name)
77 
78  reco.mergeReco(acc)
79 
80  selAcc = SelectionCA('UncTrkrecoSeqDJTrigDisp')
81  selAcc.mergeReco(reco, robPrefetchCA=robPrefetchAlg)
82  return selAcc
83 
85  from TrigLongLivedParticlesHypo.TrigDJHypoConfig import TrigDJHypoDispToolFromDict
86 
87  hypo_alg = CompFactory.DisplacedJetDispHypoAlg("DJTrigDispHypoAlg",
88  lrtTracksKey = flags.Trigger.InDetTracking.DJetLRT.tracks_FTF,
89  vtxKey = flags.Tracking.ActiveConfig.vertex_jet)
90 
91  selAcc = DJDispFragment(flags)
92 
93  selAcc.addHypoAlgo(hypo_alg)
94 
95  return MenuSequence(flags,
96  selAcc,
97  HypoToolGen = TrigDJHypoDispToolFromDict,
98  )
grepfile.info
info
Definition: grepfile.py:38
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrigInDetConfig.trigInDetLRTCfg
def trigInDetLRTCfg(flags, LRTInputCollection, roisKey, in_view, extra_view_inputs=tuple())
Definition: TrigInDetConfig.py:87
DJTriggerConfiguration.DJPromptStepSequenceGenCfg
def DJPromptStepSequenceGenCfg(flags)
Definition: DJTriggerConfiguration.py:17
python.utils.cloneFlagsToActiveConfig
AthConfigFlags cloneFlagsToActiveConfig(AthConfigFlags flags, str config_name)
Definition: Trigger/TrigTools/TrigInDetConfig/python/utils.py:55
DJTriggerConfiguration.DJDispStepSequenceGenCfg
def DJDispStepSequenceGenCfg(flags)
Definition: DJTriggerConfiguration.py:84
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
DJTriggerConfiguration.DJDispFragment
def DJDispFragment(flags)
Definition: DJTriggerConfiguration.py:44
python.TrigGenericAlgsConfig.ROBPrefetchingAlgCfg_Si
def ROBPrefetchingAlgCfg_Si(flags, nameSuffix, **kwargs)
Definition: TrigGenericAlgsConfig.py:57
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:34