Introduction

Modern experimental particle physics would be unthinkable without the aid of computers. Early detectors gave visual event signatures that could be discerned by the human eye (e.g., [1]). Later, algorithms were introduced for the identification of particle trajectories, not the least due to the ever-increasing amounts of data. With time, both accelerator and detector technology improved, leading to larger event and data rates as well as more complex signatures. As a result, the explored physics landscape grew larger and a considerable part of the “low-hanging fruits” could be collected. We have now reached a point where most of the interesting physics signals are not only rare, but also look so similar to the background that they can be difficult to distinguish. Intelligent software that can find the proverbial needle in the ever-growing haystack, is a prerequisite for further progress in particle physics.

Current and future experiments are responding to this challenge with more sophisticated triggering systems. This is realised by introducing complex software algorithms, i.e. event reconstruction, when making a decision about whether to retain or discard incoming data. For example, the trigger system for the LHCb detector has been redesigned to perform a full event reconstruction online, including real-time alignment and calibration [2]. This applies in a similar way to the high-level trigger of ALICE, using acceleration on GPUs and FPGAs to cope with the large data rates [3]. Harnessing the power of heterogeneous computing hardware is of increasing importance. As such, this approach has also been incorporated into the reconstruction of CMS for their High Level Trigger in preparation for the High-Luminosity upgrade of the LHC [4]. The XENON1T experiment designed their readout system so that detector signals are send directly to a high-level software trigger [5]. PANDA will join this new generation of experiments, employing a pure software trigger for its online event selection [6].

A full kinematic reconstruction of both transversal and longitudinal momentum components can be very beneficial. For exclusive processes, i.e. reactions in which all of the final state particles have been reconstructed, this enables the use of kinematic constraints, leading to better resolutions or background suppression. Under certain circumstances, the importance of the longitudinal component is emphasised. For example, in fixed-target experiments, the final state can carry a considerable momentum in longitudinal direction. This can be exploited in the reconstruction of long-lived particles, such as hyperons, by specifically selecting longitudinally displaced decay vertices [7, 8]. Furthermore, considering the reaction \(\overline{p} p \rightarrow \overline{\Lambda } \Lambda\), for example, the \(\overline{\Lambda }\) is primarily emitted at small polar angles, i.e. in longitudinal direction. In turn, also its decay products will have a large longitudinal momentum component [9].

In this article, we contribute with one piece of the puzzle by presenting a method for reconstructing longitudinal track components in a cylindrical straw tube detector located in a solenoid magnetic field. While many existing methods are adapted for tracks originating from the beam-target interaction point, this method applies to all tracks, also those from the decays of long-lived particles such as hyperons. We implement this method for the PANDA experiment [10], a next-generation facility for hadron physics that is currently under construction at FAIR in Darmstadt, Germany [11]. We put particular emphasis on resolving the spatial ambiguity that arises during track reconstruction in a cylindrical drift detector. Three different algorithms have been tested for this purpose.

The PANDA Detector

Fig. 1
figure 1

Schematic view of the PANDA detector

PANDA (antiProton ANnihilations at DArmstadt) [10], shown in Fig. 1, is designed as a fixed-target, multi-purpose detector with a wide variety of physics channels and different reaction topologies in mind. To enable the exclusive measurement of physics processes, PANDA will cover almost 4\(\pi\) of the solid angle and comprise a range of sub-detectors for the reconstruction of both charged and neutral particles. The subdetectors are grouped into two main segments: the target spectrometer, employing a solenoid magnetic field of up to 2 T and covering the polar angle range \(10^{\circ }< \theta < 160^{\circ }\), and the forward spectrometer, using a dipole magnet with a field integral of 2 Tm and covering the region of \(\theta < 10^{\circ }\) and \(\theta < 5^{\circ }\) in horizontal and vertical direction, respectively. The relevant sub-detectors for charged track reconstruction in the target spectrometer are the Micro Vertex Detector (MVD) [12], the Straw Tube Tracker (STT) [13], and the Gas Electron Multiplier (GEM). The MVD is designed to provide a vertex resolution of 100 \(\upmu\)m in the beam direction and a few tens of \(\upmu\)m in the radial direction. Combined with the STT and GEM detectors, PANDA will achieve a momentum resolution of \(\sigma _p / p < 1 \%\) for particles in momentum range of a few hundred MeV/c up to several GeV/c.

