ATLAS Offline Software
AFP_GlobReco.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 #==============================================================
4 # Job options file for the AFP_GlobReco package
5 #==============================================================
6 
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from TrigEDMConfig.TriggerEDM import recordable
10 
11 def AFP_GlobReco_Cfg(flags, kwargs={}):
12  # side A = 0, side C = 1
13  afpProtonRecoToolA = CompFactory.AFP_ProtonRecoAnalytical("AFP_ProtonRecoAnalyticalA", parametrizationFileName="param_mad_b1_def.txt", side=0, **kwargs)
14  afpProtonRecoToolC = CompFactory.AFP_ProtonRecoAnalytical("AFP_ProtonRecoAnalyticalC", parametrizationFileName="param_mad_b2_def.txt", side=1, **kwargs)
15 
16  protonsToolsList=[afpProtonRecoToolA, afpProtonRecoToolC]
17 
18  # collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_GlobRecoTool::initialize() will complain
19  outputProtonList=[]
20  for protonTool in protonsToolsList:
21  contName=getattr(protonTool, "protonsContainerName", protonTool.getDefaultProperty("protonsContainerName"))
22  if contName not in outputProtonList:
23  outputProtonList.append(contName)
24 
25  # prepare proton reco tool
26  protonRecoTool = CompFactory.AFP_GlobRecoTool("AFP_GlobRecoTool", RecoToolsList=protonsToolsList, AFPProtonContainerList=outputProtonList )
27 
28  # actually setup the track reco
29  acc = ComponentAccumulator()
30  acc.addEventAlgo(CompFactory.AFP_GlobReco("AFP_GlobReco", recoTool = protonRecoTool))
31 
32  return acc
33 
34 
35 
36 
37 def AFP_GlobReco_HLT(flags):
38 
39  acc = AFP_GlobReco_Cfg(flags, {"AFPTrackContainerKey": "HLT_AFPTrackContainer", "protonsContainerName": recordable("HLT_AFPProtonContainer")})
40 
41  return acc
42 
43 
AFP_GlobReco.AFP_GlobReco_Cfg
def AFP_GlobReco_Cfg(flags, kwargs={})
Definition: AFP_GlobReco.py:11
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TriggerEDM.recordable
def recordable(arg, runVersion=3)
Definition: TriggerEDM.py:30
AFP_GlobReco.AFP_GlobReco_HLT
def AFP_GlobReco_HLT(flags)
Definition: AFP_GlobReco.py:37