Reconstruction¶
General¶
Reconstruction is at the core of data processing. Reconstruction algorithms use calibration constants generated by calibration algorithms to convert the raw electrical signal data recorded by detectors into physical quantities such as particle energy, position, direction, and type, generating reconstructed data. The input for reconstruction algorithms can be the real detector response. In addition, physics analysis requires the generation of simulated data that closely resembles the real data, and this simulated data also needs to undergo reconstruction for understanding the detector response and optimizing the development of reconstruction algorithms. In principle, a set of event reconstruction algorithms should be applicable to both real detector response and simulated detector response as inputs. The resulting reconstructed data will be stored on disk for use by physics analysts, who will analyze the reconstructed data using software tools such as kinematic fitting, multivariate analysis, vertex finding, and machine learning to obtain physical research results.
The entire reconstruction process is divided into four levels:
At the lowest level of reconstruction, the raw data from each detector, either based on real or simulated responses, is combined with calibration databases to convert the digital signals from each readout channel into signals with energy dimensions. This is defined as the bottom level reconstruction.
Using the intrinsic responses of each detector, the detector level reconstruction data (L0) is formed, which reflects the characteristics of the detectors, such as clusters and hits.
Taking L0 as input, the primary reconstruction algorithms specific to each detector are used to form primary reconstruction data (L1) that includes features related to event physics, such as charge, energy, and particle identification.
By simultaneously considering L0 and L1 as input, advanced reconstruction algorithms that involve matching physical quantities between different detectors are used to form advanced reconstruction data (L2) with event physics features.
Overall, these four levels of reconstruction enable the transformation of raw data into high-level reconstructed data that can be used for physics analysis.
Details¶
bottom level reconstruction (To be supplemented)¶
The raw data from each detector is taken as input, based on either the real or simulated responses of the detectors. This raw data is then combined with calibration databases to convert the digital signals from each readout channel into signals with energy dimensions.
L0 reconstruction¶
CALO clustering¶
(To be supplemented)
FIT clustering¶
When a particle passes through a scintillating fiber, it generates scintillation light signals that are then converted into current pulse signals within a Silicon Photomultiplier (SiPM). These current pulse signals undergo a series of electronic processes and are ultimately converted into digital signals (ADC values). Typically, each event causes one or more channels of the SiPM to ¡°fire¡± as shown in the figure below. All adjacent ¡°fired¡± channels are grouped together as a signal cluster.

By applying a ¡°Cluster Finding Algorithm¡± to all channels of each SiPM, signals generated by real physical events can be selected while excluding interference from SiPM noise. The ADC values corresponding to each SiPM, also known as FIT digi hits, are the input objects for the clustering program. The algorithm works as follows using a dual threshold comparison:
First, all channels with signal charge greater than the ¡°seed threshold¡± are identified during a traversal of all channels.
Then, all continuous channels on both sides of the identified channel with signal amplitude greater than the ¡°neighbor threshold¡± are scanned.
Finally, all channels belonging to the same seed are merged into a signal cluster.
After the clustering reconstruction, a series of information related to the physical hits of the particle can be obtained. This data mainly includes the sector/layer/mat numbers corresponding to the cluster, the total ADC amplitude value, the width of the cluster, coordinates in both local and global coordinate systems, preliminary reconstructed charge information, and the channel IDs and ADC values for each channel in the cluster.
SCD clustering¶
The input data for SCD cluster reconstruction mainly consists of SCD digit hits.