At its design luminosity of \(2 \times 10^{32}\,\)cm\(^{-1}\)s\(^{-1}\), PANDA will expect an event rate of 20 MHz and produce approximately 200 GB/s of raw data. All sub-detectors will continuously stream their data to the software trigger. By employing a full event reconstruction and selectors for physics processes of interest, the software trigger will have to reduce the data rate by a factor of 1000. Per year, PANDA is foreseen to produce approximately 1 PB of experimental data, containing both raw data and high-level analysis objects, as well as 2 PB of simulation data [14]. The processing of these data will be done in a heterogeneous environment, consisting of FPGA-based compute nodes and general purpose CPU+GPU farms [15].

The purpose of the method presented in this work is to reconstruct the longitudinal track component of charged particles traversing the target spectrometer, specifically in the STT.

Straw Tube Tracker

The STT is the main tracking detector of the target spectrometer and surrounds the MVD. Being inside a solenoid field, charged particles traverse it along helical trajectories. The STT is designed for particles in a momentum range from a few hundred MeV/c up to 8 GeV/c and a polar angle range between \(22^{\circ }\) and \(140^{\circ }\).

The detector consists of 4224 gas-filled tubes, arranged in a hexagonal layout and filling a cylindrical volume. A vertical gap is left at the centre to make room for the target system. The inner and outer tube layers are oriented parallel to the beam pipe, whereas the 8 intermediate layers are tilted by \(\pm 2.9^{\circ }\). The purpose of the latter is to provide longitudinal information about the particle trajectories. A cross section of the STT is shown in Fig. 2, where the parallel tubes are presented in green and the skewed tubes in red or blue.

Fig. 2
figure 2

Cross-sectional view of the Straw Tube Tracker in the xy-plane. The green circles represent parallel straws, the blue and red circles the skewed straws

The tubes are made from a \(27 \upmu\)m thick mylar foil with 10 mm in diameter and filled with a 90/10 gas mixture of Ar/CO\(_2\). The tubes have a conductive inner layer and a 20 \(\upmu\)m thick gold-plated tungsten anode wire at the centre. A potential differential of several kV is applied between the cathode layer and the anode wire. Charged particles traversing the tube ionize the gas, producing free ions and electrons that are accelerated towards the anode wire. In the vicinity of the wire (\(\mathcal {O}(10 \, \upmu \text {m})\)) they produce more free electrons and ions in an avalanche-like manner, which in turn results in a signal large enough for readout.

When considering mechanical positioning and alignment, the overall precision in xy-plane will be lower than 150 \(\upmu\)m, with single straw deviations being less than 40 \(\upmu\)m, [13].

The time it takes the electrons to reach the anode wire is called the drift time. By measuring the shortest drift time within a signal, the minimal distance between the wire and the charged track can be inferred. This distance is usually referred to as the isochrone radius, which describes a cylindrical surface around the wire and contains all possible positions that the particle might have traversed. This is illustrated in Fig. 3.

Fig. 3
figure 3

An illustration of a particle traversing three straw tubes, shown in the xy-plane. The isochrones are represented by blue circles. The green point indicates the correct position where the distance to the wire is minimal and the track is tangential to the isochrone

After a series of straw tubes has been associated with a common track candidate, the particle track is reconstructed by fitting a trajectory such that it is tangential to the isochrones. The resolution of the isochrone radius will be \(< 150 \, \upmu\)m after calibration, whereas the resolution of the z-position along the wire will be about 3 mm [13].

Pattern Recognition

Track reconstruction begins with pattern recognition. In this phase, signals from individual detector elements are associated to a common track, originating from the traversing particle. The output consists of sets of hits together with an initial estimate for the track parameters, e.g. based on a simple helix fit. The final track parameters are obtained later using a more sophisticated, usually adaptive fitting method that takes into account physical effects such as energy loss, as well as imperfections in the detector. However, at the pattern recognition stage, a high precision of the track parameters is not always needed when grouping the hit signals. Furthermore, when execution speed becomes a concern, e.g. for online reconstruction, a computationally simpler approach might be necessary. In such cases, the helix shape is a well-suited approximation to the particle trajectory.

Track Representation

Assuming that the trajectory of a particle with charge Q moving in the solenoid field of the target spectrometer can be approximated by a helix of radius r, five parameters are needed to describe the track. A sixth parameter can be added to define a point along the helix trajectory, which is convenient for extracting the longitudinal information more easily.

