Determination of inter-system timing for Mini-CBM in 2020

Future operation of the CBM detector requires ultra-fast analysis of the continuous stream of data from all subdetector systems. Determining the inter-system time shifts among individual detector systems in the existing prototype experiment mCBM is an essential step for data processing and in particular for stable data taking. Based on the input of raw measurements from all detector systems, the corresponding time correlations can be obtained at digital level by evaluating the differences in time stamps. If the relevant systems are stable during data taking and sufficient digital measurements are available, the distribution of time differences should display a clear peak. Up to now, the outcome of the processed time differences is stored in histograms and the maximum peak is considered, after the evaluation of all timeslices of a run leading to significant run times. The results presented here demonstrate the stability of the synchronicity of mCBM systems. Furthermore it is illustrated that relatively small amounts of raw measurements are sufficient to evaluate corresponding time correlations among individual mCBM detectors, thus enabling fast online monitoring of them in future online data processing.


Introduction
The Compressed Baryonic Matter (CBM) detector is currently being constructed at the Facility for Antiproton and Ion Research (FAIR). The experimental programme of CBM is manifold and includes the measurement of a large number of rare observables. To this end, a key design feature of CBM is to be able to take very high interaction rates of up to 10 7 collisions per second [1].
The primary aim of the prototype Mini-CBM (mCBM) experiment [2] is to commission and optimize the complex interplay of the different detector systems with triggerlessstreaming data acquisition and fast online event reconstruction and selection. In particular, it allows testing of the detector and electronics components developed for the CBM experiment as well as the corresponding online/offline software packages under realistic experiment conditions up to the top CBM interaction rates of 10 MHz.
Stability of timing among the detector systems is of central importance for reliable, longterm data taking and constitutes a precondition for the reproducibility of results. Constant time differences between detector systems manifest themselves as strong time correlations after processing and comparing of the corresponding detector measurements. Some measures to accelerate processing of digital time measurements for inter-system time calibration have been studied within the project [3]. Also automatic procedures for fitting the corresponding peaks in time difference distributions have been tested in this context focusing on two test runs from mCBM.

Detector systems
The detector systems of mCBM are described in detail in [2] and [4] and are summarized here very briefly: • mT0: A fast and segmented diamond counter for time-zero (T0) determination positioned upstream of the target, consisting of 8 vertical strips each of 2 mm width, mounted inside the target chamber. • mSTS: Two 6 x 6 cm 2 STS prototype modules mounted on a half-ladder, positioned on the first station. Each module contains 1024 channels on each sensor side. • mMUCH: 2 GEM prototype stations consisting of M2 modules with 2304 pads.

Data acquisition and timing
Data are received from the self-triggered detectors of all subsystems. The mCBM detector front-ends are time-synchronized by the timing and synchronization system, which relies on a simple clock and pulse-per-second distribution. The detector front-end digitizes signals above threshold and assigns a time stamp to the hit. The data acquisition system includes ultra-fast and radiation-tolerant ASICs as front-end chips followed by CERN GBTx-based radiation-tolerant data aggregation units. At the GBTx readout board the electrical signals acquired through a large number of e-links are converted and merged into an optical GBT link. Further downstream, the data streams are handled by Data Processing Boards containing powerful FPGAs. The distributed input interface will preprocess and index the incoming data streams. Data are then transferred to the online processing cluster.
The First-level Event Selector (FLES) is the central system for online processing, designed for the CBM experiment [5]. Real-time event selection will be performed by the FLES system thus enabling the detection of very rare hadronic decays. Employing a timebased container data format to decontextualize the time-stamped signal messages from the detectors, data segments of specific time intervals can be distributed on the farm and processed independently. Timeslice building, i.e. the continuous process of collecting the data of a time interval simultaneously from all detectors, places a high load on the network and is the basis of all subsequent data processing steps.
As a demonstrator for the future FLES system, the mFLES system has been set up and is currently in operation at the GSI/FAIR facility [6]. The mCBM full-system test setup at SIS18 allows testing of all relevant components connected to mFLES. During the last mCBM beam time March 27th to May24th, 2020, the reliable operation of the mFLES system at various beam intensities has been essential in processing data streams from all active subsystems and grouping them into larger timeslices.

Evaluation of inter-system timing
In this section the parts of the workflow relevant for processing timing information of raw data will be outlined. Based on the input from all mCBM detector subsystems, the derivation of their time correlations and also the procedure for fitting the corresponding parameters are illustrated. It should be noted that for the mCBM setup in 2020 the steps of unpacking and determination of inter-system timing have been processed in offline workflows. However it is foreseen to integrate these steps into online data taking in the 2021 data taking campaigns.

Processing of digis
Time stamps assigned to the raw hit messages by their front-end ASICs are converted into digis in unit of nanoseconds during the unpacking stage of the data analysis. Unpacking includes the determination of full timestamps of all hit messages together with the complete addresses from each readout channel. Indeed it represents the first step of the data processing in the CbmRoot framework [7] which is built on top of the FairRoot framework [8].
After unpacking, decontextualized information of digis is available corresponding to a single measurement of time and signal for contributing readout channels. In order to evaluate the time correlations between subsystems, the time distributions of the subsystems are compared with respect to the time-zero counter mT0, i. e. the quantity t system − t mT0 is studied for all systems.

Set of runs for study
In [4] also inter-system time distributions are analyzed, illustrating details for run 831 corresponding to a beam intensity of 2 × 10 6 ions for a 2.5 mm thick gold (Au) target. During mCBM data taking in 2020 various other beam conditions have been tested motivating in particular further detailed studies for other conditions. To this end, a set of runs has been chosen for this analysis, as summarized in Table 1. These runs represent a broad range in beam intensities as well as different target thicknesses to systematically study the inter-system timing for mCBM. Further details on data taking runs and particularly on first commissioning results are presented in [4].

