#!/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 cd $SIMPATH/transport/ 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 if [ ! -d $SIMPATH/transport/data/geant4/G4EMLOW6.19 ]; then echo "**** Retrieving G4EMLOW ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4EMLOW.6.19.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/G4NDL3.14 ]; then echo "**** Retrieving G4NDL ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4NDL.3.14.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/RadioactiveDecay3.3 ]; then echo "**** Retrieving G4RadiactiveDecay ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4RadioactiveDecay.3.3.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/PhotonEvaporation2.1 ]; then echo "**** Retrieving PhotonEvaporation ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4PhotonEvaporation.2.1.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/G4ABLA3.0 ]; then echo "**** Retrieving G4ABLA ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4ABLA.3.0.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/RealSurface1.0 ]; then echo "**** Retrieving RealSurface ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/RealSurface.1.0.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/G4NEUTRONXS1.0 ]; then echo "**** Retrieving neutron cross sections on natural composition of elements ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4NEUTRONXS.1.0.tar.gz fi if [ ! -d $SIMPATH/transport/data/geant4/G4PII1.2 ]; then echo "**** Retrieving G4PII ****" | tee -a $logfile $getCommand http://geant4.cern.ch/support/source/G4PII.1.2.tar.gz fi fi if [ -e G4EMLOW.6.19.tar.gz -a ! -d $SIMPATH/transport/data/geant4/G4EMLOW6.19 ]; then cp G4EMLOW.6.19.tar.gz data/geant4 cd data/geant4 untar G4EMLOW G4EMLOW.6.19.tar.gz ln -s G4EMLOW6.19 G4EMLOW # rm G4EMLOW.6.19.tar.gz cd ../.. else echo "Could not find file G4EMLOW.6.19.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4NDL.3.14.tar.gz -a ! -d $SIMPATH/transport/data/geant4/G4NDL3.14 ]; then cp G4NDL.3.14.tar.gz data/geant4 cd data/geant4 untar G4NDL G4NDL.3.14.tar.gz ln -s G4NDL3.14 G4NDL # rm G4NDL.3.14.tar.gz cd ../.. else echo "Could not find file G4NDL.3.14.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4RadioactiveDecay.3.3.tar.gz -a ! -d $SIMPATH/transport/data/geant4/RadioactiveDecay3.3 ]; then cp G4RadioactiveDecay.3.3.tar.gz data/geant4 cd data/geant4 untar G4RadioactiveDecay G4RadioactiveDecay.3.3.tar.gz ln -s RadioactiveDecay3.3 G4RadioactiveDecay # rm G4RadioactiveDecay.3.3.tar.gz cd ../.. else echo "Could not find file G4RadioactiveDecay.3.2.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4PhotonEvaporation.2.1.tar.gz -a ! -d $SIMPATH/transport/data/geant4/PhotonEvaporation2.1 ]; then cp G4PhotonEvaporation.2.1.tar.gz data/geant4 cd data/geant4 untar PhotonEvaporation G4PhotonEvaporation.2.1.tar.gz ln -s PhotonEvaporation2.1 PhotonEvaporation # rm G4PhotonEvaporation.2.1.tar.gz cd ../.. else echo "Could not find file PhotonEvaporation.2.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4ABLA.3.0.tar.gz -a ! -d $SIMPATH/transport/data/geant4/G4ABLA3.0 ]; 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 -a ! -d $SIMPATH/transport/data/geant4/RealSurface1.0 ]; 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.0.tar.gz -a ! -d $SIMPATH/transport/data/geant4/G4NEUTRONXS1.0 ]; then cp G4NEUTRONXS.1.0.tar.gz data/geant4 cd data/geant4 untar G4NEUTRONXS G4NEUTRONXS.1.0.tar.gz ln -s G4NEUTRONXS1.0 G4NEUTRONXS # rm G4NEUTRONXS.1.0.tar.gz cd ../.. else echo "Could not find file G4NEUTRONXS.1.0.tar.gz in $SIMPATH/transport" | tee -a $logfile fi if [ -e G4PII.1.2.tar.gz -a ! -d $SIMPATH/transport/data/geant4/G4PII1.2 ]; then cp G4PII.1.2.tar.gz data/geant4 cd data/geant4 untar G4PII G4PII.1.2.tar.gz ln -s G4PII1.2 G4PII # rm G4PII.1.2.tar.gz cd ../.. else echo "Could not find file G4PII.1.2.tar.gz in $SIMPATH/transport" | tee -a $logfile fi cd $SIMPATH return 1