#!/bin/sh # Tell simulation macro that we run it via script. export SCRIPT=yes # Path to your build directory. cd /Users/andrey/Projects/cbm/workshop2011/build . ./config.sh cd - # First parameter to this scrip is STS geometry export STS_GEOM=$1 # NOW Second parameter to script is output directory name export OUTPUT_DIR=$2 rm -r $OUTPUT_DIR mkdir $OUTPUT_DIR # Run simulation now since it is the same for all reconstructions root -b -q -l "$VMCWORKDIR/macro/tutorial/tracking/tut1/global_sim.C()" # After the simulation we have to test different digitization parameters. # STS digi file name and output result directory would be different for each reconstruction run. function run_reconstruction() { # First parameter to function is STS digi file name. export STS_DIGI=$1 # Second parameter is result directory name export RESULTS_DIR=$2 rm -r $RESULTS_DIR mkdir $RESULTS_DIR # Reconstruction file name export GLOBAL_RECO_FILE=global.reco.$3.0000.root # After we have set all necessary parameters run the reconstruction macro. root -b -q -l "$VMCWORKDIR/macro/tutorial/tracking/tut1/global_reco.C()" } # Third parameter to script specifies geometry name #GEO=$3 # Now run the reconstruction for each STS digi run_reconstruction sts/sts_$3.digi.par ./results_$3/ sts_$3 run_reconstruction sts/sts_$3_0-4.digi.par ./results_$3_0-4/ sts_$3_0-4 run_reconstruction sts/sts_$3_0-6.digi.par ./results_$3_0-6/ sts_$3_0-6 run_reconstruction sts/sts_$3_0-8.digi.par ./results_$3_0-8/ sts_$3_0-8 export SCRIPT=no