#!/bin/tcsh if ( ! $?JOB_ID ) setenv JOB_ID 1234 setenv JOB_ID `basename $JOB_ID .farmpbs.jlab.org` set workroot=/work/halld/home/davidl/CDC/2008.10.CDC_geom/geomA source ${workroot}/set_env.csh set workdisk=${workroot}/set2 set bindir=${workroot}/bin/Linux_Fedora8-i686-gcc4.1.2 set libdir=${workroot}/lib/Linux_Fedora8-i686-gcc4.1.2 setenv JANA_PLUGIN_PATH ${libdir} mkdir -p $workdisk env > $workdisk/env.${JOB_ID} mkdir tmp${JOB_ID} cd tmp${JOB_ID} ####################### MULS ON ######################## # Run hdgeant rm -f control.in cat ${workroot}/farm/control.in.tmpl | sed -e s/XXX/${JOB_ID}/g > ${workdisk}/control.in.${JOB_ID} ln -s ${workdisk}/control.in.${JOB_ID} control.in echo "hdgeant output redirected to log file: ${workdisk}/hdgeant_${JOB_ID}.log" ${bindir}/hdgeant >& ${workdisk}/hdgeant_${JOB_ID}.log # Run hd_root echo "hd_root output redirected to log file: ${workdisk}/hd_root_${JOB_ID}.log" ${bindir}/hd_root --plugin=trackeff_hists2 hdgeant*.hddm -o hd_root_${JOB_ID}.root >& ${workdisk}/hd_root_${JOB_ID}.log # Smear data and re-process ${bindir}/mcsmear -n hdgeant*.hddm echo "hd_root output redirected to log file: ${workdisk}/hd_root_${JOB_ID}_smeared.log" ${bindir}/hd_root --plugin=trackeff_hists2 hdgeant*_smeared.hddm -o hd_root_${JOB_ID}_smeared.root >& ${workdisk}/hd_root_${JOB_ID}_smeared.log cp hdgeant*.hddm hd_root*.root $workdisk rm -f hdgeant*.hddm hd_root*.root ####################### MULS OFF ######################## # Run hdgeant rm -f control.in cat ${workroot}/farm/control_no_muls.in.tmpl | sed -e s/XXX/${JOB_ID}/g > ${workdisk}/control_no_muls.in.${JOB_ID} ln -s ${workdisk}/control_no_muls.in.${JOB_ID} control.in echo "hdgeant output redirected to log file: ${workdisk}/hdgeant_no_muls_${JOB_ID}.log" ${bindir}/hdgeant >& ${workdisk}/hdgeant_no_muls_${JOB_ID}.log # Run hd_root echo "hd_root output redirected to log file: ${workdisk}/hd_root_no_muls_${JOB_ID}.log" ${bindir}/hd_root --plugin=trackeff_hists2 hdgeant*.hddm -o hd_root_no_muls_${JOB_ID}.root >& ${workdisk}/hd_root_no_muls_${JOB_ID}.log # Smear data and re-process ${bindir}/mcsmear -n hdgeant*.hddm echo "hd_root output redirected to log file: ${workdisk}/hd_root_no_muls_${JOB_ID}_smeared.log" ${bindir}/hd_root --plugin=trackeff_hists2 hdgeant*_smeared.hddm -o hd_root_no_muls_${JOB_ID}_smeared.root >& ${workdisk}/hd_root_no_muls_${JOB_ID}_smeared.log cp hdgeant*.hddm hd_root*.root $workdisk rm -f hdgeant*.hddm hd_root*.root