Draft: Changes needed for making generator transforms CA compatible
Main changes
-
Gen_tf.py
: changed initialisation ofathenaExecutor
inGen_tf.py
to useskeletonCA
. Old executors are still kept - New
EvgenConfig
class from which the jO will inherit- add
genCA
as a class attribute - move helper function definitions to
EvgenConfigHelpers.py
- add
- added
python/GENtoEVGEN_Skeleton.py
as a replacement ofshare/skel.GENtoEVGEN.py
- Added
flags.Generator
configuration flags inGeneratorConfig
-
evgenTrfArgs.py
- removed 13.0 TeV as default energy. Made the transform crash if
ecmEnergy
not provided. This was also the intended behaviour in the old skeleton but probably it was overseen thatecmEnergy
had a default value - removed
inputGenConfFile
as a possible argument. This makes the code crash automatically when this argument is provided
- removed 13.0 TeV as default energy. Made the transform crash if
To do
-
MetaData and other containers (e.g. JetContainer) not saved -
Need to discuss relation between main sequence and sequences created in GENtoEVGEN.py_Skeleton
-
Discuss whether EvgenConfig.setupProcess
should return aComponentAccumulator
-
Need to decide how we are going to support CA and legacy configuration running together. We would need two EvgenConfig
classes
How to run
- Check out my
sargyrop/athena:spyrosCA
asetup main,latest,AthGeneration
Gen_tf.py --jobConfig=./100000 --ecmEnergy=13600. --maxEvents=10 --outputEVNTFile=minbias.root --CA
In the run
directory make a DSID with a jO file 100000/mc.PG_test.py
with the following content
# Translation of 950555/mc.PG_single_nu_valid.py into CA mode
from EvgenJobTransforms.EvgenConfig import EvgenConfig
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
class Sample(EvgenConfig):
def __init__(self, runArgs, flags):
super().__init__(runArgs, flags)
def setupFlags(self, runArgs, flags):
self.description = ["Single neutrinos with fixed eta and E: purely for pile-up/lumi testing"]
self.keywords = ["singleParticle", "neutrino"]
self.contact = ["dhirsch@mail.cern.ch"]
self.nEventsPerJob = 100
self.generators += ["ParticleGun"]
super().setupFlags(runArgs, flags)
def setupProcess(self, flags):
sampleConfig = ComponentAccumulator()
import ParticleGun as PG
pg = PG.ParticleGun(randomStream = "SINGLE", randomSeed = flags.Random.SeedOffset)
pg.sampler.pid = 12
pg.sampler.mom = PG.EEtaMPhiSampler(energy=50000, eta=0)
sampleConfig.addEventAlgo(pg)
return sampleConfig
How to run
Gen_tf.py --jobConfig=./100000 --outputEVNTFile=minbias.root --CA --maxEvents=10
Edited by Spyros Argyropoulos