1 | #!/bin/tcsh |
---|
2 | |
---|
3 | echo setting up root 5.34 |
---|
4 | #the root initialisation was copied from /lal/root/5.34/setup.csh |
---|
5 | # to change the version, change the number in the line "set init_script=...." |
---|
6 | |
---|
7 | # echo "Setting the ROOTSYS and PATH Variables" |
---|
8 | |
---|
9 | set root_arch=`uname -i` |
---|
10 | switch ( $root_arch ) |
---|
11 | case i386: |
---|
12 | set libdir=lib |
---|
13 | breaksw |
---|
14 | |
---|
15 | case x86_64: |
---|
16 | set libdir=lib64 |
---|
17 | breaksw |
---|
18 | |
---|
19 | default: |
---|
20 | echo "Error: unsupported root_architecture ($root_arch)" |
---|
21 | exit 1 |
---|
22 | breaksw |
---|
23 | endsw |
---|
24 | |
---|
25 | # ROOTSYS must point to the directory containing ROOT etc/ |
---|
26 | set init_script=`echo /lal/root/5.34/setup.sh` |
---|
27 | if ( -z ${init_script} ) then |
---|
28 | echo "Failed to guess ROOT version. Cannot set the environment." |
---|
29 | exit 2 |
---|
30 | endif |
---|
31 | set root_dir=`dirname ${init_script}` |
---|
32 | set root_version=`basename ${root_dir}` |
---|
33 | |
---|
34 | if ( ${init_script} == '.' ) then |
---|
35 | echo "Failed to guess ROOT version. Cannot set the environment." |
---|
36 | exit 3 |
---|
37 | endif |
---|
38 | set root_sys_dir=/lal/root/${root_version} |
---|
39 | if ( ! -d ${root_sys_dir} ) then |
---|
40 | echo "ROOT version ${root_version} not found" |
---|
41 | exit 4 |
---|
42 | endif |
---|
43 | set root_bin_dir=${root_sys_dir}/bin/${root_arch} |
---|
44 | if ( ! -d ${root_bin_dir} ) then |
---|
45 | echo "Architecture ${root_arch} not available for ROOT version ${root_version}" |
---|
46 | exit 5 |
---|
47 | endif |
---|
48 | setenv ROOTSYS ${root_sys_dir} |
---|
49 | |
---|
50 | # ROOT binaries are located in an root_arch-specific directory under bin |
---|
51 | setenv PATH ${root_bin_dir}:${PATH} |
---|
52 | |
---|
53 | setenv LD_LIBRARY_PATH ${ROOTSYS}/${libdir}:${LD_LIBRARY_PATH} |
---|
54 | |
---|
55 | echo setting up Pythia8 with HepMC |
---|
56 | source `pwd`/Pythia8/pythia8170/examples/config.csh |
---|
57 | |
---|
58 | echo setting up PythiaDelphes |
---|
59 | setenv PYTHIA8LOCATION `pwd`/Pythia8/pythia8170 |
---|
60 | setenv PYTHIA8DATA `pwd`/Pythia8/pythia8170 |
---|