The PANDA target spectrometer has a cylindrical design. A superconducting solenoid provides an approximately homogeneous magnetic field for the whole detector volume, bending the trajectories of charged particles into helices around an axis parallel to the beam axis. Choosing the z-axis along the beam direction, the track can be explicitly represented by the following five parameters:

  • \(x_\mathrm{c}\) horizontal coordinate of the helix centre

  • \(y_\mathrm{}\) vertical coordinate of the helix centre

  • \(\omega = Q/r\) signed curvature of the helix

  • \(\phi _0\) azimuthal angle at the reference \(z_0\)

  • \(\tan \lambda\) dip angle of the helix with \(\lambda = \arctan p_z/p_t\)

In this representation, the helix can be analytically described in two projections. In the xy-projection the helix becomes a circle, defined as

$$\begin{aligned} (x - x_\mathrm{c})^2 + (y - y_\mathrm{c})^2 = r^2. \end{aligned}$$
(1)

In this approximation, the track has constant transversal and longitudinal momentum components \(p_t\) and \(p_z\), respectively. Hence, the particle traverses at a constant rate in z with respect to the helix axis. It is reduced to a line in the \(z\phi\)-projection, i.e.

$$\begin{aligned} \phi (z) = kz + \phi _0, \end{aligned}$$
(2)

with the slope parameter \(k \equiv \tan \lambda\). The azimuthal angle \(\phi\) can be replaced by the arc length

$$\begin{aligned} S = (\phi _0 - \phi ) rQ, \end{aligned}$$
(3)

where Q is the charge of the track. The arc length is defined such that it is zero at the starting point of the track and increases positively, regardless of the charge. The helix dip angle \(\tan \lambda\) gives the slope in the Sz coordinate system and \(z_0\) can be chosen as a reference point along the trajectory, e.g. the production vertex or first hit. The linear relation then becomes

$$\begin{aligned} z(S) = \tan \lambda S + z_0. \end{aligned}$$
(4)

Equation (4) simplifies the problem considerably, and the task reduces to identifying a line among a set of points in the Sz-space.

Track Reconstruction at PANDA

The PANDA software framework, PandaRoot [16], contains a variety of global and local track finding algorithms. While the global methods aim to take the whole detector into account, the local methods focus on one or few sub-detectors, such as the Straw Tube Tracker. The approaches are based on methods such as the Hough transformation [17], triplet finding [18], or cellular automata combined with Riemann mapping [19]. Some of these are designed to be used only for the reconstruction of track originating from the primary vertex, using the beam/target interaction point as a constraint [17]. Others enable the reconstruction of the decay products of long-lived particles, which can originate up to a few meters away from the primary vertex [7, 19, 20]. There have been efforts to parallelise these algorithms using GPUs [17] or FPGAs [21]. More recent developments involved adapting the track finders to the time-based data format that is a result of utilising a pure software trigger [19, 20]. For the STT in particular, the existing local track finders focus on reconstructing the transversal track components.

The following studies use the primary track finder [22], which is currently the default track finder for the target spectrometer in PandaRoot. It is designed for offline use for tracks originating from the interaction point. The track finder begins the clusterisation with parallel STT hits, using a conformal mapping procedure, which maps hits lying on a circle onto a straight line. A road-finding algorithm then searches for hits lying on such lines. After the initial clusterisation, the track parameters are estimated using a Hough transformation. These parameters are then used to extrapolate to the hits in the MVD and include them in the track fit. A track candidate containing all clustered hits is produced, which already includes the skewed hits of the STT.

Longitudinal Track Reconstruction

Fig. 4
figure 4

The isochrone alignment procedure. The isochrone ellipse in the xy-projection is aligned along the STT tube projection such that it is tangential to the track (black curve). Two possible solutions for the z-position are obtained, \(z_1\) and \(z_2\). The red ellipse illustrates the initial assumption for the isochrone position

To supplement the track finders in PandaRoot, a set of algorithms dedicated to the extraction of longitudinal position and momentum information of track candidates was developed and named the PzFinder after the third momentum component \(p_z\). Since the PzFinder is used during the early stage of the track reconstruction, the particle trajectory is approximated by a helix which is described as in Section “Track Representation”. The PzFinder requires the three parameters \(x_\mathrm{c}, y_\mathrm{c}\), and Q/r to be known and provides estimates for \(\phi _0\) and \(\tan \lambda\) in return, yielding a complete description of the track.

