Skip to content

Commit

Permalink
EventVisualisation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Myrcha authored and shahor02 committed Sep 29, 2021
1 parent 25358ab commit e3b2f60
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 1 deletion.
7 changes: 7 additions & 0 deletions EventVisualisation/DataConverter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- doxy
\page refEventVisualisationDataConverter EventVisualisation DataConverter
/doxy -->

# Event Visualisation DataConverter

A description of this module is not yet available.
7 changes: 7 additions & 0 deletions EventVisualisation/Detectors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- doxy
\page refEventVisualisationDetectors EventVisualisation Detectors
/doxy -->

# Event Visualisation Detectors

A description of this module is not yet available.
9 changes: 8 additions & 1 deletion EventVisualisation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@

# Event Visualisation

There is no module description yet.
Module define `o2-eve` desktop application (build on top of ROOT) used to display tracks and clusters. In View module the desktop application is described (see \ref refEventVisualisationView). In Workflow module workflow used to prepare data is descrived (see \ref refEventVisualisationWorkflow)



<!-- doxy
This module contains the following submodules:

* \subpage refEventVisualisationBase
* \subpage refEventVisualisationDataConverter
* \subpage refEventVisualisationDetectors
* \subpage refEventVisualisationScripts
* \subpage refEventVisualisationView
* \subpage refEventVisualisationWorkflow
/doxy -->

39 changes: 39 additions & 0 deletions EventVisualisation/Scripts/.bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

alias enter='alienv enter O2/latest-dev-o2'

function sync-alice() {
rsync -arvz -e'ssh -p 2020' --progress --delete [email protected]:/home/ed/jsons /home/ed
}

function query-alice() {
while true
do
sync-alice
sleep 2
done
}

function o2eve() {
o2-eve -o -d /home/ed/jsons
}

export ALIBUILD_WORK_DIR=~/alice/sw
eval "`alienv shell-helper`"
104 changes: 104 additions & 0 deletions EventVisualisation/Scripts/.o2eve_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#===============================================================#
# This is o2-eve config file. #
# #
# You can copy it to your home directory and set custom values. #
# please remember to change paths #
# #
#===============================================================#

trigger.class.filter: none

axes.show: 0
fullscreen.mode: 0
background.color: 1

camera.3D.rotation.horizontal: -0.4
camera.3D.rotation.vertical: 1.0
camera.3D.zoom: 1.0
camera.R-Phi.zoom: 1.0
camera.Rho-Z.zoom: 1.0

simple.geom.default: R3
simple.geom.R3.path: /home/ed/geom/O2

tracks.width: 2

tracks.byType.electron: 600
tracks.byType.muon: 416
tracks.byType.pion: 632
tracks.byType.kaon: 400
tracks.byType.proton: 797
tracks.byType.unknown: 920

PHS.draw: 1
TPC.draw: 1
HMP.draw: 1
TRD.draw: 1
MCH.draw: 1
EMC.draw: 1
ACO.draw: 1
ITS.draw: 1
TOF.draw: 1
MFT.draw: 1
T00.draw: 1
FIT.draw: 1
AD0.draw: 1
FMD.draw: 1

PHS.color: 53
TPC.color: 3
HMP.color: 5
TRD.color: 921
MCH.color: 920
EMC.color: 53
ACO.color: 920
ITS.color: 634
TOF.color: 634
MFT.color: 920
T00.color: 2
FIT.color: 2
AD0.color: 5
FMD.color: 906

PHS.trans: 70
TPC.trans: 60
HMP.trans: 70
TRD.trans: 80
MCH.trans: 80
EMC.trans: 80
ACO.trans: 50
ITS.trans: 50
TOF.trans: 60
MFT.trans: 80
T00.trans: 70
FIT.trans: 40
AD0.trans: 40
FMD.trans: 50

MCH.line.color: 920
TPC.line.color: 1
HMP.line.color: 1
PHS.line.color: 1
TRD.line.color: 1
TOF.line.color: 1
EMC.line.color: 1
ITS.line.color: 1
MFT.line.color: 0
T00.line.color: 1
FIT.line.color: 1
AD0.line.color: 1
FMD.line.color: 907

OCDB.default.path: local:///home/ed/cdb


#Gui.DefaultFont: -*-helvetica-medium-r-*-*-20-*-*-*-*-*-iso8859-1
#Gui.MenuFont: -*-helvetica-medium-r-*-*-20-*-*-*-*-*-iso8859-1
#Gui.MenuHiFont: -*-helvetica-bold-r-*-*-20-*-*-*-*-*-iso8859-1
#Gui.DocFixedFont: -*-courier-medium-r-*-*-20-*-*-*-*-*-iso8859-1
#Gui.DocPropFont: -*-helvetica-medium-r-*-*-20-*-*-*-*-*-iso8859-1
#Gui.IconFont: -*-helvetica-medium-r-*-*-32-*-*-*-*-*-iso8859-1
#Gui.StatusFont: -*-helvetica-medium-r-*-*-20-*-*-*-*-*-iso8859-1
#
# EOF
#
24 changes: 24 additions & 0 deletions EventVisualisation/Scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- doxy
\page refEventVisualisationScripts EventVisualisation Scripts
/doxy -->

# Event Visualisation Scripts

## Configuration of the online event display in P2

There are 2 processes to be run on the visualisation machine in P2. To simplify deployment there are `bash` functions declared in `.bashrc` functions of the `ed` user.

