ATLAS Offline Software
Loading...
Searching...
No Matches
mc.PG_single_nu_valid.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3from EvgenJobTransforms.EvgenCAConfig import EvgenConfig
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from GeneratorConfig.Sequences import EvgenSequence, EvgenSequenceFactory
6
7class Sample(EvgenConfig):
8
9 def setupFlags(self, flags):
10 self.description = "Single neutrinos with fixed eta and E: purely for pile-up/lumi testing"
11 self.keywords = ["singleParticle", "neutrino"]
12 self.contact = ["dhirsch@mail.cern.ch"]
13 self.nEventsPerJob = 100
14 self.generators += ["ParticleGun"]
15
16 def setupProcess(self, flags):
17 # TODO: update once we have a proper PG fragment
18 sampleConfig = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
19
20 import ParticleGun as PG
21 pg = PG.ParticleGun(randomStream="SINGLE", randomSeed=flags.Random.SeedOffset)
22 pg.sampler.pid = 12
23 pg.sampler.mom = PG.EEtaMPhiSampler(energy=50000, eta=0)
24
25 sampleConfig.addEventAlgo(pg)
26
27 return sampleConfig