ATLAS Offline Software
Loading...
Searching...
No Matches
ExtraParticlesConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.AccumulatorCache import AccumulatorCache
4from AthenaConfiguration.ComponentFactory import CompFactory
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from ExtraParticles import PDGHelpers
7
8@AccumulatorCache
9def 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
ExtraParticlesPhysicsToolCfg(flags, name="ExtraParticlesPhysicsTool", **kwargs)
getPDGTABLE(table)
Definition PDGHelpers.py:37