3
# This runs pgs on the pythia_events.hep
5
# Usage: run_pgs [pgsdir [para/serial [run_name]]]
6
# where pgsdir is the path to the pgs executable
15
if [ ! -e ../Cards/delphes_card.dat ]; then
16
echo "No delphes_card.dat found. Quitting..."
20
if [ ! -e $delphesdir/Delphes ]; then
21
echo "No Delphes executable found. Quitting..."
25
echo $$ >> ../myprocid
28
echo pythia_events.hep > inputfiles.list
30
# Set delphes path in delphes_card.dat
32
sed -e "s:DELPHESDIR:$delphesdir:g" ../Cards/delphes_card.dat > ../Cards/tmp_card.dat
35
$delphesdir/Delphes inputfiles.list delphes.root ../Cards/tmp_card.dat ../Cards/delphes_trigger.dat
36
$delphesdir/LHCO_Only delphes.root
39
if [ -e delphes_events.lhco ]; then
40
# write the delphes banner
41
sed -e "s/^/#/g" ${run}/${run}_${tag}_banner.txt > ${run}/${tag}_delphes_events.lhco
42
if [ ${cross} != "0" ];then
43
echo "## Integrated weight (pb) : ${cross}" >> ${run}/${tag}_delphes_events.lhco
45
cat delphes_events.lhco >> ${run}/${tag}_delphes_events.lhco
46
rm -f delphes_events.lhco