From 64d434d2014fa247fe4f5a7161520088acce6fb5 Mon Sep 17 00:00:00 2001 From: Jan Kieseler Date: Mon, 11 Sep 2023 08:44:57 +0200 Subject: [PATCH] fixes --- bind/G4Calo.py | 2 +- bind/example.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bind/G4Calo.py b/bind/G4Calo.py index 6d0dc8f..5161415 100644 --- a/bind/G4Calo.py +++ b/bind/G4Calo.py @@ -12,7 +12,7 @@ class G4System(_G4System): def run_visualize(self,particleSpec : str, minEnergy: float, maxEnergy:float = -1.): if maxEnergy < 0: maxEnergy = minEnergy - super(G4System).run_visualize(particleSpec, minEnergy, maxEnergy) + _G4System.run_visualize(self, particleSpec, minEnergy, maxEnergy) self.displayEvent() def displayEvent(self): diff --git a/bind/example.py b/bind/example.py index 80b622e..b58be66 100644 --- a/bind/example.py +++ b/bind/example.py @@ -6,6 +6,8 @@ cw.addLayer(10,"G4_Si",True) #10 cm of Silicon, active cw.addLayer(1,"G4_Pb",False) #1 cm of Lead, passive cw.addLayer(10,"G4_Si",True, 3) #10 cm of Silicon, active, 3x3 segmentation -sb = G4System() -sb.init(cw) -sb.run_batch(100, "gamma", 1000, 5000) #100 events, photons, 1000 MeV to 5000 MeV +G4s = G4System() +G4s.init(cw) +G4s.run_batch(100, "gamma", 1000, 5000) #100 events, photons, 1000 MeV to 5000 MeV + +G4s.run_visualize("gamma", 1000, 5000) \ No newline at end of file