The z-position for each hit in a skewed STT tube is extracted through an isochrone alignment procedure, illustrated in Fig. 4. The isochrone radius for each hit is determined beforehand outside the PzFinder. Since these tubes are skewed, the projection of the isochrone onto the xy-plane becomes an ellipse. The isochrone is aligned such that its centre position lies along the wire and is tangential to the particle trajectory. This alignment provides two solutions, introducing a left/right ambiguity with one solution on either side of the trajectory.

In the following, three different methods are presented to resolve this ambiguity.

Combinatorial Path Finder

Fig. 5
figure 5

A visualisation of the combinatorial path finder. Reconstructed (Sz) points are shown as red crosses. a All possible connections are considered. The black lines are generated by the algorithm to calculate angles. b Only the lines corresponding to the found path remain. The points encircled in blue are the (Sz) points that were selected as part of the straightest path. For comparison, the MC truth (Sz) points are shown as green stars

A combinatorial approach was developed to find the “straightest” path from one end of the track to the other, similar to a track road procedure [23]. First, all possible connections between the (Sz) solutions of neighbouring STT tubes are determined. With two (Sz) solutions for each hit, this yields four possible connections between neighbouring tubes. Figure 5 illustrates the procedure. Having two (Sz) solutions per layer, there are four possible connections between two adjacent layers. Given a track candidate with N hits in the skewed STT layers, the total number of generated lines is \(4(N-1)\). Since there are eight layers of skewed STT tubes, a typical track passing fairly straight through all these layers will have 28 connections to be considered.

The “straightest” path is determined by evaluating the cost function

$$\begin{aligned} w = \sum ^{N-1}_{j} \left( 180^{\circ } - \theta _j\right) ^2, \end{aligned}$$
(5)

where \(\theta _j\) is the opening angle between two lines connecting at the same (Sz) point. With two possible points for each STT hit, this leaves \(2^N\) possible paths to be evaluated. To reduce the computational footprint, connections containing an opening angle smaller than \(90^{\circ }\) are discarded right away. Among the remaining points, the correct ones are chosen by minimising the cost function Eq. (5). In Fig. 5, the selected positions are marked by blue circles. For this example track, these positions are also the ones that are closest to the true positions, marked by green stars. This indicates that the selection process was successful.

The combinatorial nature of this approach brings about a possibly high computational cost. Since the STT has eight layers of skewed tubes, any fairly straight particle trajectory creates eight or, due to still having a slight curvature, nine skewed STT hits, resulting in 256 or 512 combinations to be evaluated. Tracks with a higher curvature can leave even more hits, increasing the number of combinations exponentially. Furthermore, the algorithm assumes that all skewed STT hits have been correctly associated with the track by the preceding pattern recognition.

These considerations leave room for other options to be explored.

Hough Transformation

The Hough transformation [24] has been a staple in track reconstruction in particle physics for more than half a century. It was designed to detect simple shapes, originally lines, but later also more complex one such as circles or ellipses [25]. Since the parameterisation of these shapes becomes part of the algorithm, it performs best when the points follow this parameterisation closely and the shape is not distorted by secondary effects such as energy loss. Since the problem at hand is about finding points on the same line in (Sz) space, it is reasonable to expect that the classical Hough transformation could be a good solution.

To avoid unbound parameters, the line is described using the Hesse normal form with the closest distance to the origin R and the inclination angle \(\theta\):

$$\begin{aligned} R = z \cos \theta + S \sin \theta . \end{aligned}$$
(6)

In the Hough transformation, a set of lines is generated for each point. All lines go through the point, but at different inclination angles. The line parameters are then filled into an accumulator space that is spanned by \(\theta\) and R. In the accumulator space, local maxima will emerge for line parameters that connect multiple points. In our case, the algorithm searches for only one line connecting the largest number of points. Hence, the corresponding parameters can be found by selecting the global maximum in the accumulator space. The (Sz) points contributing to this maximum are chosen as the correct ones. The procedure is illustrated in Fig. 6. In case the global maximum is ambiguous, i.e. two bins with the maximum number of entries are present, a line fit for both sets of (Sz) hits is performed and the bin resulting in the smallest \(\chi ^2\) is selected as the correct one.

The computational cost of this procedure depends on the chosen size of the accumulator space. Based on the results given in Section “Hough Transformation Binning”, we use 25 bins for R and 90 bins for \(\theta\). Hence, for each (Sz) solution, Eq. 6 has to evaluated for 90 values of \(\theta\) to determine R. Since we consider the global maximum, the resulting \(25 \times 90\) array representing the accumulator space has to be searched only once.