Firstly, all digit hits are organized, and the stripADC and stripID of the strips that exceed the noise threshold are stored according to the ladder.
Secondly, within each ladder, consecutive fired strips are searched for and grouped together as a candidate cluster. If the maximum strip ADC value of this cluster exceeds the set cluster low threshold, it is considered a true cluster.
Next, the possibility of splitting is considered. For example, if there are non-adjacent local maxima with ADC values exceeding a high threshold within the cluster, the cluster is split at the local minimum, and the strip values at the splitting point are evenly distributed to the two sub-clusters.
Finally, the relevant information of the cluster is calculated and saved. The reconstructed cluster data stored includes the ladder to which the cluster belongs, the total ADC, the size, the centroid, the coordinates in the global coordinate system, and the strip IDs and ADC values for each strip in the cluster.
TRD clustering¶
To be supplemented
L1 reconstruction¶
CALO fast reconstruction¶
The CALO fast reconstruction mainly includes the following components:
shower axis reconstruction for incident particles,
energy reconstruction,
particle identification for electrons/photons and protons
PCA for shower axis¶
The PCA (Principal Component Analysis) method is based on the spatial positions and energy values of each calorimeter cell in CALO to construct a covariance matrix. By solving the covariance matrix, the first principal direction, which corresponds to the primary axis of the incident particle, is obtained.
others CALO fast reco. alg. to be supplemented¶
FIT local tracking¶
The task of FIT local tracking is to preliminarily reconstruct the trajectory of the incident particle passing through the FIT detector using the signal clusters (FIT clusters) generated by the FIT itself from the L0 output.
Currently, a reconstruction algorithm based on Kalman filtering is used, implemented by calling a third-party toolkit called the Generic Track-Fitting Toolkit (GenFit). GenFit is a mature trajectory reconstruction toolkit that not only provides various reconstruction algorithms but also supports multiple detector types. It has been used in several high-energy physics experiments.
The FIT reconstruction process based on GenFit is as follows:
Firstly, the FIT clusters from L0, the detector geometry in root format, and initial filtering seeds are input to GenFit.
GenFit performs the core Kalman filtering process. It updates the current track state by combining the predicted values based on the outer hits and the measured values from the current layer in an outer-to-inner order. It then continues filtering downwards. Afterwards, it further performs smoothing by repeating the above process in the reverse direction from inner to outer, obtaining the optimal track.
Finally, the amplitudes of all clusters contained in the track are traversed to evaluate the charge of the particle corresponding to the track.
The final track data mainly includes the initial interaction point of the particle in FIT, the three-dimensional direction information of the track, the fitting results (Chi2, ndf), the corresponding particle charge Z, and all FIT clusters belonging to the track.
SCD local tracking¶
The implementation methods for SCD local tracking mainly include Kalman filtering and linear fitting algorithms.

The tracking seeds are primarily constructed through blind search or directly obtained from CALO tracks. Using Kalman filtering or linear extrapolation, the optimal clusters belonging to these track seeds are searched within each layer of the SCD detector.
Then, a track is formed through Kalman filtering or linear fitting. Charge reconstruction is performed based on the cluster information belonging to a particular track.
Finally, the optimal tracks are selected and their information is saved.
It should be noted that the chargeZ reconstruction algorithm is called as an external function within the local tracking algorithm. The output data of the local track primarily includes the interaction point, slope, Chi2, charge, and cluster information belonging to the track.
PSD chargeZ¶
To be supplemented
Global tracking¶
The FIT and SCD detectors in the HERD experiment provide precise position measurements, while the PSD and CALO detectors primarily provide auxiliary position measurements. The Global Track is reconstructed by considering all the position information to obtain the trajectory of high-energy particles passing through the detector.
Based on the design characteristics of the HERD detector, the same layer of FIT Cluster or SCD Cluster can only provide position information in two dimensions of the three-dimensional coordinate system. Therefore, the obtained position measurements are independent for the x-z and y-z directions. Global Tracking will use a network algorithm based on cellular automata, performing multiple iterations on the network structure separately for the x-z and y-z directions. The final stable network provides two-dimensional trajectories corresponding to each direction.
The matching and merging of the two-dimensional trajectories in different directions are achieved by introducing constraints. Firstly, the similarity constraint of ionization energy loss for different clusters is considered. Secondly, the three-dimensional position information from PSD and CALO is introduced as a spatial constraint. After the global matching and merging, the two-dimensional trajectories become precise three-dimensional trajectory information. Fitting this three-dimensional information provides the accurate position and direction of the primary high-energy particle.
The charge measurement in the HERD experiment is based on the ionization energy loss of particles passing through the detector. The position and direction information provided by Global Tracking can provide the correct path length input for charge measurement. Global Tracking introduces a charge matching mechanism, which measures the charge of multiple clusters along the trajectory multiple times, significantly improving the accuracy of charge reconstruction.
Track updating¶
To be supplemented
L2 reconstruction¶
shower fitting¶
To be supplemented
machine learing¶
To be supplemented. CNN, GNN, etc.
global matching¶
To be supplemented. The matching between global tracks and CALO forms a global particle that contains information about the particle¡¯s energy, direction, type, origin or decay vertex, Lorentz factor, etc., in the event.