diff --git a/MCwrapper/MakeMC.csh b/MCwrapper/MakeMC.csh index 4b5ee933..3d3f3d9d 100755 --- a/MCwrapper/MakeMC.csh +++ b/MCwrapper/MakeMC.csh @@ -235,8 +235,8 @@ if ("$GENR" != "0") then else if ("$GEANTVER" == "4") then #make run.mac then call it below rm -f run.mac - echo /run/beamOn $EVT_TO_GEN >> run.mac - echo "exit" >> run.mac + echo "/run/beamOn $EVT_TO_GEN" > run.mac + echo "exit" >>! run.mac hdgeant4 -t$NUMTHREADS run.mac rm run.mac else diff --git a/MCwrapper/MakeMC.sh b/MCwrapper/MakeMC.sh index 71618de9..36951846 100755 --- a/MCwrapper/MakeMC.sh +++ b/MCwrapper/MakeMC.sh @@ -235,8 +235,8 @@ if [[ "$GENR" != "0" ]]; then elif [[ "$GEANTVER" -eq "4" ]]; then #make run.mac then call it below rm -f run.mac - echo /run/beamOn $EVT_TO_GEN >> run.mac - echo "exit" >> run.mac + echo "/run/beamOn $EVT_TO_GEN" >run.mac + echo "exit" >>! run.mac hdgeant4 -t$NUMTHREADS run.mac rm run.mac else