Fig. 6
figure 6

A visualisation of the Hough transformation algorithm. a (Sz) points (red crosses) with three example hits highlighted. The MC truth (Sz) points are shown for comparison (green stars). b–d The accumulator space after the line parameters of hits 1, 2 and 3 have been added, respectively

Recursive Annealing Fit

Fig. 7
figure 7

A visualisation of the recursive annealing fit. The red crosses denote all possible (Sz) points, the blue line illustrates the fit made to the points encircled in blue. The Monte Carlo truth points are marked as green stars. a All (Sz) points are considered as possible solutions. A fit is applied to all of them. b The points furthest away from the fit are removed. c A final fit is applied to the remaining (Sz) points

Annealing procedures found their way into track reconstruction several decades ago [23]. One possible application is to remove wrongly matched hits from a track and thereby improve the track fit [26]. Thus, the recursive annealing fit operates by removing outliers within a set of measurements. The rejection of these outlying measurements can be based on the measurement of a residual, here the distance between one (Sz) point and a line fit to all (Sz) points.

The procedure is illustrated in Fig. 7. The initial line fit is performed to all (Sz) points in a track candidate. Since the detector resolution is much better in the transversal direction than in the longitudinal, only the uncertainty of the z-component of the position is taken into account. Given that an iterative minimisation has to be performed, this is a helpful simplification of the fit. The line expression in Eq. (4) is fitted to the points to extract the slope \(\tan \lambda\) and the starting position \(z_0\). The fit minimises the \(\chi ^2\)

$$\begin{aligned} \chi ^2 = \sum _i^n \frac{\left( z_i - kS_i - z_0\right) }{\sigma _i^2}, \end{aligned}$$
(7)

with respect to the slope k and the intercept \(z_0\). The index i runs over all (Sz) points and the uncertainty \(\sigma _z\) of the i-th hit is denoted \(\sigma _i\).

The (Sz) points with the largest contribution to the \(\chi ^2\) are rejected from the skewed STT hits after the initial fit. Specifically, the (Sz) point with the largest residual is removed and the remaining points are fitted anew. This procedure is repeated until one (Sz) point has been removed for every skewed STT hit.

There is a certain computational simplicity to this approach. Equation 7 has to be solved once for all (Sz) points. Since only one (Sz) point per hit has to be removed, it is sufficient to compare the residuals for the two points belonging to the same hit. Calculating a new \(\chi ^2\) is then done by subtracting the term corresponding to the removed point from the sum in Eq. 7.

Data Samples

To evaluate the algorithms, two different sets of data samples were simulated.

First, a single particle generator, derived from the generator present in FairRoot [27], was used to simulate 1000 events with four muons, two of each charge, orginating from the interaction point and isotropically and monochromatically distributed. This was done with each of the momenta of 0.1, 0.2, 0.5, 1.0, 2.0, and 5.0 GeV/c to cover a wide range of expected particle momenta. Muons have two main advantages: i) they interact mainly electromagnetically with the detector material, hence their measurement is less obscured by strong processes compared to hadrons and ii) being 200 times heavier than electrons, they are less prone to change direction through scattering. The muons in these samples originate from the interaction point and are emitted uniformly within the acceptance of the Straw Tube Tracker, i.e. the polar angle \(\theta \in [22^\circ , 140^\circ ]\) and the azimuthal angle \(\phi \in [0^\circ , 360^\circ ]\).

More general data sets are provided by the Dual Parton Model generator [28], offering a realistic composition of known processes that occur in \(\overline{p} p\) collisions. These include a broad range of final states, involving \(p, \pi , K, \mu , e\) as well as their respective anti-particles. Some of these are notoriously difficult to reconstruct and, hence, the efficiency is expected to be lower. Four samples at the beam momenta 1.642, 4.6, 7.0, and 15.0 GeV/c, with 5000 events in each sample, were produced in this study. The first three points bear relevance to specific physics channels, whereas the fourth point corresponds to the maximum beam momentum at which the PANDA experiment will operate.

Results

Efficienty and Purity

Fig. 8
figure 8

Sample efficiency (a) and purity (b) of (Sz) points selected by the Recursive Annealing fit (black dots), Combinatorial Path Finder (blue upwards triangles), and Hough transformation (red downwards triangles) for the muon data sample as a function of the muon momentum. The statistical uncertainties have been calculated, but vanish behind the markers in the plot

