diff --git a/calorimeters/run_emcal_barrel_pions.sh b/calorimeters/run_emcal_barrel_pions.sh index fd399640179ccd17d1e77d8a321d69181934224c..8ce7ee4a7db64172f7284d7c42be0d1ed6eb2ffb 100755 --- a/calorimeters/run_emcal_barrel_pions.sh +++ b/calorimeters/run_emcal_barrel_pions.sh @@ -42,6 +42,31 @@ if [[ "$?" -ne "0" ]] ; then exit 1 fi +# Run geant4 simulations +npsim --runType batch \ + -v WARNING \ + --part.minimalKineticEnergy 0.5*GeV \ + --numberOfEvents ${JUGGLER_N_EVENTS} \ + --compactFile topside/${JUGGLER_DETECTOR}.xml \ + --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ + --outputFile sim_output/${JUGGLER_SIM_FILE} + +if [[ "$?" -ne "0" ]] ; then + echo "ERROR running npdet" + exit 1 +fi + +# Run Juggler +xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv \ + gaudirun.py calorimeters/options/emcal_barrel_reco.py +if [[ "$?" -ne "0" ]] ; then + echo "ERROR running juggler" + exit 1 +fi + # Directory for plots mkdir -p results +# Move ROOT output file +mv ${JUGGLER_REC_FILE} sim_output/ +