## 3 Methodology
### Boosting Algorithm Efficiency for Accurate Track Elimination through Parallelization Techniques  
According to references [13; 14], parallelization within an event involves executing multiple cores simultaneously from multiple event queues to achieve additional parallelism. Although the order of kernel execution within a sector must be maintained, different sectors can be distributed across multiple queues, allowing all cores for one sector to be put in the same queue. This technique can be implemented up to the number of queues equal to the number of sectors, but it is recommended to match the number of queues with hardware constraints for optimal performance.  
On the other hand, the HLT GPU framework allows for the execution of kernels for multiple events simultaneously as a simpler and completely different approach to parallelization, as stated in reference [15]. Each independent processing component performs track reconstruction on the same GPU if there is enough GPU memory available for all of them. However, this technique can increase the memory requirement by the number of simultaneous queues, although it effectively loads the GPU.  
In our study, for greater generality, two approaches were used to approximate the found candidate tracks. In the first approach, a spatial helix was fitted; in the second, a spatial polynomial of the third degree. In Algorithm 1 proposed for computing optimal helix-loop parameters in parallel, we used running parallel threads, where each thread performs a fitting procedure for events assigned to the threads according to the circular round-robin procedure. A schematic of the parallel Algorithm 1 is shown in Figure 8.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Cluster ID** & **Mean** & **Std** & **Number of Elements** \\ \hline
0 & 4.5178 & 0.3570 & 121 \\
1 & 0.0006 & 0.0016 & 16,839 \\
2 & 0.0225 & 0.0080 & 1091 \\
3 & 0.0585 & 0.0131 & 277 \\
4 & 0.1210 & 0.0233 & 419 \\
5  
```
0: DataFrame \(D\) containing hit coordinates \((x,y,z)\), event and station identifiers, and track number
0: Labeled tracks \(T\)
1: Load TrackNETV2.1 model
2:functionGenerateCandidates(\(D\))
3: Candidate tracks \(C\leftarrow[]\)
4:for\(i\gets 1\) to \(\operatorname{length}(D)\)do
5:\(h\gets D_{i}\)
6:\(c\leftarrow\operatorname{TrackNetv2.1}(h)\)
7: add \(c\) to \(C\)
8:endfor
9:return\(C\)
10:endfunction
11:\(C\leftarrow\)GenerateCandidates(\(D\))
12:functionLabelTracks(\(C\))
13: Labeled tracks \(T\leftarrow[]\)
14:for\(c\) in \(C\)do
15: fit helix to \(c\)
16: calculate \(\chi^{2}\) value for fitted helix
17:if\(\chi^{2}<\operatorname{threshold}\)then
18: label \(c\) as correct
19:else
20: label \(c\) as false
21:endif
22: add \(c\) to \(T\)
23:endfor
24:return\(T\)
25:endfunction
26:\(T\leftarrow\)LabelTracks(\(C\))
```  
**Algorithm 1** Track Reconstruction  
Figure 8: Schematic diagram of the parallel Algorithm 1.  
All tracks table contains the coordinates of the top of the event \(x\), \(y\), \(z\), the identity number of the event \(N\), the station number \(s\), the detector number \(d\), and the track number \(T\) within the event. Large number of tracks formed by different events necessitates improving the performance of the optimal helical parameter fitting process for each of the tracks. Thus, in our implementation, we propose a partitioning algorithm that uses multi-threaded computation to divide the workload among processing threads. The partitioning algorithm is based on the round-robin procedure that uses the approach of sequential execution of tasks by parallel threads. If we have \(k\) threads, tasks are distributed in such a way that the first thread will compute parameters for the first track from the dataset, the second thread will compute parameters for the second track, and so on, until we reach the \(k\)-th element (with a thread \(k\)), and in circular fashion, \(k+1\)-th element will be processed by the first thread again, and so on, until all the elements of the table are processed.