As a first step, the performance of the PzFinder is assessed by investigating the efficiency and purity of the (Sz) point selection, i.e. the resolution resulting from the left-right ambiguity. One correct and one false (Sz) point exists for each skewed STT hit. The (Sz) point closest to in z to the Monte Carlo truth position is then selected as the correct one. The selection efficiency is defined as

$$\begin{aligned} \epsilon = \frac{N_\mathrm{hit}}{N_\mathrm{hit}^\mathrm{MC}}, \end{aligned}$$
(8)

where \(N_\mathrm{hit}\) is the number of found hits matched to one reference track and \(N_\mathrm{hit}^\mathrm{MC}\) the total number of hits created by that reference track. The hit purity is defined as the ratio of found hits belonging to one reference track over the total number of found hits

$$\begin{aligned} \mathrm{purity} = \frac{N_\mathrm{hit}}{N_\mathrm{hit}^\mathrm{tot}}. \end{aligned}$$
(9)

The efficiencies and purities of the three algorithms are shown in Fig. 8 for the momentum points described in Section “Data Samples”. While all three algorithms reach \(80 \%\) for momenta above 0.2 GeV/c in both observables, the Recursive Annealing Fit performs best with efficiencies and purities above \(95 \%\). The Combinatorial Path Finder has consistently the lowest efficiencies at all momenta, reaching up to \(\approx 85 \%\). Its purity tends to be slightly better than the Hough transformation, but stays well below the Recursive Annealing Fit, reaching up to \(\approx 85 \%\). The Hough transformation achieves efficiencies of \(\approx 90 \%\), but has the lowest purities at slightly above \(80 \%\) at higher momenta.

Hough Transformation Binning

The performance of the Hough transformation is sensitive to the chosen size of the accumulator ray, which can be expressed via the bin widths of R and \(\theta\). At first glance, a higher granularity leads to a better resolution of the track, albeit by using a larger number of computations. However, the granularity is also limited by the detector resolution. In this section, we demonstrate how we educated our choice of an optimal binning that led to the results given in Section “Efficienty and Purity”.

Fig. 9
figure 9

ROC curve of the Hough transformation algorithm with different bin widths of the accumulator space. Each point is classified by the number of bins in R and \(\theta\). The optimal choice is highlighted in red

Different numbers of bins were tested on a sample of 1 GeV/c muons: \(N^R_\mathrm{bin} = 25,50,100\) and \(N^{\theta }_\mathrm{bin} = 45,90,180\) for the parameters R and \(\theta\), respectively. Figure 9 displays the purity and efficiency for these binnings as a pseudo Receiver Operating Characteristics curve (ROC curve), illustrating the performance of binary classifiers.

The figure shows a range of binning choices, for which efficiency and purity have been determined. The parameter set closest to (1,1) on the curve is chosen as optimal. Henceforth, the Hough transformation was used with the parameters \(N^R_\mathrm{bin} = 25\) and \(N^{\theta }_\mathrm{bin} = 90\). The optimal binning for this procedure depends on the detector resolution and thereby on the particle momentum. However, with further increasing particle momenta, the momentum resolution increases and hence, this binning will remain a good choice.

Spatial Resolution

Fig. 10
figure 10

Example distributions determining the distribution mean, root mean square, and standard deviation. A Gaussian function was fitted in both cases (red line). a The error of the reconstructed longitudinal position z of the (Sz) points. b The relative error of the reconstructed longitudinal momentum \(p_\mathrm{l}\) of the tracks. The plots were produced from a data sample with muons with a momentum of 1 GeV/c. The combined over- and underflow present in these plots is on a level of \(\approx 0.5 \%\) in (a) and \(\approx 2 \%\) in (b)

Fig. 11
figure 11

Quality observables of the z-position of (Sz) points selected by the Recursive Annealing fit (black dots), Combinatorial Path Finder (blue upwards triangles), and Hough transformation (red downwards triangles). Shown are distribution mean (a), the root mean square (b), and the standard deviation (c) for a simulated data sample of 1 GeV/c muons

Fig. 12
figure 12

Quality observables of the longitudinal momentum \(p_\mathrm{l}\) of track reconstructed by the Recursive Annealing fit (black dots), Combinatorial Path Finder (blue upwards triangles), and Hough transformation (red downwards triangles). Shown are distribution mean (a), the root mean square (b), and the standard deviation (c)

After selecting the (Sz) points of a track candidate with the PzFinder, the spatial reconstruction quality can be assessed by studying the z-position error

