Skip to content

Commit 19ab424

Browse files
schwicketiborsimko
authored andcommitted
docs: enrich DELPHI guide pages
Reshuffles DELPHI guides to add new dedicated pages for simulation, event server, analysis. Improves text verbiage across DELPHI guides. Replaces a terminal screenshot to have a prompt better corresponding with the guides.
1 parent e619458 commit 19ab424

File tree

11 files changed

+728
-180
lines changed

11 files changed

+728
-180
lines changed

cernopendata/modules/fixtures/data/docs/delphi-getting-started/delphi-getting-started.md

Lines changed: 37 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,24 @@ This quick start guide is meant as a guide for the very first steps to get going
2525

2626
The DELPHI stack consists of the following modules:
2727

28-
* DELPHI DST analysis framework, also referred to as dstana. Please take a look at the [Skelana framework](/record/80502) for detailed information.
29-
* 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](/record/80504)
28+
* DELPHI DST analysis framework, also referred to as `dstana`. Please take a look at the [Skelana framework](/record/80502) for detailed information.
29+
* MonteCarlo production, includes simulation, reconstruction and short DST creation. Note that the DST format depends on the year. During LEP1, mainly [short DST](/record/80506) or [long DST](/record/80507) formats were used, while during LEP2 the [extendent short DST](/record/80505) format was the default.
30+
Note that the reconstruction code returns results in [full DST format](/record/80504). Analyses should always use short or extended short DST format, because these generally contain fixes which were applied after the reconstruction itself.
3031
* Event reconstruction from raw data, using the DELPHI event server.
3132
* The graphical DELPHI Event display, also referred to as [delgra](/record/80503).
3233

3334
## <a name="before"> Before you start ... </a>
3435

