Skip to content

QA: Posibility of configuring histogram binning in CbmQaTask and clean-up of CbmCaInputQaTrd

Sergei Zharko requested to merge s.zharko/cbmroot:ca-input-qa-updates into master

Histograms Configuration

In this merge-request, a possibility of histogram binning configuration is introduced. The configuration file is optional and can be provided to the task with the function CbmQaTask::SetConfigName().

Each group of the binning parameters in the configuration file is mapped on a particular tag. To use the parameters, one may create a histogram with method CbmQaTask::MakeQaObject<T>(), applying the same signature as was applied to the constructor of the object, but defining a tag directly in the end of the histogram name, following with a semicolon. For example, in the CbmCaInputQaTrd task the call of auto* h = MakeQaObject<TH1D>("station0/pulls/pull_x;pull_x", "Pulls for x-coordinate", 100, -5., 5.); will create a histogram with a name "catrd_pull_x", stored in the sub-directory "CbmCaInputQaTrd/histograms/station0/pulls" and initialized with the parameters, defined for a tag "pull_x". If the configuration file or the tag is not provided, the default parameters "100, -5., 5." will be used to create a histogram.

A typical configuration file entry looks as follows:

qa:
  <task_name>:
    histograms:
      <tag>:
        x: { nbins: 100, min: -5., max: 5. }
        y: { nbins: 100, max: -5., max: 5. }

where <task_name> -- is a name of the task, -- is a binning tag, 'x' and 'y' are the names of the axes, the binning of which should be modified. Please note, that if the valid tag is passed into the MakeHistoConfig method, and defined in the configuration file, the user should provide all the necessary parameters, otherwise a std::runtime_error exception will be thrown. Example of the configuration file can be found by the path $VMCWORKDIR/macro/qa/configs/qa_tasks_config_mcbm.yaml.

Clean-Up of the CbmCaInputQaTrd Task

  1. CbmQaEff classes are replaced with TProfile/TProfile2D.
  2. A possibility to configure histogram binning was introduced to histograms vs. x and y coordinates.
  3. Histograms integrated by all TRD2D (with index = nSt) and by all TRD1D (with index = nSt + 1) were removed.
  4. Other histograms were sorted into sub-directories depending from the station index.
Edited by Sergei Zharko

Merge request reports