Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-08-30 08:16:12

0001 #!/bin/bash
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 #printenv
0011 
0012 echo "Done with setup"
0013 
0014 Sample=$1
0015 segment=$2
0016 
0017 outfile=/sphenix/tg/tg01/jets/bkimelman/Herwig_UE/Herwig_rootFiles_Aug5_2026/Herwig${Sample}_${segment}.root
0018 
0019 sample=`echo "$Sample" | tr '[:upper:]' '[:lower:]'`
0020 
0021 cd /sphenix/u/bkimelman/analysis/HERWIG_UE/
0022 
0023 if [ -f "filelists/Herwig${Sample}_${segment}.list" ];
0024 then
0025     rm filelists/Herwig${Sample}_${segment}.list
0026 fi
0027 
0028 #for i in {0..99};
0029 for ((i=segment; i<segment+20; i++));
0030 do
0031     #f=/sphenix/lustre01/sphnxpro/mdc2/herwig/g4hits/run0028/${sample}/G4Hits_Herwig_${Sample}-0000000028-$(printf "%06d" $((segment*50+i))).root
0032     f=/sphenix/lustre01/sphnxpro/mdc2/herwig/g4hits/run0028/${sample}/G4Hits_Herwig_${Sample}-0000000028-$(printf "%06d" $i).root
0033     if [ -f "$f" ];
0034     then
0035         echo $f >> filelists/Herwig${Sample}_${segment}.list
0036     fi
0037 done
0038 
0039 if [ ! -s "filelists/Herwig${Sample}_${segment}.list" ];
0040 then
0041     echo "file filelists/Herwig${Sample}_${segment}.list did not exist or was empty. Skipping"
0042     if [ -f "filelists/Herwig${Sample}_${segment}.list" ];
0043     then
0044         rm filelists/Herwig${Sample}_${segment}.list
0045     fi
0046     exit 1
0047 fi
0048 
0049 root -b -q Fun4All_HerwigUE.C\(-1,\"filelists/Herwig${Sample}_${segment}.list\",\"${outfile}\"\)