Skip to content

Initial sequences suport for CA-based event generation

Tadej Novak requested to merge tadej/athena:ca-gen-sequences into main

This MR is quite large and I may break it up (also it depends on !70698 (merged), !70662 (merged), !70690 (merged), !70663 (merged) and !70664 (merged) to all land in main).

These are the main features of this MR (last commit):

  • Add EvgenSequence enum and EvgenSequenceFactory to make the sequences consistently.
  • MainEvgenServicesCfg optionally now creates the sequences (alternatively we could rename the current fragment and make a separate one, but for now it's fine I think).
  • Cleanup the CA-based GENtoEVGEN skeleton and add all the main utilities (note that a lot of trailing whitespaces were there, maybe this motivates a CI check 😊).
  • Commit the test sample configuration in the repo to allow easier testing and make sure that we have a version that is in sync with the release. I still expect many API changes in the next weeks.
  • Related, add testing infrastructure to JO loading that loads config from the release if DSID starts with Test.
  • Add unit tests for sequences and a CI test for the CA-based particle gun job.

How I envision for sequences to be used (will make a longer presentation at one of the future meetings)?

Evgen fragments will define the sequence that a specific algorithm needs to go to:

def FixHepMCCfg(flags, name="FixHepMC", **kwargs):
    acc = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Fix))
    acc.addEventAlgo(CompFactory.FixHepMC(name, **kwargs))
    return acc

Then this fragment just needs to be merged in the job where needed and the user does not need to care.

from EvgenProdTools.EvgenProdToolsConfig import FixHepMCCfg
cfg.merge(FixHepMCCfg(flags))

Complex fragments can still setup the sequence hierarchy and add algorithms to relevant sequences as they want, but that is not actually needed (and test is added for it)

cfg = ComponentAccumulator()
addEvgenSequences(flags, cfg)

Tagging some experts for now: @ewelina @sargyrop @jchapman @fwinkl @tstreble

Merge request reports

Loading