Implements star noise occupancy analysis
Implementation of noise occupancy scan for strips.
This is a simple threshold scan with no injected charge. Hit counters (i.e. reading hits from registers) are used to speed things up, since large numbers of triggers need to be sent for high thresholds.
A throttling mechanism in StarThrottleLoop
and StarTriggerThrottleAnalysis
allows for variations in the number of triggers sent depending on the current occupancy. A target occupancy (target_occ
) and a maximum number of triggers (max_ntriggers
) are set in the scan config. Triggers are sent in bunches, after which the occupancy for that bunch is recorded. The number of triggers for the next bunch is determined based on how close we are to the target. If the maximum number of triggers is reached before the target, we stop there.
Once all data is recorded, StarNoiseOccupancyFitter
takes care of the analysis. The mean occupancy per chip is determined and a plot of log(mean occupancy) vs threshold^2 is obtained and fit to a linear function to obtain the equivalent noise charge (ENC). For this to hold, the thresholds must be in fC. This requires the fit parameters from a previous response curve to convert thresholds from mV to fC. This is done via HistoFromDisk
histogrammers which are written in the scan config and passed through the clipboard. The conversion is done chip-by-chip, since there can be some variation in the gain.
Note: the function lmcurve_tyd
was added to take into account errors in the linear fit.
Requires !453 (closed) to be merged first.