ATLAS Offline Software
JetTLASequenceConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
5 from TriggerMenuMT.HLT.Config.MenuComponents import MenuSequenceCA, SelectionCA, InEventRecoCA
6 from TrigEDMConfig.TriggerEDM import recordable
7 from TrigGenericAlgs.TrigGenericAlgsConfig import TrigEventInfoRecorderAlgCfg
8 from TrigHLTJetHypo.TrigJetHypoToolConfig import trigJetTLAHypoToolFromDict
9 
10 
11 def JetTLASequenceCfg(flags, jetsIn):
12 
13 
14  tlaJetInputMakerAlg = CompFactory.InputMakerForRoI("IMTLAJets_"+jetsIn)#,RoIsLink="initialRoI")
15  tlaJetInputMakerAlg.RoITool = CompFactory.ViewCreatorPreviousROITool()
16  tlaJetInputMakerAlg.mergeUsingFeature = True
17 
18  # configure an instance of TrigEventInfoRecorderAlg
19  recoAcc = InEventRecoCA("JetTLARecoSeq_"+jetsIn,inputMaker=tlaJetInputMakerAlg)
20  eventInfoRecorderAlgCfg = TrigEventInfoRecorderAlgCfg(flags, name="TrigEventInfoRecorderAlg_TLA",
21  decoratePFlowInfo=True,
22  decorateEMTopoInfo=True,
23  renounceAll=True, # avoid dependencies, just take what is there, so can share alg between EMTopo & PFlow TLA
24  trigEventInfoKey=recordable("HLT_TCEventInfo_TLA"),
25  primaryVertexInputName="HLT_IDVertex_FS",
26  )
27  recoAcc.mergeReco(eventInfoRecorderAlgCfg)
28 
29  return recoAcc
30 
31 @AccumulatorCache
32 def JetTLAMenuSequenceGenCfg( flags, jetsIn, attachBtag=True ):
33 
34  jetsOut = recordable(jetsIn+"_TLA")
35  # retrieves the sequence
36  recoAcc = JetTLASequenceCfg(flags, jetsIn=jetsIn)
37  # add the hypo
38  hypo = CompFactory.TrigJetTLAHypoAlg("TrigJetTLAHypoAlg_"+jetsIn)
39  hypo.AttachBtag = attachBtag # avoid attaching btag if creating EMTopo Jets with no tracking
40  btagJetTool = CompFactory.TrigBtagTLATool("BtagTLATool_"+jetsIn)
41 
42  if hypo.AttachBtag:
43  btagJetTool.TLAOutputBTaggingCollection = recordable(jetsOut+"_BTagging")
44 
45  hypo.BtagJetTool = btagJetTool
46  hypo.TLAOutputName = jetsOut
47 
48  selAcc = SelectionCA("TrigJetTLAMainSeq_"+jetsIn)
49  selAcc.mergeReco(recoAcc)
50  selAcc.addHypoAlgo(hypo)
51 
52  return MenuSequenceCA( flags,
53  selAcc,
54  HypoToolGen = trigJetTLAHypoToolFromDict
55  )
python.HLT.Jet.JetTLASequenceConfig.JetTLAMenuSequenceGenCfg
def JetTLAMenuSequenceGenCfg(flags, jetsIn, attachBtag=True)
Definition: JetTLASequenceConfig.py:32
python.TrigGenericAlgsConfig.TrigEventInfoRecorderAlgCfg
def TrigEventInfoRecorderAlgCfg(flags, name, trigEventInfoKey, decoratePFlowInfo, decorateEMTopoInfo, renounceAll=False, primaryVertexInputName="HLT_IDVertex_FS", RhoKey_PFlow='HLT_Kt4EMPFlowEventShape', RhoKey_EMTopo='HLT_Kt4EMTopoEventShape')
Definition: TrigGenericAlgsConfig.py:24
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:30
python.HLT.Jet.JetTLASequenceConfig.JetTLASequenceCfg
def JetTLASequenceCfg(flags, jetsIn)
Definition: JetTLASequenceConfig.py:11