For comparison make a plot which contains both an electron and a pion shower. Make different species visible, distinguish neutrons from others.
Simulate showers of 30 GeV negative pions in an iron - scintillator sandwich calorimeter with diron = 10 mm and dsci = 3 mm and 400 layers each; shower axis perpendicular to sandwich plates.
% calorimeter.py
wget http://www.ifh.de/geant4/g4course2011/TestEm3a.tgz tar xzf TestEm3a.tgz cd TestEm3a gmake clean gmake -j2 TestEm3
And specify the calorimeter geometry using macro commands.
/testem/det/setNbOfLayers 400 /testem/det/setNbOfAbsor 2 /testem/det/setAbsor 1 Iron 10 mm /testem/det/setAbsor 2 Scintillator 3 mm /testem/det/setSizeYZ 100 cm
/vis/filtering/trajectories/create/particleFilter noGamma /vis/filtering/trajectories/noGamma/add gamma /vis/filtering/trajectories/noGamma/invert true
/vis/modeling/trajectories/create/drawByParticleID colorID /vis/modeling/trajectories/colorID/set e+ blue /vis/modeling/trajectories/colorID/set e- red /vis/modeling/trajectories/colorID/set neutron green /vis/modeling/trajectories/colorID/set proton yellow
/vis/scene/endOfEventAction accumulate 10 /vis/scene/endOfRunAction accumulate /gun/particle e- /gun/position -400.0 -100.0 -100.0 mm /run/beamOn 1 /gun/particle pi+ /gun/position -400.0 100.0 100.0 mm /run/beamOn 1
/vis/scene/endOfEventAction refresh /vis/scene/endOfRunAction refresh