R3BROOT
R3B analysis software
|
The NeuLAND online analysis focuses on data visualization of different levels of NeuLAND data converted from the list mode data with existing calibration parameters. The analysis can be done either during the beam time, when the raw data comes from a socket (pipe) or after the beam time, when the raw data is stored in list mode files (file stream). The NeuLAND calibration parameters can be calculated from the cosmic data using multiple calibration algorithms. Both NeuLAND and LOS calibration parameters are required in this analysis and must be put in a single root file using a program called neuland_par_merger
. The output of the analysis are histograms of different NeuLAND data levels and can be checked concurrently through a web browser in the local machine.
Before running the program, please make sure R3BRoot is compiled successfully and the config.sh
is correctly sourced in the R3BRoot build folder:
The online analysis program is called neuland_online_monitor
and its flags can be checked with the command:
Here is the output:
Additional info about the flags above:
-n
: If the value is less than or equal to 0, the program will run through all events available.-i
: Use regex to specify multiple input lmd files.-p
: The port number must not be preoccupied.If more functionalities are required, please edit the source file neuland_online_monitor.cxx
accordingly and create a pull request for the new features, or directly contact developers in NeuLAND WG.
If the program is run in the local machine, to check the histograms from the program, simply open a web browser and visit the link http://localhost:10000.
If the program is run in a server (e.g. lxir136), before visiting the link, a ssh tunnel has to be created with:
10000:localhost:10000
must be the same as the number in the link used in browser. The second number must be the same as the port number used by neuland_online_monitor
. Sometimes this port number could be already occupied and the user must choose a different value (see this page to know which values should be chosen).to be tested
To merge parameters of different detectors and put them into a single file, one example can be shown below:
The meaning of flags can also be seen with the command:
Here is the output:
--par-in
flag specifies all file names of input parameters, separated by semicolons. Many important information, such as run ID and version numbers are only determined by the first file name.
The NeuLAND online analysis outputs histograms grouped by different canvases. The related FairTask
is the class named R3BNeulandOnlineSpetra2. The usage of this class can be seen in the source code neuland_online_monitor.cxx:
Here canvases are added one by one with the corresponding names and trigger conditions. If the trigger condition is not specified, the default one, R3B::Neuland::CalTrigger::all
, will be chosen. Triggers are defined in the source file R3BNeulandTriggerTypes.h with following available options (all in the namespace R3B::Neuland::CalTrigger
):
A canvas holds a set of histograms or graphs which are plotted with some data according to a certain trigger condition. To create a new canvas and add it to the online spectra class, user need to define a class derived from a bass class called R3BNeulandOnlineCanvas
. Many examples can be found in the folder canvases. Here is another simple example:
An canvas class contains 4 important virtual methods to be overriden:
The base class R3BNeulandOnlineCanvas
also contains a pointer to the online spectra, from which the event header and other parameters can be obtained as well.
The CanvasElement
class holds any graph-like object, such as histograms (TH1
) or graphs (TGraph
). To add the elements to the canvas, first a TCanvas
class need to be specified in the CanvasInit()
method:
Here the canvas is divided into 2 by 2 pads, each of which holds a canvas element. To specify the element with the corresponding pad, it can be done with:
The pad corresponding to each element can be obtained with:
, which comes really handy if user want to set logarithm scale on certain axis. All the interfaces to the underlying plot object can be accessed through '->' operator: