File indexing completed on 2026-08-30 08:16:12
0001
0002
0003 export USER="$(id -u -n)"
0004 export LOGNAME=${USER}
0005 export HOME=/sphenix/u/${LOGNAME}/macros/detectors/sPHENIX/
0006 export MYINSTALL=/sphenix/user/bkimelman/sPHENIX/install/
0007
0008 source /opt/sphenix/core/bin/sphenix_setup.sh -n
0009 source /opt/sphenix/core/bin/setup_local.sh $MYINSTALL
0010
0011
0012 echo "Done with setup"
0013
0014 Sample=$1
0015 segment=$2
0016
0017 SubSample=$Sample
0018 if [[ "$SubSample" == "MB" ]];
0019 then
0020 SubSample=Detroit
0021 fi
0022
0023 outfile=/sphenix/tg/tg01/jets/bkimelman/Herwig_UE/Pythia_rootFiles_July20_2026/Pythia${Sample}_${segment}.root
0024
0025 sample=`echo "$Sample" | tr '[:upper:]' '[:lower:]'`
0026 subsample=`echo "$SubSample" | tr '[:upper:]' '[:lower:]'`
0027
0028 cd /sphenix/u/bkimelman/analysis/HERWIG_UE/
0029
0030 if [ -f "filelists/Pythia${Sample}_${segment}.list" ];
0031 then
0032 rm filelists/Pythia${Sample}_${segment}.list
0033 fi
0034
0035
0036 for ((i=segment; i<segment+20; i++));
0037 do
0038 f=/sphenix/lustre01/sphnxpro/mdc2/js_pp200_signal/g4hits/run0028/${subsample}/G4Hits_pythia8_${SubSample}-0000000028-$(printf "%06d" $i).root
0039 if [ -f "$f" ];
0040 then
0041 echo $f >> filelists/Pythia${Sample}_${segment}.list
0042 fi
0043 done
0044
0045 if [ ! -s "filelists/Pythia${Sample}_${segment}.list" ];
0046 then
0047 echo "file filelists/Pythia${Sample}_${segment}.list did not exist or was empty. Skipping"
0048 if [ -f "filelists/Pythia${Sample}_${segment}.list" ];
0049 then
0050 rm filelists/Pythia${Sample}_${segment}.list
0051 fi
0052 exit 1
0053 fi
0054
0055 root -b -q Fun4All_HerwigUE.C\(-1,\"filelists/Pythia${Sample}_${segment}.list\",\"${outfile}\"\)