Skip to content

Commit 2bf6d93

Browse files
schwicketiborsimko
authored andcommitted
docs: expand DELPHI guide on using Docker
1 parent 2c03806 commit 2bf6d93

File tree

6 files changed

+61
-13
lines changed

6 files changed

+61
-13
lines changed

cernopendata/modules/fixtures/data/docs/delphi-guide-docker/delphi-guide-docker.md

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ In this guide we will use the latest Alma9 image.
1111
## Starting the container
1212
In this guide, we will assume to be running on a Linux desktop, which has podman and podman-docker installed. Some of the applications require a graphical interface, namely the CERNLIB applications paw, paw++ and kxterm, as well as the event display.
1313

14-
If you want to run on any data samples, please download them first. You can then attach them using the -v option of the ```podman run ``` command. Please check the podman documentation for more details.
14+
If you want to run on any data samples, please download them first. You can then attach them using the -v option of the `podman run` command. Please check the podman documentation for more details.
1515

1616
The image is configured with a local user called delphi. To start the container on a Linux based system, use:
1717

@@ -20,31 +20,79 @@ xhost + local:docker
2020
docker run --privileged --rm -it -e DISPLAY --network host -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.Xauthority:/home/delphi/.Xauthority --user delphi gitlab-registry.cern.ch/delphi/deployment/delphi/al9_64 /bin/bash -l
2121
```
2222

23-
This command will download the Alma9 based container and create a login shell for the DELPHI user. This image comes with support for EOS: when launched on a system which supports fuse file systems, the DELPHI data will be available inside the container beneath the path ```/eos/opendata/delphi```.
23+
This command will download the Alma9 based container and create a login shell for the DELPHI user. This image comes with support for EOS: when launched on a system which supports fuse file systems, the DELPHI data will be available inside the container beneath the path `/eos/opendata/delphi`. Note that due to the --rm option, the container will be destroyed when you exit it.
2424

25-
For Debian based distribution, you need to source the environment:
25+
<p><center><img src="/static/docs/delphi-guide-docker/delphi-container-start.png" width="60%"></center></p>
2626

27-
```
28-
. /etc/profile.d/delphi.sh
29-
```
30-
31-
Note that Debian and Ubuntu images currently do not yet support EOS.
32-
33-
## Contents of the image
27+
## Contents of the container image
3428
The image ships with the following modules:
3529

3630
* CERNLIB: This is the community CERNLIB version
3731
* [dstana](/record/80502): dstana is the analysis framework of DELPHI. For historical reasons there are 3 different versions available. The default one and the one which should be used is the pro version. Only switch to a non default version is you know what you are doing.
3832
* simana: Simana is the simulation and reconstruction framework of DELPHI. Note that it differs for each year. For the year 2000 there are 2 different versions: va0e and va0s. The former is valid for the first year, the latter for the second part of the year when a part of the TPC went offline.
3933
* [delgra](/record/80503): delgra is the event display of delphi.
4034

41-
## Running an example
42-
The binaries are installed in /delphi. The home directory of the delphi user contains a set of basic examples which can be used as templates. For example, to simulate a couple of events and scan them with the event display, do
35+
The software stack itself can be found in /delphi on the container.
36+
37+
## Running a simple example: Simulation and event display
38+
The home directory of the delphi user contains a set of basic examples which can be used as templates.
39+
### Event simulation
40+
As an example, let's generate some events with the Pythia generator, and pass them through the DELPHI detector simulation and reconstruction. Todo that, inside the container, first switch to
41+
the examples folder
4342

4443
```
4544
cd examples/pythia
46-
pythia.sh
45+
```
46+
Take a look at the script `pythia.sh` in that folder. In the first part, the configuration (also called the title card) for the generator is created and stored in a file named pythia.tit. Here, you can define the desired end states etc. Then, the generator binary is compiled using the provided Makefile. When the generator is run, it will store the generated events in a file called pythia.fadgen.
47+
48+
The last step consist in passing these generated events through the DELPHI detector simulation, reconstruction and short DST creation. The `runsim` script takes care of this. The requested detector setup is for the year 1994, using the latest processing version number. The laboratory is set to CERN. This setting is used to setup random number seeds only. The run nummber is set to 1000, and the beam energy to 45.625 which should match the settings in the generator. The gext version instructs the tools to read the external file pythia.fadgen which was just created.
49+
50+
Run the script by typing inside the pythia folder in the container via
51+
52+
```
53+
./pythia.sh
54+
```
55+
The script will create a bunch of files:
56+
57+
* simana.fadsim is the raw simulated data
58+
* simana.fadana is the reconstructed simulated data
59+
* simana.sdst is the short DST data which is what should be used for analysis.
60+
61+
### Scanning the short dst events
62+
63+
To run the event display, let's first make sure that the required folders are present. So please run
64+
```
4765
mkdir -p ~/graexe/data ~/graexe/hcopy ~/graexe/macro ~/graexe/run
66+
```
67+
68+
For convenience, let's copy over the short dst file
69+
70+
```
4871
cp simana.sdst ~/graexe/data
72+
```
73+
74+
Finally, start the event display from the home directory
75+
```
76+
cd
4977
rungra
5078
```
79+
80+
It should start up showing an hour glass, and a welcome box, like this:
81+
82+
<p><center><img src="/static/docs/delphi-guide-docker/delgra_startup_1.png" width="60%"></center></p>
83+
84+
After pressing on OK in the welcome box, the program will bring up the file dialog where you can select the folder and the file to be read in:
85+
86+
<p><center><img src="/static/docs/delphi-guide-docker/delgra_startup_2.png" width="60%"></center></p>
87+
88+
Switch to ~/graexe/data and select the simana.sdst file which we just copied there, and press Ok in that dialog. Next, it will ask for the number of event in this run to be read:
89+
90+
<p><center><img src="/static/docs/delphi-guide-docker/delgra_startup_3.png" width="60%"></center></p>
91+
92+
Just press OK to start reading the first event from the run, or press return.
93+
94+
You will see the first event, can rotate it, zoom in, and analyze it, or you can skip to the next event, going through them one by one. Here's a screen shot of event number 5, viewed at a slightly different angle:
95+
96+
<p><center><img src="/static/docs/delphi-guide-docker/delgra_startup_4.png" width="60%"></center></p>
97+
98+
Note that due to possibly different random number seeds, the sequence may look different for you.
349 KB
Loading
267 KB
Loading
242 KB
Loading
454 KB
Loading
111 KB
Loading

0 commit comments

Comments
 (0)