#!/bin/bash # Script install the data files needed by GEANT4. Either it # gets this from the download page or if present in the directory # only copy the files if [ "$make_install" = "yes" ]; then install_data=$SIMPATH_INSTALL/share else install_data=$SIMPATH/transport fi cd $install_data mkdir -p data/geant4 echo "**** Installing the Geant4 data files ****" | tee -a $logfile is_in_path curl result=$? if [ "$result" = "0" ]; then echo "using wget......" export getCommand=wget else echo "using curl......" export getCommand='curl -O' fi if [ "$geant4_get_data" = "yes" ]; then echo "**** Retrieving the data files ****" | tee -a $logfile echo "**** Retrieving G4EMLOW ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4EMLOW.6.23.tar.gz echo "**** Retrieving G4NDL ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4NDL.4.0.tar.gz echo "**** Retrieving G4RadiactiveDecay ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4RadioactiveDecay.3.4.tar.gz echo "**** Retrieving PhotonEvaporation ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4PhotonEvaporation.2.2.tar.gz # echo "**** Retrieving G4ELASTIC ****" | tee -a $logfile # $getCommand http://geant4.cern.ch/support/source/G4ELASTIC.1.1.tar.gz echo "**** Retrieving G4ABLA ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4ABLA.3.0.tar.gz echo "**** Retrieving RealSurface ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/RealSurface.1.0.tar.gz echo "**** Retrieving neutron cross sections on natural composition of elements ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4NEUTRONXS.1.1.tar.gz echo "**** Retrieving G4PII ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4PII.1.3.tar.gz fi if [ -e G4EMLOW.6.23.tar.gz ]; then cp G4EMLOW.6.23.tar.gz data/geant4 cd data/geant4 untar G4EMLOW G4EMLOW.6.23.tar.gz ln -s G4EMLOW6.23 G4EMLOW rm G4EMLOW.6.23.tar.gz cd ../.. else echo "Could not find file G4EMLOW.6.23.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4NDL.4.0.tar.gz ]; then cp G4NDL.4.0.tar.gz data/geant4 cd data/geant4 untar G4NDL G4NDL.4.0.tar.gz ln -s G4NDL4.0 G4NDL rm G4NDL.4.0.tar.gz cd ../.. else echo "Could not find file G4NDL.4.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4RadioactiveDecay.3.4.tar.gz ]; then cp G4RadioactiveDecay.3.4.tar.gz data/geant4 cd data/geant4 untar RadioactiveDecay G4RadioactiveDecay.3.4.tar.gz ln -s RadioactiveDecay3.4 RadioactiveDecay rm G4RadioactiveDecay.3.4.tar.gz cd ../.. else echo "Could not find file G4RadioactiveDecay.3.4.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4PhotonEvaporation.2.2.tar.gz ]; then cp G4PhotonEvaporation.2.2.tar.gz data/geant4 cd data/geant4 untar PhotonEvaporation G4PhotonEvaporation.2.1.tar.gz ln -s PhotonEvaporation2.2 PhotonEvaporation rm G4PhotonEvaporation.2.2.tar.gz cd ../.. else echo "Could not find file PhotonEvaporation.2.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi #if [ -e G4ELASTIC.1.1.tar.gz ]; #then # cp G4ELASTIC.1.1.tar.gz data/geant4 # cd data/geant4 # untar G4ELASTIC G4ELASTIC.1.1.tar.gz # ln -s G4ELASTIC1.1 G4ELASTIC # rm G4ELASTIC.1.1.tar.gz # cd ../.. #else # echo "Could not find file G4ELASTIC.1.1.tar.gz in $SIMPATH/transport" | tee -a $logfile #fi if [ -e G4ABLA.3.0.tar.gz ]; then cp G4ABLA.3.0.tar.gz data/geant4 cd data/geant4 untar G4ABLA G4ABLA.3.0.tar.gz ln -s G4ABLA3.0 G4ABLA rm G4ABLA.3.0.tar.gz cd ../.. else echo "Could not find file G4ABLA.3.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e RealSurface.1.0.tar.gz ]; then cp RealSurface.1.0.tar.gz data/geant4 cd data/geant4 untar RealSurface RealSurface.1.0.tar.gz ln -s RealSurface1.0 RealSurface rm RealSurface.1.0.tar.gz cd ../.. else echo "Could not find file RealSurface.1.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4NEUTRONXS.1.1.tar.gz ]; then cp G4NEUTRONXS.1.1.tar.gz data/geant4 cd data/geant4 untar G4NEUTRONXS G4NEUTRONXS.1.1.tar.gz ln -s G4NEUTRONXS1.1 G4NEUTRONXS rm G4NEUTRONXS.1.1.tar.gz cd ../.. else echo "Could not find file G4NEUTRONXS.1.1.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4PII.1.3.tar.gz ]; then cp G4PII.1.3.tar.gz data/geant4 cd data/geant4 untar G4PII G4PII.1.3.tar.gz ln -s G4PII1.3 G4PII rm G4PII.1.3.tar.gz cd ../.. else echo "Could not find file G4PII.1.3.tar.gz in $SIMPATH/transport" | tee -a $logfile fi cd $SIMPATH return 1