#!/usr/bin/python # ================================================================== # An example of ploting by EmCalculator # # Plotting photon cross sections and stopping power # ================================================================== from Geant4 import * import g4py.ExN03pl import g4py.emcalculator import EmPlot # initialize EmPlot.Configure() # user physics list g4py.ExN03pl.Construct() # target material material= "G4_Pb" EmPlot.SetMaterial(material) # initialize G4 kernel gRunManager.Initialize() gRunManagerKernel.RunInitialization() # energy elist= [] for n in range(-3, 4): for i in range(10,99): elist.append(i/10.*10.**n *MeV)
def g4_configure(): EmPlot.Configure() g4py.ExN03pl.Construct()