Skip to content

4. ReadROOT's Merger

Chloé Legué edited this page Jun 28, 2023 · 4 revisions

The Merger

In order to use the Merger, we need to import it from ReadROOT.

>>> from ReadROOT import merge

The merge subpackage of ReadROOT contains two important classes that are used to find the TOF events, the Merger and the Converter.

Merger Class

The Merger can be accessed from the merge subpackage. It is usually used with the GUI in a QThread. When creating a Merger instance, two files need to be passed as well as a time window and a TTree key.

Using energy cuts on the data

If cuts are enabled, the user can select the minimum and maximum energies used for the cuts for each file. The following commands can be executed:

>>> new_merge = merge.Merger(file0, file1, window, "Data_R")
>>> new_merge.select_cuts(min, max, 0)

The last option of the function select_cuts allows to choose which file is affected by the cut.

Clone this wiki locally