Fitting setup
The histograms for distributions of digis-based time differences of each detector system with respect to mT0 should display a pronounced peak in case of stable time correlations. Without further calibration, these peaks are not expected to be centered at zero time difference, correspondingly leading to time offsets relative to mT0. Such time offsets typically will also differ among the various subsystems. The histograms for distributions of time differences of each detector system with respect to mT0 can be directly obtained using the CbmRoot framework [7]. More specifically, the CbmRoot class CbmCheckTiming determines time differences t diff = t system − t mT0 at the level of digis. Looping over all mT0 digis within a range of timeslices, corresponding t diff values are calculated per subsystem, provided that these time differences are within predefined time windows. By default, the resulting distributions of t diff are also written into histograms by another method of the CbmCheckTiming class. Some properties can be directly derived from these distributions serving as input for the fitting function as explained below.
A combination of a Gaussian function plus a constant modelling signal peaks over background is assumed for fitting the t diff time distributions in the vicinity of the corresponding peak. Including four free parameters for fitting, this ansatz represents a minimal and robust setup trying to avoid overfitting or artifical tuning of parameters per subsystem. Initial values for fitting are based on the peak height, the peak position, the average of all bins entries, and a typical width of the timing distribution, the latter being different for each system. The actual fitting results are derived in the Root framework [9] and they comprise fitted height of Gaussian p 0 , peak position p 1 in nanoseconds, peak width p 2 and constant level of background p 3 .

Results for a set of mCBM runs
In addition to a numerical convergence of previously defined fitting functions, several conditions need to be fulfilled in order to verify the stability of time correlations: The fitted peak positions should match the corresponding positions of the maximum bin, with deviations maximally in the range of the fitted beam width. In particular, the stability of t diff of a mCBM detector system is reflected by fitted peak positions remaining approximately constant over a large range of timeslices, implying very broad ranges of detector digis, also for different  Results for time distributions requiring an additional time coincidence of mT0 with mTOF digis for mMUCH digis are exemplified for run 831 in Fig. 2. In this case time synchronization of all systems has been reached by shifting the relative timing distributions by the respective time offsets as determined by fitting. The additional time coincidence is implemented by also requiring at least 6 mTOF digis in a time window of ± 90 ns. It is interesting to see that this requirement strongly reduces the level of background digis in the vicinity of the peak. This effect is also visible for relatively high statistics in Fig. 2 (b), corresponding to a factor of 1000 more mMUCH digis as compared to plot Fig. 2 (a).
Probing fitting results for various numbers of digis and all runs under study, the results of Figure 3 have been obtained. These results exemplify the stability of fitted peak positions and peak widths over several orders of magnitudes of numbers of digis for mSTS and mTOF, respectively. In the case of the fitted mTOF peak widths, the entrire range of the right-hand side Figure 3 fulfills the requirements of stable time correlations as explained in section 3.3. It is also interesting to note that the envelope of fitted mTOF peak widths tends to shrink for larger number of mTOF digis. For the mSTS on the left-hand side of Figure 3, the data points seem to indicate a stable peak position around -930 ns for numbers of mSTS digis around 2 × 10 6 . However, considering also the position of the maximum in the time distribution by additionally requiring coincidence with mTOF digis, has revealed that a number of mSTS digis at least as large as 5 × 10 6 fulfil that requirement in these runs. Cross-checking all of the relevant requirements for the systems in the set of runs leads to a respective minimum number of digis for obtaining stable peak positions in the fitting setup. Depending also on the data size included in a timeslice, the stability criteria can be reached already after processing a few timeslices, e. g. 5 timeslices in run 855 are sufficient for stable determination of time correlations for mSTS, mTOF, mRICH or mPSD. In addition to the stability of the time correlations also the time needed for processing of the corresponding digis is a relevant quantity that should be optimized. The relation between different ranges of digis to runtimes required for processing the relevant time distributions with respect to the time-zero counter are shown in Figure 4. Runtimes have been measured for a number of different timeslices in run 831 using the central algorithm of the class Cbm-CheckTiming, see also section 3.3. More specifically, the processing of mTOF digis has been been measured at lxbk0599.gsi.de, a compute node of the GSI Virgo HPC cluster [10]. In order to visualize the broad range of underlying mTOF digis appropriately, two distinct ranges are shown in Figure 4. Normalizing runtimes to the corresponding maximum over the respective range, the linear scaling of runtimes with respect to number of mTOF digis becomes visible.

Conclusions
Stable timing among all mCBM subsystems plays a central role in previous and future data taking campaigns. A successful approach for determination of unambigous peaks in distributions of time differences with respect to the mT0 counter has been found. Evaluating different properties from the corresponding distributions both before and after fitting, criteria for this procedure have been sharpened. As a result, stable positions of the peaks in the time correlations per system are typically available for processing only a fraction of digis as compared to the total numbers of digis or correspondingly numbers of timeslices per run. The required minimum number of digis spans the range of approximately 2 × 10 3 digis for mRICH and mPSD to 5 × 10 6 digis for mSTS, also reflecting statistics and available number of readout channels.
For future mCBM data taking campaigns, a significant reduction of processing times for the determination of inter-system timing is possible. Depending on the time scales planned for monitoring results of time correlations, there are essentially three scenarios foreseen: Directly obtaining maxima from time difference distributions or performing also fits as outlined in this analysis. A third option would focus also on investigation of long-term or more intricate inter-system effects using additional information from multi-variate statistics.