ATLAS Offline Software
ExtraParticlesConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from ExtraParticles import PDGHelpers
7 
8 @AccumulatorCache
9 def ExtraParticlesPhysicsToolCfg(flags, name="ExtraParticlesPhysicsTool", **kwargs):
10  result = ComponentAccumulator()
11  if PDGHelpers.getPDGTABLE('PDGTABLE.MeV'): # FIXME This should be a ConfigFlag
12  parser = PDGHelpers.PDGParser('PDGTABLE.MeV', #flags.ExtraParticlesPDGTABLE,
13  '111-556,1112-9090226') #flags.ExtraParticlesRanges) # FIXME need to add these as flags?
14  kwargs.setdefault("ExtraParticlesConfig", parser.createList())
15  else:
16  raise RuntimeError('Failed to find PDGTABLE.MeV file')
17  result.setPrivateTools(CompFactory.ExtraParticlesPhysicsTool(name, **kwargs))
18  return result
PDGHelpers.PDGParser
Definition: PDGHelpers.py:109
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
PDGHelpers.getPDGTABLE
def getPDGTABLE(table)
Definition: PDGHelpers.py:37
ExtraParticlesConfig.ExtraParticlesPhysicsToolCfg
def ExtraParticlesPhysicsToolCfg(flags, name="ExtraParticlesPhysicsTool", **kwargs)
Definition: ExtraParticlesConfig.py:9