From 71ad1331bf3ff91db3d80e932399ba4ac866533a Mon Sep 17 00:00:00 2001
From: Ralf Kliemt <r.kliemt@gsi.de>
Date: Wed, 17 Jul 2024 07:18:02 +0000
Subject: [PATCH] Jupyter kernelspec files

Add generation of Jupyter kernelspec files to support Root & CbmRoot classes in Python3.
Generation is performed by cmake and the files are placed at <build/install>/share/jupyter/.
Some documentation is provided in docs/jupyter.
---
 CMakeLists.txt                                |   5 +
 cmake/modules/CbmGenerateConfig.cmake         |  72 +-
 cmake/modules/WriteGeant4Data_jupy.cmake      |   6 +
 cmake/modules/WriteKernelFile.cmake           | 199 +++++
 .../scripts/jupyter/CbmRootPy/kernel.json.in  |  39 +
 cmake/scripts/jupyter/logo-64x64.png          | Bin 0 -> 6361 bytes
 docs/jupyter/Jupyter.rst                      |  42 +
 docs/jupyter/notebooks/CbmRoot.ipynb          | 797 ++++++++++++++++++
 8 files changed, 1124 insertions(+), 36 deletions(-)
 create mode 100644 cmake/modules/WriteGeant4Data_jupy.cmake
 create mode 100644 cmake/modules/WriteKernelFile.cmake
 create mode 100644 cmake/scripts/jupyter/CbmRootPy/kernel.json.in
 create mode 100644 cmake/scripts/jupyter/logo-64x64.png
 create mode 100644 docs/jupyter/Jupyter.rst
 create mode 100644 docs/jupyter/notebooks/CbmRoot.ipynb

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c67a306aab..cae01e8ee3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,6 +71,8 @@ include(FairMacros)
 include(WriteConfigFile)
 include(CheckCompiler)
 
+include(WriteGeant4Data_jupy)
+include(WriteKernelFile)
 
 # Do some basic checks
 # out-of-source build, unix system and
@@ -82,6 +84,9 @@ list(PREPEND CMAKE_PREFIX_PATH ${SIMPATH})
 
 unset(packages)
 
+find_package(Python3)
+MESSAGE("Python3_EXECUTABLE=${Python3_EXECUTABLE}")
+
 #Searches for ROOT Package
 find_package(ROOT 6.22 CONFIG REQUIRED)
 if(ROOT_FOUND)
diff --git a/cmake/modules/CbmGenerateConfig.cmake b/cmake/modules/CbmGenerateConfig.cmake
index 73519f91a8..92716aaacb 100644
--- a/cmake/modules/CbmGenerateConfig.cmake
+++ b/cmake/modules/CbmGenerateConfig.cmake
@@ -1,38 +1,38 @@
 macro(generate_config_files)
-
-  # generate config files used for build directory
-  WRITE_CONFIG_FILE(config.sh)
-  WRITE_CONFIG_FILE(config.csh)
-
-  # generate config files used for installation directory 
-  SET(ROOT_INCLUDE_PATH 
-      ${ROOT_INCLUDE_PATH} 
-      "${CMAKE_INSTALL_PREFIX}/include" 
-      "${CMAKE_INSTALL_PREFIX}/include/mvd"
-      "${CMAKE_INSTALL_PREFIX}/include/littrack"
-      "${CMAKE_INSTALL_PREFIX}/include/KF"
-      "${CMAKE_INSTALL_PREFIX}/include/AnalysisTree"
-      "${CMAKE_INSTALL_PREFIX}/include/AnalysisTreeQA"
-     )
-
-  set(CMAKE_INSTALL_LIBDIR lib)
-  SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
-
-  WRITE_CONFIG_FILE(config.sh_install)
-  WRITE_CONFIG_FILE(config.csh_install)
-
-  Install(FILES ${CMAKE_BINARY_DIR}/config.sh_install
-          DESTINATION bin
-          RENAME CbmRootConfig.sh
-         )
-
-  Install(FILES ${CMAKE_BINARY_DIR}/check_system.sh
-          DESTINATION bin
-         )
-
-  Install(FILES ${CMAKE_BINARY_DIR}/config.csh_install
-          DESTINATION bin
-          RENAME CbmRootConfig.csh
-         )
-
+        # generate config files used for build directory
+        WRITE_CONFIG_FILE(config.sh)
+        WRITE_CONFIG_FILE(config.csh)
+        WRITE_KERNEL_FILE(CbmRootPy/kernel.json)
+
+        # generate config files used for installation directory
+        SET(ROOT_INCLUDE_PATH
+                ${ROOT_INCLUDE_PATH}
+                "${CMAKE_INSTALL_PREFIX}/include"
+                "${CMAKE_INSTALL_PREFIX}/include/mvd"
+                "${CMAKE_INSTALL_PREFIX}/include/littrack"
+                "${CMAKE_INSTALL_PREFIX}/include/KF"
+                "${CMAKE_INSTALL_PREFIX}/include/AnalysisTree"
+                "${CMAKE_INSTALL_PREFIX}/include/AnalysisTreeQA"
+        )
+
+        set(CMAKE_INSTALL_LIBDIR lib)
+        SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
+
+        WRITE_CONFIG_FILE(config.sh_install)
+        WRITE_CONFIG_FILE(config.csh_install)
+        WRITE_KERNEL_FILE(CbmRootPy/kernel.json_install)
+
+        Install(FILES ${CMAKE_BINARY_DIR}/config.sh_install
+                DESTINATION bin
+                RENAME CbmRootConfig.sh
+        )
+
+        Install(FILES ${CMAKE_BINARY_DIR}/check_system.sh
+                DESTINATION bin
+        )
+
+        Install(FILES ${CMAKE_BINARY_DIR}/config.csh_install
+                DESTINATION bin
+                RENAME CbmRootConfig.csh
+        )
 endmacro()
