~maddevelopers/mg5amcnlo/WWW5_caching

« back to all changes in this revision

Viewing changes to users/mardelcourt/PROC_970226/PROC_970226/bin/internal/run_delphes

  • Committer: John Doe
  • Date: 2013-03-25 20:27:02 UTC
  • Revision ID: john.doe@gmail.com-20130325202702-5sk3t1r8h33ca4p4
first clean version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
#  This runs pgs on the pythia_events.hep
 
4
#
 
5
#  Usage: run_pgs [pgsdir [para/serial [run_name]]]
 
6
#  where pgsdir is the path to the pgs executable
 
7
 
 
8
delphesdir=$1
 
9
run=$2
 
10
tag=$3
 
11
cross=$4 
 
12
 
 
13
main=`pwd`
 
14
 
 
15
if [ ! -e ../Cards/delphes_card.dat ]; then
 
16
  echo "No delphes_card.dat found. Quitting..."
 
17
  exit
 
18
fi
 
19
 
 
20
if [ ! -e $delphesdir/Delphes ]; then
 
21
  echo "No Delphes executable found. Quitting..."
 
22
  exit
 
23
fi
 
24
 
 
25
echo $$ >> ../myprocid
 
26
 
 
27
 
 
28
echo pythia_events.hep > inputfiles.list
 
29
 
 
30
# Set delphes path in delphes_card.dat
 
31
 
 
32
sed -e "s:DELPHESDIR:$delphesdir:g" ../Cards/delphes_card.dat > ../Cards/tmp_card.dat
 
33
 
 
34
 
 
35
$delphesdir/Delphes inputfiles.list delphes.root ../Cards/tmp_card.dat ../Cards/delphes_trigger.dat
 
36
$delphesdir/LHCO_Only delphes.root
 
37
 
 
38
 
 
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
 
44
    fi
 
45
    cat delphes_events.lhco >> ${run}/${tag}_delphes_events.lhco
 
46
    rm -f delphes_events.lhco
 
47
fi