#!/bin/tcsh if ( ! $?JOB_ID ) setenv JOB_ID 1234 setenv JOB_ID `basename $JOB_ID .farmpbs.jlab.org` set workroot=/work/halld/home/davidl/2009.08.27.spoiledField source ${workroot}/setenv.csh set workdisk=${workroot}/set1 set bindir=${workroot}/bin/${BMS_OSNAME} set libdir=${workroot}/lib/${BMS_OSNAME} setenv JANA_PLUGIN_PATH ${JANA_PLUGIN_PATH}:${libdir} mkdir -p $workdisk env > $workdisk/env.${JOB_ID} mkdir tmp${JOB_ID} cd tmp${JOB_ID} ####################### hdgeant ######################## # Run hdgeant rm -f control.in cat ${workroot}/farm/control.in.piplus | sed -e s/XXX/${JOB_ID}/g > ${workdisk}/control.in.piplus.${JOB_ID} ln -s ${workdisk}/control.in.piplus.${JOB_ID} control.in echo "hdgeant output redirected to log file: ${workdisk}/hdgeant_piplus_${JOB_ID}.log" hdgeant >& ${workdisk}/hdgeant_piplus_${JOB_ID}.log # Smear drift chamber hits mcsmear -n hdgeant_piplus_${JOB_ID}.hddm ####################### hd_root ######################## # Run hd_root with correct field echo "hd_root output redirected to log file: ${workdisk}/hd_root_piplus_${JOB_ID}.log" hd_root --config=${workroot}/farm/piplus.conf hdgeant_piplus_${JOB_ID}_smeared.hddm -o hd_root_piplus_${JOB_ID}.root >& ${workdisk}/hd_root_piplus_${JOB_ID}.log # Run hd_root with spoiled field 1 echo "hd_root output redirected to log file: ${workdisk}/hd_root_piplus_${JOB_ID}_01.log" hd_root --config=${workroot}/farm/piplus.conf -PBFIELD_MAP=Magnets/Solenoid/solenoid_1500_poisson_20090827_01 hdgeant_piplus_${JOB_ID}_smeared.hddm -o hd_root_piplus_${JOB_ID}_01.root >& ${workdisk}/hd_root_piplus_${JOB_ID}_01.log # Run hd_root with spoiled field 2 echo "hd_root output redirected to log file: ${workdisk}/hd_root_piplus_${JOB_ID}_02.log" hd_root --config=${workroot}/farm/piplus.conf -PBFIELD_MAP=Magnets/Solenoid/solenoid_1500_poisson_20090827_02 hdgeant_piplus_${JOB_ID}_smeared.hddm -o hd_root_piplus_${JOB_ID}_02.root >& ${workdisk}/hd_root_piplus_${JOB_ID}_02.log # Run hd_root with spoiled field 3 echo "hd_root output redirected to log file: ${workdisk}/hd_root_piplus_${JOB_ID}_03.log" hd_root --config=${workroot}/farm/piplus.conf -PBFIELD_MAP=Magnets/Solenoid/solenoid_1500_poisson_20090827_03 hdgeant_piplus_${JOB_ID}_smeared.hddm -o hd_root_piplus_${JOB_ID}_03.root >& ${workdisk}/hd_root_piplus_${JOB_ID}_03.log # Run hd_root with spoiled field 4 echo "hd_root output redirected to log file: ${workdisk}/hd_root_piplus_${JOB_ID}_04.log" hd_root --config=${workroot}/farm/piplus.conf -PBFIELD_MAP=Magnets/Solenoid/solenoid_1500_poisson_20090827_04 hdgeant_piplus_${JOB_ID}_smeared.hddm -o hd_root_piplus_${JOB_ID}_04.root >& ${workdisk}/hd_root_piplus_${JOB_ID}_04.log cp hdgeant_piplus_${JOB_ID}_smeared.hddm hd_root*.root $workdisk rm -f hdgeant_piplus_${JOB_ID}_smeared.hddm hd_root*.root