R3BROOT
R3B analysis software
|
The motivation of using a cli executable with a JSON file as the configuration is to provide users a much easier and robust way to run the R3BRoot tasks, such as for simulation and analysis. Compared to a ROOT Macro file, a JSON file only contains two things: strings and numbers. To run a task, users only need to look for some names and change the following values, without being burdened with unnecessary overhead in the ROOT Macro file, such as setting up FairRun or EventHeader in the correct order. It also provides opportunities for the users who just want to use the software without going deep to the ROOT/C++ programming language and code practices. The usage of a cli executable is also much safer and more robust than a ROOT Macro because the programming logic is fixed and users are only allowed to change the values according to their own needs.
Before running any application, please make sure the config.sh script in the R3BRoot/build folder is correctly sourced. The NeuLAND cli executable, neuland, includes the interfaces to multiple applications (modes), like simulation, offline and online (not yet implemented) analysis. The interface of each application/mode also take in multiple program options for further configurations. Configuration can be specified by either through the program options or a JSON file. When they are both used for the configuration (see below), the final configuration value should be the one specified by the program options.
The available mode values from the cli executable are
For example,
prints out the help message for the chosen application.
There are some program options that are shared by all modes/applications, such as input data and parameter file names, output data and parameter file names, run id, etc. The most important ones are specifying a JSON configuration file and dumping the default configuration to a JSON file.
If the JSON file is not available, using the option --dump-config, every mode/application generates a JSON file containing the corresponding default configuration values. This generated file can be used as a template and users should open the file and change the values according to their own needs. For example,
saves all default configurations to a new file called "config.json". If the file name is left empty, the default value will be used, which is different for each application.
To use the JSON file as the configuration:
If the configurations specified in the JSON file are the same as the default, they could be removed and the existing configurations will be imposed on the default values. Multiple JSON files can also be given, in which the configurations from the JSON file will overwrite the ones from the previous JSON file.
The program options from neuland mode -h can be used to overwrite certain values from the JSON file. For example,
simulates 5000 events regardless to the event value specified in JSON file.
The general JSON configuration exists for every application/mode.
Further information:
The logging tool used in this program is fairlogger. There are two different levels user can adjust: severity (log-level) and verbosity (verbosity-level). The severity specifies the level threshold whether a certain message should be printed out whereas the verbosity specifies the format with which the printed messages are displayed. Their available options are:
The format of each verbosity is shown in the following table:
verbosity | format |
---|---|
verylow | message |
low | [severity] message |
medium | [HH:MM:SS][severity] message |
high | [process_name][HH:MM:SS][severity] message |
veryhigh | [process_name][HH:MM:SS:µS][severity][file:line:function] message |
user1 | [severity][file:line:function] message |
user2 | [severity][HH:MM:SS][file:line:function] message |
Simulation application neuland sim is used for the simulation tasks using different particle generators and detector geometries.
The offline analysis application neuland ana is used to run the analysis tasks, such as digitization of the simulation output and event reconstruction.
All tasks listed above have three common options: "enable", "read" and "write". The "enable" option specifies whether the task is added or not. If some tasks should be added, simply change its value to true.
Options "read" and "write" specify the names of input branch or parameter that the task requires and the names of output branch and parameter the task produces. If not explicitly specified and one of the inputs is absent or not provided by the outputs of other task, the program will fail. Different tasks whose output can be fed as the input of the other can be enabled at the same time in one execution. However, if a task requires an input parameter, which can be generated by another task, they may not be enabled in the same execution as, most of time, the output parameter is only calculated in the very end of the run.
NeuLAND base parameter is required to do any data calibrations and conversions from the real experimental data. It has the type Neuland::CalibrationBasePar, which contains multiple important numbers relating to NeuLAND detector in an experiment, such as experiment ID, off-spill bit position, number of scintillation planes and the mapping of trigger signal IDs.
The program options such -i, -o, --offspill-pos, --exp-id must be given by users:
To be implemented ...