\(\Delta z = z_\mathrm{rec} - z_\mathrm{MC}\) for each hit. An example distribution for the reconstructed longitudinal position z of 1 GeV/c muons is shown in Fig. 10a. The standard deviation was approximated from the Full Width at Half Maximum (FWHM) using

$$\begin{aligned} \sigma _z = \text {FWHM}/2.355. \end{aligned}$$
(10)

Since the distribution does not always follow a well-defined Gaussian shape, we also provide the root mean square in addition. Figure 11 shows the \(\Delta z\) distribution mean, root mean square, and standard deviation for all three algorithms. Above particle momenta of \(0.1 \,\)GeV/c, the mean values of the distributions are close to zero. The root mean square values are around 3 cm for higher particle momenta. The standard deviation, on the other hand, quickly reaches values below 5 mm. Even before using an adaptive fitting method, e.g. Kalman Filter [29], this comes close to the design value for the resolution of 3 mm [13].

The deviations arise primarily from the assumption of a helix shape for the track. The expected resolution from the calibration is already modelled in the isochrone radii. Furthermore, uncertainties from the mechanical positioning are expected to be even smaller (see Section “Straw Tube Tracker”) and not affect these results in a major way. This leads to false (Sz) matches for very small isochrone radii, in which case the true and the false (Sz) point are also very close to each other. This is reflected in the results of Section “Efficienty and Purity”. The impact of these false matches on longitudinal momentum resolution in Section “Longitudinal Momentum Resolution” is minor.

Longitudinal Momentum Resolution

To assess the quality of the longitudinal momentum reconstruction, we define the relative longitudinal momentum resolution as

$$\begin{aligned} \mathrm{Res}(p_\mathrm{l}) = \frac{\left( p_\mathrm{l}^\mathrm{rec} - p_\mathrm{l}^\mathrm{MC}\right) }{p_l^\mathrm{MC}}, \end{aligned}$$
(11)

with \(p_\mathrm{l}^\mathrm{rec}\) and \(p_\mathrm{l}^\mathrm{MC}\) being the reconstructed and Monte Carlo momentum, respectively. Here, the reconstructed longitudinal momentum was calculated from the slope in the Sz space and the transversal momentum obtained from the primary track finder via the relation

$$\begin{aligned} p_\mathrm{l} = p_t \tan \lambda . \end{aligned}$$
(12)

An example distribution of the reconstructed longitudinal momentum \(p_\mathrm{l}\) for 1 GeV/c muons can be seen in Fig. 10b. The standard deviation was determined in same way as in Section “Spatial Resolution”. The quality parameters for the longitudinal momentum reconstruction are shown in Fig. 12: the mean of the longitudinal momentum distribution, the root mean square, and the standard deviation. All three algorithms perform similarly, with the Recursive Annealing Fit slightly outperforming the others. The root mean square and standard deviation are lowest in the range of 0.2–0.5 GeV/c. At lower momenta, the particle trajectories begin to deviate from the helix assumption due to distorting effects like energy loss. This makes them more difficult to reconstruct with accuracy and precision. At higher momenta, the particle trajectories become straighter, introducing a larger uncertainty to the momentum reconstruction.

Dual Parton Model simulations

Fig. 13
figure 13

Quality observables for the Recursive Annealing fit (black dots), Combinatorial Path Finder (blue upwards triangles), and Hough transformation (red downwards triangles) applied on several data samples using a DPM generator at several simulated momenta of the antiproton beam. Shown are the efficiency (a), the purity (b), the distribution mean for the z-position reconstruction (c) and the corresponding standard deviation (d), as well as the distribution for reconstructed longitudinal momentum \(p_\mathrm{l}\) (e) and the corresponding standard deviation (f)

In addition to clean muons, the PzFinder was tested on samples generated using the a DPM generator. The corresponding quality observables are given in Fig. 13. Overall, the purity is slightly lower than for the muon sample, most notably in case of the Hough transformation. The lower hit finding purity of the PzFinder is correlated with a lower purity of the tracks reconstructed by the primary track finder for the DPM sample. When performing the Hough transformation, the lower track purity leads to a more washed out accumulator space and less accurate estimation of the line parameters. This gives rise to more false (Sz) selections. As before, the Recursive Annealing Fit outperforms the other methods in terms efficiency and purity, yielding values of 95% and higher. The quality of the spatial and momentum reconstruction is comparable to the clean muon case.

