diff options
| author | Stan Seibert <stan@mtrr.org> | 2011-09-16 20:09:49 -0400 |
|---|---|---|
| committer | Stan Seibert <stan@mtrr.org> | 2011-09-16 20:09:49 -0400 |
| commit | 26e5398807b6edd6dd71046ef745f5c6acfab1ed (patch) | |
| tree | 82de046a7289576278f5d58f5c15f9563166280a /chroma | |
| parent | 5fa54a5e6f2d76a52ec0d25b663d1051136de395 (diff) | |
| download | chroma-26e5398807b6edd6dd71046ef745f5c6acfab1ed.tar.gz chroma-26e5398807b6edd6dd71046ef745f5c6acfab1ed.tar.bz2 chroma-26e5398807b6edd6dd71046ef745f5c6acfab1ed.zip | |
Silence annoying GEANT4 warnings and banners during operation.
Diffstat (limited to 'chroma')
| -rw-r--r-- | chroma/generator/g4gen.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/chroma/generator/g4gen.py b/chroma/generator/g4gen.py index 7f55e56..0ed5433 100644 --- a/chroma/generator/g4gen.py +++ b/chroma/generator/g4gen.py @@ -1,12 +1,20 @@ +from chroma.generator.mute import * + +import pyublas +import numpy as np +from chroma.event import Photons, Vertex + +g4mute() from Geant4 import * +g4unmute() import g4py.ezgeom import g4py.NISTmaterials import g4py.ParticleGun -import pyublas -import numpy as np -from chroma.event import Photons, Vertex from chroma.generator import _g4chroma +#cppmute() +#cppunmute() + class G4Generator(object): def __init__(self, material, seed=None): """Create generator to produce photons inside the specified material. @@ -40,8 +48,9 @@ class G4Generator(object): self.tracking_action = _g4chroma.PhotonTrackingAction() gRunManager.SetUserAction(self.tracking_action) + g4mute() gRunManager.Initialize() - + g4unmute() # preinitialize the process by running a simple event self.generate_photons([Vertex('e-', (0,0,0), (1,0,0), 0, 1.0)]) |
