2 source /grid/fermiapp/products/common/etc/setup
5 # Setup grid submit tools if not on a grid node
6 if [ -z "${_CONDOR_SCRATCH_DIR}" ]; then
7 echo "_CONDOR_SCRATCH_DIR is not set... so I'm assuming we're not running on a grid node.... Setting up jobsub tools."
11 if [ -z "${G4LBNE_IS_SETUP}" ]; then
16 export EXPERIMENT=argoneut
19 export GROUP=microboone
20 export EXPERIMENT=uboone
24 export EXPERIMENT=lbne
27 echo experiment is $GROUP
29 export SETUP_LOCATION=/grid/fermiapp/products/lbne/
34 # Make sure this file exists.
35 if [ -f ${SETUP_LOCATION}/setup ]; then
36 source ${SETUP_LOCATION}/setup
39 #Now SETUP_UPS and UPS_DIR env vars should now be set
45 #Set the versions of root, and geant4 you want to setup
46 #If you want to print the avaliable versions define print_products variable
49 export ROOT_VERSION=v5_30_06
50 export ROOT_FLAVOR=Linux64bit+2.6-2.5
51 export ROOT_QUALIFIERS=gcc46:prof
53 export GEANT4_VERSION=v4_9_4_p03
54 export GEANT4_FLAVOR=Linux64bit+2.6-2.5
55 export GEANT4_QUALIFIERS=gcc46:prof
59 if [ -z "${print_products}" ]; then
60 echo "PRODUCTS = ${PRODUCTS}"
69 echo "Setting up ROOT"
70 export SETUP_ROOT="root ${ROOT_VERSION} -f ${ROOT_FLAVOR} -z ${SETUP_LOCATION} -q ${ROOT_QUALIFIERS}"
72 echo "setup ${SETUP_ROOT}"
74 echo "Setting up GEANT4"
75 export SETUP_GEANT4="geant4 ${GEANT4_VERSION} -f ${GEANT4_FLAVOR} -z ${SETUP_LOCATION} -q ${GEANT4_QUALIFIERS}"
77 echo "setup ${SETUP_GEANT4}"
79 echo "Setting up G4Photon"
80 export SETUP_G4PHOTON="g4photon v2_1"
81 setup ${SETUP_G4PHOTON}
82 echo "setup ${SETUP_G4PHOTON}"
84 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
86 ## Set G4WORKDIR to g4lbne directory, if not already set
88 ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
90 SETUPDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
92 if [ -z "$G4WORKDIR" ]; then
93 export G4WORKDIR=`dirname $SETUPDIR`
94 echo "G4WORKDIR is not set... Setting it to "$G4WORKDIR
97 export G4LBNEWORKDIR=`dirname $SETUPDIR`
99 export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$G4LIB/Linux-g++"
104 echo "*********************"
105 echo Locating ROOT...
107 echo "*********************"
108 echo Locating Geant4...
110 echo "*********************"
111 echo Locating CLHEP...
113 echo "*********************"
115 setup dk2nu r487 -f Linux64bit+2.6-2.5 -q g4lbne-gcc46-r53006
118 echo "*********************"
121 echo G4WORKDIR is ${G4WORKDIR}
122 echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}
125 # Set a flag to suppress unnecessary re-executions of this script.
127 #export G4LBNE_IS_SETUP=1