35-
Please read and accept the data access rules.
36-
37-
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).
38-
39-
Please read these before accessing the DELPHI software and data.
36+
Please read and accept the [DELPHI data access rules](/record/417). They can as well be viewd at the [the DELPHI web pages](https://delphi-www.web.cern.ch/delphi-www/delsec/finalrules/DELPHI_Data_preservation-8.pdf).
4037

4138
# <a name="access"> Accessing the software stack</a>
4239
There are two possible ways to access the software stack.
4340

44-
## <a name="docker"> Docker</a>
45-
A docker container is available which ships with all the modules installed. Please take a look [here](/docs/delphi-guide-docker).
41+
## <a name="docker"> Docker </a>
42+
A container image is available which ships with all the modules installed. Please take a look at the [DELPHI docker guide](/docs/delphi-guide-docker).
4643

4744
## <a name="cvmfs"> CVMFS</a>
48-
Binaries are also available from CVMFS, for a variety of different Linux flavors. Please take a look [here](/docs/delphi-guide-cvmfs).
45+
Binaries are also available from CVMFS, for a variety of different Linux flavors. Instructions can be found in our [dedicated CVMFS guide](/docs/delphi-guide-cvmfs).
4946

5047
# <a name="documentation"> Documentation</a>
5148
DELPHI manuals and notes are available from [https://cds.cern.ch/](http://cds.cern.ch/search?c=DELPHI&sc=1)
@@ -57,14 +54,16 @@ Here is a selection for getting started:
5754
* [DST contents](/record/80504)
5855

5956
## <a name="sources">Source code</a>
60-
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.
57+
The sources are available from https://gitlab.cern.ch/delphi. Some modules still requires CERN authentication. The plan is to release the software in the near future.
6158

6259
## <a name="compilers">Compilers</a>
63-
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.
60+
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
61+
supported operating system. Recommended compiler and linker flags are set by the environment and should be used when building software linking with the DELPHI libraries.
6462

6563
## <a name="help">Getting help</a>
6664

67-
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!
65+
The collaboration main contact for data preservation is the mailing list [email protected]. Support can only be given on a best effort basis.
66+
Suggestions and feedback is of course welcome!
6867

6968
# <a name="examples">Examples</a>
7069
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.
@@ -82,100 +81,43 @@ Simulation is reconstruction code is supported for all the years 1992 and later.
8281
* The DELPHI simulation code comes with a few build-in generators. Typically, generators are run externally though.
8382
* 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.
8483

84+
There is a [dedicated guide](delphi-guide-simulation) available with more details about how to run DELPHI simulations.
85+
8586
## <a name="simulinter"> Creating Monte Carlo samples interactively</a>
8687

8788
### <a name="internalgen">Using internal generators</a>
8889
For creating a few events with a build-in generator run
89-
```
90-
runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -igen qqps -NEVMAX 10
9190

9291
```
93-
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.
94-
95-
It will as well pass the events through the detector simulation with the following settings:
92+
$ runsim -VERSION v94c -LABO CERN -NRUN 1000 -EBEAM 45.625 -igen qqps -NEVMAX 10
9693
97-
* Run number -1000 (negative numbers indicate simulated events)
98-
* Laboratory identifier CERN (please change that if possible)
99-
* year 2000 (no TPC sector 6 period)
100-
101-
The events will be reconstructed and an extended short DST file will be created, which is ready for analysis.
102-
103-
Created files:
104-
105-
* simana.fadsim : detector simulation output (corresponds to raw data, not to be used directly)
106-
* simana.fadana : reconstructed output, full DST format (not to be used directly)
107-
* simana.xsdst : short DST output for analysis
94+
```
95+
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 and the detector setup of 1994.
10896

109-
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.
97+
It will as well pass the events through the detector simulation, and create a short DST file named `simana.sdst` which can be used for analysis, scanning etc.
11098

11199
### <a name="externalgen">Using external generators</a>
112-
In this case the generator is run externally and the output is written to a file in a specific format. This can then
113-
be passed through the detector simulation with
100+
In this case the generator is run externally and the output is written to a file
101+
in a specific format. This can then be passed through the detector simulation with
102+
114103
```
115-
runsim -VERSION va0u -LABO CERN -NRUN 1000 -EBEAM 45.625 -gext generated.lund -NEVMAX 10
104+
$ runsim -VERSION 94c -LABO CERN -NRUN 1000 -EBEAM 45.625 -gext generated.lund -NEVMAX 10
116105
```
117-
Old executables for generators can be found in /cvmfs/delphi.cern.ch/mc-production/generators/pgf77_glibc2.2
118106

119-
A source code example of DELPHI tuned Pythia can be found in the example tree.
107+
Again, this will create a short DST file name simana.sdst. Note that for the LEP 2 phase, a sol called extended short DST file will be created, which is typically called simana.xsdst instead.
108+
120109

121110
## <a name="anajobinter">Running an analysis job on the result</a>
122-
The following script can be run interactively or submitted to a batch farm with DELPHI setup
111+
A [dedicated guide](delphi-guide-analysis) is availabe with more details about how to run an analysis job for DELPHI.
123112

124-
```
125-
#!/bin/bash
126-
pgm=skelana
127-
128-
export DELLIBS=`dellib skelana dstana pxdst vfclap vdclap ux tanagra ufield bsaurus herlib trigger uhlib dstana`
129-
export CERNLIBS=`cernlib genlib packlib kernlib ariadne herwig jetset74`
130-
echo "+OPTION VERbose" > $pgm.cra1
131-
echo "+USE, ${PLINAM}." >> $pgm.cra1
132-
cat $DELPHI_PAM/skelana.cra >> $pgm.cra1
133-
134-
# modify
135-
ycmd=`which nypatchy`
136-
command="$ycmd - $pgm.f $pgm.cra1 $pgm.ylog $pgm.c - - ${pgm}R.f .go"
137-
echo "Running $command"
138-
eval $command
139-
140-
# compile
141-
for ending in .f .F ; do
142-
ls *$ending >/dev/null 2>&1
143-
if [ $? -eq 0 ]; then
144-
for file in *$ending ; do
145-
$FCOMP $FFLAGS -c $file
146-
done
147-
fi
148-
done
149-
150-
for ending in *.c *.C *.cc ; do
151-
ls *$ending >/dev/null 2>&1
152-
if [ $? -eq 0 ]; then
153-
for file in *ending ; do
154-
$CCOMP $CFLAGS -c $file
155-
done
156-
fi
157-
done
158-
159-
# link
160-
$FCOMP $LDFLAGS *.o -o $pgm.exe $ADDLIB $DELLIBS $CERNLIBS
161-
162-
# cleanup
163-
rm -f *.f *.c *.o
164-
165-
# create input file
166-
echo "FILE = simana.xsdst" > ./PDLINPUT
167-
168-
# execute
169-
./$pgm.exe 1>$pgm.log 2>$pgm.err
170-
```
113+
The DELPHI analysis framework is called `skelana`. The way to write analysis code is by overriding one or more of the following Fortran functions:
171114

172-
This simple script will:
115+
* `USER00` for the initialisation at the start of the run
116+
* `USER01` for the event selection. It should return 0 to skip the current event and 1 to read it.
117+
* `USER02` is called for each selected event.
118+
* `USER99` is called at the end of the run
173119

174-
* get the sources
175-
* run nypatchy to create the compilable Fortran input files
176-
* compile the Fortran code to create an executable file
177-
* create a data input fiel which would read **simana.xsdst** from the local folder where the executable will be started
178-
* run the job
120+
An example can be found in the examples folder on the [DELPHI container](delphi_guide_docker) or on [CERN gitlab](https://gitlab.cern.ch/delphi/examples). Take a look e.g. at the `dump` folder there.
179121

180122
## <a name="nicknames">Using nicknames</a>
181123
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.
@@ -186,40 +128,27 @@ In this case, the PDLINPUT file created by the script above should contain the k
186128
```bash
187129
FAT = short94_c2
188130
```
131+
189132
to read 94 C2 data. It will automatically resolve the data files and loop over all of them.
190133

191134
## <a name="rawdata">Raw data access</a>
192135
The DELPHI event server can be used to pick and reprocss individual events from raw data.
193-
It supports different modes:
194-
195-
* *pick* only selects the raw data of a specific event and returns that
196-
* *delana* picks an event from raw data, and runs the reconstruction code on it, returning a full dst file#
197-
* *dstana* picks the event from raw data, runs reconstruction and dst creation on it, subsequently
198-
199-
The *wired* option is no longer supported as the wired code no longer exists.
136+
A [dedicated guide](delphi-guide-eventserver) is available on the DELPHI event server.
200137

201138
Example:
202139
```
203-
des -m dstana -e 84078:10815
204-
```
205-
creates the following output files:
140+
$ des -m dstana -e 84078:10815
206141
```
207-
R84078_E10815.dst
208-
dstana.dst
209-
```
210-
where the first one is the full DST output, and the second the short dst one.
211-
212-
Note: Running the event server requires access to the DELPHI raw data sets.
213142

214143
## <a name="delgra">Event visualisation</a>
215144
After setting up the DELPHI environment you can start the DELPHI event display with
216145

217146
```
218-
cd
219-
rungra
147+
$ cd
148+
$ rungra
220149
```
221150

222-
For convenience, copy the files you want to scan to ~/graexe/data.
151+
For convenience, copy the files you want to scan to `~/graexe/data`.
223152
Please take a look at the [DELGRA guide](delphi-guide-delgra) on how to proceed.
224153

225154
## <a name="more">More examples</a>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"body": {
4+
"content": "delphi-guide-analysis.md",
5+
"format": "md"
6+
},
7+
"experiment": [
8+
"DELPHI"
9+
],
10+
"short_description": {
11+
"content": "This guide describes how to run a simple DELPHI analysis."
12+
},
13+
"slug": "delphi-guide-analysis",
14+
"tags": [
15+
"Getting Started"
16+
],
17+
"title": "Running a simple DELPHI analysis job interactively",
18+
"type": {
19+
"primary": "Documentation",
20+
"secondary": [
21+
"Guide"
22+
]
23+
}
24+
}
25+
]

0 commit comments

Comments
 (0)