online: BMON hit-finder
The merge request introduces a separate hit finder for BMON in the online reconstruction chain.
TODO:
-
hit calibrator configuration -
hit calibrator proposal -
hit calibrator validation -
hit finder configuration -
hit finder proposal -
hit finder validation
@n.herrmann, could you please validate the calibration procedure?
Algorithm description
BMON addressing
Original addresses of BMON digis are used. For mcbm2024_nickel runs, the two BMON diamonds are distinguished explicitly by the selection bitmask and the diamond hardware addresses, which are specified in the configuration file (e.g., CbmSoft/cbmroot_parameter!219 (diffs)).
Digi calibration
The digi calibration procedure (see cbm::algo::bmon::Calibrate::operator()) is taken from one for TOF (see cbm::algo::tof::Calibrate::operator()). NB: Probably, some of the calibration steps are unnecessary.
Hit class
The cbm::algo::bmon::Hit class contains the hit time, time error, diamond address and number of channels.
- time error is set temporarily to 0 (FIXME: provide a reasonable definition of time uncertainty)
- the hit address does not contain information on channel: this should reduce the complexity of the hit PartitionedVector (number of partitions equals to number of diamonds).
- number of channels corresponds to the number of digis, which were used to create a hit: either 1 or 2
Hit-finding algorithm
A sample of input digis is bucket-sorted by diamonds (on the steering class level). During the sorting the digis coming from the dead channels (specified in a config) are rejected. NB: Probably, a rejection by charge threshold should be considered here as well.
The algorithm has a O(nDigis) time complexity and relies on time-sorting of digis within a diamond, which is natural for real data taking.
The digis are iterated over the range (digis.begin(), prev(digis.end())). If the time difference between this digi and the next digi is less then 1ns (configurable) and if the channels (strips) are neighbouring, a hit is created from two digis. In this case, the time of a hit is calculated as a weighted average of the digi times, with weights equal to digi charges (see Hit constructor).
Otherwise, a single digi is used to create a hit (see Hit constructor).