diff --git a/cmake/modules/WriteGeant4Data_jupy.cmake b/cmake/modules/WriteGeant4Data_jupy.cmake
new file mode 100644
index 0000000000..033d3d9fcb
--- /dev/null
+++ b/cmake/modules/WriteGeant4Data_jupy.cmake
@@ -0,0 +1,6 @@
+MACRO(Write_Geant4Data_Variables_jupy)
+Set(Geant4Data_Variables_jupy "")
+foreach(DATASET  ${Geant4_DATASETS})
+  string(CONCAT Geant4Data_Variables_jupy ${Geant4Data_Variables_jupy} "    \"${Geant4_DATASET_${DATASET}_ENVVAR}\": \"${Geant4_DATASET_${DATASET}_PATH}\",\n")
+endforeach()
+ENDMACRO()
diff --git a/cmake/modules/WriteKernelFile.cmake b/cmake/modules/WriteKernelFile.cmake
new file mode 100644
index 0000000000..89cef789b8
--- /dev/null
+++ b/cmake/modules/WriteKernelFile.cmake
@@ -0,0 +1,199 @@
+################################################################################
+ #    Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH    #
+ #                                                                              #
+ #              This software is distributed under the terms of the             #
+ #              GNU Lesser General Public Licence (LGPL) version 3,             #
+ #                  copied verbatim in the file "LICENSE"                       #
+ ################################################################################
+ MACRO (WRITE_KERNEL_FILE filename)
+
+ #MESSAGE("
+ #  Python3_FOUND=${Python3_FOUND}
+ #  Python3_Interpreter_FOUND=${Python3_Interpreter_FOUND}
+ #  Python3_EXECUTABLE=${Python3_EXECUTABLE}
+ #  "
+ #)
+
+ String(REGEX REPLACE "^.*(install).*$" "\\1" INSTALL_VERSION ${filename})
+ String(COMPARE EQUAL "install" "${INSTALL_VERSION}" INSTALL_TRUE)
+
+ List(REMOVE_ITEM LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/lib)
+
+ If (INSTALL_TRUE)
+   SET(_INSTALLDIR ${CMAKE_INSTALL_PREFIX})
+   SET(_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
+   #SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase)
+   SET(FAIRLIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
+   SET(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
+ Else (INSTALL_TRUE)
+   SET(_INSTALLDIR ${CMAKE_BINARY_DIR})
+   SET(_BINDIR ${CMAKE_BINARY_DIR})
+   #SET(VMCWORKDIR ${CMAKE_SOURCE_DIR})
+   SET(FAIRLIBDIR ${CMAKE_BINARY_DIR}/lib)
+   SET(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH})
+ EndIf (INSTALL_TRUE)
+
+ If(NOT DEFINED FULL_CONFIG_FILE)
+   Set(FULL_CONFIG_FILE "true")
+ EndIf(NOT DEFINED FULL_CONFIG_FILE)
+
+
+ IF(CMAKE_SYSTEM_NAME MATCHES Linux)
+   IF(FAIRROOTPATH)
+     configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.sh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh
+                   )
+     configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.csh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh
+                   )
+   ELSE(FAIRROOTPATH)
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.sh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh
+                   )
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.csh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh
+                   )
+   ENDIF(FAIRROOTPATH)
+
+   EXECUTE_PROCESS(COMMAND lsb_release -sd
+                    OUTPUT_VARIABLE _linux_flavour
+                    OUTPUT_STRIP_TRAILING_WHITESPACE
+                   )
+
+   IF(_linux_flavour)
+     STRING(REGEX REPLACE "^\"" "" _linux_flavour ${_linux_flavour})
+     STRING(REGEX REPLACE "\"$" "" _linux_flavour ${_linux_flavour})
+   ENDIF(_linux_flavour)
+
+   EXECUTE_PROCESS(COMMAND uname -m
+                   OUTPUT_VARIABLE _system
+                   OUTPUT_STRIP_TRAILING_WHITESPACE
+                  )
+
+ ElseIf(CMAKE_SYSTEM_NAME MATCHES Darwin)
+   IF(FAIRROOTPATH)
+     configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.sh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh
+                   )
+     configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.csh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh
+                   )
+   ELSE(FAIRROOTPATH)
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.sh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh
+                   )
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.csh.in
+                    ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh
+                   )
+   ENDIF(FAIRROOTPATH)
+   EXECUTE_PROCESS(COMMAND uname -sr
+                   OUTPUT_VARIABLE _linux_flavour
+                   OUTPUT_STRIP_TRAILING_WHITESPACE
+                  )
+   EXECUTE_PROCESS(COMMAND uname -m
+                   OUTPUT_VARIABLE _system
+                   OUTPUT_STRIP_TRAILING_WHITESPACE
+                  )
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux)
+
+
+ CONVERT_LIST_TO_STRING(${Geant4_INCLUDE_DIRS})
+ Set(Geant4_INCLUDE_DIRS ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant4VMC_INCLUDE_DIRS})
+ Set(Geant4VMC_INCLUDE_DIRS ${output})
+
+ #CONVERT_LIST_TO_STRING(${Geant4VMC_CMAKE_INSTALL_LIBDIR})
+ #Set(Geant4VMC_LIBRARY_DIR ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant4VMC_MACRO_DIR})
+ Set(Geant4VMC_MACRO_DIR ${output})
+
+ Write_Geant4Data_Variables_jupy()
+
+ CONVERT_LIST_TO_STRING(${PYTHIA6_LIBRARY_DIR})
+ Set(PYTHIA6_LIBRARY_DIR ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant3_SYSTEM_DIR})
+ Set(G3SYS ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant3_INCLUDE_DIRS})
+ Set(Geant3_INCLUDE_DIRS ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant3_LIBRARY_DIR})
+ Set(Geant3_LIBRARY_DIR ${output})
+
+ CONVERT_LIST_TO_STRING(${Geant3_LIBRARIES})
+ Set(Geant3_LIBRARIES ${output})
+
+ CONVERT_LIST_TO_STRING(${ROOT_LIBRARY_DIR})
+ Set(ROOT_LIBRARY_DIR ${output})
+
+ CONVERT_LIST_TO_STRING(${ROOT_LIBRARIES})
+ Set(ROOT_LIBRARIES ${output})
+
+ CONVERT_LIST_TO_STRING(${ROOT_INCLUDE_DIR})
+ Set(ROOT_INCLUDE_DIR ${output} )
+
+ #Set(VMCWORKDIR ${C})
+
+ Set(FAIRLIBDIR ${FAIRLIBDIR})
+
+ List(APPEND _LD_LIBRARY_PATH ${PYTHIA6_LIBRARY_DIR} ${Geant3_LIBRARY_DIR} ${Geant4VMC_LIBRARY_DIR})
+
+ List(REMOVE_DUPLICATES _LD_LIBRARY_PATH)
+ CONVERT_LIST_TO_STRING(${_LD_LIBRARY_PATH})
+
+ IF(CMAKE_SYSTEM_NAME MATCHES Linux)
+   Set(MY_LD_LIBRARY_PATH ${output})
+ ELSE(CMAKE_SYSTEM_NAME MATCHES Linux)
+   IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
+     Set(MY_DYLD_LIBRARY_PATH ${output})
+   ENDIF(CMAKE_SYSTEM_NAME MATCHES Darwin)
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux)
+
+ Set(USE_VGM 1)
+
+ SET(PYTHONPATH ${CMAKE_SOURCE_DIR}/python ${FAIRLIBDIR} ${SIMPATH}/lib ${SIMPATH}/lib/root ${SIMPATH}/lib/Geant4 ${SIMPATH}/lib/g4py ${PYTHONPATH})
+ UNIQUE(PYTHONPATH "${PYTHONPATH}")
+ CONVERT_LIST_TO_STRING(${PYTHONPATH})
+ SET(MY_PYTHONPATH ${output})
+
+ SET (PATH ${ROOTSYS}/bin ${PATH})
+ UNIQUE(PATH "${PATH}")
+ CONVERT_LIST_TO_STRING(${PATH})
+ Set(MY_PATH ${output})
+
+ # If(FAIRSOFT_EXTERN)
+   # Set(PYTHIA8DATA "${SIMPATH}/share/pythia8/xmldoc")
+ # Else(FAIRSOFT_EXTERN)
+   # Set(PYTHIA8DATA "${SIMPATH}/generators/pythia8/xmldoc")
+ # EndIf(FAIRSOFT_EXTERN)
+
+ CONVERT_LIST_TO_STRING(${ROOT_INCLUDE_PATH})
+ Set(ROOT_INCLUDE_PATH ${output})
+
+ IF(${filename} MATCHES "[.]json.*$")
+   MESSAGE("Configuring Jupyter kernelspec file ${filename}")
+   String(REPLACE "_install" "" KERNELFILE ${filename})
+   configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/jupyter/${KERNELFILE}.in
+                ${CMAKE_CURRENT_BINARY_DIR}/share/jupyter/kernels/${filename}
+                 )
+   get_filename_component(KERNELSUBPATH ${KERNELFILE} DIRECTORY)
+   file(COPY ${CMAKE_SOURCE_DIR}/cmake/scripts/jupyter/logo-64x64.png
+        DESTINATION share/jupyter/kernels/${KERNELSUBPATH}
+       )
+
+   IF(${filename} MATCHES "install$")
+     install( FILES       ${CMAKE_BINARY_DIR}/share/jupyter/kernels/${filename}
+              DESTINATION share/jupyter/kernels
+              RENAME ${KERNELFILE}
+            )
+     install( FILES       ${CMAKE_SOURCE_DIR}/cmake/scripts/jupyter/logo-64x64.png
+              DESTINATION share/jupyter/kernels/${KERNELSUBPATH}
+            )
+   ENDIF(${filename} MATCHES "install$")
+              
+ ENDIF(${filename} MATCHES "[.]json.*$")
+
+ENDMACRO (WRITE_KERNEL_FILE)
diff --git a/cmake/scripts/jupyter/CbmRootPy/kernel.json.in b/cmake/scripts/jupyter/CbmRootPy/kernel.json.in
new file mode 100644
index 0000000000..0398990c58
--- /dev/null
+++ b/cmake/scripts/jupyter/CbmRootPy/kernel.json.in
@@ -0,0 +1,39 @@
+{
+  "language": "python",
+  "display_name": "CbmRoot Python3",
+  "argv": [
+    "@Python3_EXECUTABLE@",
+    "-m",
+    "ipykernel_launcher", 
+    "-f",
+    "{connection_file}"
+  ],
+  "env": {
+    "Linux_Flavour_": "@_linux_flavour@",
+    "System_": "@_system@",
+    "SIMPATH": "@SIMPATH@",
+    "ROOTSYS": "@ROOTSYS@",
+    "FAIRROOTPATH": "@FAIRROOTPATH@",
+    "Geant4_INCLUDE_DIRS": "@Geant4_INCLUDE_DIRS@",
+    "Geant4VMC_INCLUDE_DIRS": "@Geant4VMC_INCLUDE_DIRS@",
+    "Geant4VMC_LIBRARY_DIR": "@Geant4VMC_LIBRARY_DIR@",
+    "Geant4VMC_MACRO_DIR": "@Geant4VMC_MACRO_DIR@",
+    "PYTHIA6_LIBRARY_DIR": "@PYTHIA6_LIBRARY_DIR@",
+    "Geant3_INCLUDE_DIRS": "@Geant3_INCLUDE_DIRS@",
+    "G3SYS": "@G3SYS@",
+    "Geant3_LIBRARY_DIR": "@Geant3_LIBRARY_DIR@",
+    "USE_VGM": "1",
+    "PYTHIA8DATA": "@PYTHIA8DATA@",
+@Geant4Data_Variables_jupy@
+    "ROOT_LIBRARY_DIR": "@ROOT_LIBRARY_DIR@",
+    "ROOT_LIBRARIES": "@ROOT_LIBRARIES@",
+    "ROOT_INCLUDE_DIR": "@ROOT_INCLUDE_DIR@",
+    "ROOT_INCLUDE_PATH": "@Geant3_INCLUDE_DIRS@:@ROOT_INCLUDE_PATH@",
+    "VMCWORKDIR": "@VMCWORKDIR@",
+    "FAIRLIBDIR": "@FAIRLIBDIR@",
+    "PYTHONPATH": "@MY_PYTHONPATH@",
+    "DYLD_LIBRARY_PATH": "@MY_DYLD_LIBRARY_PATH@:$DYLD_LIBRARY_PATH",
+    "LD_LIBRARY_PATH": "@MY_LD_LIBRARY_PATH@:$LD_LIBRARY_PATH",
+    "PATH": "@MY_PATH@:$PATH"
+  }
+}
diff --git a/cmake/scripts/jupyter/logo-64x64.png b/cmake/scripts/jupyter/logo-64x64.png
new file mode 100644
index 0000000000000000000000000000000000000000..81177c9aeaff3afbbcc91c098703ef56adb9a0d3
GIT binary patch
literal 6361
zcmZ`-bzD?i*B(k@=<Y6M7>1#xyCo!*8e#zH0bu~??owbxIz>7pg#nZ<r4gkBK{^Em
z{J?v^d;Q+u`|b1FXRY(B^{i*@v-kPu#OU5rB_g0F0000)>S{{**H-Rk;@!HwmpgiV
zzBbtQ^4jtMKy4E60)}(_%xa^iuMGhBaRUIs;Q+voYbbaF0C)@m0KQoP0CzJ102=of
zt$I?|0i>OYI$T>DaOc{`17Ks21F)_=jOz=4K@Yg8cI^RVFc|*vRiYdL*ni{quI<fG
zyPh|Be_5<NjDM@-Vg8dXmxuMQe?xmYwvBsj@ZHr+Jplk9#m&S3Jbyt80AN0KG%)cp
z(bl?a<K_Z}*}7TVfsromH!Oe@^6s_kV&?^8MY=e<dfr7!v;WSxd+p!A0_?26Q@os{
z*-f-{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YdXxC<mYmz
z6Q;W>SbuO4Zgd`)e-ZMbn+rr&-sXHZ#70&)e_{~q{P>)vk&urfRfSlLMn^_ua<n+9
zyqdu;gDR_s`B1=@uDcB!#FoJpl$+5c$RP1{fyfSc2&5La#=D{o%KgPs`Dx@;qyOWC
Qo1gdU%J-D26s$u32f24=-~a#s

literal 0
HcmV?d00001

