ATLAS Offline Software
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 
3 from EvgenJobTransforms.EvgenCAConfig import EvgenConfig
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from GeneratorConfig.Sequences import EvgenSequence, EvgenSequenceFactory
6 
7 class 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
mc.Sample.setupProcess
def setupProcess(self, flags)
Definition: mc.PG_single_nu_valid.py:16
python.Sequences.EvgenSequenceFactory
def EvgenSequenceFactory(sequence)
Definition: Sequences.py:17
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
mc.Sample
Definition: mc.PG_single_nu_valid.py:7
mc.Sample.nEventsPerJob
nEventsPerJob
Definition: mc.PG_single_nu_valid.py:13
mc.Sample.setupFlags
def setupFlags(self, flags)
Definition: mc.PG_single_nu_valid.py:9
mc.Sample.contact
contact
Definition: mc.PG_single_nu_valid.py:12
mc.Sample.keywords
keywords
Definition: mc.PG_single_nu_valid.py:11
mc.Sample.description
description
Definition: mc.PG_single_nu_valid.py:10