The LHCb online event display
The LHCb online event display shows the pp collisions in the LHCb detector in both three and two dimensions.
The display is based on the
WebGL
graphics library and written in
JavaScript.
This allows to use the display simply in the web browser, on any modern operating system, without the need to install additional software.
The display runs
online is located at
https://lbevent.cern.ch/EventDisplay/index.html
but it is also possible to run the display offline.
Basic usage of the event display
Basic usage of the event display is covered in the two presentations below.
Technical details
The display code can be found in the
Online/WebGLdisplay
project.
The display consists of two main parts, the web-portion (the actual display) and the converter
- the display consists of the javascript code (
svn+ssh://svn.cern.ch/reps/lhcb/OnlineExtra/trunk/Online/WebGLDisplay/WebGLDisplaySys/web/
) to display files in a .json
text-format. These files need to be generated using the converter and are expected to be in the subdirectory events/
. One .json
file is used per event. Furthermore, the filenames of all available events need to be present in the events/events.json
file (see the svn repository for an example).
- the converter is used to generate
.json
files from .raw/.dst
files. The converter is a DaVinci algorithm, it can be found at svn+ssh://svn.cern.ch/reps/lhcb/Online/trunk/Online/WebGLDisplay/JsonConverter
. An older version of the converter is the attached gaudipython script convertDSTtoJSON.py and which is tested using DaVinci v35r1. Currently only the gaudipython script supports the generation of secondary vertices.
The display in the online environment
The display is run on the online environment (edit from plus cluster, connecting via lbgw), and the code is installed on NFS in:
/group/online/dataflow/cmtuser/WebGLDisplay
which is a project containing the checkout/build of the JSONConverter, and the options to run the task.
The generated event files can be found in:
/group/online/dataflow/cmtuser/EventDisplay
The Online system automatically starts:
/group/online/dataflow/cmtuser/WebGLDisplay/WebGLDisplaySys/scripts/runWebGLDisplay.sh
on host
mona0802
(as
LHCb_WebGLSrv_0
).
It restarts it automatically when it detects it has stopped.
To kill the task:
. /group/online/dataflow/scripts/shell_macros.sh
tmKill -N mona08 -m mona0802 LHCb_WebGLSrv_0
To view its log:
. /group/online/dataflow/scripts/shell_macros.sh
errlog -N mona08 -m mona0802 -s gaudi
Using the event display offline
- To use the display offline, first the display code from
svn+ssh://svn.cern.ch/reps/lhcb/OnlineExtra/trunk/Online/WebGLDisplay/WebGLDisplaySys/web/
needs to be checked out and copied to some directory that is published by a webserver, for example ~/www on lxplus.
- Then,
.json
files need to be generated using the converter, either with the convertDSTtoJSON.py gaudipython script or using the DaVinci algorithm from svn+ssh://svn.cern.ch/reps/lhcb/OnlineExtra/trunk/Online/WebGLDisplay/JsonConverter
. An example script for running the DaVinci algorithm is attached (runconverter.py). For the generation of the .json
a selected .dst
is needed, a script to filter according to run/event number is attached as well (selsignal.py).
- Finally, the
.json
files need to be copied to the events/
subdirectory and the events/events.json
file needs to be created (an example is already present in svn).
Editing .json files
The
.json
files generated are text files and thus it is possible to modify them manually, below some operations that might be of interest
- The tracks are given as list of PARTICLES. If you are interested in only some of the tracks, you can remove all others.
- If different material settings (line width, color, etc.) are needed for anything but the signal tracks, one can change the particle types to something not used in the signal decay and modify the corresponding material in index.html
- tracks don't stop at the corresponding SV. Since all points of a track can be edited this can be fixed by using the location of the SV (given under SVS in the
.json
) as start of the track
Running the converter offline on RAW events
It is possible to display RAW events.
The converter needs
DaVinci to run, but in that case we can add the JSON converter at the end of the Brunel sequence to have the reconstruction information.
e.g. to build a local project with the required dependencies:
lb-dev --name RawEventJSON Brunel v49r0
cd RawEventJSON
Edit the
CMakeLists.txt to depend on both Brunel and
DaVinci (obviously based on the same stack):
[...]
gaudi_project(BrunelDev v49r0
USE Brunel v49r0
DaVinci v38r0)
[...]
Now checkout out the JSON Converter package and build:
svn co svn+ssh://svn.cern.ch/reps/lhcb/OnlineExtra/trunk/Online/WebGLDisplay/JsonConverter
make
To run on a RAW file see the following options:
convertRAWToJSON.py.txt
--
ChristophLangenbruch - 2015-06-2