#!/usr/bin/env bash r="root -q -l -b" echo "Running with GEANT 3" $r 'sim.C(1000, "TGeant3")' $r 'digi.C' $r 'hitcount.C' mv "mc_hitcount.root" "mc_hitcount.geant3.root" $r 'genHistos.C("mc_hitcount.geant3.root", "GEANT3")' echo "Running with GEANT 4" $r 'sim.C(1000, "TGeant4")' $r 'digi.C' $r 'hitcount.C' mv "mc_hitcount.root" "mc_hitcount.geant4.root" $r 'genHistos.C("mc_hitcount.geant4.root", "GEANT4")' echo "All done! Now take a look at the two PDF files."