Skip to content
Snippets Groups Projects
Commit e7f1db76 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'dsoFix.ParticleGun-20181017' into 'master'

ParticleGun: Avoid loading DSOs during job configuration.

See merge request atlas/athena!15113
parents 8f8fb927 3dc4d8ca
No related branches found
No related tags found
1 merge request!20779WIP: Migrate DataQualityTools to ToolHandles
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from GeneratorModules.EvgenAlg import EvgenAlg
from ParticleGun.samplers import *
from ParticleGun.histsampling import TH1, TH2
from AthenaPython.PyAthena import HepMC, StatusCode
import McParticleEvent.Pythonizations
from AthenaPython.PyAthena import StatusCode
__author__ = "Andy Buckley <andy.buckley@cern.ch>"
......@@ -36,6 +35,7 @@ class ParticleGun(EvgenAlg):
"""
Pass the AtRndmGenSvc seed to Python's random module, or use a fixed value set via pg.randomSeed.
"""
import McParticleEvent.Pythonizations
seed = None
## Use self.randomSeed directly, or if it's None find a seed string from the ATLAS random number service
if self.randomSeed is not None:
......@@ -67,6 +67,7 @@ class ParticleGun(EvgenAlg):
"""
## Set event weight(s)
# TODO: allow weighted sampling?
from AthenaPython.PyAthena import HepMC
evt.weights().push_back(1.0)
## Make and fill particles
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment