{'fraction_non_alphanumeric': 0.029481919664154185, 'fraction_numerical': 0.013500620169831123, 'mean_word_length': 4.489133280963603, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Space Charge Effects in the SπRIT Time Projection Chamber

Time projection chambers (TPCs) are widely used in nuclear and particle physics. They are particularly useful when measuring reaction products from heavy ion collisions. Most nuclear experiments at low energy are performed in a fixed target configuration, in which the unreacted beam will pass through the detection volume. As the beam intensity increases, the buildup of positive ions created from the ionization of the detector gas by the beam creates the main source of space charge, distorting the nominal electric field of the TPC. This has a profound effect on the accuracy of the measured momenta of the emitted particles. In this paper we will discuss the magnitude of the effects and construct an observable more appropriate for fixed target experiments to study the effects. We also will present an algorithm for correcting the space charge and some of the implications it has on the momentum determination.


Introduction
When placed inside of a magnetic field, time projection chambers (TPCs) provide an accurate means to determine the momenta of charged particles resulting from particle collisions. TPCs in nuclear physics experiments are typically used in either fixed-target or active-target mode [1][2][3][4]. Charged particles traversing the gas-filled detection volume of a TPC ionize the gas, producing electron-ion pairs. The ions are much heavier than the electrons, and as a result, the ions drift much slower in the TPC. Due to their lower drift velocity, a build-up of ions can occur within the TPC. Such a build up of free ions is referred to as space charge. One must take into consideration the effects that the build up of positive space charge have on the reconstructed tracks of the charged particles.
The gas ionization (and resulting space charge) occurs due to several processes: from charge amplification within the avalanche region, from the reaction products of nuclear reactions, and from unreacted beam particles traversing the detection volume. Typically the space charge originating from the back flow of ions from the avalanche region is mitigated by the use of a gating grid [5], which, when operated with the proper settings, blocks at least 99.9% of back flow. Typically, the frequency of nuclear reactions is small compared to the rate of incoming beam particles; for the data examined in this work, nuclear reactions only occur from about 2% of the incident beam particles. Further, the products from a nuclear reaction are mainly composed of protons and other light particles that have a low stopping power as compared to the heavy ion beam. For example, a LISE++ [6] calculation shows that the ratio of energy deposition per unit length in P10 gas (a typical gas used in TPCs, consisting of 90% Ar and 10% CH 4 ) of a 500 MeV/c proton to that from a single Sn beam at 270 MeV/u is only 0.03%. Due to the relatively low rate of occurrence and low ionization, the contribution to space charge from nuclear reactions is diminutive. Therefore, in this paper we consider only the space charge accumulation due to unreacted beam particles traversing the TPC detection volume.
Our studies specifically analyze the space charge effects observed within data taken by the SAMURAI Pion-Reconstruction and Ion-Tracker (SπRIT) TPC during experiments performed at the Radioactive Isotope Beam Factory (RIBF) facility at RIKEN in Japan [4]. The SπRIT TPC is a rectangular TPC with an active gas volume of dimensions 86.2 cm × 51.3 cm × 134.4 cm, constructed in a joint US-Japan collaboration [4,7]. The pad-plane, which detects the position of the drift electrons, is located on top of the active gas volume while the cathode, which removes the associated positive ions, is located below the gas volume. A set of experiments were performed in 2016 with four secondary Sn isotope beams, 108 Sn, 124 Sn, 112 Sn and 132 Sn at an energy of 270 MeV/u. The beam intensity varied but was roughly on the order of 10 kHz. The beams impinged on a target located 13.2 mm upstream of the TPC's detection region, with the 112 Sn target being used for the first two beams and the 124 Sn target for the last two.
An ideal way to directly measure the space charge effects is to use a laser system. Highly energetic photons from the laser ionize gaseous molecules, which are detected by the TPC. The deviation of the detected trajectory from a straight line provides a measurement of the distortion caused by space charge and B-field non-uniformity [8]. The SπRIT TPC did not have a functioning laser calibration system during this experimental campaign.
The STAR TPC collaboration showed that the amount of space charge is proportional to observables such as the signed Distance of Closest Approach (sDCA) [9]. This is suitable for collider experiments where reactions occur everywhere along the beam path. However, the desired nuclear reactions occur only on the target plane in the SπRIT experiment. Therefore a new observable, ∆V LR , is constructed to correctly reflect this geometric configuration. It will be used in the development of the correction algorithm for the space charge distortion in this study.

Experimental setup
The SπRIT TPC was designed to measure the yields of charged pions and light charged particles in heavy ion collisions, an observable which is sensitive to the symmetry energy term of the nuclear equation of state (EoS) [4]. In this paper, we choose to use data from the reaction 108 Sn + 112 Sn to illustrate the effects of the space charge. This set of data is chosen because the beam intensity varies more than the other beams used in the experiment, providing a better demonstration of the correlation between space charge effects and beam intensity. The same corrections and conclusions should be applicable to the other reactions as well.
A top-down view of the experimental setup is shown in Fig. 1. The SπRIT TPC is installed inside the SAMURAI dipole magnet [10], which provides a nearly uniform 0.5 T magnetic field. The detection volume of the TPC is enclosed by the field cage, which is made of printed circuit boards with precisely spaced horizontal copper strips. The voltage of each strip decreases sequentially from top to bottom to create a uniform electric field of 124.7 V/cm [11]. Figure 1 also defines the coordinate system for this study, with the origin (0, 0, 0) located at middle of the front edge of the active pads and at the same height as the pad-plane. The magnetic field points in the +y direction while electric field points in the −y direction; the +z direction points along the beam defining a right handed coordinate system.
The TPC detection volume is filled with P10 gas at atmospheric pressure which is continuously monitored. There are several detectors upstream of the target, including two Beam Drift Chambers (BDC1 and BDC2) that  The origin of the coordinate system and the direction of the fields are illustrated, with y-direction pointing out of the page track the beam as it passes through the beam tube [12]. By extrapolating the beam trajectory to the target plane at z = −13.2 mm, the reaction vertex can be determined with position resolution of δx = 0.7 mm and δy = 0.3 mm [7]. Although the reaction vertex can be and is usually reconstructed from the tracks in the TPC [13], it is susceptible to space charge effects which renders it unusable in this study. Throughout this paper, "vertex" refers to the vertex extrapolated to the target plane by the two BDC measurements. The incident beam intensity is calculated through the data analysis of other upstream detectors (not shown in Fig. 1). Details of this analysis can be found in Ref. [7].

Space charge distortion
In the case of anti-parallel E-and B-fields, electrons created by the traversing charged particles will drift opposite to the E-field, terminating on the pad-plane. If the E-or B-fields exhibits any non-uniformities, the electron drift path will not be completely vertical. The reconstructed positions of electron clusters along the trajectory of the primary ionizing particle will be distorted if this lateral movement of electrons is not corrected for. In the presence of E-and B-fields, the motion of electrons is described by the Langevin equation [14], In this equation, ω = e B /m is the cyclotron frequency, τ is the mean time between collisions, m is the mass and e is the signed charge of the drifting electron or ion and µ = eτ /m is the ion-mobility. The value of τ is fixed once the drift velocity is measured. Since the E-and Bfields are nearly uniform, the drift velocity of electrons can be approximated as v = µ E = eτ E/m. By comparing hit points with the longest drift time to the height of the device, the electron drift velocity for SπRIT with data from 108 Sn beam is determined to be 5.42 ± 0.06 cm/µs, with ωτ = 2.18 ± 0.02. The beam-induced ions drift primarily downward towards the cathode with uniform velocity. While the repulsion between ions causes this sheet to diffuse slightly as they drift downward, it has a small effect on the electron trajectories. Therefore, they are approximated as a positively-charged sheet as indicated by the shaded region inside the TPC in Fig. 2. The energy loss per unit length of 108 Sn at 270 MeV/u inside P10 gas at atmospheric pressure is around ∼ 10 MeV/cm and the ion drift velocity is ∼ 2 × 10 −4 cm/µs. Given that ∼ 30 electrons are ionized from the gas per eV, a beam intensity of 10 kHz would give rise to a sheet charge density on the order of ∼ 10 −8 C/m 2 . Using the empirical charge-finding method, which will be discussed in Section 4, the accurate value is found to be 2.1 × 10 −8 C/m 2 . Furthermore, the ionization as measured by the energy loss per unit length of the beam particle at beginning (z = 0) and end (z = 134.4 cm) of the TPC only differs by 2.2% according to LISE++ [6]. Therefore, we assume the sheet charge density along the beam path to be uniform.
To understand the movement of electrons, let us consider only the electric field contribution from the sheet charge; the first term ( E term) inside the parenthesis of Eq. (1) pushes electrons in the direction normal to the sheet charge. The second term (the E × B term) pushes electrons in the direction parallel to the beam path. The third term (the E · B term) pushes electrons in the direction of B-field. The influence the space charge has on the trajectories is a complicated three-dimensional effect due to the non-uniformity of SAMURAI magnetic field and the space charge configuration. The details on obtaining a solution from Eq. (1) and measuring the sheet charge density will be discussed in later sections. However, general tendencies can be illustrated with an example of the displacement vector field calculated from Eq. (1) with a typical sheet charge density of 2.1 × 10 −8 C/m 2 (corresponds to beam intensity of 10 kHz), as shown in Fig. 3   The distortion causes the intersection point between the reconstructed tracks and the target plane at z = −13.2 mm to diverge from the actual vertex. The difference in the x-coordinate between the vertex and the projected position on the target plane is denoted as ∆V x . This is highlighted by the inset in Fig. 3, where the ∆V x of the displaced left-going track is shown. Generally speaking, the space charge effects cause the projected positions of left-going tracks to be shifted to the right (negative ∆V x ), and for right-going tracks to be shifted to the left (positive ∆V x ). It should be noted that although Fig. 3 shows a vertex at x = 0, the measured coordinates of the vertex changes event-by-event.
We observe a similar trend in the data; Fig. 4 shows two ∆V x distributions for left-and right-going tracks for particles emitted with polar angle θ, defined with respect to the z-axis, larger than 40°. The trend is the same for tracks emitted with θ < 40°, but to a lesser extent because the electrons are mostly displaced in the z-direction, as evident in Fig. 3. When the tracks are projected onto the target plane, the shift in z-coordinate will be more difficult to observe than for tracks that are almost perpendicular to the target plane. The separation between the peak locations of the left-and right-going distributions is denoted as ∆V LR . Imperfections in track reconstruction, such as the appearance of broken tracks, cause the long tails in the distributions. Since the amount of space charge is proportional to the beam intensity, we should observe a positive correlation between ∆V LR and the beam intensity if the displacement from the vertex is indeed caused by space charge distortion. During the experiment, data was taken every 30 minutes and constitutes a "run". The run-averaged value of ∆V LR is plotted against the run-averaged beam intensity in Fig. 5 using data from 61 consecutive runs with the 108 Sn beam; a strong linear positive correlation is observed. In the absence of space charge effects, the nonuniformities of the magnetic field alone can cause distortions explaining the non-zero y-intercept value of 5.4 mm.
The distortions in the measured hit points impact the accuracy of the momentum determination of the emitted particles, where most information relevant to nuclear 6 8 10 12 Beam intensity (kHz) physics is encapsulated [15,16]. In theory, fitting the track curvatures while including the precise vertex point determined by the BDCs should improve the momentum resolution [17]. In practice, the TPC hit points are affected by the space charge while the vertex point determined by the BDCs is not. The combination of distorted and undistorted information adversely affects the track fitting algorithm.
The two-dimensional plots in Fig. 6a and Fig. 6b show the reconstructed momentum with and without the vertex point for tracks with θ < 40°and θ > 40°respectively. The one-dimensional plots in Fig. 6c and Fig. 6d show the fractional difference between the two reconstructed momenta, again for tracks with θ < 40°and θ > 40°respectively; with the left-going tracks and right-going tracks being plotted separately. The disagreement before and after refitting with the vertex becomes larger as the polar angle of the track increases since the track's projection onto the target is sensitive to even small distortions. The bifurcation seen in Fig. 6b originates from the asymmetry of leftand right-going tracks as discussed earlier and shown in Fig. 4 This is corroborated in Fig. 6d where the distributions from tracks heading in opposite x-directions peak at different locations, with left-going tracks peaking at 0.054 and right-going tracks peaking at -0.14.

Space charge correction
In this section, we will discuss in detail the algorithm for correcting the space charge distortions. We define x det and z det as the x-and z-coordinates of the measured cluster positions on the pad-plane, and x real and z real as the xand z-coordinates of the original position of the ionization. An inverse map is defined as the difference in coordinates between the detected and original position, The variable t drift is the drift time of the electrons, which is measured as the time difference between the associated  pad signal and the trigger. With accurate maps of the Eand B-fields, the inverse map can be calculated by solving Eq. (1) with Runge-Kutta methods; by setting x det , z det and t = t drift as the initial position, with negative time steps, we solve and trace the electrons back to where they originated at t = 0, corresponding to x real and z real in Eq. (2). Tables of ∆x and ∆z are generated in this manner for a range of values in x det , z det , and t drift , which are then added to the x-and z-coordinates of the measured cluster positions in order to determine the original undistorted location.
The magnetic field map was simulated with TOSCA code. Hall probe measurements at selected locations verify that the simulation is accurate to within 0.25% when field strength at the center is 0.5 T [12,18]. The electric field is calculated by solving Poisson's equation numerically with the Jacobi method [19], provided that the electric charge density from space charge and the boundary conditions of the field are known. The field cage configuration described in Section 2 indicates that all six sides can be described by Dirichlet boundary conditions, with the potential on the four vertical sides increasing linearly with y-coordinate, and the top and bottom sides having uniform potential.
The sheet-like space charge distribution, as sketched in Fig. 2, is represented by the charge density σ SC . Without a direct measurement of σ SC , we determine it empirically by scanning a range of values; for each run, five inverse maps are calculated with five trial space charge densities. The value of ∆V LR is calculated and plotted against their corresponding σ SC in Fig. 7a. The two example runs shown with different beam intensities exhibit linearity between ∆ LR and σ SC . Fitting the relationship between ∆ LR and σ SC and taking the vertical intercept provides the optimal value of σ SC .
Ideally, one should optimize σ SC for each run individually, but it is very computationally expensive. The optimal values of σ SC with the two runs in Fig. 7a and three additional runs are plotted against their respective beam intensities in Fig. 7b, showing a clear linear dependence within the beam variation. The linear approximation of the optimal value of σ SC as a function of beam intensity reduces the need to optimize σ SC for each run.
The dependence of ∆V LR on beam intensity after applying space charge corrections is shown in Fig. 8 for all runs. The reconstructed values of ∆V LR fluctuate around ∆V LR = 0, the expected value if the distortion is corrected perfectly. Fig. 9 shows an improvement in the ∆V x distributions for all tracks with dashed and solid histograms representing data before and after applying the inverse map correc-  tion respectively. A significant improvement is also seen in the ∆V x distributions for tracks with θ < 40°, seen in Fig. 9a even though they are minimally affected by the space charge. After the space charge correction, the peak is closer to zero and the full width at half maximum of the distribution improves from 6.6 mm to 4.0 mm. The improvement is more prominent for tracks with θ > 40°a s shown in Fig. 9b, where the bimodal distribution is reduced to a unimodal distribution. The peaks of both distributions in Figs. 9a and 9b deviate from zero by less than 1 mm, which is consistent with the uncertainties in the BDC vertex determination.
The correction also improves the precision of the reconstructed momentum. This is demonstrated in Fig. 10. This improvement is most striking for the tracks with larger polar angles, with the bifurcation previously observed in 6d disappearing in Fig. 10d. Fractional differences between the two types of reconstructed momentum are shown in Fig. 10c and Fig. 10d, with the most probable percentage differences smaller than 1.0% for both small-angle tracks and large-angle tracks after correcting for space charge effects.

Discussions and Conclusions
We have studied the effect of field distortions due to space charge effects in the SπRIT TPC. The field distortions cause a lateral displacement of drift electrons, which causes the reconstructed tracks to be misaligned from the vertex position and impacts the accuracy of particle momentum determination, especially for particles emitted at  large polar angles. By solving the Langevin equation (Eq. (1)), we restore the cluster positions back to their original location. In this procedure, the space charge density σ SC is treated as a free parameter, determined by minimizing the separation between the peaks in the ∆V x distribution from left-going and right-going particles. This correction should significantly improve the accuracy of the reconstructed momentum, especially for particles emitted at large polar angles.
This method has a few limitations. Firstly, the space charge sheet density is assumed to be the average value over a run and beam intensity fluctuations that occur within a run (∼30 minutes) are not considered. Another limitation of the method comes from the dependence of charge density on beam type. We found that the relationship between charge density and beam rate was unique to each secondary beam. The charge density depends on the isotopic composition of the secondary beam, which depends on the primary beam settings and beam tuning. By implementing a laser system in future experiments, this correction could be verified with a direct measurement of space charge distortion.
Monte Carlo simulation can be performed to further our understanding of the space charge effect beyond our current observables and to quantify the improvement in determining momentum resolution and accuracy. An effort is underway to accurately simulate the detector response of the SπRIT TPC.