diff --git a/docs/jupyter/Jupyter.rst b/docs/jupyter/Jupyter.rst
new file mode 100644
index 0000000000..cd5e045e76
--- /dev/null
+++ b/docs/jupyter/Jupyter.rst
@@ -0,0 +1,42 @@
+Jupyter Notebooks
+=================
+
+Jupyter Notebooks offer a large quality of life and are becoming more important with machine learning etc. Natively PandaRoot is a collection of C++ libraries which usually are collected and called through ROOT, mostly by macros.
+
+ROOT by itself features python bindings as well as an own C++ Kernel. With the ``%%cpp`` magic it is also possible to mix C++ code into python code. See the introduction to PyROOT_. 
+
+.. _PyROOT: https://root.cern.ch/notebooks/HowTos/HowTo_ROOT-Notebooks.html
+
+Using the Kernels without installation
+######################################
+
+It it is enough to do the following::
+
+  source <build>/config.sh -p
+  export JUPYTER_CONFIG_DIR=$SIMPATH/etc/root/notebook
+  export JUPYTER_PATH=$SIMPATH/etc/root/notebook
+  jupyter notebook
+
+You now can use ROOT and CbmRoot classes in the Python3 kernel or the RootC++ kernel. Here are two example notebooks to start off with.
+
+Examples
+########
+
+- <source>/docs/jupyter/notebooks/CbmRoot.ipynb
+
+Install the Kernel
+##################
+
+In some cases it is beneficial to install the Kernel to automatically be used in the system. A simple 'jupyter notebook' command in a fresh shell would allow them to be used. Also VSCode with the jupyter extension would be able to spawn such notebooks inside the integrated environment.
+
+The downside is that the Kernels are pointing to one specific installation of CbmRoot and its dependencies and managing multiple installations may become cumbersome.
+
+As a prerequisit one has to install the metakernel package in python (``pip3 install metakernel``).
+To install the Kernels simply copy the folders from ``<build>/jupyter/kernels`` to the appropriate place:
+
+- ``~/.local/share/jupyter/kernels`` (Linux)
+- ``~/Library/Jupyter/kernels`` (Mac)
+- ``%APPDATA%\jupyter\kernels`` (Win)
+
+
+
diff --git a/docs/jupyter/notebooks/CbmRoot.ipynb b/docs/jupyter/notebooks/CbmRoot.ipynb
new file mode 100644
index 0000000000..693fbb6dcc
--- /dev/null
+++ b/docs/jupyter/notebooks/CbmRoot.ipynb
@@ -0,0 +1,797 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "id": "2126cfd4",
+   "metadata": {},
+   "source": [
+    "# CbmRoot Notebook\n",
+    "\n",
+    "This notebook provides code snippets how one can run simulations & analysis in a notebook, employing the CbmRoot classes."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "3bdfe179",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Welcome to JupyROOT 6.26/10\n"
+     ]
+    }
+   ],
+   "source": [
+    "# When using the CbmRootPy kernel, this also loads CbmRoot classes\n",
+    "import ROOT\n",
+    "ROOT.gROOT.SetBatch(True)\n",
+    "ROOT.PyConfig.DisableRootLogon = True\n",
+    "\n",
+    "import os\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "eb5ea347",
+   "metadata": {},
+   "source": [
+    "## The transport macro\n",
+    "\n",
+    "Here we have the macro from `macro/run` just with python syntax. Note that all CBM related classes are available in the `ROOT` package/namespace.\n",
+    "\n",
+    "First we define tha macro as function, then we call it in the next cell."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "4a329503",
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "-I- CbmJupyTransport: Using input file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/input/urqmd.auau.10gev.centr.root\n",
+      "The file test.tra.root has been deleted.\n",
+      "The file test.par.root has been deleted.\n",
+      "The file test.geo.root has been deleted.\n",
+      "Target is at -44.0cm from origin\n",
+      "Creating a RUN object\n",
+      "Loading the setup\n",
+      "Target being generated in tra macro\n",
+      "Starting the RUN with 1 events\n",
+      "Macro finished successfully.\n",
+      "Real time 13.448765993118286 s, CPU time 13.010000000000002s\n",
+      "MaxMemory 861.9609375\n",
+      "CpuLoad0.9673749998072091\n",
+      "[INFO] File /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/input/urqmd.auau.10gev.centr.root is a ROOT file.\n",
+      "[INFO] UnigenGenerator: Initialising...\n",
+      "[INFO] UnigenGenerator: Mode  standard; rotate event plane to zero\n",
+      "[INFO] UnigenGenerator: Open input file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/input/urqmd.auau.10gev.centr.root\n",
+      "[INFO] UnigenGenerator: Run description\n",
+      "--------------------------------------------------\n",
+      "-I-                 Run Header                 -I-\n",
+      "Generator                     : UrQMD20030\n",
+      "Comment                       : op  0    0    0    0    0    0    0    0    0    0    0    0    0    0    0  \n",
+      "op  0    0    0    0    0    0    1    0    1    0    0    0    0    2    1  \n",
+      "op  0    0    0    1    1    0    0    0    0    0    0    0    0    1    0  \n",
+      "pa 0.1000E+01   0.5200E+00   0.2000E+01   0.3000E+00   0.0000E+00   0.3700E+00   0.0000E+00   0.9300E-01   0.3500E+00   0.2500E+00   0.0000E+00   0.5000E+00  \n",
+      "pa 0.2700E+00   0.4900E+00   0.2700E+00   0.1000E+01   0.1600E+01   0.8500E+00   0.1550E+01   0.0000E+00   0.0000E+00   0.0000E+00   0.0000E+00   0.0000E+00  \n",
+      "pa 0.9000E+00   0.5000E+02   0.1000E+01   0.1000E+01   0.1000E+01   0.1500E+01   0.1600E+01   0.0000E+00   0.2500E+01   0.1000E+00   0.3000E+01   0.2750E+00  \n",
+      "pa 0.4200E+00   0.1080E+01   0.8000E+00   0.5000E+00   0.0000E+00   0.5500E+00   0.5000E+01   0.8000E+00   0.5000E+00   0.8000E+06   0.1000E+01   0.2000E+01  \n",
+      "\n",
+      "Decayer                       : \n",
+      "Projectile mass               : 197\n",
+      "Projectile charge             : 79\n",
+      "Projectile momentum (AGeV/c)  : 2.06646\n",
+      "Target mass                   : 197\n",
+      "Target charge                 : 79\n",
+      "Target momentum (AGeV/c)      : -2.06646\n",
+      "Minimal impact parameter (fm) : 0\n",
+      "Maximal impact parameter (fm) : 0\n",
+      "Impact parameter weightning   : -1\n",
+      "Minimal azimuthal angle (rad) : 0\n",
+      "Maximal azimuthal angle (rad) : 0\n",
+      "Cross-section (mb)            : 0\n",
+      "Requested number of events    : 100\n",
+      "--------------------------------------------------\n",
+      "[INFO] UnigenGenerator: sqrt(s_NN) = 4.539 GeV, p_beam = 9.99676 GeV/u\n",
+      "[INFO] UnigenGenerator: Lorentz transformation to lab system:  beta -0.910537, gamma 2.41881\n",
+      "[INFO] UnigenGenerator: 100 events in input tree\n",
+      "[INFO] UnigenGenerator: 0 ions registered.\n",
+      "[INFO] Loading CbmGeoSetup from svn repository.\n",
+      "Setup tag: sis100_electron Revision: latest\n",
+      "[WARN] Media file not found for tag  using default media.geo\n",
+      "\n",
+      "\n",
+      "[INFO] CbmTransport: Using engine TGeant3\n",
+      "[INFO] Media file used: /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/media.geo\n",
+      "[INFO] -I- RegisterSetup: Registering CAVE default using cave.geo\n",
+      "[INFO] -I- RegisterSetup: Registering MAGNET v22a using magnet/magnet_v22a.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering PIPE v21d using pipe/pipe_v21d.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering PIPE v21i using pipe/pipe_v21i.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering MVD v20d_tr -ACTIVE-  using mvd/mvd_v20d_tr.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering STS v22d -ACTIVE-  using sts/sts_v22d.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering RICH v23a -ACTIVE-  using rich/rich_v23a.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering TRD v20b_1e -ACTIVE-  using trd/trd_v20b_1e.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering TOF v21a_1e -ACTIVE-  using tof/tof_v21a_1e.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering PSD v23a -ACTIVE-  using psd/psd_v23a.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering FSD v23i -ACTIVE-  using fsd/fsd_v23i.geo.root\n",
+      "[INFO] -I- RegisterSetup: Registering PLATFORM v22b using passive/platform_v22b.geo.root\n",
+      "[INFO] Target: Material Gold, standard density, thickness 250 mum, diameter 2.5 cm, position (0, 0, -44) cm, rotation (y) 0 rad\n",
+      "[INFO] CbmTransport: Register magnetic field\n",
+      "[INFO] 0\n",
+      "[INFO] Filename is /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/input/field_v22c.root\n",
+      "======================================================\n",
+      "----  CbmFieldMap : field_v22c\n",
+      "----\n",
+      "----  Field type     : Map sym3\n",
+      "----\n",
+      "----  Field map grid : \n",
+      "----  x = 0.000 to 0.000 cm, 0 grid points, dx = 0.000 cm\n",
+      "----  y = 0.000 to 0.000 cm, 0 grid points, dy = 0.000 cm\n",
+      "----  z = 0.000 to 0.000 cm, 0 grid points, dz = 0.000 cm\n",
+      "\n",
+      "----  Field centre position: (  0.000,  0.000,  0.000) cm\n",
+      "----  Field scaling factor: 1.000\n",
+      "----\n",
+      "----  Field at origin is (  0.000,  0.000,  0.000) kG\n",
+      "======================================================\n",
+      "\n",
+      "[INFO] -----   Settings for event generator\n",
+      "[INFO] Beam profile:\n",
+      "\t x position mean 0 cm, sigma 0.1 cm\n",
+      "\t y position mean 0 cm, sigma 0.1 cm\n",
+      "\t Focal plane: z =  0 cm\n",
+      "\t x-z angle 0 rad (fixed)\n",
+      "\t y-z angle 0 rad (fixed)\n",
+      "[INFO] Target: Material Gold, standard density, thickness 250 mum, diameter 2.5 cm, position (0, 0, -44) cm, rotation (y) 0 rad\n",
+      "[INFO] Vertex smearing along beam ON\n",
+      "[INFO] Random event plane angle between 0 and 6.28319 rad\n",
+      "[INFO] Number of generators 1\n",
+      "OBJ: CbmUnigenGenerator\tUnigenGenerator\tCBM generator\n",
+      "[INFO] -----   End settings for event generator\n",
+      "\n",
+      "[INFO] FairRootFileSink initialized.\n",
+      "[INFO]  - cbmroot_0\n",
+      "[INFO]     - test.tra.root\n",
+      "[INFO] ==============  FairRunSim: Initialising simulation run ==============\n",
+      "[INFO] FairGeoMedia: Read media \n",
+      "\n",
+      "************************************************************* \n",
+      "     initialisation for run id 1720175896\n",
+      "************************************************************* \n",
+      "[INFO] CbmFieldMap: Reading field map from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/input/field_v22c.root\n",
+      "======================================================\n",
+      "----  CbmFieldMap : field_v22c\n",
+      "----\n",
+      "----  Field type     : Map sym3\n",
+      "----\n",
+      "----  Field map grid : \n",
+      "----  x = 0.000 to 302.0 cm, 152 grid points, dx = 2.000 cm\n",
+      "----  y = 0.000 to 302.0 cm, 152 grid points, dy = 2.000 cm\n",
+      "----  z = 0.000 to 502.0 cm, 252 grid points, dz = 2.000 cm\n",
+      "\n",
+      "----  Field centre position: (  0.000,  0.000,  0.000) cm\n",
+      "----  Field scaling factor: 1.000\n",
+      "----\n",
+      "----  Field at origin is ( 0.004120, -10.95, -0.005054) kG\n",
+      "======================================================\n",
+      "[WARN] FairField::FillParContainer Should be implemented in User class\n",
+      "\n",
+      "[INFO] CbmTransport: Configuring VMC...\n",
+      "[INFO] CbmTransport: Create TGeant3TGeo\n",
+      "\n",
+      "=============================================================\n",
+      " Virtual Monte Carlo Library\n",
+      " Version 2.0 ( 10 February 2022 )\n",
+      "=============================================================\n",
+      "\n",
+      "=============================================================\n",
+      " Geant3 Virtual Monte Carlo \n",
+      " Version 4.1 ( 17 March 2022 )\n",
+      " WWW : https://vmc-project.github.io/\n",
+      "=============================================================\n",
+      "\n",
+      "\n",
+      " MZSTOR.  ZEBRA table base TAB(0) in /MZCC/ at adr   123850191     761CDCF HEX\n",
+      "\n",
+      " MZSTOR.  Initialize Store  0  in /GCBANK/\n",
+      "          with Store/Table at absolute adrs   118404533   123850191\n",
+      "                                        HEX     70EB5B5     761CDCF\n",
+      "                                        HEX    FFACE5D2           0\n",
+      "                              relative adrs    -5446190           0\n",
+      "          with     1 Str. in     2 Links in   5300 Low words in 4999970 words.\n",
+      "          This store has a fence of   16 words.\n",
+      "\n",
+      " MZLOGL.  Set Log Level 0 for store  0\n",
+      "1*****  GEANT Version  3.21/11 Released on 100298\n",
+      "0*****  Correction Cradle Version  0.1100\n",
+      "\n",
+      " MZDIV.   Initialize Division  Constant  in Store  0\n",
+      "          NW/NWMAX=   20004000000,  MODE/KIND=  1  2\n",
+      "          Division 20 initialized.\n",
+      "\n",
+      " MZLINK.  Initialize Link Area  /GCLINK/  for Store  0 NL/NS=    20    20\n",
+      "\n",
+      " MZLINK.  Initialize Link Area  /GCSLNK/  for Store  0 NL/NS=   100   100\n",
+      "[INFO] : Configuring global VMC settings\n",
+      "[INFO] : Configuring Geant3\n",
+      "[WARN] UnigenGenerator: Already initialised!\n",
+      "[INFO] Constructing MAGNET        from ROOT  file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/magnet/magnet_v22a.geo.root\n",
+      "[INFO] Constructing Pipe geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/pipe/pipe_v21d.geo.root\n",
+      "[INFO] Importing Pipe geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/pipe/pipe_v21i.geo.root\n",
+      "[INFO] Constructing MVD  geometry from ROOT  file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/mvd/mvd_v20d_tr.geo.root\n",
+      "[INFO] Importing STS geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/sts/sts_v22d.geo.root\n",
+      "[INFO] Importing RICH geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/rich/rich_v23a.geo.root\n",
+      "[INFO] Importing TRD geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/trd/trd_v20b_1e.geo.root\n",
+      "[INFO] Importing TOF geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/tof/tof_v21a_1e.geo.root\n",
+      "[INFO] Importing PSD geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/psd/psd_v23a.geo.root\n",
+      "[INFO] Importing FSD geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/fsd/fsd_v23i.geo.root\n",
+      "[INFO] Importing Platform geometry from ROOT file /u/kliemt/CBM/CbmRoot/Install/share/cbmroot/geometry/passive/platform_v22b.geo.root\n",
+      "\n",
+      "[INFO] Target: Constructing geometry...\n",
+      "[INFO] Target: Use material Gold, z =  79\n",
+      "[INFO] Target: Mother node is pipevac1_0\n",
+      "\n",
+      "[INFO] TGeometry will be imported to VMC\n",
+      "\n",
+      "0*** GSTMED *** Warning, medium =     2, value of EPSIL= 0.000E+00 reset to 1 micron\n",
+      "0*** GSTMED *** Warning, medium =     8, value of EPSIL= 0.000E+00 reset to 1 micron\n",
+      "0*** GSTMED *** Warning, medium =     9, value of EPSIL= 0.000E+00 reset to 1 micron\n",
+      "0*** GSTMED *** Warning, medium =    10, value of EPSIL= 0.000E+00 reset to 1 micron\n",
+      "0*** GSTMED *** Warning, medium =    11, value of EPSIL= 0.000E+00 reset to 1 micron\n",
+      "[INFO] CbmRich::ConstructOpGeometry()\n",
+      "[INFO] CbmRich::SetRichGlassPropertiesForGeant4() Transport engine:TGeant3\n",
+      "[INFO] CbmRich::SetRichGlassPropertiesForGeant4() fIsGeant4 is false. No need to set RICH glass properties. Return.\n",
+      "[INFO] FairMCApplication::InitGeometry: 0\n",
+      "[INFO] \n",
+      "[INFO] ==========================================================\n",
+      "[INFO] Initialising STS Setup \n",
+      "\n",
+      "[INFO] STS: Reading geometry from TGeoManager FAIRGeom\n",
+      "[INFO] STS: STS top node is sts_v22d_0\n",
+      "[INFO] STS: Elements in setup: \n",
+      "[INFO]             units   20\n",
+      "[INFO]           ladders  106\n",
+      "[INFO]       halfladders  212\n",
+      "[INFO]           modules  876\n",
+      "[INFO]           sensors  876\n",
+      "[INFO] Sensor in map: 876 in vector 876\n",
+      "[INFO] STS: Setup contains 8 stations objects.\n",
+      "[INFO] ==========================================================\n",
+      "\n",
+      "[INFO] \n",
+      "[INFO] STSMC: Address map initialised with 876 sensors. \n",
+      "[INFO] CbmRichDigiMapManager is initialized\n",
+      "[INFO] fPixelPathToAddressMap.size() = 75264\n",
+      "[INFO] fPixelAddressToDataMap.size() = 75264\n",
+      "[INFO] fPmtPathToIdMap.size() = 1176\n",
+      "[INFO] fPmtIdToDataMap.size() = 1176\n",
+      "Mixture TRDgas    Aeff=124.791 Zeff=51.401 rho=0.004944 radlen=1792.89 intlen=33993.1 index=243500301\n",
+      "   Element #0 : C  Z=  6.00 A= 12.01 w= 0.015\n",
+      "   Element #1 : O  Z=  8.00 A= 15.99 w= 0.041\n",
+      "   Element #2 : XE  Z= 54.00 A=131.29 w= 0.944\n",
+      "[INFO] Using special parameters for TRDgas\n",
+      "[INFO] Inspect node 0 magnet_v22a_0\n",
+      "[INFO] Inspect node 1 pipe_v21d_0\n",
+      "[INFO] Inspect node 2 pipe_v21i_0\n",
+      "[INFO] Inspect node 3 sts_v22d_0\n",
+      "[INFO] Inspect node 4 rich_v23a_0\n",
+      "[INFO] Inspect node 5 trd_v20b_1e_0\n",
+      "[INFO] Inspect node 6 tof_v21a_1e_0\n",
+      "[INFO] Found TOF geometry tof_v21a_1e_0\n",
+      "[INFO] CbmTofGeoHandler::CheckGeometryVersion: Found TOF geometry tof_v21a_1e_0, treat as Id 21a   \n",
+      "<I> V21a module mask 0x0fdfffff\n",
+      "[INFO] Initialize Tasks--------------------------\n",
+      "[INFO] MCEventFilter: Add branch MCTrack\n",
+      "[INFO] MCEventFilter: Add branch MvdPoint\n",
+      "[INFO] MCEventFilter: Add branch StsPoint\n",
+      "[INFO] MCEventFilter: Add branch RichPoint\n",
+      "[INFO]  Branch: MuchPoint not found in Tree.\n",
+      "[INFO] MCEventFilter: Add branch TrdPoint\n",
+      "[INFO] MCEventFilter: Add branch TofPoint\n",
+      "[INFO] MCEventFilter: Add branch FsdPoint\n",
+      "[INFO] MCEventFilter: Add branch PsdPoint\n",
+      "[INFO] Simulation RunID: 1720175896\n",
+      "\n",
+      " Calculating cross section tables, see gphysi.dat for more information\n",
+      "\n",
+      " Cross section calculation concluded successfully\n",
+      "[INFO] Monte Carlo Engine Initialisation with: TGeant3TGeo\n",
+      "[INFO] CbmTransport: Set decay modes for pi0 and eta\n",
+      "\n",
+      " *** GSDK ***: Warning, redefinition of decay for particle:\n",
+      "0Part                         Options        Mass    Charge    Life time                  User words\n",
+      "\n",
+      "   17 ETA                        3       0.5479E+00     0.    0.54850E-18\n",
+      "\n",
+      " *** GSDK ***: Warning, redefinition of decay for particle:\n",
+      "0Part                         Options        Mass    Charge    Life time                  User words\n",
+      "\n",
+      "    7 PION 0                     3       0.1350E+00     0.    0.84000E-16\n",
+      "[INFO] create CbmFieldPar container CbmFieldPar\n",
+      "[INFO] ***  FairBaseParSet written to ROOT file   version: 1\n",
+      "[INFO] ***  FairGeoParSet written to ROOT file   version: 1\n",
+      "[INFO] ***  CbmGeoPassivePar written to ROOT file   version: 1\n",
+      "[INFO] ***  CbmFieldPar written to ROOT file   version: 1\n",
+      "--------------------------------------------------------------------------------\n",
+      "--------------  actual containers in runtime database  -------------------------\n",
+      "FairBaseParSet                                 class for parameter io\n",
+      "FairGeoParSet                                  class for Geo parameter\n",
+      "CbmGeoPassivePar                               Passive Geometry Parameters\n",
+      "CbmFieldPar                                    Field parameter container\n",
+      "--------------  runs, versions  ------------------------------------------------\n",
+      "run id\n",
+      "  container                                        1st-inp    2nd-inp    output\n",
+      "run: 1720175896\n",
+      "  FairBaseParSet                                1720175896         -1          1\n",
+      "  FairGeoParSet                                 1720175896         -1          1\n",
+      "  CbmGeoPassivePar                              1720175896         -1          1\n",
+      "  CbmFieldPar                                           -1         -1          1\n",
+      "--------------  input/output  --------------------------------------------------\n",
+      "first input: none\n",
+      "second input: none\n",
+      "output:\n",
+      "OBJ: FairParRootFile\ttest.par.root\t : 0 at: 0x137274f0\n",
+      "Root file I/O test.par.root is open\n",
+      "detector I/Os:  FairGenericParIo\n",
+      "[INFO] Here I am\n",
+      "[INFO] Write Geant3Settings\n",
+      " **** GTRIGI: IEVENT=      1 IDEVT=      1 Random Seeds = **********           0\n",
+      "\n",
+      "[INFO] EventGenerator: Generate event 1\n",
+      "[INFO] EventGenerator: Rotate event by 5.1107 rad\n",
+      "[INFO] UnigenGenerator: Event ID 1, particles 963, primaries 963, b = 0 fm, phi (source) = 0 rad , phi (generated) = -0 rad\n",
+      "[INFO] EventGenerator: Event ID 1, tracks 963, vertex (0.00183597, -0.272284, -44.0027) cm\n",
+      "[INFO] EventGenerator: Beam angle (0, 0) rad, event plane angle 5.1107 rad (total 5.1107 rad) change\n",
+      "[INFO] CbmFsdGeoHandler has initialized maps\n",
+      "[INFO] fUnitIdToSpecsMap.size() = 1\n",
+      "[INFO] fModuleIdToSpecsMap.size() = 372\n",
+      "\n",
+      " *** GTRACK *** More than  10000 steps, tracking abandoned!\n",
+      " =====> TRACK    1 STACK NR   1 NTMULT=      6622     Cerenkov                 TOFG =     8.002 NS\n",
+      "       X          Y          Z          R     NAME  NUMBER   SLENG      STEP      DESTEP     GEKIN   MECHANISMS\n",
+      "     -8.0599     5.8851   195.6469     9.9798 rich    1     7.9893    0.0003    0.0  eV    6.272  eV NEXT SCOR STOP\n",
+      " IEVENT       1 IDEVT       1 Random Seeds **********           0 Time of flight      8.002 ns\n",
+      "\n",
+      "\n",
+      " *** GTRACK *** More than  10000 steps, tracking abandoned!\n",
+      " =====> TRACK    1 STACK NR   1 NTMULT=      6646     Cerenkov                 TOFG =     7.613 NS\n",
+      "       X          Y          Z          R     NAME  NUMBER   SLENG      STEP      DESTEP     GEKIN   MECHANISMS\n",
+      "     -7.6363     5.5571   184.0066     9.4443 rich    1     7.3858    0.0003    0.0  eV    4.169  eV NEXT SCOR STOP\n",
+      " IEVENT       1 IDEVT       1 Random Seeds **********           0 Time of flight      7.613 ns\n",
+      "\n",
+      "\n",
+      " *** GTRACK *** More than  10000 steps, tracking abandoned!\n",
+      " =====> TRACK    1 STACK NR   1 NTMULT=      6700     Cerenkov                 TOFG =     6.891 NS\n",
+      "       X          Y          Z          R     NAME  NUMBER   SLENG      STEP      DESTEP     GEKIN   MECHANISMS\n",
+      "     -6.7460     5.0904   162.4149     8.4511 rich    1     5.2554    0.0002    0.0  eV    6.509  eV NEXT SCOR STOP\n",
+      " IEVENT       1 IDEVT       1 Random Seeds **********           0 Time of flight      6.891 ns\n",
+      "\n",
+      " GTREVE_ROOT : Transporting primary track No        900\n",
+      " GTREVE_ROOT : Transporting primary track No        800\n",
+      " GTREVE_ROOT : Transporting primary track No        700\n",
+      " GTREVE_ROOT : Transporting primary track No        600\n",
+      " GTREVE_ROOT : Transporting primary track No        500\n",
+      " GTREVE_ROOT : Transporting primary track No        400\n",
+      " GTREVE_ROOT : Transporting primary track No        300\n",
+      " GTREVE_ROOT : Transporting primary track No        200\n",
+      " GTREVE_ROOT : Transporting primary track No        100\n",
+      "[INFO] CbmStack: 129478 particles, 14205 written to output.\n",
+      "[INFO] MCEventFilter: MCTracks 14205, Points: MVD 1583  STS 3722  RICH 6609  TRD 1883  TOF 8246  FSD 397  PSD 2829  \n",
+      "[INFO] MCEventFilter: Current event 1 selected for output\n",
+      "[INFO] MVD: 1583 points registered in this event.\n",
+      "[INFO] STSMC: 3722 points registered in this event.\n",
+      "[INFO] RICH: 6609 points registered in this event.\n",
+      "[INFO] TRD: 1883 points registered in this event.\n",
+      "[INFO] TOF: 8246 points registered in this event.\n",
+      "[INFO] PSDMC: 2829 points registered in this event.\n",
+      "[INFO] FSDMC: 397 points registered in this event.\n",
+      "\n",
+      "[INFO] MCEventFilter: Number of input events  1\n",
+      "[INFO] MCEventFilter: Number of output events 1 = 100 %\n",
+      "\n",
+      "\n",
+      "[INFO] CbmTransport: Run finished successfully.\n",
+      "[INFO] CbmTransport: Wall time for Init : 2.15356 s \n",
+      "[INFO] CbmTransport: Wall time for Run  : 6.61636 s (6.61636 s / event)\n",
+      "[INFO] CbmTransport: Output file    : test.tra.root\n",
+      "[INFO] CbmTransport: Parameter file : test.par.root\n",
+      "[INFO] CbmTransport: Geometry file  : test.geo.root\n",
+      "\n",
+      "\n"
+     ]
+    },
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "Info in <TGeoManager::TGeoManager>: Geometry FAIRGeom, FAIR geometry created\n",
+      "Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave\n",
+      "Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100\n",
+      "Warning in <TGeoMaterial::ctor>: Material MAG_Vacuum defined with fractional Z=0.500000\n",
+      "Info in <TGeoManager::CheckGeometry>: Fixing runtime shapes...\n",
+      "Info in <TGeoManager::CheckGeometry>: ...Nothing to fix\n",
+      "Info in <TGeoManager::CloseGeometry>: Counting nodes...\n",
+      "Info in <TGeoManager::Voxelize>: Voxelizing...\n",
+      "Info in <TGeoManager::CloseGeometry>: Building cache...\n",
+      "Info in <TGeoManager::CountLevels>: max level = 10, max placements = 372\n",
+      "Info in <TGeoManager::CloseGeometry>: 577444 nodes/ 1092 volume UID's in FAIR geometry\n",
+      "Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------\n",
+      "Error in <TExMap::Remove>: key 166863080 not found at 3052\n",
+      "Error in <TExMap::Remove>: key 166863280 not found at 3252\n",
+      "Error in <TExMap::Remove>: key 166863472 not found at 3446\n",
+      "Error in <TExMap::Remove>: key 166863664 not found at 3640\n",
+      "Error in <TExMap::Remove>: key 166863856 not found at 3834\n",
+      "Error in <TExMap::Remove>: key 166864048 not found at 4021\n",
+      "Error in <TExMap::Remove>: key 166864240 not found at 4213\n",
+      "Error in <TExMap::Remove>: key 166864432 not found at 4404\n",
+      "Error in <TExMap::Remove>: key 166864624 not found at 4597\n",
+      "Error in <TExMap::Remove>: key 166864816 not found at 4788\n",
+      "Error in <TExMap::Remove>: key 166865008 not found at 4980\n",
+      "Error in <TExMap::Remove>: key 166865200 not found at 5173\n",
+      "Error in <TExMap::Remove>: key 166865352 not found at 5325\n",
+      "Error in <TExMap::Remove>: key 166865552 not found at 53\n",
+      "Error in <TExMap::Remove>: key 166865744 not found at 245\n",
+      "Error in <TExMap::Remove>: key 166865936 not found at 438\n",
+      "Error in <TExMap::Remove>: key 166866128 not found at 630\n",
+      "Error in <TExMap::Remove>: key 166866320 not found at 821\n",
+      "Error in <TExMap::Remove>: key 166866512 not found at 1014\n",
+      "Error in <TExMap::Remove>: key 166866704 not found at 1205\n",
+      "Error in <TExMap::Remove>: key 166866896 not found at 1397\n",
+      "Error in <TExMap::Remove>: key 166867088 not found at 1589\n",
+      "Error in <TExMap::Remove>: key 166867352 not found at 1853\n",
+      "Error in <TExMap::Remove>: key 166870864 not found at 5365\n",
+      "Error in <TExMap::Remove>: key 166871016 not found at 46\n",
+      "Error in <TExMap::Remove>: key 166873936 not found at 2966\n",
+      "Error in <TExMap::Remove>: key 166874024 not found at 3054\n",
+      "Error in <TExMap::Remove>: key 166874112 not found at 3142\n",
+      "Error in <TExMap::Remove>: key 166874200 not found at 3230\n",
+      "Error in <TExMap::Remove>: key 166874720 not found at 3750\n",
+      "Error in <TExMap::Remove>: key 166874808 not found at 3838\n",
+      "Error in <TExMap::Remove>: key 166874896 not found at 3926\n",
+      "Error in <TExMap::Remove>: key 166874984 not found at 4014\n",
+      "Error in <TExMap::Remove>: key 166875072 not found at 4104\n",
+      "Error in <TExMap::Remove>: key 166875592 not found at 4622\n",
+      "Error in <TExMap::Remove>: key 166875680 not found at 4711\n",
+      "Error in <TExMap::Remove>: key 166875768 not found at 4798\n",
+      "Error in <TExMap::Remove>: key 166875856 not found at 4886\n",
+      "Error in <TExMap::Remove>: key 166875944 not found at 4975\n",
+      "Error in <TExMap::Remove>: key 166876032 not found at 5062\n",
+      "Error in <TExMap::Remove>: key 166876552 not found at 111\n",
+      "Error in <TExMap::Remove>: key 166876640 not found at 200\n",
+      "Error in <TExMap::Remove>: key 166876728 not found at 287\n",
+      "Error in <TExMap::Remove>: key 166876816 not found at 376\n",
+      "Error in <TExMap::Remove>: key 166876904 not found at 463\n",
+      "Error in <TExMap::Remove>: key 166876992 not found at 552\n",
+      "Error in <TExMap::Remove>: key 166877512 not found at 1074\n",
+      "Error in <TExMap::Remove>: key 166877600 not found at 1161\n",
+      "Error in <TExMap::Remove>: key 166877688 not found at 1247\n",
+      "Error in <TExMap::Remove>: key 166877776 not found at 1336\n",
+      "Error in <TExMap::Remove>: key 166877864 not found at 1424\n",
+      "Error in <TExMap::Remove>: key 166878384 not found at 1943\n",
+      "Error in <TExMap::Remove>: key 166878472 not found at 2031\n",
+      "Error in <TExMap::Remove>: key 166878560 not found at 2119\n",
+      "Error in <TExMap::Remove>: key 166878648 not found at 2207\n",
+      "Error in <TExMap::Remove>: key 166878736 not found at 2295\n",
+      "Error in <TExMap::Remove>: key 166878824 not found at 2383\n",
+      "Error in <TExMap::Remove>: key 166878912 not found at 2472\n",
+      "Error in <TExMap::Remove>: key 166879432 not found at 2992\n",
+      "Error in <TExMap::Remove>: key 166879520 not found at 3079\n",
+      "Error in <TExMap::Remove>: key 166879608 not found at 3168\n",
+      "Error in <TExMap::Remove>: key 166880128 not found at 3687\n",
+      "Error in <TExMap::Remove>: key 166880216 not found at 3776\n",
+      "Error in <TExMap::Remove>: key 166880304 not found at 3863\n",
+      "Error in <TExMap::Remove>: key 166880392 not found at 3951\n",
+      "Error in <TExMap::Remove>: key 166880912 not found at 4471\n",
+      "Error in <TExMap::Remove>: key 166881000 not found at 4559\n",
+      "Error in <TExMap::Remove>: key 166881088 not found at 4647\n",
+      "Error in <TExMap::Remove>: key 166881240 not found at 4799\n",
+      "Error in <TExMap::Remove>: key 166882440 not found at 528\n",
+      "Error in <TExMap::Remove>: key 166882528 not found at 616\n",
+      "Error in <TExMap::Remove>: key 166882616 not found at 705\n",
+      "Error in <TExMap::Remove>: key 173113976 not found at 596\n",
+      "Error in <TExMap::Remove>: key 173114064 not found at 683\n",
+      "Error in <TExMap::Remove>: key 243369256 not found at 2764\n",
+      "Error in <TExMap::Remove>: key 243369408 not found at 2917\n",
+      "Error in <TExMap::Remove>: key 243369560 not found at 3068\n",
+      "Error in <TExMap::Remove>: key 243369712 not found at 3222\n",
+      "Error in <TExMap::Remove>: key 243369864 not found at 3372\n",
+      "Error in <TExMap::Remove>: key 245541160 not found at 2682\n",
+      "Error in <TExMap::Remove>: key 245541360 not found at 2881\n",
+      "Error in <TExMap::Remove>: key 245541552 not found at 3074\n",
+      "Error in <TExMap::Remove>: key 245541744 not found at 3265\n",
+      "Error in <TExMap::Remove>: key 245541936 not found at 3461\n",
+      "Error in <TExMap::Remove>: key 245542128 not found at 3649\n",
+      "Error in <TExMap::Remove>: key 245542320 not found at 3842\n",
+      "Error in <TExMap::Remove>: key 245542512 not found at 4033\n",
+      "Error in <TExMap::Remove>: key 245542704 not found at 4226\n",
+      "Error in <TExMap::Remove>: key 245542896 not found at 4417\n",
+      "Error in <TExMap::Remove>: key 245543088 not found at 4609\n",
+      "Error in <TExMap::Remove>: key 245543280 not found at 4801\n",
+      "Error in <TExMap::Remove>: key 245543472 not found at 4993\n",
+      "Error in <TExMap::Remove>: key 245543664 not found at 5185\n",
+      "Error in <TExMap::Remove>: key 245543856 not found at 5377\n",
+      "Error in <TExMap::Remove>: key 245544048 not found at 99\n",
+      "Error in <TExMap::Remove>: key 245544240 not found at 290\n",
+      "Error in <TExMap::Remove>: key 245544432 not found at 486\n",
+      "Error in <TExMap::Remove>: key 245544624 not found at 674\n",
+      "Error in <TExMap::Remove>: key 245544816 not found at 866\n",
+      "Error in <TExMap::Remove>: key 245545008 not found at 1058\n",
+      "Error in <TExMap::Remove>: key 245545200 not found at 1250\n",
+      "Error in <TExMap::Remove>: key 245545392 not found at 1442\n",
+      "Error in <TExMap::Remove>: key 245545584 not found at 1635\n",
+      "Error in <TExMap::Remove>: key 245545776 not found at 1826\n",
+      "Error in <TExMap::Remove>: key 245545968 not found at 2018\n",
+      "Error in <TExMap::Remove>: key 245546160 not found at 2214\n",
+      "Error in <TExMap::Remove>: key 245546352 not found at 2402\n",
+      "Error in <TExMap::Remove>: key 245546544 not found at 2596\n",
+      "Error in <TExMap::Remove>: key 245546736 not found at 2786\n",
+      "Error in <TExMap::Remove>: key 245546928 not found at 2978\n",
+      "Error in <TExMap::Remove>: key 245547120 not found at 3170\n",
+      "Error in <TExMap::Remove>: key 245547312 not found at 3362\n",
+      "Error in <TExMap::Remove>: key 245547504 not found at 3554\n",
+      "Error in <TExMap::Remove>: key 245547696 not found at 3750\n",
+      "Error in <TExMap::Remove>: key 245547888 not found at 3940\n",
+      "Error in <TExMap::Remove>: key 245548080 not found at 4130\n",
+      "Error in <TExMap::Remove>: key 245548272 not found at 4323\n",
+      "Error in <TExMap::Remove>: key 245548464 not found at 4514\n",
+      "Error in <TExMap::Remove>: key 245548656 not found at 4708\n",
+      "Error in <TExMap::Remove>: key 245548848 not found at 4898\n",
+      "Error in <TExMap::Remove>: key 245549040 not found at 5090\n",
+      "Error in <TExMap::Remove>: key 245549232 not found at 5282\n",
+      "Error in <TExMap::Remove>: key 245549424 not found at 3\n",
+      "Error in <TExMap::Remove>: key 245549664 not found at 243\n",
+      "Error in <TExMap::Remove>: key 245549856 not found at 438\n",
+      "Error in <TExMap::Remove>: key 245550048 not found at 627\n",
+      "Error in <TExMap::Remove>: key 245550240 not found at 821\n",
+      "Error in <TExMap::Remove>: key 245550432 not found at 1014\n",
+      "Error in <TExMap::Remove>: key 245550672 not found at 1252\n",
+      "Error in <TExMap::Remove>: key 246287064 not found at 4532\n",
+      "Error in <TExMap::Remove>: key 246287200 not found at 4668\n",
+      "Error in <TExMap::Remove>: key 246287328 not found at 4793\n",
+      "Error in <TExMap::Remove>: key 246287456 not found at 4921\n",
+      "Error in <TExMap::Remove>: key 246287584 not found at 5049\n",
+      "Error in <TExMap::Remove>: key 246287712 not found at 5177\n",
+      "Error in <TExMap::Remove>: key 246287840 not found at 5306\n",
+      "Error in <TExMap::Remove>: key 246287968 not found at 5433\n",
+      "Error in <TExMap::Remove>: key 246288096 not found at 90\n",
+      "Error in <TExMap::Remove>: key 246288272 not found at 267\n"
+     ]
+    }
+   ],
+   "source": [
+    "# /* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt\n",
+    "#    SPDX-License-Identifier: GPL-3.0-only\n",
+    "#    Authors: Volker Friese [original file committer], Ralf Kliemt */\n",
+    "ROOT.gROOT.Reset()\n",
+    "\n",
+    "input = \"\"\n",
+    "nEvents = 1\n",
+    "output = \"test\"  \n",
+    "setup = \"sis100_electron\"\n",
+    "randomSeed = 0\n",
+    "overwrite = True\n",
+    "\n",
+    "# --- Logger settings ----------------------------------------------------\n",
+    "ROOT.FairLogger.GetLogger().SetLogScreenLevel(\"INFO\")\n",
+    "ROOT.FairLogger.GetLogger().SetLogVerbosityLevel(\"LOW\")\n",
+    "\n",
+    "# -----   Environment   --------------------------------------------------\n",
+    "myName = \"CbmJupyTransport\"                 # this macro's name for screen output\n",
+    "srcDir = ROOT.gSystem.Getenv(\"VMCWORKDIR\")  # top source directory\n",
+    "\n",
+    "# -----   Input file   ---------------------------------------------------\n",
+    "# Use default input if not specified by the user\n",
+    "defaultInput = srcDir + \"/input/urqmd.auau.10gev.centr.root\"\n",
+    "inFile = input if input != \"\" else defaultInput\n",
+    "print(f\"-I- {myName}: Using input file {inFile}\")\n",
+    "\n",
+    "# -----   Output files   -------------------------------------------------\n",
+    "dataset = output\n",
+    "outFile = dataset + \".tra.root\"\n",
+    "parFile = dataset + \".par.root\"\n",
+    "geoFile = dataset + \".geo.root\"\n",
+    "if overwrite:\n",
+    "  if os.path.exists(outFile):\n",
+    "    os.remove(outFile)\n",
+    "    print(f\"The file {outFile} has been deleted.\")\n",
+    "  if os.path.exists(parFile):\n",
+    "    os.remove(parFile)\n",
+    "    print(f\"The file {parFile} has been deleted.\")\n",
+    "  if os.path.exists(geoFile):\n",
+    "    os.remove(geoFile)\n",
+    "    print(f\"The file {geoFile} has been deleted.\")\n",
+    "\n",
+    "# -----   Target properties   --------------------------------------------\n",
+    "targetMaterial  = \"Gold\"\n",
+    "targetThickness = 0.025  # in cm\n",
+    "targetDiameter  = 2.5    # in cm\n",
+    "targetZpos = -44.0\n",
+    "# The target is at -44 cm from the centre of the magnet.\n",
+    "print(f\"Target is at {targetZpos}cm from origin\")\n",
+    "\n",
+    "# -----   Beam properties   ----------------------------------------------\n",
+    "beamPosX   = 0.\n",
+    "beamPosY   = 0.\n",
+    "beamSigmaX = 0.1  # cm\n",
+    "beamSigmaY = 0.1  # cm\n",
+    "# -----   Event plane rotation   -----------------------------------------\n",
+    "rotateEvents = True\n",
+    "\n",
+    "# --- Transport run preparation-------------------------------------------\n",
+    "print(\"Creating a RUN object\")\n",
+    "timer = ROOT.TStopwatch()\n",
+    "timer.Start()\n",
+    "run = ROOT.CbmTransport()\n",
+    "engine = ROOT.kGeant3\n",
+    "run.SetEngine(engine)\n",
+    "if \"pluto\" in inFile.lower():\n",
+    "  run.AddInput(inFile, ROOT.kPluto)\n",
+    "else:\n",
+    "  run.AddInput(inFile, ROOT.kUnigen)\n",
+    "run.SetOutFileName(outFile, overwrite)\n",
+    "run.SetParFileName(parFile)\n",
+    "run.SetGeoFileName(geoFile)\n",
+    "\n",
+    "print(\"Loading the setup\")\n",
+    "run.LoadSetup(setup)\n",
+    "if not run.GetSetup().IsActive(ROOT.ECbmModuleId.kTarget):\n",
+    "  print(\"Target being generated in tra macro\")\n",
+    "  run.SetTarget(targetMaterial, targetThickness, targetDiameter, 0, 0, targetZpos)\n",
+    "run.SetBeamPosition(beamPosX, beamPosY, beamSigmaX, beamSigmaY)\n",
+    "if rotateEvents: \n",
+    "  run.SetRandomEventPlane()\n",
+    "run.SetRandomSeed(randomSeed)\n",
+    "\n",
+    "# --- Transport run execution -------------------------------------------\n",
+    "print(f\"Starting the RUN with {nEvents} events\")\n",
+    "run.Run(nEvents)\n",
+    "\n",
+    "# ------------------------------------------------------------------------\n",
+    "# -----   Finish   -------------------------------------------------------\n",
+    "timer.Stop()\n",
+    "rtime = timer.RealTime()\n",
+    "ctime = timer.CpuTime()\n",
+    "sysInfo = ROOT.FairSystemInfo()\n",
+    "maxMemory = sysInfo.GetMaxMemory()\n",
+    "cpuUsage = ctime / rtime\n",
+    "print(f\"Macro finished successfully.\")\n",
+    "print(f\"Real time {rtime} s, CPU time {ctime}s\")\n",
+    "print(f\"MaxMemory {maxMemory}\")\n",
+    "print(f\"CpuLoad{cpuUsage}\")\n",
+    "ROOT.gROOT.Reset()\n",
+    "# ------------------------------------------------------------------------\n",
+    "# End of macro\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "a208d11e",
+   "metadata": {},
+   "source": [
+    "## A quick plot\n",
+    "\n",
+    "Plotting with ROOT is still working. To show a canvas use its `Draw()` function."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "ef5347b0",
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "\n",
+       "\n",
+       "<div id=\"root_plot_1720175905212\"\n",
+       "     style=\"width: 696px; height: 472px\">\n",
+       "</div>\n",
+       "<script>\n",
+       "\n",
+       "function display_root_plot_1720175905212(Core) {\n",
+       "   let obj = Core.parse({\"_typename\":\"TCanvas\",\"fUniqueID\":0,\"fBits\":3375112,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":0,\"fFillStyle\":1001,\"fLeftMargin\":0.1,\"fRightMargin\":0.1,\"fBottomMargin\":0.1,\"fTopMargin\":0.1,\"fXfile\":2,\"fYfile\":2,\"fAfile\":1,\"fXstat\":0.99,\"fYstat\":0.99,\"fAstat\":2,\"fFrameFillColor\":0,\"fFrameLineColor\":1,\"fFrameFillStyle\":1001,\"fFrameLineStyle\":1,\"fFrameLineWidth\":1,\"fFrameBorderSize\":1,\"fFrameBorderMode\":0,\"fX1\":-33.5000008568168,\"fY1\":-37.6687528065408,\"fX2\":81.5000008568168,\"fY2\":339.018752806541,\"fXtoAbsPixelk\":202.747878251383,\"fXtoPixelk\":202.747878251383,\"fXtoPixel\":6.05217382285905,\"fYtoAbsPixelk\":424.800047186661,\"fYtoPixelk\":424.800047186661,\"fYtoPixel\":-1.25302802181291,\"fUtoAbsPixelk\":5e-5,\"fUtoPixelk\":5e-5,\"fUtoPixel\":696,\"fVtoAbsPixelk\":472.00005,\"fVtoPixelk\":472,\"fVtoPixel\":-472,\"fAbsPixeltoXk\":-33.5000008568168,\"fPixeltoXk\":-33.5000008568168,\"fPixeltoX\":0.165229887519589,\"fAbsPixeltoYk\":339.018752806541,\"fPixeltoYk\":-37.6687528065408,\"fPixeltoY\":-0.798066749180257,\"fXlowNDC\":0,\"fYlowNDC\":0,\"fXUpNDC\":1,\"fYUpNDC\":1,\"fWNDC\":1,\"fHNDC\":1,\"fAbsXlowNDC\":0,\"fAbsYlowNDC\":0,\"fAbsWNDC\":1,\"fAbsHNDC\":1,\"fUxmin\":-22,\"fUymin\":0,\"fUxmax\":70,\"fUymax\":301.35,\"fTheta\":30,\"fPhi\":30,\"fAspectRatio\":0,\"fNumber\":0,\"fTickx\":0,\"fTicky\":0,\"fLogx\":0,\"fLogy\":0,\"fLogz\":0,\"fPadPaint\":0,\"fCrosshair\":0,\"fCrosshairPos\":0,\"fBorderSize\":2,\"fBorderMode\":0,\"fModified\":false,\"fGridx\":false,\"fGridy\":false,\"fAbsCoord\":false,\"fEditable\":true,\"fFixedAspectRatio\":false,\"fPrimitives\":{\"_typename\":\"TList\",\"name\":\"TList\",\"arr\":[{\"_typename\":\"TFrame\",\"fUniqueID\":0,\"fBits\":8,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":0,\"fFillStyle\":1001,\"fX1\":-22,\"fY1\":0,\"fX2\":70,\"fY2\":301.35,\"fBorderSize\":1,\"fBorderMode\":0},{\"_typename\":\"TH1F\",\"fUniqueID\":0,\"fBits\":9,\"fName\":\"htemp\",\"fTitle\":\"StsPoint.fZ\",\"fLineColor\":602,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":0,\"fFillStyle\":1001,\"fMarkerColor\":1,\"fMarkerStyle\":1,\"fMarkerSize\":1,\"fNcells\":102,\"fXaxis\":{\"_typename\":\"TAxis\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"xaxis\",\"fTitle\":\"StsPoint.fZ\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":1,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42,\"fNbins\":100,\"fXmin\":-22,\"fXmax\":70,\"fXbins\":[],\"fFirst\":1,\"fLast\":100,\"fBits2\":0,\"fTimeDisplay\":false,\"fTimeFormat\":\"\",\"fLabels\":null,\"fModLabs\":null},\"fYaxis\":{\"_typename\":\"TAxis\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"yaxis\",\"fTitle\":\"\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":0,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42,\"fNbins\":1,\"fXmin\":0,\"fXmax\":1,\"fXbins\":[],\"fFirst\":0,\"fLast\":0,\"fBits2\":0,\"fTimeDisplay\":false,\"fTimeFormat\":\"\",\"fLabels\":null,\"fModLabs\":null},\"fZaxis\":{\"_typename\":\"TAxis\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"zaxis\",\"fTitle\":\"\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":1,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42,\"fNbins\":1,\"fXmin\":0,\"fXmax\":1,\"fXbins\":[],\"fFirst\":0,\"fLast\":0,\"fBits2\":0,\"fTimeDisplay\":false,\"fTimeFormat\":\"\",\"fLabels\":null,\"fModLabs\":null},\"fBarOffset\":0,\"fBarWidth\":1000,\"fEntries\":3722,\"fTsumw\":3722,\"fTsumw2\":3722,\"fTsumwx\":79670.7818379402,\"fTsumwx2\":3997768.61183205,\"fMaximum\":-1111,\"fMinimum\":-1111,\"fNormFactor\":0,\"fContour\":[],\"fSumw2\":[],\"fOption\":\"\",\"fFunctions\":{\"_typename\":\"TList\",\"name\":\"TList\",\"arr\":[{\"_typename\":\"TPaveStats\",\"fUniqueID\":0,\"fBits\":9,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":0,\"fFillStyle\":1001,\"fX1\":56.2000023305417,\"fY1\":254.26406628883,\"fX2\":79.2000030159951,\"fY2\":314.534065839783,\"fX1NDC\":0.780000016093254,\"fY1NDC\":0.775000005960464,\"fX2NDC\":0.980000019073486,\"fY2NDC\":0.935000002384186,\"fBorderSize\":1,\"fInit\":1,\"fShadowColor\":1,\"fCornerRadius\":0,\"fOption\":\"brNDC\",\"fName\":\"stats\",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":12,\"fTextColor\":1,\"fTextFont\":42,\"fLabel\":\"\",\"fLongest\":18,\"fMargin\":0.05,\"fLines\":{\"_typename\":\"TList\",\"name\":\"TList\",\"arr\":[{\"_typename\":\"TLatex\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"\",\"fTitle\":\"htemp\",\"fTextAngle\":0,\"fTextSize\":0.0368,\"fTextAlign\":0,\"fTextColor\":0,\"fTextFont\":0,\"fX\":0,\"fY\":0,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":2,\"fLimitFactorSize\":3,\"fOriginSize\":0.0368000008165836},{\"_typename\":\"TLatex\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"\",\"fTitle\":\"Entries = 3722   \",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":0,\"fTextColor\":0,\"fTextFont\":0,\"fX\":0,\"fY\":0,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":2,\"fLimitFactorSize\":3,\"fOriginSize\":0.04},{\"_typename\":\"TLatex\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"\",\"fTitle\":\"Mean  =  21.41\",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":0,\"fTextColor\":0,\"fTextFont\":0,\"fX\":0,\"fY\":0,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":2,\"fLimitFactorSize\":3,\"fOriginSize\":0.04},{\"_typename\":\"TLatex\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"\",\"fTitle\":\"Std Dev   =  24.82\",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":0,\"fTextColor\":0,\"fTextFont\":0,\"fX\":0,\"fY\":0,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":2,\"fLimitFactorSize\":3,\"fOriginSize\":0.04}],\"opt\":[\"\",\"\",\"\",\"\"]},\"fOptFit\":0,\"fOptStat\":1111,\"fFitFormat\":\"5.4g\",\"fStatFormat\":\"6.4g\",\"fParent\":{\"$ref\":3}}],\"opt\":[\"brNDC\"]},\"fBufferSize\":0,\"fBuffer\":[],\"fBinStatErrOpt\":0,\"fStatOverflows\":2,\"fArray\":{\"$arr\":\"Float32\",\"len\":102,\"p\":8,\"v\":[109,177,218,0,0,0,0,0,0,0,0,0,287,231,5,0,0,0,0,0,0,0,0,197,173,206],\"p1\":45,\"v1\":[220,236,22,0,0,0,0,0,0,0,0,152,110,148,0,0,0,0,0,0,0,0,7,193,199,0,0,0,0,0,0,0,0,0,189,114,112,0,0,0,0,0,0,0,0,37,178,202]}},{\"_typename\":\"TPaveText\",\"fUniqueID\":0,\"fBits\":9,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":0,\"fFillStyle\":0,\"fX1\":12.4405170691296,\"fY1\":316.417503957222,\"fX2\":35.5594829308704,\"fY2\":337.135317074661,\"fX1NDC\":0.39948275862069,\"fY1NDC\":0.940000003948808,\"fX2NDC\":0.60051724137931,\"fY2NDC\":0.995000004768372,\"fBorderSize\":0,\"fInit\":1,\"fShadowColor\":1,\"fCornerRadius\":0,\"fOption\":\"blNDC\",\"fName\":\"title\",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":22,\"fTextColor\":1,\"fTextFont\":42,\"fLabel\":\"\",\"fLongest\":11,\"fMargin\":0.05,\"fLines\":{\"_typename\":\"TList\",\"name\":\"TList\",\"arr\":[{\"_typename\":\"TLatex\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"\",\"fTitle\":\"StsPoint.fZ\",\"fTextAngle\":0,\"fTextSize\":0,\"fTextAlign\":0,\"fTextColor\":0,\"fTextFont\":0,\"fX\":0,\"fY\":0,\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":2,\"fLimitFactorSize\":3,\"fOriginSize\":0.0467500016093254}],\"opt\":[\"\"]}},{\"_typename\":\"TStyle\",\"fUniqueID\":0,\"fBits\":0,\"fName\":\"Modern\",\"fTitle\":\"Modern Style\",\"fLineColor\":1,\"fLineStyle\":1,\"fLineWidth\":1,\"fFillColor\":19,\"fFillStyle\":1001,\"fMarkerColor\":1,\"fMarkerStyle\":1,\"fMarkerSize\":1,\"fTextAngle\":0,\"fTextSize\":0.05,\"fTextAlign\":11,\"fTextColor\":1,\"fTextFont\":62,\"fXaxis\":{\"_typename\":\"TAttAxis\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":1,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42},\"fYaxis\":{\"_typename\":\"TAttAxis\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":0,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42},\"fZaxis\":{\"_typename\":\"TAttAxis\",\"fNdivisions\":510,\"fAxisColor\":1,\"fLabelColor\":1,\"fLabelFont\":42,\"fLabelOffset\":0.005,\"fLabelSize\":0.035,\"fTickLength\":0.03,\"fTitleOffset\":1,\"fTitleSize\":0.035,\"fTitleColor\":1,\"fTitleFont\":42},\"fBarWidth\":1,\"fBarOffset\":0,\"fColorModelPS\":0,\"fDrawBorder\":0,\"fOptLogx\":0,\"fOptLogy\":0,\"fOptLogz\":0,\"fOptDate\":0,\"fOptStat\":1111,\"fOptTitle\":1,\"fOptFile\":0,\"fOptFit\":0,\"fShowEventStatus\":0,\"fShowEditor\":0,\"fShowToolBar\":0,\"fNumberContours\":20,\"fAttDate\":{\"_typename\":\"TAttText\",\"fTextAngle\":0,\"fTextSize\":0.025,\"fTextAlign\":11,\"fTextColor\":1,\"fTextFont\":62},\"fDateX\":0.01,\"fDateY\":0.01,\"fEndErrorSize\":2,\"fErrorX\":0.5,\"fFuncColor\":2,\"fFuncStyle\":1,\"fFuncWidth\":2,\"fGridColor\":0,\"fGridStyle\":3,\"fGridWidth\":1,\"fLegendBorderSize\":1,\"fLegendFillColor\":0,\"fLegendFont\":42,\"fLegendTextSize\":0,\"fHatchesLineWidth\":1,\"fHatchesSpacing\":1,\"fFrameFillColor\":0,\"fFrameLineColor\":1,\"fFrameFillStyle\":1001,\"fFrameLineStyle\":1,\"fFrameLineWidth\":1,\"fFrameBorderSize\":1,\"fFrameBorderMode\":0,\"fHistFillColor\":0,\"fHistLineColor\":602,\"fHistFillStyle\":1001,\"fHistLineStyle\":1,\"fHistLineWidth\":1,\"fHistMinimumZero\":false,\"fHistTopMargin\":0.05,\"fCanvasPreferGL\":false,\"fCanvasColor\":0,\"fCanvasBorderSize\":2,\"fCanvasBorderMode\":0,\"fCanvasDefH\":500,\"fCanvasDefW\":700,\"fCanvasDefX\":10,\"fCanvasDefY\":10,\"fPadColor\":0,\"fPadBorderSize\":2,\"fPadBorderMode\":0,\"fPadBottomMargin\":0.1,\"fPadTopMargin\":0.1,\"fPadLeftMargin\":0.1,\"fPadRightMargin\":0.1,\"fPadGridX\":false,\"fPadGridY\":false,\"fPadTickX\":0,\"fPadTickY\":0,\"fPaperSizeX\":20,\"fPaperSizeY\":26,\"fScreenFactor\":1,\"fStatColor\":0,\"fStatTextColor\":1,\"fStatBorderSize\":1,\"fStatFont\":42,\"fStatFontSize\":0,\"fStatStyle\":1001,\"fStatFormat\":\"6.4g\",\"fStatX\":0.98,\"fStatY\":0.935,\"fStatW\":0.2,\"fStatH\":0.16,\"fStripDecimals\":true,\"fTitleAlign\":23,\"fTitleColor\":0,\"fTitleTextColor\":1,\"fTitleBorderSize\":0,\"fTitleFont\":42,\"fTitleFontSize\":0.05,\"fTitleStyle\":0,\"fTitleX\":0.5,\"fTitleY\":0.995,\"fTitleW\":0,\"fTitleH\":0,\"fLegoInnerR\":0.5,\"fLineStyles\":[\"\",\"  \",\" 12 12\",\" 4 8\",\" 12 16 4 16\",\" 20 12 4 12\",\" 20 12 4 12 4 12 4 12\",\" 20 20\",\" 20 12 4 12 4 12\",\" 80 20\",\" 80 40 4 40\",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \",\"  \"],\"fHeaderPS\":\"\",\"fTitlePS\":\"\",\"fFitFormat\":\"5.4g\",\"fPaintTextFormat\":\"g\",\"fLineScalePS\":3,\"fJoinLinePS\":0,\"fCapLinePS\":0,\"fTimeOffset\":788918400,\"fImageScaling\":1}],\"opt\":[\"\",\"\",\"blNDC\",\"\"]},\"fExecs\":null,\"fName\":\"c1\",\"fTitle\":\"c1\",\"fNumPaletteColor\":0,\"fNextPaletteColor\":0,\"fDISPLAY\":\"$DISPLAY\",\"fDoubleBuffer\":0,\"fRetained\":true,\"fXsizeUser\":0,\"fYsizeUser\":0,\"fXsizeReal\":20,\"fYsizeReal\":14.28571,\"fWindowTopX\":0,\"fWindowTopY\":0,\"fWindowWidth\":0,\"fWindowHeight\":0,\"fCw\":696,\"fCh\":472,\"fCatt\":{\"_typename\":\"TAttCanvas\",\"fXBetween\":2,\"fYBetween\":2,\"fTitleFromTop\":1.2,\"fXdate\":0.2,\"fYdate\":0.3,\"fAdate\":1},\"kMoveOpaque\":true,\"kResizeOpaque\":true,\"fHighLightColor\":2,\"fBatch\":true,\"kShowEventStatus\":true,\"kAutoExec\":true,\"kMenuBar\":true});\n",
+       "   Core.settings.HandleKeys = false;\n",
+       "   Core.draw(\"root_plot_1720175905212\", obj, \"\");\n",
+       "}\n",
+       "\n",
+       "function script_load_root_plot_1720175905212(src, on_error) {\n",
+       "    let script = document.createElement('script');\n",
+       "    script.src = src;\n",
+       "    script.onload = function() { display_root_plot_1720175905212(JSROOT); };\n",
+       "    script.onerror = function() { script.remove(); on_error(); };\n",
+       "    document.head.appendChild(script);\n",
+       "}\n",
+       "\n",
+       "if (typeof requirejs !== 'undefined') {\n",
+       "\n",
+       "    // We are in jupyter notebooks, use require.js which should be configured already\n",
+       "    requirejs.config({\n",
+       "       paths: { 'JSRootCore' : [ 'scripts/JSRoot.core', 'https://root.cern/js/6.1.1/scripts/JSRoot.core.min', 'https://jsroot.gsi.de/6.1.1/scripts/JSRoot.core.min' ] }\n",
+       "    })(['JSRootCore'],  function(Core) {\n",
+       "       display_root_plot_1720175905212(Core);\n",
+       "    });\n",
+       "\n",
+       "} else if (typeof JSROOT !== 'undefined') {\n",
+       "\n",
+       "   // JSROOT already loaded, just use it\n",
+       "   display_root_plot_1720175905212(JSROOT);\n",
+       "\n",
+       "} else {\n",
+       "\n",
+       "    // We are in jupyterlab without require.js, directly loading jsroot\n",
+       "    // Jupyterlab might be installed in a different base_url so we need to know it.\n",
+       "    try {\n",
+       "        var base_url = JSON.parse(document.getElementById('jupyter-config-data').innerHTML).baseUrl;\n",
+       "    } catch(_) {\n",
+       "        var base_url = '/';\n",
+       "    }\n",
+       "\n",
+       "    // Try loading a local version of requirejs and fallback to cdn if not possible.\n",
+       "    script_load_root_plot_1720175905212(base_url + 'static/scripts/JSRoot.core.js', function(){\n",
+       "        console.error('Fail to load JSROOT locally, please check your jupyter_notebook_config.py file');\n",
+       "        script_load_root_plot_1720175905212('https://root.cern/js/6.1.1/scripts/JSRoot.core.min.js', function(){\n",
+       "            document.getElementById(\"root_plot_1720175905212\").innerHTML = \"Failed to load JSROOT\";\n",
+       "        });\n",
+       "    });\n",
+       "}\n",
+       "\n",
+       "</script>\n"
+      ],
+      "text/plain": [
+       "<IPython.core.display.HTML object>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "ROOT.gROOT.Reset()\n",
+    "%jsroot on\n",
+    "asimfile = ROOT.TFile(\"test.tra.root\")\n",
+    "atree = asimfile.Get(\"cbmsim\")\n",
+    "canvas = ROOT.TCanvas()\n",
+    "atree.Draw(\"StsPoint.fZ\",\"\")\n",
+    "canvas.Draw()\n"
+   ]
+  }
+ ],
+ "metadata": {
+  "@webio": {
+   "lastCommId": null,
+   "lastKernelId": null
+  },
+  "kernelspec": {
+   "display_name": "CbmRoot Python3",
+   "language": "python",
+   "name": "CbmRootPy"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.7.3"
+  },
+  "vscode": {
+   "interpreter": {
+    "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
+   }
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
-- 
GitLab