|
| 1 | +FIXME: Introduce table of contents |
| 2 | + |
| 3 | +# Introduction |
| 4 | +This quick start guide is meant as a guide for the very first steps to get going with DELPHI software and data access. |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +The DELPHI stack consists of the following modules: |
| 9 | + |
| 10 | +* DELPHI DST analysis framework, also referred to as dstana. Please take a look at the [Skelana framework](docs/27002) for detailed information. |
| 11 | +* MonteCarlo production, consisting of simulation, reconstruction and short DST production. Note that the DST format depends on the year. During LEP1, mainly short DST was used, while during LEP2 the extendent short DST format was used. The various formats are described [here](docs/27004) |
| 12 | +* Event reconstruction from raw data, using the DELPHI event server. |
| 13 | +* The graphical DELPHI Event display, also referred to as [delgra](docs/27003). |
| 14 | + |
| 15 | +## Before you start ... |
| 16 | + |
| 17 | +Please read and accept the data access rules. |
| 18 | + |
| 19 | +DELPHI data access rules are available [here](/record/417), or from [the DELPHI web pages](https://delphi-www.web.cern.ch/delphi-www/delsec/finalrules/DELPHI_Data_preservation-8.pdf). |
| 20 | + |
| 21 | +Please read these before accessing the DELPHI software and data. |
| 22 | + |
| 23 | +## Accessing the software stack |
| 24 | +There are two possible ways to access the software stack. |
| 25 | + |
| 26 | +### Docker |
| 27 | +A docker container is available which ships with all the modules installed. Please take a look [here](docs/delpi-guide-docker) |
| 28 | + |
| 29 | +### CVMFS |
| 30 | +Binaries are also available from CVMFS, for a variety of different Linux flavors. There are no native Windows or Apple ports available for the time being. |
| 31 | + |
| 32 | +This method is convenient if you are running a desktop or a virtual machine with one of the supported Linux flavors on it. |
| 33 | + |
| 34 | +#### Requirements |
| 35 | +You will need to have: |
| 36 | + |
| 37 | +* /cvmfs/delphi.cern.ch mounted. Documentation can be found at https://cvmfs.readthedocs.io/en/stable/ |
| 38 | +* /eos/opendata/delphi mounted. Documentation can be found at |
| 39 | +* A list of additional packages installed, see https://gitlab.cern.ch/delphi/deployment for more information: |
| 40 | + * general: tcsh xfonts-100dpi xfonts-75dpi libxfont2 |
| 41 | + * compilers: cmake gcc g++ gfortran |
| 42 | + * library packages: libx11 libglu1-mesa xutils libmotif r-base xutils libxbae libxaw7 libssl libglew libdlm |
| 43 | + |
| 44 | +Please check the instructions at https://cvmfs.readthedocs.io/en/stable/cpt-quickstart.html and https://eoscta.docs.cern.ch/install/eos/ and https://eos-web.web.cern.ch/eos-web. |
| 45 | + |
| 46 | +#### Initialising the environment: |
| 47 | +For C-Shell (csh, tcsh ), do |
| 48 | +``` |
| 49 | + source /cvmfs/delphi.cern.ch/setup.csh |
| 50 | +``` |
| 51 | + |
| 52 | +For Bourne shell (sh, bash, zsh, ...), type |
| 53 | +``` |
| 54 | +. /cvmfs/delphi.cern.ch/setup.sh |
| 55 | +``` |
| 56 | +If using the container, please use ```/etc/profile.d/delphi.sh``` or ```/etc/profile.d/delphi.csh``` instead. |
| 57 | + |
| 58 | +After sourcing the environment, make sure that the environment variable **DELPHI_DATA_ROOT** points to the tip of the data area. This is specifically important if you copied the data sets you want to use locally. The default is ```/eos/experiment/delphi/castor2015```. |
| 59 | + |
| 60 | +## Documentation |
| 61 | +DELPHI manuals and notes are available from [https://cds.cern.ch/](http://cds.cern.ch/search?c=DELPHI&sc=1) |
| 62 | + |
| 63 | +Here is a selection for getting started: |
| 64 | + |
| 65 | +* [Analysis framework](/docs/27002) |
| 66 | +* [Event display](/docs/27003) |
| 67 | +* [DST contents](/docs/27004) |
| 68 | + |
| 69 | +## Source code |
| 70 | +The sources are available on https://gitlab.cern.ch/delphi. Some modules still requires CERN authentication. The plan is to release the software in the near future. |
| 71 | + |
| 72 | +## Compilers |
| 73 | +The DELPHI stack is mostly written in Fortran, with some bits written in C. Only gfortran and GNU gcc are supported. We use the gfortran version which comes with the supported operating system. |
| 74 | + |
| 75 | +## Getting help |
| 76 | + |
| 77 | +The collaboration main contact for data preservation is the mailing list [email protected]. Support can only be given on a best effort basis. Suggestions and feedback is of course welcome! |
| 78 | + |
| 79 | +# Examples |
| 80 | +Some basic examples of how to run the software stack and perform various tasks can be found in the ```/cvmfs/delphi.cern.ch/examples``` tree. |
| 81 | + |
| 82 | +In the following, we will |
| 83 | +* Create some Monte Carlo events and run simulation, reconstruction and DST production on them |
| 84 | + * First, we will show how to do so interactively |
| 85 | + * Then, how to do this on the batch farm at CERN |
| 86 | +* Show how to read the result from an analysis job |
| 87 | + |
| 88 | +## About simulation |
| 89 | +Simulation is reconstruction code is supported for all the years 1992 and later. The code differs a bit for each of the years. |
| 90 | + |
| 91 | + * The DELPHI simulation code comes with a few build-in generators. Typically, generators are run externally though. |
| 92 | + * The script *runsim* is used to do the detector simulation, reconstruction and short DST creation steps. Use -gext to process an external file from some generator. |
| 93 | + |
| 94 | +## Creating Monte Carlo samples interactively |
| 95 | + |
| 96 | +### Using internal generators |
| 97 | +For creating a few events with a build-in generator run |
| 98 | +``` |
| 99 | +runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -igen qqps -NEVMAX 10 |
| 100 | +
|
| 101 | +``` |
| 102 | +This will create 10 Z-> qqbar events at a beam energy of 45.625 GeV (ECM 91.25 GeV), using the build-in QQPS generator. |
| 103 | + |
| 104 | +It will as well pass the events through the detector simulation with the following settings: |
| 105 | + |
| 106 | +* Run number -1000 (negative numbers indicate simulated events) |
| 107 | +* Laboratory identifier CERN (please change that if possible) |
| 108 | +* year 2000 (no TPC sector 6 period) |
| 109 | + |
| 110 | +The events will be reconstructed and an extended short DST file will be created, which is ready for analysis. |
| 111 | + |
| 112 | +Created files: |
| 113 | + |
| 114 | +* simana.fadsim : detector simulation output (corresponds to raw data, not to be used directly) |
| 115 | +* simana.fadana : reconstructed output, full DST format (not to be used directly) |
| 116 | +* simana.xsdst : short DST output for analysis |
| 117 | + |
| 118 | +In principle, analysis code can be run as well on the full DST output, however, this requires that a bunch of modules and fixes have to be rerun on top of the data, before they can be used. |
| 119 | + |
| 120 | +### Using external generators |
| 121 | +In this case the generator is run externally and the output is written to a file in a specific format. This can then |
| 122 | +be passed through the detector simulation with |
| 123 | +``` |
| 124 | +runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -gext generated.lund -NEVMAX 10 |
| 125 | +``` |
| 126 | +Old executables for generators can be found in /cvmfs/delphi.cern.ch/mc-production/generators/pgf77_glibc2.2 |
| 127 | + |
| 128 | +A source code example of DELPHI tuned Pythia can be found in the example tree. |
| 129 | + |
| 130 | +## Running an analysis job on the result |
| 131 | +The following script can be run interactively or submitted to a batch farm with DELPHI setup |
| 132 | + |
| 133 | +``` |
| 134 | +#!/bin/bash |
| 135 | +pgm=skelana |
| 136 | +
|
| 137 | +export DELLIBS=`dellib skelana dstana pxdst vfclap vdclap ux tanagra ufield bsaurus herlib trigger uhlib dstana` |
| 138 | +export CERNLIBS=`cernlib genlib packlib kernlib ariadne herwig jetset74` |
| 139 | +echo "+OPTION VERbose" > $pgm.cra1 |
| 140 | +echo "+USE, ${PLINAM}." >> $pgm.cra1 |
| 141 | +cat $DELPHI_PAM/skelana.cra >> $pgm.cra1 |
| 142 | +
|
| 143 | +# modify |
| 144 | +ycmd=`which nypatchy` |
| 145 | +command="$ycmd - $pgm.f $pgm.cra1 $pgm.ylog $pgm.c - - ${pgm}R.f .go" |
| 146 | +echo "Running $command" |
| 147 | +eval $command |
| 148 | +
|
| 149 | +# compile |
| 150 | +for ending in .f .F ; do |
| 151 | + ls *$ending >/dev/null 2>&1 |
| 152 | + if [ $? -eq 0 ]; then |
| 153 | + for file in *$ending ; do |
| 154 | + $FCOMP $FFLAGS -c $file |
| 155 | + done |
| 156 | + fi |
| 157 | +done |
| 158 | +
|
| 159 | +for ending in *.c *.C *.cc ; do |
| 160 | + ls *$ending >/dev/null 2>&1 |
| 161 | + if [ $? -eq 0 ]; then |
| 162 | + for file in *ending ; do |
| 163 | + $CCOMP $CFLAGS -c $file |
| 164 | + done |
| 165 | + fi |
| 166 | +done |
| 167 | +
|
| 168 | +# link |
| 169 | +$FCOMP $LDFLAGS *.o -o $pgm.exe $ADDLIB $DELLIBS $CERNLIBS |
| 170 | +
|
| 171 | +# cleanup |
| 172 | +rm -f *.f *.c *.o |
| 173 | +
|
| 174 | +# create input file |
| 175 | +echo "FILE = simana.xsdst" > ./PDLINPUT |
| 176 | +
|
| 177 | +# execute |
| 178 | +./$pgm.exe 1>$pgm.log 2>$pgm.err |
| 179 | +``` |
| 180 | + |
| 181 | +This simple script will: |
| 182 | + |
| 183 | +* get the sources |
| 184 | +* run nypatchy to create the compilable Fortran input files |
| 185 | +* compile the Fortran code to create an executable file |
| 186 | +* create a data input fiel which would read **simana.xsdst** from the local folder where the executable will be started |
| 187 | +* run the job |
| 188 | + |
| 189 | +## Using nicknames |
| 190 | +DELPHI data is organised in data sets which are identified via a nickname. When using opendata, each nickname comes with a corresponding DOI which you can quote. |
| 191 | + |
| 192 | +To analyse data, use the nicknames which you can find at http://delphiwww.cern.ch/offline/data/castor/html. |
| 193 | +In this case, the PDLINPUT file created by the script above should contain the keyword PDL, followed by the nickname, e.g. |
| 194 | + |
| 195 | +```bash |
| 196 | +FAT = short94_c2 |
| 197 | +``` |
| 198 | +to read 94 C2 data. It will automatically resolve the data files and loop over all of them. |
| 199 | + |
| 200 | +# Raw data access |
| 201 | +The DELPHI event server can be used to pick and reprocss individual events from raw data. |
| 202 | +It supports different modes: |
| 203 | + |
| 204 | +* *pick* only selects the raw data of a specific event and returns that |
| 205 | +* *delana* picks an event from raw data, and runs the reconstruction code on it, returning a full dst file# |
| 206 | +* *dstana* picks the event from raw data, runs reconstruction and dst creation on it, subsequently |
| 207 | + |
| 208 | +The *wired* option is no longer supported as the wired code no longer exists. |
| 209 | + |
| 210 | +Example: |
| 211 | +``` |
| 212 | +des -m dstana -e 84078:10815 |
| 213 | +``` |
| 214 | +creates the following output files: |
| 215 | +``` |
| 216 | +R84078_E10815.dst |
| 217 | +dstana.dst |
| 218 | +``` |
| 219 | +where the first one is the full DST output, and the second the short dst one. |
| 220 | + |
| 221 | +Note: Running the event server requires access to the DELPHI raw data sets. |
| 222 | + |
| 223 | +## Event visualisation: |
| 224 | +After setting up the DELPHI environment you can start the DELPHI event display with |
| 225 | +``` |
| 226 | +rungra |
| 227 | +``` |
| 228 | +Note that the event display can read only reconstructed data, not raw data. Both full and short DST work. |
| 229 | + |
| 230 | +# More examples |
| 231 | +More examples can be found at https://gitlab.cern.ch/delphi/examples. |
0 commit comments