{'fraction_non_alphanumeric': 0.024702875917738207, 'fraction_numerical': 0.020849389526629618, 'mean_word_length': 4.49086859688196, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, '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}}
Performance of the AMS-02 Transition Radiation Detector

For cosmic particle spectroscopy on the International Space Station the AMS experiment will be equipped with a Transition Radiation Detector (TRD) to improve particle identification. The TRD has 20 layers of fleece radiator with Xe/CO2 proportional mode straw tube chambers. They are supported in a conically shaped octagon structure made of CFC-Al-honeycomb. For low power consumption VA analog multiplexers are used as front-end readout. A 20 layer prototype built from final design components has achieved proton rejections from 100 to 2000 at 90% electron efficiency for proton beam energies up to 250 GeV with cluster counting, likelihood and neural net selection algorithms.


Introduction
The AMS-02 experiment will measure the cosmic ray particle spectra on the International Space Station ISS for a period of at least three years.
With AMS-02 data our understanding of dark matter could be substantially improved. There is overwhelming evidence that some non-luminous non-baryonic substance of yet unknown nature accounts for more than 80% of the matter density of the universe [1,2]. The neutralino χ as a weakly interacting massive particle is the most promising candidate. It would be indirectly observable as additional signal from neutralino annihilation processes in positron spectra as shown in fig. 1. To measure these deviations from standard physics expectations below a cutoff energy around 100 GeV and to verify the agreement above the cutoff requires precise positron spectroscopy with the dominant proton background reduced by a factor of 10 6 . Three orders of magnitude will be achieved with electromagnetic calorimeter shower shape measurements and a further factor of ten from matching calorimeter particle energy with spectrometer particle momentum. A transition radiation detector (TRD) will provide an additional proton rejection factor between 100 and 1000. Figure 1. The expected positron fraction accuracy from AMS-02 after 1 year on the ISS compared to available data from the HEAT collaboration [3]. The error bars reflect the particle identification power estimated from AMS subdetector beamtest data [4].

The AMS-02 Detector
The AMS-02 experiments is optimised for precision particle spectroscopy in space, based on the experience gained from the precursor flight of AMS-01 for ten days in 1998 [5]. Fig. 2 shows the configuration of the detector. Built around a superconducting magnet with a bending power of 0.86 Tm 2 and 8 planes of double-sided silicon tracker with 0.5 m 2 sr acceptance it has two crossed scintillator planes for trigger and time of flight (TOF) measurements both above and below the tracker and anticoincidence scintillation counters (ACC) enclosing the side of the tracker. The ring imaging cherenkov counter (RICH), the electromagnetic calorimeter (ECAL) at the bottom and the TRD on top enhance the particle identification capability. For details refer to [4].

Transition Radiation Detection
Transition Radiation (TR) photons are soft Xrays peaking around 5 keV. With a low probability on the order of α em TR photons are generated when a boundary with a change in the dielectric constant is crossed by a charged particle with a relativistic Lorentz factor above a threshold of around 500 and are emitted colinear with the primary particle. Thus primary protons up to 300 GeV can be distinguished from positrons of same momentum in a suitable detector recording both the direct ionisation signal from the primary particle and the TR photons after a radiator with a large number of TR boundary crossings [6].

The AMS TRD
The AMS TRD design is based on R&D work for ground based experiments [7,8]. It uses an irregular fleece radiator and Xe/CO 2 filled proportional wire straw tubes. The challenge is to build such a detector for safe and reliable operation for three years in space. The AMS TRD will have 20 layers, each with 20mm fleece and detector modules of 16 tubes. The straws are made of double layer aluminised kapton foils and have an inner diameter of 6mm. A centered 30 µm gold plated tungsten wire is operated at 1350V for a gas gain of 3000. The AMS TRD covers an area of 2x2m 2 with 328 modules built from 16 straws each with gastightness at the diffusion level. The construction is described in detail in [9,10].

TRD Prototype Beamtest
To verify the proton rejection power of the AMS TRD design, 40 modules of 40 cm length were built and arranged in two staggered towers of 20 layers each, with layers 3, 4, 17 and 18 aligned horizontally, the others vertically as shown in fig 3. The gas-panel has six separate open circuit Xe/CO 2 (80/20) supply lines at 1 l/h and atmospheric pressure for 6 or 8 modules connected in series. The HV is set to 1480 V and is distributed from a single channel supply line. The frontend boards are equipped with VA32 HDR2 [11] analog multiplexers, with an input range set to 1100 fC. They are read out with an external sequencer and 12bit ADCs as were used for the AMS-01 tracker K-side [12]. Additional beamtests were performed in 2002 and 2003 with final design frontend readout cards equipped with VA32 HDR12 chips, onboard sequencing and 12 bit ADCs connected to AMS TRD DAQ crate electronics [13].

Cern Beamline and Trigger Setup
At the CERN-SPS X7 and H6 beamlines 3 ·10 6 events are recorded with negative and positive charges. Fig. 4 shows the schematic setup.  The event-trigger uses four scintillators (S1,S2,S3,S4). Two directly in front (S2) and behind (S3) the jig, the other two at the beam entrance (S1) and in front of the beam dump (S4). The trigger logic is set up to select a four-fold (S1&S2&S3&S4) scintillator coincidence, with a veto requiring no previous signal for at least 100 µs from scintillators S1 or S4 to reject those particles that are closely preceeded by a previous particle crossing, that would influence the signal height due to base-line shifts from remaining signal overshoot. An additional scintillator (S5) is placed behind the beam-dump to select or veto on muons. Further particle identification is performed at the X7 beamline with cherenkov counter signals from two threshhold-counters (He and N 2 ) each set to efficiently veto the lighter particles when recording protons or pions. At the H6 beamline a proton trigger requires the 8-fold coincidence of a CEDAR-N He differential counter with settings optimised according to a pressure scan for each beam energy. At the X7 beamline electrons, muons and pions are recorded from 20 to 100 GeV, protons from 15 to 200 GeV (tertiary beam) and at 250 GeV (secondary beam). At the H6 beamlines protons are recorded at 120, 160 and 200 GeV. The prototype was mounted on a support allowing rotations around the vertical axis. The data are recorded at 1.5 • and 9 • tilt angle between the beam axis and the jigg.

Data Preparation
Prior to the physical data analysis the recorded beam data are preprocessed. This requires calibration runs which are recorded in between the beam data runs for pedestal subtraction and conversion from ADC bin to deposited energy. In addition the gas pressure and temperature are continuously monitored for gas density dependent gas gain corrections. Finally clean single track events are preselected.

Raw data preparations
Pedestal positions and widths are monitored for the complete data taking period and found to be stable. They are shown in fig. 5 for all 640 channels. With 4096 bins from a 12bit ADC the dynamic range is around 3000 bins above pedestal. The noise between 2 and 4 ADC channels is estimated from the pedestal widths σ after individual common mode correction for each group of 16 channels from one module. It varies for the three frontend boards (vertical-N, vertical-P, horizontal) due to the different noise conditions on different sides on the jig. The individual pedestal positions and widths are used to define a hit as a wire signal larger than 5σ above pedestal. Also the deviations from a linear input response of the VA Chips are corrected. Fig. 6 shows the typical VA input response. The improved flight module frontend boards have pedestal positions between 300 and 600 ADC channels, a linear response up to 1800 fC and the electronic noise is below 2 ADC channels.

Intercalibration
With 5000 muon hits per tube a relative pulse height intercalibration with errors below 2% is achieved. Fig. 7 shows a typical muon pulseheight distribution used for these fits. The intercalibration factors vary between 0.9 and 1.1, mainly due to VA preamplifier gain variations. The contribution from straw tube gas gain variation is below 2%.

Gas density correction
The muon events are also used to determine the gas gain dependence on the gas density. Fig. 8 shows the correlation. It is used to normalise the recorded data runs to standard temperature and pressure conditions. At the beamtest operating parameters a 1% increase in gas density results in a 5% decrease in gas gain.

Energy Calibration
In between runs an 55 Fe source was placed in front of layers 1 and 20. To calibrate the ADC energy scale the upper edge of a periodically triggered spectrum is fitted as shown in fig. 9 and identified as the upper edge of the 5.9 keV photopeak. Figure 9. Random triggered 55 Fe signal with Fermi-Function parameterization All 55 Fe calibration measurements are averaged after tube intercalibration and gas density corrections to give an overall energy calibration factor of 9.14 eV per ADC channel. For the recorded proton events fig. 10 shows the most probable ionisation energy loss. The beam energy dependence is in good agreement with a globally scaled NIST prediction [14] for the relativistic rise.

Single track event selection
With AMS good proton positron separation will be required primarily for clean unambiguous single track events. To select these from the recorded beamtest data a track finding algorithm is used which assumes only one track in the detector: Separately for the 16 vertical (v) and 4 horizontal (h) layers a first linear fit is performed with mean hit positions from each layer of the detector using their RMS as errors to give layers with a single hit a higher weight. A second linear fit uses the 10(v) and 4(h) hits with the smallest residuum with respect to the first fit. Around this path an inner and outer road are defined containing the wires within 1.5 and 5 tube diameters as illustrated in fig 11. INNER ROAD TRcluster OUTER ROAD SECONDARY Figure 11. Inner and outer road around the primary track-fit A clean single track event requires 10(v) and 3(h) hits on the inner road with at least one hit in the first and last pair of layers, less than 4(v) and 2(h) hits in the outer road and less than 6(v) and 3(h) hits in the rest of the detector. For beamtest data the single-track efficiency varies between 50% and 70% depending on the beamline settings. The expected single track efficiency for space station data is estimated from MC simulations of single particle passages. It is around 90% with 5% loss from interactions inside the TRD and 5% from interactions in the material in front of the TRD.

Selected events
These clean single track events are selected to study particle separation and the detector simulation.
Electron data from runs above 20 GeV beamenergy were found to have a lower clean single track event fraction. Since the remaining event statistics do not contribute significantly, but apart from that are in agreement with the 20 GeV electron data, all electron data presented here are those recorded at 20 GeV.
The TRD Monte Carlo simulation (MC) is based on Geant3 [15] with modifications to generate and absorb TR photons [16] and to improve ionisation fluctuations in thin gas layers [17], as implemented by the HERA-B collaboration [18]. Precomputed TR-and ionisation-dN/dX tables for primary particle Lorentz-factors from 1.5 to 200000 are used to randomly generate individual TR-photons and ionisation energy losses for each Geant tracking step.
The tube energy deposition distributions for recorded electrons at 20 GeV and protons from 20 to 160 GeV are used to tune the TR generation parameters to the AMS TRD radiator specifications and the TR absorption and ionisation fluctuation parameters to the AMS TRD straw wall and gas specifications [19].
With the Geant3 simulation the energy depositions from ionisation and TR photons can be studied separately. Fig. 12 shows the energy spectrum for all TR photons generated in the fleece radiator and for those which are detected through absorption in the counting gas. The detection efficiency for TR photons above 5 keV is around 30 %. It drops for lower energeties due to reabsorption in the radiator. The line at 4.2 keV are Xenon L-escape photons.  Fig. 13 shows the recorded energy depositions in a single tube for different particles and different beam energies. The amount of TR contribution above 5 keV can be seen to depend on the Lorentz-factor γ of the primary particle and it is well described by the modified Geant3 MC simulation.

Electron Proton Separation
Depending on their Lorentz factor the particles will be separated based on the tube energy deposition. The background rejection factor is defined as the inverse of the background selection efficiency with cut parameters set for a signal selection efficiency of 90%. The recorded electron data are assumed identical to the positron distributions.

Cluster Counting
The cluster counting algorithm defines a cluster as a tube on the particle track with a deposited energy above a fixed threshold: Edep > Ethr. Events with a cluster count Ncl ≥ Ncut are selected. Fig. 14 shows the number of clusters for 20 GeV electrons and 100 GeV protons with a threshold cut of Ethr = 6.5 keV. The proton cluster count is well described by a binomial distribution, reflecting the statistical nature of the ionisation fluctuations. For Ncut = 6 the shaded area indicates a proton rejection factor of 360 ± 60.

Likelihood
According to the Neyman-Pearson-Lemma [20] the best test to decide between two hypotheses is the liklihood ratio which can be defined as: L = P e ( E)/(P e ( E) + P p ( E)) where E is the vector with the energy deposition of one event. P e ( E), P p ( E) are the multidimensional probabilities for this event to be electron-or protonlike. To reduce the dimensions of this problem mean probabilitiesP e ,P p are used instead of P e ( E), P p ( E) to classify the events:P e/p = n n i P e/p (E (i) ) where n is the number of hits on the track. P e/p (E (i) ) is the probability for the i-th hit with energy E (i) to be electron-or protonlike. It is determined from a parameterisation to the histograms of the tube energy deposition, averaged over all layers. For clean single track events this likelihood analysis achieves proton rejection factors from 2000 to 100 for proton energies from 20 GeV to 250 GeV. To allow a comparison with other TRD experiments, the pion-electron separation power is shown in fig.15.

Neural Network
To further improve the positron proton separation power, the beamtest data are analysed with a neural network algorithm [21]. A neural network adapts its weights with the aim to map training events to expected values (learning). The feedforward neural net used here consists of three layers with one neuron in the output layer. In the hidden and the last layer neurons with a sigmoid output function o i = tanh A i are used ( fig. 16) because a differentiable output function is needed for the learning algorithm. A i is the activation of the particular neuron. To determine the goodness of the mapping of the input data to the expected values, the mean square error (MSE) is defined as: where N is the number of training events, w is the vector with all weight values, E k is the expected value and o k the actual value for the k-th event.
The weight adaption is done with theδ-δlearning rule which is an extension of the backpropagation algorithm that adapts not only the weights but also the learning rates for each weight on the basis of the MSE: ∆w i (t) is the change of weight i in step t and η i (t) is the learning rate at this step. ∂ wi f t k is the error gradient of event k at step t. α, η + and η − are free parameters for the optimization of the learning process. The weight update takes place after each presentation of a batch with 200 training events. A random presentation prevents a learning of the batch order. This algorithm achieves good results with low CPU costs.
A random initialization of net weights according to a normal distribution with σ w = 1/ √ n, where n is the number of inputs to a layer, is a good starting point for the learning process [22]. To present all inputs to the net equally, they are normalised for each input neuron with x ′ k = (x k −x)/σ. The mean valuex and the width σ are calculated from the training sample for each input neuron.
The complete event sample is randomly divided into three subsamples: 40 % for training, 20 % for validation during training and the remaining 40 % for the "real-world" test data to determine the proton rejection factor. The training will be stopped when the MSE of the validation sample reaches its global minimum.

Tube Energy Neural Network
In a first step the 20 energy depositions on the track are used as input data for a neural net (E Tube -NN). The expected value for proton events is set to -1 and for electron events to +1. The input data consists of all single track events at all recorded energies and tilt angles. This has the advantage that only one net is needed for the analysis of all events and the statistics for the training are higher. After parameter variation highest rejections were achieved with η + = 5.5 · 10 −3 , η − = 0.6 , α = 0.6 and 60 neurons in the hidden layer. The output of the trained net for 60 GeV protons and 20 GeV electrons is shown in fig. 17.  [23]. R e = η e /(η e + η p ) is the signal to background ratio of the electron η e and proton events η p at output o. From ∂F o (o)/∂o = 0 or R e = (o + 1)/2 it follows that R e is a straight line for an optimally trained net. On the left side of fig. 18 it is shown that the net is well trained. Variations of the cut parameter show a smooth correlation beteewn rejection and efficiency ( fig. 18 right).
The AMS TOF measurement will provide the particle direction. Apart from a slight saturation of the tube energy spectra within the first few layers of the electron sample the likelihood method is insensitive to the input order. The neural net on the other hand has an intrinsic sensitivity be-cause during training every track is presented in the right order of the particle energy depositions in the detector. A classification run with the energy depositions given in random or reversed order shows a rejection factor reduction of 25 %. The AMS TRD training sample will eventually consist of cosmic electrons and protons preselected with the AMS ECAL. To test the dependence on the input data sample purity, the electron training and validation samples are contaminated with a fraction of protons. The normalised rejections in fig. 19 show that even a contamination of the samples with a few percent results in rejections of the same order as without contamination. With cosmic data a contamination of the training and validation samples below a permil is expected.  Figure 19. Proton rejection with contamination of training and validation sample for E Tube -NN

Combined Neural Net
In a second step an additional neural network with different input data is used. The singular analysis techniques are not the best hypotheses tests according to the Neyman-Pearson-Lemma as pointed out in section 5.2, so it is possible to get better results with a combination of the different methods in an additional neural network (combined NN). A correlation analysis was performed to find the inputs with the lowest correlation, so the combined NN can benefit from non redundant information. The following four inputs have a mean correlation coefficient of |r| ≈ 0.7 among each other: • E Tube -NN, • Likelihood with probability distributions averaged over all beam energies. • TR cluster count with E T HR = 6.5 keV, • Fisher's discriminant with mean covariance matrix calculated from all events. Every event is characterised by these four values. A neural net with 8 neurons in the hidden layer and η + = 5.5 · 10 −3 , η − = 0.6, α = 0.9 gives the best rejections. The rejection power of the combined net is shown in fig. 20. It achieves rejection factors above 100 over all beam energies.  Table 1 shows a comparison of the rejection factors for the test beam data averaged over all recorded energies for the different classification techniques normalised to the cluster counting method. The rejection of the likelihood method with mean probabilities is lower than with individual probabilities, but the rejections of the combined net are an improvement. The neural net with energy inputs has somewhat lower rejections than the likelihood but a much higher rejection than the cluster counting and Fisher's discriminant. A large fraction of the gain in separation power of the combined net over the likelihood method is attributed to the directional information used in the tube energy neural net. The experimentally determined rejection factors should be understood as a lower bound for the TRD when operated on the ISS for the following reason: For beam energies above 200 GeV the Geant3 simulation predicted higher proton rejection factors than observed in the data. Such a discrepancy was not observed for pions and muons with Lorentz factors above 200. As a conservative approach this was attributed to quasi elastic low energy pion pair production by high energy protons in the detector -resembling a TR signature -and was added to the simulation code. If on the other hand this effect is caused by a pion contamination present in the high energy proton beam with inefficient veto from the cherenkov counters this would not affect measurements on the ISS where no primary pion component is present. Also a pion or muon contamination in the negative electron beam would reduce the measured electron efficiency thus also underestimate the TRD performance on the ISS.

Sensitivity to TRD Operating Parameters
Uncertainties in the positron efficiency and proton suppression will enter as systematical errors into any positron or anti proton analysis. In the following analysis the tube energies are deliberately smeared to estimate the effects on proton rejection factors and electron efficiencies, keeping the selection procedures and cuts fixed.
Electronic noise is simulated by adding a normal distributed random value with a relative width (rel.Noise) and an absolute width (abs.Noise) to the original energy depositions. To estimate the effect of calibration precision, a normal distributed set of intercalibration factors for each individual tube is generated with a fixed width around a mean of 1. The effect of a global change in gas gain is estimated with a correlated variation of the energy depositions using a fixed scale factor. Fig. 21 shows that the analysis techniques react quite similar to the different kinds of smearing. The simulations show only a small dependance on relative noise and intercalibration errors. The likelihood method shows a larger dependance on absolute noise contamination because the single tube probability functions are more sensitive to energy shifts than the other methods which rely directly on the tube energies. With an expected electronic noise of about 2 ADC bins or 50 eV all methods are quite stable though. The strongest effect is observed for a correlated variation of the energy depositions: A 5% change in gas gain -resulting from a 1% change in gas density -leads to a 50% change of the proton rejection factor, emphasizing the need for precise gas quality control and monitoring.

Conclusions
The AMS-01 precursor flight demonstrated the feasibility to operate a modern particle physics detector in space, collecting 10 8 events up to rigidities of 140 GV. To exploit AMS-02 data with statistics a 100 times higher, improved particle identification is required. Beam test results have shown that a 20 layer TRD with fleece ra-diator and Xe/CO 2 straw tube detection will deliver proton rejection factors between 1000 and 100 for particle momenta from 20 GeV to 250 GeV. The TRD flight version is under construction and so far within specifications and schedule. This project is funded by the German Space Agency DLR under contract No. 50OO0501, the US Department of Energy DOE and NASA.