Online-capable TOF hitfinder.
This MR builds upon and replaces !1311 (closed).
The online-capable TOF hitfinder implemented therein was further developed, such that an additional steering layer is introduced between the framework and the algorithm layers.
The steering layer is implemented by the class cbm::algo::tof::Hitfind
. In analogy to the class cbm::algo::Unpack
, this steering class should eventually be moved out of the tof
sub-namespace and include other detectors.
Reading the hitfinder parameters from an appropriate .yaml
file is supported at the task level (i.e. in CbmTaskTofClusterizer
). The task is now very lean, as all of the parameter initialization was moved elsewhere.
A new class CbmTaskTofClusterizerParWrite
is added, which produces the .yaml
files. This task contains all of the processing of the histograms which contain calibration constants, as implemented in the original CbmTaskTofEventClusterizer
by @n.herrmann. It has the same interface as CbmTaskTofClusterizer
and can be called from a macro instead of it, if production of .yaml
files is desired. The files are produced during the Init
stage and nothing then happens during Run
. Granted, this is not the most elegant way of accomplishing this, but it will do for now.
One advantage of this approach, is that existing macros need not be changed, other than switchting out the hitfinder task.
I have included an example macro tof_hitfinder_run.C
, which, for lack of better ideas, I placed into macro/tools/
.
In order to run the macro you will need an input file with digis, as well as a *.digibdf.par
and a *tofClust.hst.root
file with parameters. The later two can be obtained from @n.herrmann.
In my view, this is in a mergable state, and can be taken over by @fweig, to be integrated into the online-processing chain. The files tof_hitfinder_run.C
and CbmTaskTofClusterizerParWrite
should be understood as temporary solutions, which will be deleted / replaced at a later time.
The reading and writing of the .yaml
file is currently done with a hardcoded filename TofHitfinderPar.yaml
in the execution directory. This can easily be changed. I decided not include a sample file in the MR, as it is several megabytes large (should not be in the repository). This is due to the rather large number of walk coefficients it contains. I will attach such a file below.