~maddevelopers/mg5amcnlo/WWW5_caching

« back to all changes in this revision

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

  • 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 Delphes 3 on the pythia_events.hep
 
4
#
 
5
#  Usage: run_delphes3 [delphes3dir [para/serial [run_name]]]
 
6
#  where delphes3dir is the path to the delphes3 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/DelphesSTDHEP ]; then
 
21
  echo "No Delphes executable found at $delphesdir/DelphesSTDHEP. Quitting..."
 
22
  exit
 
23
fi
 
24
 
 
25
echo $$ >> ../myprocid
 
26
 
 
27
# Set delphes path in delphes_card.dat
 
28
 
 
29
$delphesdir/DelphesSTDHEP ../Cards/delphes_card.dat delphes.root pythia_events.hep
 
30
$delphesdir/root2lhco delphes.root delphes_events.lhco
 
31
 
 
32
if [ -e delphes_events.lhco ]; then
 
33
# write the delphes banner
 
34
    sed -e "s/^/#/g" ${run}/${run}_${tag}_banner.txt > ${run}/${tag}_delphes_events.lhco
 
35
    echo "##  Integrated weight (pb)  : ${cross}" >> ${run}/${tag}_delphes_events.lhco
 
36
    cat delphes_events.lhco >> ${run}/${tag}_delphes_events.lhco
 
37
    rm -f delphes_events.lhco
 
38
fi