Run-time Performance

Fig. 14
figure 14

Run-time performance numbers in milliseconds. From left to right: no PzFinder, Recursive Annealing Fit, Combinatorial Path Finder, Hough Transformation. Different parts of of the reconstruction code were measured: The preceding event reconstruction (yellow, horizontally striped), the interface between the PzFinder and PandaRoot (blue, vertically striped), the common part of the PzFinder (red, diagonally striped), and the algorithm used for resolving the left/right ambiguity (green, solid)

Efficiency, purity, and resolution observables take a dominant role when assessing the applicability of our algorithm in an offline processing environment, i.e. after the experiment was carried out and the data has been taken. During online processing, though, the reconstruction algorithms have to keep pace with the event and data rate of the ongoing experiment.

Figure 14 shows timing measurements of four different cases, the event reconstruction without the PzFinder, and then with the PzFinder for each of its three different algorithms. At present, both the primary track finder as well as the PzFinder have only been optimised for reconstruction quality, not execution speed. While full optimisation was enabled for the compiler (GCC 7.4.0), no explicit use of vectorisation or parallelisation was implemented. Hence, the results presented here serve rather as an orientation for future developments. The run-time is broken down into different parts of the code: The event reconstruction before the invocation of the PzFinder (yellow, horizontally striped), the interface between the PzFinder and PandaRoot which consists mainly of exchanging data between the two (blue, vertically striped), the bulk of the PzFinder code (red, diagonally striped), which includes for example the isochrone alignment procedure and writing of output, but not the algorithm for resolving the isochrone ambiguity, which is displayed separately (green, solid). The measurements were repeated 5 times with 1000 events each. The average run-time was taken as the result. In all cases, the standard deviation was less than 0.036 \(\mu\)s. The machine used was an Intel Core i7-4770 CPU at 3.40 GHz inside a Desktop PC with no other non-essential processes running.

At present, the interface between the PzFinder and PandaRoot adds the largest contribution to the event reconstruction time with close to 9 \(\upmu\)s/event. With the goal in mind to keep the tool generically usable by multiple track finders in its prototype form, a lot of input and output data is being copied via a singleton run-time task manager. In the future, this can be mitigated or even circumvented, for example, by passing references and offering a more direct integration between the PzFinder and other track finders. The PzFinder sans ambiguity resolution itself adds about 60% to the execution time. Since this is the common part of the tool, future optimisation will benefit all configurations. Among the three algorithms for ambiguity resolution, the Combinatorial Path Finder adds the largest additional run-time with \(\approx 2.4\) \(\upmu\)s/event, close to the common part itself. The Hough transformation is about \(2.5 \times\) faster with \(\approx 0.9\) \(\upmu\)s/event. However, the Recursive Annealing Fit outperforms the others by an order of magnitude with \(\approx 0.1\) \(\upmu\)s/event, resulting in an almost negligible computational footprint.

These results were obtained for purely serial, single-threaded versions of the algorithms. The various strategies for accelerating the execution through vectorisation or parallelisation will likely benefit each algorithm differently, which will be investigated further in the future. For reconstructing track from the primary vertex online, when the average time between events can be as little as 50 ns, significant improvements for the run-time are required. Considering, however, the use of the PzFinder in the context of a dedicated track finder for particles with displaced vertices, which occur many orders of magnitude less frequent, it could already serve as an adequate solution. It is also this case where the reconstruction of longitudinal track components is the most beneficial.

Summary

We have implemented and investigated three different algorithms for the reconstruction of the longitudinal momentum in the Straw Tube Tracker of the PANDA experiment. Among these three algorithms, the Recursive Annealing Fit offered the best qualitative results, yielding efficiencies and purities of 95% and higher for particle momenta above 0.2 GeV/c. Even without adaptive fitting, the reconstructed spatial and momentum resolution comes close to the design goals set for the detector. When compared to the other two methods, the computational simplicity results in faster execution times, which adds to its appeal. The longitudinal track information will complete the kinematic description even of those tracks that only leave hits in the Straw Tube Tracker. It will be particularly important for the selection of events involving long-lived particles.

The PzFinder is constructed in such a general way that it can be added or integrated into other track finding algorithm, that only reconstruct transversal track components, in a straightforward way. The procedure should also be applicable to other detectors of a similar geometry, for example the forward tracking stations of the PANDA detector. Furthermore, the extrapolation of a locally reconstructed track to another subdetector would be a possible use case.