* Process which synchronises (every 2 seconds) local folder `/home/ed/jsons` with folder on EPN which is run in terminal by calling `query-alice`. That process should be run from one of the terminals. Because files in folder on EPN are produced in FIFO scheme (so creating new ones results in deletion the same number of the old ones) files in local folders also are created and deleted.
```shell
query-alice
```
* Process which starts `o2-eve` application in mode when contents of the `/home/ed/jsons` folder is observed which is run in terminal by calling `o2eve`. Before calling `o2eve` user must enter O2 environment - it can be done by calling `enter` function declared in `.bashrc`
```shell
enter
o2eve
```
## navigation in o2-eve events using << < > >> buttons
Event display shows defined pool of data (by default there are 300+2) which are present in observed folder. The first and last data are duplicated (so 1 and 2 show the same and 301 and 302 show the same) because:
* position 1 means 'show the latest available data'. When observed latest data disappear (because new data has arrived and old one deleted) the new latest data is displayed
* positions 2-301: as long as data exists in the folder o2-eve displays the same data (but their positions decreases as new data is arriving and old data is deleted). Finally, the position become 1.
* position 302 means 'show the newest available data'. If we are on position 302 as soon as new data file is presented in the observed folder that data is immediately displayed by the o2-eve. The position remains the same, but the data displayed changes.
36 changes: 36 additions & 0 deletions EventVisualisation/View/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!-- doxy
\page refEventVisualisationView EventVisualisation View
/doxy -->

# Event Visualisation View

To run `o2-eve` you need to have a computer with linux or mac with properly build O2. There are no special hardware requirements, but for performance it is better to have discrete graphic card.

## Prerequisites
for `o2-eve` to run you should:
* have in the working folder:
* `.o2eve_config` file (available from EventVisualisation/Scripts)
* `o2sim_geometry.root` (copied from simulation folder)
* `o2sim_grp.root` (copied from simulation folder)
* have (somewhere, specified by command line parameter) folder with json files (f.e `/home/ed/jsons`)
* have (somewhere, specified in `.o2eve_config` file) folder with simplify geometry files (f.e `/home/ed/geom/O2`)

## Running o2-eve
Here are sample commands:
```shell
alienv enter O2/latest-dev-o2
cd /home/ed # working folder containing .o2eve_config, o2sim_geometry.root and o2sim_grp.root
o2-eve -o -d /home/ed/jsons
```

## o2-eve command line parameters:
| *parameter*| *description* | *status* |
|-----|---|---|
|i |displaying ITS tracks from `o2trac_its.root` and clusters from `o2clus_its.root` |(under development) |
|j |reading from *.json files (non online mode). require specification of json folder with `-d` | |
|o |online mode. require specification of json folder with `-d` | |
|r |randomly generated tracks | (test option, switched off) |
|t |displaying TPC tracks from `o2trac_its.root` and clusters from `o2clus_its.root` |(under development) |
|v |displaying data from sample ROOT file (vsd) | (development test usage only) |
|f file |location of AOD file containing data to be displayed | (under development) |
|d folder|location of json folder - a folder where json files from workflow data are located | |
64 changes: 64 additions & 0 deletions EventVisualisation/Workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!-- doxy
\page refEventVisualisationWorkflow EventVisualisation Workflow
/doxy -->

# Event Visualisation Workflow

This module contains DPL worflow, which can be used to produce data (in JSON format) to be displayed be `o2-eve`. Workflow may be used:
* on EPN to produce data which are then copied to online visualisation machine in P2 (see process description \subpage refEventVisualisationScripts)
* locally to make visualisation based on simulated data


## Prepare data based on simulated data
before one starts steps described below, please verify that:
* for `o2-eve-display` step you should:
* start within the folder where simulated data was produced
* you need to store in the folder file ```ITSdictionary.bin``` (available from O2-2288 jira)
* for `o2-eve` step you should:
* have in the working folder:
* `.o2eve_config` file (available from EventVisualisation/Scripts)
* `o2sim_geometry.root` (copied from simulation folder)
* `o2sim_grp.root` (copied from simulation folder)
* have (somewhere) folder with json files (f.e `/home/ed/jsons`)
* have (somewhere) folder with simplify geometry files (f.e `/home/ed/geom/O2`)



To visualise a simulated data one should:
* Run simulation
```shell
# for example:
enter dev
$O2_ROOT/prodtests/sim_challenge.sh -n 5 -s pbpb
```
* Run Workflow in folder with files produced by simulation
```shell
o2-global-track-cluster-reader --track-types TPC,ITS --cluster-types TPC,ITS | o2-eve-display --display-tracks TPC,ITS --display-clusters TPC,ITS
```
* Run `o2-eve` pointing a folder where produced `*.json` files were stored (see description # Event Visualisation View)
```shell
enter dev
o2-eve -j -d /home/ed/jsons -o
```


## o2-eve-display command line parameters:

| *parameter*| *default value* | *description* |
|-----|---|---|
|jsons-folder | jsons |name of the host allowed to produce files |
|eve-hostname | |name of the host allowed to produce files (empty means no limit) |
|eve-dds-collection-index |-1 |number of dpl collection allowed to produce files (-1 means no limit) |
|number-of_files |300 |maximum number of json files in folder (newer one will replace oldest) |
|number-of_tracks |-1 |maximum number of track stored in json file (-1 means no limit) |
|enable-mc |false |enable visualization of MC data |
|disable-mc |false |disable visualization of MC data |
|display-clusters |ITS,TPC,TRD,TOF |comma-separated list of clusters to display |
|display-tracks |TPC,ITS,ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF |comma-separated list of tracks to display |
|read-from-files |false | |
|disable-root-input |false |Disable root input overriding read-from-files |
|configKeyValues | |Semicolon separated key=value strings ..." |




0 comments on commit e3b2f60

Please sign in to comment.