Files
minicalosim/bind/example.py
T
Jan Kieseler 9cd1a93ced fix
2023-10-09 11:55:30 +02:00

12 lines
490 B
Python

from G4Calo import GeometryDescriptor, G4System
cw = GeometryDescriptor()#the width of the calorimeter is 50 cm times 50 cm (also steerable, but I'd leave it)
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
#directly use G4System as a global singleton
G4System.init(cw)
G4System.run_batch(100, "gamma", 1, 5) #100 events, photons, 1000 MeV to 5000 MeV