#! /bin/sh # example file to simulation with ckmgeant, with fbs as batch system # This job will calculate momentum resolutions for pion RICH. # source directory: here are the command files etc source_dir=/usr/people/ehep4/jurgen/fbsng/ckmgeant # result directory: here goes the output result_dir=/usr/people/ehep4/jurgen/fbsng/ckmgeant # now we start working part=$1 mom=$2 # first declare setup etc . /usr/people/ehep/ehep_home/etc/e781rc.sh # get the products you need setup ckmgeant # go to the working directory cd $FBS_SCRATCH #get all the files you need cp $source_dir/ckminit.kumac.part ckminit.kumac cp $source_dir/batch.kumac . cp $source_dir/display . cp $CKMGEANT_DIR/bin/ckm.int . echo Doing $part with $mom gev if [ "$part" = "pion" ]; then echo spart 97 \'CKM Pi+\' 4 0.13956E+00 1. 31536000. ubuf ubuf br md >>ckminit.kumac fi if [ "$part" = "muon" ]; then echo spart 97 \'CKM mu+\' 5 0.105E+00 1. 31536000. ubuf ubuf br md >>ckminit.kumac fi echo UKINE -2 97 0. 0. 5000. 0. 0. `expr $mom / 10`"."`expr $mom % 10` 0.004 0.004 >>ckminit.kumac # prepare output files ln -s ckmgeant.out.$part.$mom ckmgeant.out ln -s ckm.hbook.$part.$mom ckm.hbook echo exec batch | ./ckm.int -n -b batch.kumac > $part.$mom.log 2>&1 ln -s display.hbk.$part.$mom display.hbk ./display ckmgeant.out gzip ckmgeant.out.$part.$mom $part.$mom.log ckm.hbook.$part.$mom mv ckmgeant.out.$part.$mom.gz $part.$mom.log.gz ckm.hbook.$part.$mom.gz display.hbk.$part.$mom $result_dir exit 0