Skip to content
Snippets Groups Projects
Commit 9c12d56c authored by Ulrich Schwickerath's avatar Ulrich Schwickerath
Browse files

document MC production with internal generator and simple analysis job

parents
Branches
No related tags found
No related merge requests found
# DELPHI software simple examples
This repository shows basic examples of how to run the software stack and perform various tasks.
## [Creating Monte Carlo samples interactively](create_mc.sh)
To creating a few events with a build-in generator run
```
runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -igen qqps -NEVMAX 10
```
This will:
* Create 10 Z-> qqbar events
* at Beam energy 45.625 GeV (ECM 91.25 GeV)
with the build-in QQPS generator.
It will as well pass the events through the detector simulation with the following settings:
* Run number -1000 (negative numbers indicate simulated events)
* Laboratory identifier CERN
* year 2000 (no TPC sector 6 period)
reconstruct them and create an extended short DST file which is ready for analysis.
Created files:
* simana.fadsim : detector simulation output (corresponds to raw data)
* simana.fadana : reconstructed output, full DST format
* simana.xsdst : short DST output for analysis
Analysis can be run as well on the full DST output in which case a bunch of packages will be rerun.
## [Running an analysis job interactively](testjob.sh)
The following script can be run interactively or submitted to a batch farm with DELPHI setup
```
#!/bin/bash
pgm=skelana
export DELLIBS=`dellib skelana dstana pxdst vfclap vdclap ux tanagra ufield bsaurus herlib trigger uhlib dstana`
export CERNLIBS=`cernlib genlib packlib kernlib ariadne herwig jetset74`
echo "+OPTION VERbose" > $pgm.cra1
echo "+USE, ${PLINAM}." >> $pgm.cra1
cat $DELPHI_PAM/skelana.cra >> $pgm.cra1
# modify
ycmd=`which nypatchy`
command="$ycmd - $pgm.f $pgm.cra1 $pgm.ylog $pgm.c - - ${pgm}R.f .go"
echo "Running $command"
eval $command
# compile
for ending in .f .F ; do
ls *$ending >/dev/null 2>&1
if [[ $? == 0 ]]; then
for file in *$ending ; do
$FCOMP $FFLAGS -c $file
done
fi
done
for ending in *.c *.C *.cc ; do
ls *$ending >/dev/null 2>&1
if [[ $? == 0 ]]; then
for file in *ending ; do
$CCOMP $CFLAGS -c $file
done
fi
done
# link
$FCOMP $LDFLAGS *.o -o $pgm.exe $ADDLIB $DELLIBS $CERNLIBS
# cleanup
rm -f *.f *.c *.o
# create input file
echo "FILE = simana.xsdst" > ./PDLINPUT
# execute
./$pgm.exe 1>$pgm.log 2>$pgm.err
```
It
* gets the sources
* runs nypatch to create the Fortran input files
* compiles the fortran to create an executable file
* creates a data input fiel which would read **simana.xsdst** from the local folder where the executable will be started
* runs the job
#!/bin/bash
# produce 10 jetset events with build-in generator,
# simulate
# reconstruct
# and create short DST output
runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -igen qqps -NEVMAX 10
#!/bin/bash
#set -x
pgm=skelana
export DELLIBS=`dellib skelana dstana pxdst vfclap vdclap ux tanagra ufield bsaurus herlib trigger uhlib dstana`
export CERNLIBS=`cernlib genlib packlib kernlib ariadne herwig jetset74`
echo "+OPTION VERbose" > $pgm.cra1
echo "+USE, ${PLINAM}." >> $pgm.cra1
cat $DELPHI_PAM/skelana.cra >> $pgm.cra1
# modify
ycmd=`which nypatchy`
command="$ycmd - $pgm.f $pgm.cra1 $pgm.ylog $pgm.c - - ${pgm}R.f .go"
echo "Running $command"
eval $command
# compile
for ending in .f .F ; do
ls *$ending >/dev/null 2>&1
if [[ $? == 0 ]]; then
for file in *$ending ; do
$FCOMP $FFLAGS -c $file
done
fi
done
for ending in *.c *.C *.cc ; do
ls *$ending >/dev/null 2>&1
if [[ $? == 0 ]]; then
for file in *ending ; do
$CCOMP $CFLAGS -c $file
done
fi
done
# link
$FCOMP $LDFLAGS *.o -o $pgm.exe $ADDLIB $DELLIBS $CERNLIBS
# cleanup
rm -f *.f *.c *.o
# create input file
echo "FILE = simana.xsdst" > ./PDLINPUT
# execute
./$pgm.exe 1>$pgm.log 2>$pgm.err
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment