Skip to content

Minimal working version of CA skeleton for evgen

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

Adding a minimal working version (producing a filled EVNT.root file from a ParticleGun jO).

Changes

  • Add new EvgenConfig class in EvgenJobTransforms.EvgenCAConfig module
  • Added necessary changes to CA-based skeleton in order to run a minimal jO and save the output in a root file
  • checkJOConsistency function added in GenConfig.GenConfigHelpers module

Layout of sequences

Screenshot_2024-02-09_at_11.11.57

JobOption content

# Translation of 950555/mc.PG_single_nu_valid.py into CA mode

from EvgenJobTransforms.EvgenCAConfig import EvgenConfig
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator

class Sample(EvgenConfig):

    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"]

    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 --CA --outputEVNTFile="EVNT.root" --jobConfig=./950555 --maxEvents=10

cc @tadej @ewelina

Edited by Spyros Argyropoulos

Merge request reports

Loading