Skip to content

Draft: Changes needed for making generator transforms CA compatible

Spyros Argyropoulos requested to merge sargyrop/athena:spyrosCA into main

Main changes

  • changed initialisation of athenaExecutor in to use skeletonCA. 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
  • added python/ as a replacement of share/
  • Added flags.Generator configuration flags in GeneratorConfig
    • 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 that ecmEnergy had a default value
    • removed inputGenConfFile as a possible argument. This makes the code crash automatically when this argument is provided

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 a ComponentAccumulator
  • 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
  • --jobConfig=./100000 --ecmEnergy=13600. --maxEvents=10 --outputEVNTFile=minbias.root --CA

In the run directory make a DSID with a jO file 100000/ with the following content

# Translation of 950555/ 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.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) = 12 = PG.EEtaMPhiSampler(energy=50000, eta=0)


        return sampleConfig

How to run --jobConfig=./100000 --outputEVNTFile=minbias.root --CA --maxEvents=10
Edited by Spyros Argyropoulos

Merge request reports