Upgraded DIRAC spectrometer at CERN PS for the investigation of ππ and πK atoms

The DIRAC spectrometer installed at CERN PS was upgraded in order to study simultaneously A2π and AπK atoms, namely the bound states of two π mesons, and of π and K mesons, respectively. The detector system can now accept a high intensity beam of 2–6 10 primary protons per second. The electronics and the data-acquisition system can handle a very large amount of data to identify π, K, p, e and m, allowing the selection of ππ and πK pairs in the offline analysis. The resolution of the longitudinal and transverse components of the relative momentum Q of each meson pair in their center-of-mass system with respect er Kuptsov, the key person in the design of the spectrometer who, however, has passed away prematurely before the


Introduction
The objective of the DIRAC experiment at the CERN Proton Synchrotron (PS) was a study of the hydrogen-like atom pionium formed by π þ and π À mesons (A 2π ) [4]. The second stage of this experiment, whose experimental setup is reported in detail in this article, aims at a further study of a new hadronic atom (A πK ) formed by π þ and K À mesons or π À and K þ mesons [2] in addition to the continued study of A 2π .
The objective of the experiment is to measure the lifetimes of these hadronic atoms, which are determined by the charge exchange amplitude π þ π À -π 0 π 0 and π þ K À , π À K þ -π 0K0 very close to the threshold. The precise measurement of A 2π and A πK lifetimes will enable to determine the combination of s-wave pion-pion |a 0 À a 2 | and pion-kaon |a 1/2 Àa 3/2 | scattering lengths (with isospin 0, 2 and 1/2, 3/2, respectively) in a model-independent way. The scattering lengths are evaluated in the framework of QCD with the effective Lagrangians of Chiral Perturbation Theory (ChPT). So the lifetime measurements would provide a crucial test for the understanding of chiral symmetry breaking in QCD including processes with strange quarks.
The study of A 2π includes also the observation of the long-lived states of this atom (metastable states with nonzero orbital momentum) aiming at studying a possibility to measure the energy splitting (Lamb shift; of the order of 0.5 eV) between ns and np states of pionium, where n denotes the principal quantum number. This observation will open a possibility to measure another combination of pion scattering lengths + a a 2 0 2 and thus to get both lengths separately in a model-independent way.
Hadronic atoms A 2π and A πK are produced in proton-nucleus interactions at 24 GeV. After production, these relativistic atoms may either decay due to the strong interaction into a pair of neutral mesons or interact electromagnetically with the target material and finally break up (be ionized) into the characteristic charged meson pairs (''atomic'' pairs) available for detection. These pairs have a small relative momentum in their center-of-mass system (Qo3 MeV/c) and a very small opening angle (o3 mrad) in the laboratory system. The lifetime measurement is sensitive to the target material, and a nickel foil of 100 mm was selected [2]. The choice of such a foil was also dictated by the needs to minimize the multiple scattering in the target and thus to provide a good resolution of the magnetic spectrometer, as good as about 0.5 MeV/c in terms of relative momentum of the split up pairs. This is essential in order to be able to detect the atomic pair signal superimposed over the substantial background of ''free'' pairs produced in inclusive proton-nucleus interactions.
At From this value, the difference of s-wave π-π scattering lengths with isospin 0 and 2 has been extracted as [5]: In 2008-2010, the statistics has been enriched, more than doubled, to confirm the above results. It gave us the possibility to reduce the statistical uncertainty from 3.1% to 2.2%, and the total uncertainty including systematic errors from 4.3% to 3.0%.
Data have been taken for πK atomic pairs since 2007. The results of the analysis of these data will become available soon. A preliminary lifetime of ( ) has been already reported [6]. Also the result of the first observation of the A 2π excited state is published in [7].
The present paper will be organized in the following way: after the introduction in the present chapter, the general feature of the upgraded spectrometer will be given in the next chapter. A short description of the beam, target and the spectrometer magnet in Section 3 will be followed by details of upstream detectors including micro drift chambers (MDC), scintillation fiber detectors (SFD), and ionization hodoscopes (IH) in Section 4, and downstream detectors including drift chambers (DC), vertical and horizontal hodoscopes (VH, HH), Cerenkov counters, preshower detectors (PSh), and muon detectors (MU) in Section 5. Electronics and the data taking system will be described in Section 6. Section 7 will be devoted to the discussion on overall performance of the upgraded spectrometer based on experimental data and Monte Carlo simulation. A summary will be given in the Section 8.

General layout of the spectrometer and main upgrades
The DIRAC spectrometer was constructed originally to detect π þ π À pairs with small relative momenta originating from A ππ mesons [3] in the intense secondary particle flux. It is located at the primary proton beam line T8 for slowly ejected 24 GeV/c protons in the East Hall of the CERN PS. The isometric and the top views of the spectrometer, after upgrades sketched below, are shown in Figs. 2.1 and 2.2, respectively. The median plane of the spectrometer is close to horizontal, but tilted upwards by 5.7°with respect to the primary proton beam. (see Fig. 2.1). It became operational in 1998, and the collection of π þ πdata started in 1999.
Pairs of π þ π À close to each other in position are first detected in the upstream part of the spectrometer with microstrip gas chambers (GEM/MSGC) and scintillating fiber detector (SFD) for tracking, and scintillation ionization hodoscope (IH) for particle counting. The positively and negatively charged particles are then magnetically split and measured with two identical detector systems, which are located symmetrically with respect to the vertical plane including the primary beam axis. The two arms make an opening angle of 38°. In the downstream of magnet, there are drift chambers (DC) for tracking the particles, vertical and horizontal scintillation hodoscopes (VH and HH) for measuring positions and timings, Cerenkov detectors for particle identification, together with preshower detector (PSh) and muon detector (MU).
The spectrometer was upgraded to extend measurement to πK pairs (of both signs) in addition to π þ π À , by retaining the symmetric geometry mentioned above. At the same time, smaller cross section for the πK atom production requires a higher intensity for the primary beam, and thus robustness of the detection system against larger background in the upstream area and the proton background in the left arm for the positive particles. The upgraded spectrometer became ready in the end of 2006 and has been collecting data since 2007. The main upgrades include the following items: 1. A new iron shielding ( Fig. 2.2) was installed after the target with a collimator separately for the primary beam and the secondary particles in place of the simple vacuum tube for both. Significant reduction was obtained in the background counting rates of the front end detectors.

GEM/MSGC was replaced by microdrift chambers (MDC) for
precision tracking of all the charged particles within high intensity flux. 3. SFD was improved in both construction and readout electronics.
New SFD with the fiber diameter of 0.28 mm instead of 0.5 mm in the original detector are implemented for X and Y planes. New electronics F1-TDC-ADC with dedicated data transfer system allows to measure time and pulse height simultaneously for every hit in the SFD. As a result the SFD efficiency increased up to 98% and the separation of adjacent hits became much better. 4. The same F1-TDC-ADC as for SFD was also used in read out of IH. 5. Frontend electronics for DCs were modified to decrease the threshold and consequently to reduce the required high voltage. This allowed operation at higher intensities with a high efficiency. 6. The scintillation detectors VH, HH, PSh and MU were upgraded.
VH was extended. This detector with a good time resolution is used for triggering and measurement of the time-of-flight of charged particles. HH and PSh were redesigned from scratch. The upgrade of these detectors allows an increase of the acceptance of the spectrometer and consequently the detection efficiency of πK atoms. The new electronics, F1-TDC-ADC is implemented also to VH and HH. This allows recording of the hit timing with a higher precision than before, and also of pulse height of each hit. 7. Cerenkov counters with aerogel radiator are newly installed in the left arm (for positively charged particles) for kaon/proton separation. Cerenkov counters with heavy gas radiator, perfluorobutane C 4 F 10 , are also added in both arms of the spectrometer for pion/kaon separation. The existing N 2 gas Cerenkov counters have been modified in shape in order to accommodate the newly added Cerenkov counters. The new electronics F1-TDC-ADC is implemented also to all the Cerenkov counters.

Kaon trajectories
In order to detect π þ K À atomic pairs one needs to discriminate π À from K À in the arm for negatively charged particles. The detection of π -K þ pairs is more complex as in this case, one needs to discriminate not only π þ but also background protons from K þ . Implementation of the new detectors for identification of kaons should not, however, affect the detection efficiency of π þ π À atomic pairs.
Typical trajectories for π þ K À and π À K þ from the breakup of πK atoms are sketched in Fig. 2.2. Since the momenta of the two mesons are very small in their center-of-mass system, they have similar velocities in the laboratory system, and hence kaons have momenta $ 3.54 times larger than the pions. As kaons are much less deflected than pions in magnetic field, the momentum acceptance of the spectrometer for A πK atoms is determined by the lower momentum (i.e., largest deflection) limit for the pions, and higher (smallest deflection) limit for the kaons.
A close look at the simulated trajectories shown in Fig. 2.3 reveals that for the π À K þ atoms emitted along the center axis of the collimator aperture, pions of 1.27 GeV/c pass the outer edges of the downstream detectors, and in that case, the A πK momentum is 5.77 GeV/c. On the other hand, kaons from π À K þ atoms are detectable in the K þ momentum range up to 8.9 GeV/c when the atoms are emitted close to the left walls of the collimator aperture. But in case the π À K þ atoms are emitted along the center axis of the collimator aperture, the kaons reach the inner edges of detectors at 5 GeV/c. In this case, the momentum of the associated pion is 1.41 GeV/c and the momentum of the atom is 6.41 GeV/c.
To ensure this acceptance, extension of the backward scintillation counters was needed, and was executed in this upgrade. The design of Cerenkov counters for particle identification was determined based on such simulation results as mentioned above.
For π þ K À atoms the particle trajectories are reflected images relative to the vertical symmetry plane.

Measurement of metastable states
The atoms in metastable state can also be observed in the upgraded spectrometer by providing it with a small change in the setup and the results can demonstrate the feasibility of Lamb shift (E n s À E n p ) measurement. For that, a retractable platinum (Pt) foil is installed at 105 mm downstream of the main target in order for the metastable states to break up. Ionization of metastable atoms in Pt foil produces additional amount of atomic pairs, which are absent in the absence of this foil. To select only the π þ π À atomic pairs originating from the breakup of the metastable atoms, all the other π þ π À atomic pairs produced in the target are swept away by a small permanent magnet installed between the target and the foil. The neutral metastable atoms are not affected by the magnet. It is to be noted that in the measurement of metastable atoms with both Pt foil and magnet switched on, the background intensity will be significantly reduced. A feasibility study of the effects of the Pt foil and permanent magnet has been already carried out.

Proton beam
The upgraded DIRAC spectrometer is located at the T8 beam line of 24 GeV/c protons in the East Hall of the CERN PS. The length of the proton beam line in the DIRAC experimental area is 32 m.
To extract protons into the beam line, a slow ejection mode is used with a spill length of 400-600 ms (typically 450 ms). The number of spills varies from 1 to 6 within a supercycle of about 40 s with a minimal interval between spills of 2.4 s. The beam intensity is (1.2-1.6) Â 10 11 protons per spill. To measure the beam intensity and to monitor the beam position on the target, the beam line is equipped at several locations with secondary emission chambers and luminescent screens with TV cameras.
The target station houses a device remotely controlled with 12 holders for the targets, including an empty holder and a luminescence screen. Targets made of Pt (26 mm thick), Ni (98 and 108 mm thick) and Be (106 mm thick) have been used for the data taking. The dimension of the beam spot at the target location is about 1.75 mm (RMS) vertically, and about 2 mm horizontally at 2 Â RMS level. Typical trajectories of π À and K þ from the breakup of π À K þ atoms. The numbers on the trajectory lines are the π À and K þ momenta in GeV/c. The A π À K þ , π À and K þ momenta are shown in the table in the inset. The detectors in the figure are already extended in size reflecting the upgrade.

Beam position
The proton beam position on the target has been evaluated for each run from the data using reconstructed tracks in offline analysis with DC and SFD. A typical result obtained in 2012 runs is shown in Fig. 3.1.
The maximum deviation of the proton beam axis in the y direction is 0.4 mm. The mean values and the RMS widths in the two directions are:

Beam shape
The beam shape as well as the beam size has been measured in conjunction with the study of the effect of the beam halo on the metastable state observation. A Pt foil was placed in the secondary beam line. The bottom edge of the foil is at 7.5 mm above the center of the primary beam. We shifted the center of the primary beam in y direction to see if the proton halo hits the Pt foil, and thus the counting rate on a slab of IH increases. When the distance between the central axis of the primary beam and the lower edge of the Pt foil is reduced to 3.5 mm, the counting rate on an IH slab starts increasing above the standard noise level. This rate measurement as a function of the height with respect to the primary beam line was carefully carried out, and it was found that the intensity of the primary beam has a Gaussian distribution in the y direction with a width so 1.75 mm, it varies very smoothly, and no separate spot (isolated halo) has been observed.
Independently, another measurement was carried out. We installed a copper wire of 0.3 mm diameter horizontally on the yoke of the small magnet. This wire, together with the magnet yoke, can move vertically. In the absence of the target, we measured the rate of the secondary particles stemming from the copper wire using again slabs of IH, which is proportional to the intensity of the protons hitting the copper wire in the primary beam. It was again confirmed that the intensity distribution of the protons within the primary beam is smooth and follows a Gaussian distribution with s o1.75 mm.

Target station
The DIRAC target station is an aluminum box that accommodates a marguerite type rotary target system and a small magnet assembly. (See Fig. 3.2).
The marguerite system has 12 target frames. In addition to the frames used for the physics targets mentioned below, one frame holds a ZnS scintillator plate used for the beam tuning, and one frame is just empty.
The target station is placed between the vacuum channel for the incoming proton beam and the DIRAC collimator as shown in In DIRAC experiment, different types of targets, listed in Table 3.1, have been used for physics during the data taking between 2007 and 2012.
Pt and Ni targets have been used for the lifetime measurements of π þ π À , π À K þ and π þ K À atoms. A Be target was used together with a thin Pt foil placed at 105 mm downstream of the Be target in the secondary beam line for the observation of metastable atoms. The Pt foil in the secondary flow of particles is placed so that the bottom edge of the foil is 7.5 mm away from the primary beam axis.
A general view of the spatial arrangement of the marguerite, permanent magnet and Pt foil is shown in Fig. 3.2.

Small magnet
A dipole magnet was installed for the observation of metastable atoms [37]. It was revealed, however, that a significant radiation background emerges at the planned position of the small magnet in case some malfunctioning of the transport system for extracted beam occurs.
For this reason, Sm 2 Co 17 with a high radiation hardness was used as the material for the permanent magnet poles. The magnet parameters, such as aperture, integrated magnetic field and required field quality are determined by the beam optics. The full magnet aperture was fixed to 60 mm so as to keep off additional background caused by the beam halo. The magnet provides an integrated field strength of B Â L¼ 0.0213 T m, defined as an integral of horizontal field component B x at transverse position x¼ y¼0, the magnet center being at z ¼0. The integrated field homogeneity, (Δ R B x dz/ R B x (0,0,z)dz) is better than 72% inside the good field region of 20 Â 30 mm 2 . The overall length of the magnet is 66 mm, which is determined by the required beam optics, yet the existing target station can accommodate the magnet.
The magnet measures 60 mm (length), 130 mm (width) and 170 mm (height) and weighs 8.6 kg. Fig. 3.3 shows the sketch of the magnet with detailed information about the size and composition of the magnet blocks. The grade of the permanent magnet blocks in Sm 2 Co 17 is equivalent to the "RECOMA 30S" from AR-NOLD Magnetic Technologies having the maximum intrinsic coercivity among alloys with high radiation hardness. The return yoke consists of four pieces of soft ferromagnetic steel.
As it is occasionally necessary to calibrate the setup without magnet, a special retractor was designed for the magnet displacement. Fig. 3.2 (right) shows the photo of the magnet mounted on a movable support with an actuator (Mini-Actuator HG2-05240 TECHNISCHE ANTRIEBSELEMENTE GMBH, Lademannbogen 45, 22339 HAMBURG (TEC467, MA01)). One can see also the marguerite holding targets.

Shieldings
The downstream detectors are shielded from background secondary particles produced on the primary proton pipe and surrounding elements. For this purpose a 1 m thick iron wall was installed in the primary setup between the upstream detector region and the spectrometer magnet (shielding 1 in Fig. 2.2). In addition, collimators are inserted both in the primary proton beam pipe and in the secondary particles channel.
As part of the upgrade, a new shielding with collimators for the proton and secondary beams was installed between the target station and the upstream detectors (shielding 2 Fig. 2.2). The dimensions of the shielding are 1.4 Â 2.4 Â 1.0 m 3 (W Â H Â L). The total length of the new vacuum section is 3.3 m. The aperture of the collimator for the proton beam is 88 Â 50 mm 2 (W Â H). The presence of the collimator in the proton beam line significantly reduced the background rate.

Secondary particle channel
Atomic π þ π À and π 7 K ∓ pairs enter the secondary particle  channel. They pass through vacuum chambers and are bent by the 1.65 T field of the dipole magnet. The channel consists of: first collimator, air gap, second collimator, cylindrical tube and flat vacuum chamber placed between the magnet poles. The first collimator is a new vacuum section in cast-iron shielding 2 located immediately downstream of the target station. Secondary particles exit this tube through a window, made of 100 mm thick mylar film. An air gap between the two vacuum sections allows insertion of the upstream detectors: MDC, SFD and IH.
The angular aperture of the channel is determined by the second collimator and is equal to 71°in horizontal and vertical directions resulting in a solid angle acceptance of 1.2 Â 10 -3 sr. The second collimator is in a cast-iron shielding of dimensions 3. The total thickness of the materials encountered by the secondary particles before they reach the DC system, where their momenta are measured, is about 0.077 X 0 .

Spectrometer magnet
The spectrometer magnet MNP21/3 is installed at the end of the secondary particle channel. The magnet with magnetic field B ¼1.65 T, BL ¼2.2 T m has an aperture of 1.55 Â 0.50 Â 1.10 m 3 (W Â H Â L).
To reduce the stray field, two magnetic screens are fixed near its entrance and exit. The screens are three-layered and have aperture holes.
The total weight of the magnet is 120 tons, its power consumption is 1.43 MW and the maximum current is 2500 A.

Beam dump and outer shielding
Downstream of the target station, the proton beam travels in a vacuum channel below the magnet and detectors and finally is absorbed by iron in a beam dump. The beam dump dimensions are: 8.0 Â 3.2 Â 3.2 m 3 (L Â W Â H).
To decrease the background gamma and neutron fluxes from the beam dump towards the detectors, a radiation shielding has been installed [33]. It includes a graphite core in the beam dump area, a concrete wall near the beam dump and, at a 3 m distance, another iron-concrete-iron wall, both with holes to allow the passage of the proton beam pipe. In addition, to decrease the slow neutrons in the detector area, a block of borated polyethylene with a hole in the middle was attached to the concrete wall. To decrease the muon flux from the beam dump an additional cast-iron shielding was added in 2007. That allowed increasing the intensity of the proton beam by about 6 times.
All the setup is surrounded by a radiation shielding to protect the outer hall against radiation from the experimental zone. The dimensions of the shielding are 43 Â 13.6 Â 4.4 m 3 (L Â W Â H). The shielding consists of steel (0.8 m thick) and concrete (0.8 m thick) covered by a roof (2.4 m thick).
The whole apparatus being located in a fully enclosed area, it has become necessary to provide the experimental area with an air-conditioning equipment to control the temperature and the humidity in order to protect detectors, especially the Cerenkov counters, and the electronics.

MicroDrift Chamber (MDC)
4.1.1. Construction An MDC system, as one of the upstream detectors, was to be used to perform particle tracking in the area upstream of the dipole magnet. The MDC is located behind the first shielding wall (shielding 2) near the target in a hard irradiation area. The counting rate on the sensitive area of the detector is more than 10 7 particles/s. Thus the MDC must have a high counting rate capability (low dead time, small dead zone). A primary ionization in the MDC cells, produced by different kind of particles, varies from a few electrons to a few thousand electrons. The pulse amplitude varies from 1 mA or less to a few mA. A threshold of 8 mA and rise time of 3 ns were chosen as a reasonable input parameters to MDC readout electronics.
The MDC measures particle coordinates using 18 identical planes combined into 9 modules. The modules are arranged in the following order: W1W2, X1X2, Y1Y2, X3X4, Y3Y4, X5X6, Y5Y6, X7X8, Y7Y8. The W planes are rotated by 10 degrees with respect to the Y-axis. Each module contains 2 complementary planes shifted by half a sensitive wires pitch, with 32 sensitive anode wires in each plane. This design is usually employed to eliminate a left-right ambiguity. It also helps to solve the problem of two close tracks detection. For more detailed description, see ref. [22].
A schematic drawing of the MDC sensitive area is shown in Fig. 4.1.
The pitch of anode wires and that of potential strips are both equal to 2.54 mm. The distance between the anode and cathode planes is 1 mm. The anode is made of 20 mm gold-coated wolfram wires. Cathode planes and potential strips are made of 20 mm thick carbon-coated mylar foils. The MDC contains 576 electronic channels and the sensitive area is about 80 Â 80 mm 2 .
The MDC is filled with the well-known argon-isobutane gas mixture: Ar   Due to the difficulty in operating such a detector in a very high intensity beam, the effective detection efficiency of the planes remained relatively low. However, helped by the large number of planes, the data from this detector is expected to be efficiently used in the data analysis in the reduction of background tracks in events where the multiplicity of charged particles is very high. Due to an instability problem, however, the detector was removed from the spectrometer in 2011.

Main upgrades and the achieved characteristics
The role of the SFD, installed downstream of the MDC at 2.8 m from the target, is to identify geometrically-close pairs of charged particles produced in the target in the secondary beam. This detector, as one of the upstream detectors, must have a good detection efficiency even in the high-intensity beam including background particles. A good spatial resolution is the most important characteristic of the detector, but it must have also a relatively good timing resolution in order to identify pairs of particles originating from one event.
At the start of DIRAC experiment, a couple of detector planes (X and Y) consisting of scintillating fibers of 0.5 mm diameter, which are read out with PSPM (position-sensitive PMT), have been installed and were named SFD. In the course of data taking quite a few improvements have been brought to the SFD.
At first we added a new diagonal U plane detector to resolve the ambiguity in the combination of hits in case more than one hit is detected by the SFD. This addition helped also improving the detection efficiency (one can eventually require hits on two planes out of three). This plane became operational in early 2002.
In addition we could successfully replace the scintillating fibers of 0.5 mm diameter by those of 0.28 mm (HRH: high-resolution hodoscope; the diameter is further reduced to 0.26 mm in the new setup in X and Y planes). This improvement not only gave a very high spatial resolution (0.075 mm RMS), which is almost comparable to that of chamber detectors, but also helped to increase the efficiency due to the increased granularity and allowed to accept even higher beam intensities. It was technically very difficult to build a detector with such thin fibers, but a development of new techniques and tools finally allowed to build a pair of prototypes of about 5 cm Â 5 cm. They have demonstrated to give a light-output of 10.90 70.80 photoelectrons per hit in average [25], and encouraged us to build a full size (9.84 cm Â 9.84 cm) X and Y planes (named new SFD) which became operational in autumn 2006.
Another improvement was a replacement of the readout electronics. At the beginning SFD used a discriminator called PSC (peak-sensing circuit) to avoid counting as two hits when one particle goes between two columns of scintillating fibers [23]. Later, however, shortcomings of the PSC were revealed: when a pair of particles pass through two adjacent columns of the SFD planes, their signals cancel each other to some extent, and the detection efficiency for this event was reduced. A new readout electronics F1-TDC-ADC (see Section 6) is now introduced. The TDC-F1 chip [1] used in the new electronics has a time resolution of 120 ps (optionally 60 ps) and is much better than the 500 ps of LeCroy 3377 TDC [34] used for the readout of PSC. Therefore the use of this readout electronics improved also the timing resolution of the detector from 660 ps with the LeCroy 3377 to 450ps with the new circuit.

Construction of the planes
The scintillating fiber (SciFi) bundle (sensitive part) is made of SCSF-78 M (KURARAY, Japan) double-clad fibers. The fiber has a round cross section with an outer diameter of 0.26 mm (0.57 mm for U plane). The construction of the X and Y planes is sketched in Fig. 4 Each plane has 480 (320) columns of SciFi. The ends of the SciFi are joined with clear fibers (also KURARAY double-clad type with an attenuation length of $ 3 m) with the same diameter as SciFi and with a length of about 300 mm. An aluminized mylar foil is glued to the opposite end of the SciFi so as to increase the light output. Eight (three) clear fibers joined from a column of SciFi bundle are carefully polished and glued into the holes of a square black plate, which fixes the fiber positions on the 16 photocathodes of position-sensitive photomultipliers (PMTs). No optical grease is used.
A sixteen-channel metal dynode position-sensitive photomultiplier tube (PSPM), Hamamatsu H6568Mod2, has been selected as photosensor. This PSPM is characterized by good timing properties (rise time $0.7 ns), low noise (1-2 pulses/s at a nominal detection threshold) and perfect single photoelectron spectrum. It has been modified to monitor the amplitude from the last dynode for calibration purposes. The level of optical cross-talk among the PSPM channels was found to be $ 1% (with a 1.6 mm diameter light spot on the photocathode). The measured linear range of this tube (for the linear bleeder) extends up to 15 photoelectrons at 950 V.
The SFD individual planes are installed close to each other. The directions of fibers are orthogonal in planes X and Y while plane U is rotated by 45°. The U plane has nearly an octagon shape, has 5 sections of different fiber lengths to cover roughly the same area like the X and Y planes. Fig. 4.4 shows the photo of the three planes, X, Y and U installed.
The details of the construction and the performance of HRH can be found in the reference [25]. The geometrical specifications of the three planes of SFD are summarized in Table 4.1.

Light yield and detection efficiency
One can expect a very good efficiency due to the relatively large number of observed photoelectrons (and its small variation) in the passage of a minimum ionizing particle through the counter and the good behavior in the small amplitude signal region (low noise and clearly-visible single photoelectron peak) of the PSPM used.
One factor that could limit the efficiency is the hardware (firmware) threshold applied to the F1-TDC-ADC unit. When the threshold is below 10 mV, the F1-TDC-ADC unit becomes a little unstable. Thus we set the threshold to 10 mV. This value, however, corresponds to a fraction of the position of single photoelectron peak and, therefore, this should not reduce the efficiency significantly.

Event selection.
Events, which involve only one track in each arm reconstructed using DC, were chosen among the mixed trigger events (mostly π þ -π À with about 11% of e þ -e À ). Without using the SFD information, that means assuming that the particles are coming from the center of the target, the tracks are calculated, and the hits on the SFD planes are predicted. In such a reconstruction, it is known that the precision of the prediction is about a few cm.
Therefore, if hits are predicted near the edge of the SFD planes, the real track might go outside the sensitive area of the plane. Thus we kept as samples only the events whose hits are predicted to be confined in the square of 50 mm by 50 mm at the center of the plane. It should be noted that this event selection is applied only for this analysis, and not for the physical data analysis, where information from other detectors is also available.

Triplets.
As the three planes, X, Y and U are installed close to each other, there is a certain relationship between the three hit positions of a track as far as the track is almost parallel to the z axis. Fig. 4.5 shows the situation of the hits on the 3 planes and the hits predicted by the DC. The symbols used in the figure are explained in the caption. Fig. 4.6 shows the histogram of events as a function of the value x þy-3u, where x, y and u are column number of the hits on each plane. (The units are 'column numbers'. It should be noted that the column separation is almost 2 times larger in U plane.) In addition to the sharp peak, one observes a relatively large background. This is because in this histogram all the combination of multiples hits on the three planes are plotted. Therefore the hits coming not from a single track form a random background. From the small width of the central peak, one could   see that if one takes the combinations within 7 10 channels, then the right hit combinations are all taken. We call those hits within this width the 'triplets' in this paper.

4.2.3.3.
Pulse-height dependence of the X plane efficiency. The use of the F1-TDC-ADC allows us to record the pulse height of each hit. As mentioned above, the software (firmware) threshold of the F1-TDC-ADC module has been set to 10 mV. At that level, only obvious background noise is rejected. Fig. 4.7 shows a typical raw pulseheight distribution of the X plane. The F1-TDC-ADC module does not record the hits with (nearly) zero pulse height, thus the 'pedestal peak' observed when a conventional ADC is used is not seen. The sharp and large peak on the left side of the structure observed is due to the single-photoelectrons. This is produced mostly by the cross talk between channels [25].

Offline PSC.
It is difficult to decide where the offline threshold should be set. The lower the threshold is, the higher the apparent efficiency, which is expected to rise up to almost 100% judged from the number of photoelectrons observed. Before the introduction of the F1-TDC-ADC units, the PSC has been implemented. The threshold of the PSC was set just above the single photoelectron peak, and a criterion applied was that the hit multiplicity from the single tracks does not exceed 1.05 when the PSC was tuned using the test beam T11. One cannot, however, apply this criterion this time, because there are always more than one hit on the planes in the DIRAC trigger condition, and the beam condition is different at T8 and T11. Thus we apply the offline PSC algorithm to X plane, and set its threshold so that the multiplicity of the X plane be equal to that of the Y (U) plane, which is read out with PSC as before.
4.2.3.5. Efficiency. As mentioned above, the existence of triplets gives a very good standard. In case a triplet is found within a 'certain distance' from the hit predicted by DC, we consider it as an efficient instance. But the number of triplets is 4.2 in average in an event. Thus the problem is how to fix this distance criterion. Fig. 4.6 shows the distance from the predicted point of hits on each plane that form all the triplets found. This figure shows that the widths of the peaks are 745 channels for X and Y planes, and 721 channels for U plane. One can conclude that if the distance exceeds square root 2 times 45 channels, namely 63.6 channels (13 mm), the hit is surely a background.
In the next step, we remove all the hits within triplets that are successfully associated with DC predictions.
From the stringency of the triplet condition, triplets are not expected to be formed in case a plane is inefficient. Thus among the remaining predicted hits, those which have a hit reconstructed with only two planes within the above-mentioned distance, we consider that this is due to a missed hit in a plane. The efficiency of the X plane thus estimated is plotted in Fig. 4.9 (Top) as a function of the offline PSC threshold. The offline threshold is applied to where A i À 1 , A i , A i þ 1 designate the pulse heights of the three adjacent columns (i À1, i, iþ1). On the other hand, the multiplicity which changes depending on the threshold is also shown in Pulse-height distribution of a column of the X plane. The left-side peak is a single photoelectron peak which is in reality very narrow. In this histogram, all the signals from 480 columns are added without being normalized, that makes the peak broad. plane at this threshold is 0.978. It should be noted that this efficiency and the multiplicity are those for a single track. The efficiencies of the Y and U planes corresponding to the threshold of 23.5 are 0.976 and 0.992, respectively.

Time resolution
For the investigation of SFD timing properties, the difference of time measured with new SFD planes and that measured with VH for particles with measured momenta (time-of-flight) has been used. Individual time resolutions have been obtained from RMS value of Gaussian fit of measured time distributions in each plane (example shown in Fig. 4.10). For X plane of the new SFD, an amplitude correction (move of the F1-TDC-ADC trigger timing as a function of the pulse amplitude) was switched on whereas for U and Y planes the resolutions were determined without amplitude corrections. To obtain real time resolution of each plane, it is needed to subtract time resolution of VH from each RMS value, because the VH resolution is a part of total resolution of SFD. Final results are summarized in Table 4.2.

Light yield
In DIRAC experiment, it is important to detect pairs of charged Efficiency of the X plane (Top) and multiplicity of hits in X, Y and U planes (Bottom) as function of the offline PSC threshold. The threshold is plotted in the unit of F1-ADC channel. At threshold¼ 23.5, the multiplicity of the X plane is equal to that of Y plane whose hardware PSC threshold has been tuned in the T11 beam line (see text).  particles with a small relative momentum originating from the breakup of hadronic atoms. If a pair of particles are very close to each other to hit a same column on an SFD plane, SFD misidentifies this pair as a single particle. With the information obtained solely from the SFD it is not possible to tell if the event consists of one particle or more in that case. To solve this problem, four planes of Ionization Hodoscope (IH) are used in order to measure the ionization loss of the particle(s) which is roughly proportional to the number of charged particles passing through.
It is placed behind the SFD at 3.1 m from the target. The IH detector is a hodoscope composed of four planes, two vertical and two horizontal placed alternately (X-Y-X′-Y′). A plane consists of 16 strips (slabs) of scintillators with a size of 7 Â 110 Â 1 mm 3 each. The sensitive area is 110 Â 110 mm 2 . The mechanical part of the detector was not changed from the beginning of exploitation in 2001 when it was installed in the DIRAC setup. (The detail is described in a previous paper about DIRAC setup [2]). A more complete description of the detector and its performance are reported in a separate publication [17]. Two improvements, concerning both electronics part are mentioned here. First, amplifiers with low-noise and high-bandwidth with a gain of 10 were installed between the PMTs and readout apparatus in order to reduce the HV applied to the PMTs.
In the former setup, a relatively large HV caused a variation in the gain of the PMTs dependent on the beam intensity, due to a large anode current. This modification resulted in an elimination of the degradation of the amplitudes within a spill. Second, a readout system F1-TDC-ADC described in Chap. 6 is introduced.
As it was mentioned above, the detector is working as an upstream detector since 2001 without any interventions, and the light yield is still at a good level, which is confirmed in the following paragraph.

Pulse-height resolution
As the slabs are thin (1 mm) and long (110 mm), the light attenuation along the length of the slab is large, broadening the raw pulse-height spectrum of single-hit events (selected using the SFD information) as shown in Fig. 4.11. An appropriate correction for the attenuation is then required to obtain precise energy loss information.
By fitting the peak area in the pulse-height spectra of hits at different positions with a Gaussian, we try to find the attenuation within a slab namely the hit-position dependence of the peak channel of the amplitude spectra. The hit position was obtained from the SFD information. However, this attenuation varies from slab to slab. Fig. 4.12 shows two typical examples of the dependency of the peak channel on the position of the hit. Fig. 4.12 (a Left) is the Y plane slab 10, which has a relatively small attenuation, whereas (b Right) shows a large attenuation in the Y′ plane slab 6. In each figure are shown two curves, result of two sets of runs within 2011 data. In fact this non-uniformity of the signal amplitude is an annoyance. An offline correction to the pulse height, however, is possible since this time variation is moderate within a slab as shown in Fig. 4.13.
The pulse-height spectra before and after correction of the attenuation along the length of the slab are shown in Fig. 4.14 Top and Bottom, respectively. These spectra are obtained by summing up spectra from slab1 to slab16. The width of the corrected spectrum gets slimmer by 86% than the raw pulse-height spectrum.
From this corrected pulse-height distribution, we tried to obtain an "effective number of photoelectrons" just by fitting the peak with a Gaussian. Fig. 4.15 shows how the pulse-height spectrum looks like in case single and double hit events coexist. The events are selected so that two tracks of charged particles meet at one point in SFD, and actually one plane of SFD records two hits in adjacent columns or a hit in a single column. Due to the Landau tail, the singledouble separation is not perfect. However, use of information about one hit on 4 planes should allow removing the effect of the Landau tail.
Using the corrected spectra for each slab, the variation of the 'effective number of photoelectrons' is obtained by applying a Gaussian fit to the central part of the spectra. The result is shown in Table 4.3.

Time resolution
Individual time resolutions have been obtained from RMS values of Gaussian fits of measured time distributions in each plane. A typical time difference between a slab of IH and VH is shown in Fig. 4. 16. To obtain the real time resolution of individual planes, it is needed to subtract time resolution of VH from RMS values, because the VH resolution is a part of total resolution of IH. Final results are summarized in Table 4.4.

General layout and characteristics
The DC system is used to perform particle tracking downstream of the dipole magnet. It operates in a high-intensity flux reaching 10 4 charged particles/cm 2 s.
The DC system was designed and installed at the beginning of the DIRAC experiment in 1999 and worked in a stable manner without damages and significant changes until the end of the measurements in 2012.
In 2006, this detector was refreshed during a technical stop of the CERN PS.
The sensitive areas of the chambers were cleaned and a few wires were replaced by new ones.
One can find a detailed description of the DC system in [2]. Only a short description of the device is given here together with a note on some small changes. A schematic view of the DC system is shown in Fig. 5.1. It includes 7 modules in total. Two groups of 3 modules (DC-2, DC-3, DC-4) are installed in left and right arms of the spectrometer. DC-1 module is common to both arms.
DC-1 is designed symmetrically with respect to the central axis with two separated sensitive areas of 0.8 Â 0.4 m 2 each. This chamber contains 6 coordinate planes X, Y, W, X, Y, W where W coordinate axis is inclined by 11.3°with respect to X. DC-1 is equipped with 800 electronic channels.
Each The anode-wire pitch is 10 mm, and the distance L between the anode and cathode planes is 5 mm. The cathode planes and potential wires are at equal potential.
The sensitive area corresponding to each anode wire, limited by the cathode planes and potential wires, has a size of 10 Â 10 mm 2 .
With this design and with an argon-isobutane gas mixture, a linear behavior of the drift function is achieved, except for a small region near the potential wire. Cathode planes are made of 20 mm thick carbon-coated mylar foils. Such cathode foils provide a stable chamber operation due to a high work function of the carbon coating, adding only a small amount of material along the particle path. Anode and potential wires of 50 mm and 100 mm diameter, respectively, are made of a copper-beryllium alloy.

Operation and performance
The DCs operate in a high current avalanche mode with a high pulse amplitude (about 1 mA) and a small pulse width (20 ns). The stable operation is achieved by virtue of a wide efficiency plateau larger than 1 kV. The single hit efficiency is above 96% at the particle flux of about 10 4 /cm 2 s.
The DC system operates at 3.75 kV. The threshold of electronics was set to 50 mA.
A small admixture of water vapor to the well-known argon-isobutane mixture improves significantly the performance of the chambers. Probability of sparking decreases and the operation becomes stabler. The counting rate capacity increases more than 10 times. This allows working in a high current mode with relatively high threshold of electronics, even in hard irradiation conditions of DIRAC. Better than 90 mm coordinate resolution in the DC system was achieved. Tracking efficiency of the DC system is about 99%.

Vertical hodoscope (VH)
5.2.1. Improvements and improved time resolution A pair of VHs are used for precise time measurement of hadron pairs originating from the same proton-nuclear interaction. It also provides signals for the first level trigger. It is installed downstream of the DCs as shown in Fig. 2.2. The hodoscope design is essentially unchanged in the upgrade. Its design and performance were completely described in [3]. The main difference brought by the upgrade is an increased number of slabs for the purpose of increasing the acceptance. The effective area of VH after the upgrade is 400 Â 1442 mm 2 for each arm (400 Â 1300 mm 2 before), and the distance to the target is 11.6 m. After the modification, VH in each arm is composed of twenty (was eighteen before) slabs each with dimensions 400 Â 71 mm 2 and 20 mm thickness. This  modification required an adjustment of the supporting frame. The required time resolution of the slabs is about 100 ps. The improved resolution obtained is mainly due to changes in the front-end electronics and signal cables. In the old setup, the readout electronics was installed in the electronic room and was connected to the detector by 36 m coaxial cables, whereas the new electronics is installed in the vicinity of the detector and the cable length is about 2 m. See Section 6 for details about the electronics. The efficiency of the vertical hodoscope is 0.99. A general view of VH in one arm is presented in Fig. 5.3.

Time resolution
The time resolution of VH was obtained from the standard deviation of a Gaussian fit to the distribution of the time difference in two VHs in left and right arms for all e þ e À pairs. For each scintillator slab, the timings of the signals from two ends are averaged to remove the dependence on the hit position in the slab. Pulse-height (walk) corrections are also carried out. The result is shown in Fig. 5.4.
The standard deviation obtained was then divided by 2 , since one can assume that two hodoscopes are quasi-identical and the two uncertainties are not correlated. The time resolutions finally obtained are, 112 ps in the 2008 data, and 113 ps in the 2010 data.

Construction and performance
A couple of HHs are placed downstream of VH. They were also upgraded for the same reason as for VH. After the modification, the effective area of the detector in one arm is now 1500 Â 400 mm 2 (1300 Â 400 mm 2 before). The distance of HH to the target is 11.7 m. In HH the modules are rotated by 90 degrees with respect to VH. Therefore it was necessary to replace all the scintillator slabs with new longer ones, by keeping the number of slabs unchanged. The former plastic scintillator was extrusion type custom-made (in IHEP, Protvino), but this time, BC-408 from Saint Gobain Crystals is used.
The light guides and PMT houses were modified to keep the    overall length of the detector unchanged. The resistance of the base resistor in the divider was increased in order to decrease the heating of the divider and also additional power supplies for the last three dynodes were used for the compensation of base current decrease. Sixty-four PMTs of XP-2008 were selected from a few hundreds to choose samples with best gain and quantum efficiency. The required time resolution of a slab is about 200 ps. An improvement of time resolution in the upgrade was made possible in the same manner as for VH, namely a new readout electronics and short cables between detector and electronics. The efficiency of hodoscope was about 98% in 2008 [30] and was slightly decreased up to 2012. A general view of HH is presented in Fig. 5.5. A modification of the support frame was also carried out similarly to the case of VH.

Time resolution and amplitude analysis
The timing property of HH is presented in Fig. 5.6. Here is plotted the time difference between e þ and e À for the e þ e À pairs detected by the two HH's placed in both arms.
In this measurement, the timings of the signals read out from both ends of a long slab are averaged. As a first approximation, this takes care of the hit-position dependence of the timing obtained, since light propagation velocity is almost constant and uniform in all slabs. Also, as the discriminator used in the F1-TDC-ADC module is a leading-edge type, the time signal generated walks as a function of the signal amplitude. The walk was corrected for as the amplitude of each signal is recorded at the same time. The time difference spectrum shown in Fig. 5.6 was obtained after these corrections. By fitting the peak with a single Gaussian a standard deviation of 298 ps was obtained. Assuming that two HHs are quasi-identical and the timing uncertainties involved in the measurement of timings in the two HHs are independent, one can obtain the intrinsic time resolution of HH by dividing this value by 2 , which gives 211 ps.
The light propagation in HH is slightly different from module to module and also it is not uniform. Thus we further tried to improve the timing by correcting the difference in light propagation in each module. However, the improvement was rather negligible. Thus in the final data analysis, this sophisticated correction is not carried out.
The 'effective number of photoelectrons' was also estimated by using the fit to the peak of the amplitude spectra for each slab. The result is presented in Table 5.1.

Cerenkov counters
The DIRAC identification system of charged particles was modified to give an additional detection of π þ K À and π À K þ pairs.
In addition to the existing threshold Cerenkov counters filled with N 2 gas, new threshold Cerenkov counters with aerogel and heavy gas C 4 F 10 have been installed as shown in Fig. 5.7. Detectors for particle identification downstream of the 3 Cerenkov counters are a preshower detector (PSh) and a muon detector (MU).
The nitrogen Cerenkov counters with n ¼1.00029 detect only electrons and positrons. These detectors have been modified to make space for the new Cerenkov counters. Fig. 5.8 shows the speeds of particles (electrons-positrons, pions, kaons and protons) in the range of momentum of each particle accepted by the spectrometer. Also are shown the speeds at which the N 2 , heavy-gas (C 4 F 10 ) and aerogels start emitting light (horizontal lines).
The heavy-gas Cerenkov counter named C4F10 with n ¼1.0014 detects electrons and large-momentum pions.
The newly added aerogel detectors are named AEDL, AEOL and AEIL. Since the momentum of πK atoms is in the range of 5-9 GeV/ c, the momentum of the kaons arising from the atoms is larger than 3.9 GeV/c in lab system. AEDL with n¼ 1.008 identifies those kaons. Protons are below threshold for all the counters except AEOL and AEIL with n¼ 1.015.   The detector separates kaons from protons in the left arm [11,12]. Such a detector is required only in the left arm since the contamination from antiprotons in the right arm is small due to their low production rate.
The detector consists of three modules having identical geometry. The low-momentum modules (AEIL and AEOL) cover the momentum range of 4-5.5 GeV/c with a refractive index n¼ 1.015 of aerogel radiators. The high momentum module (AEDL) with n ¼1.008 is overlapping with AEIL to cover the momentum range of 5.5-8 GeV/c in the inner half of the acceptance.
The sensitive area of AEIL þAEOL is 333 Â 417 mm 2 (W Â H) and that of AEDL is 159 Â 427 mm 2 (W Â H). The thickness of the modules is between 11 cm (on the top and bottom) and 23 cm (at the center).
We chose the aerogel with n ¼1.008 from the Budker Institute for Nuclear Physics (BINP) associated to the Boreskov Institute of Catalysis (BIC) in Novosibirsk and the one with n ¼1.015 from Matsushita (Panasonic) Electric Works (MEW) Ltd. in Japan.
To compensate the strong position dependence of the light yield, aerogel tiles are added at the center of the detector forming a unique pyramidal shape.
A three-layer wavelength shifter (WLS) is implemented in the AEDL module to increase the collection and detection efficiency for UV light. Tetratex reflector foils coated with WLS and layers of aerogel radiator are alternately stacked in the direction of incident particles. The best results were obtained with p-terphenyl giving a 50% increase in light yield.
The light is collected from the top and bottom by six 5-in. PMTs XP4570/B with UV-glass windows. The typical quantum efficiency of the bialkali photocathodes of the PMTs reaches a maximum value of 20-25% in the blue region around 420 nm.
The average number of detected photoelectrons is N pe ¼ 7 and 4 for heavy (n ¼1.015) and light (n ¼1.008) modules, respectively (β¼1). The signal uniformity is within 7 10%. Table 5.2 summarizes the specifications of the aerogels used in this work.

5.4.1.2.
Performance. The response of the counters to kaons was evaluated using the experimental information about the response to pions having the same momentum (but different velocity). This procedure is justified since the emission of the Cerenkov light is determined only by the velocity and not dependent on the kind of particle. The geometrical condition is the same for pions and kaons for a given velocity.
This procedure is also applied to protons and we have seen that the experimental response to protons is correctly reproduced. Fig. 5.10 shows the detection efficiency of kaons for the 3 detectors as a function of the kaon momentum.
To evaluate the efficiency of the 3 aerogel counters for the detection of protons, protons coming from the lambda decay were used. The result is shown in Fig. 5.11. The counter AEOL is situated far from the central axis of the spectrometer, thus no protons with high momenta (45.3 GeV/c) hit this counter. Therefore, the proton detection efficiency was evaluated only in the proton momentum range of 4-5.3 GeV/c for the AEOL. The protons start emitting light at 5.4 GeV/c, theoretically when the refractive index is 1.015 (AEIL and AEOL). In reality one observes that the detection efficiency rises at the threshold momentum. As for AEDL with refractive index ¼1.008, protons should emit light above 7.4 GeV/c. In reality one observes no change in the efficiency of this counter.
These 3 counters were installed in 2007 and used for the analysis of 2007 and 2008 data. In the end of that period, a deterioration of the performance was observed and the data were not used in the period after 2008.         addition to the Cerenkov counters.
As kaons from the decay of the πK atoms in the DIRAC setup geometry have momentum range of 4-8 GeV/c, it is enough to cover with C4F10 only part of the full aperture as shown in Fig. 5.7. Perfluorobutane (C 4 F 10 ) with a refractive index n¼ 1.00137 (for the wavelength of 300 nm under normal conditions) was chosen as Cerenkov radiator. This choice is sufficiently above the threshold for the whole momentum range. The optical system is composed of four spherical and four flat mirrors (Fig. 5.12) [29,32]. This scheme has enabled to decrease the size of the detector compared to only one mirror scheme, which is very important as it is necessary to accommodate the detector in the current geometry of the setup. The alignment of the optics with a laser was executed before the installation in the beam line [19]. Five-inch PMTs HA-MAMATSU H6528 with UV-glass are used as photodetectors.
A closed recirculation scheme was chosen for C 4 F 10 as it is rather expensive and not readily available [29]. To minimize gas losses during operation of the system, the pressure was maintained at 1-2 mbar below atmospheric pressure. The typical amplitude spectrum of the signal produced by pions is shown in Fig. 5.13. The average number of photoelectrons is about 25.

Detection efficiency.
The estimation of the detection efficiency of the C4F10 is very important for the analysis of events with momentum greater than 3 GeV/c.
The "pion efficiency" is basically the ratio of the number of detected pions to that of all pions that cross the C4F10. The method has a momentum limitation at 5 GeV/c. So the C4F10 efficiency is studied only in the interval between 3 and 5 GeV/c (the counter detects particles above 3 GeV/c), which is divided into 10 parts with a width of 200 MeV/c. The analysis is made for each part separately. Detected and non-detected particles are determined by the C4F10 pulse-height and the time-of-flight between VH and C4F10. The identification of the detected pions is done by the help of the time-of-flight. Measurement of the efficiency was performed separately for π þ and π À . The obtained results are shown in Fig. 5.14 (π þ ) and in Fig. 5.15 (π À ).
From these two figures it is seen that the pion efficiency of the counter found in the data 2010 considerably depends on momentum. The efficiency varies in the range of 45-98% as momentum changes. The efficiency is lowest for the lowest momentum (i.e. P ¼(3000, 3200) MeV/c) and grows afterwards almost till 98% in highest momentum. As seen in Figs. 5.14 and 5.15, efficiencies obtained from amplitude conditions (pions are identified with ADC) are a little lower than for time conditions (pions are identified with TDC). The reason comes from the electronics; if a signal appears in the counter, the time information is always present but the amplitude may not be.
It is also clearly seen that the efficiency for π À is higher and smoother than for π þ . This can be due to the fact that the number of π À s is smaller than for positive ones and, thus, the dead time of electronics is lower for π À than for than for π þ .

Nitrogen Cerenkov
Counter (N 2 ) 5.4.3.1. General description. The old N 2 Cerenkov counters have been modified to allow insertion of the new C4F10 and aerogel Cerenkov counters in the region of the kaon trajectories (see Fig. 5.7). Therefore, the electron rejection efficiency of the N 2 Cerenkov counters in this region becomes smaller due to a shorter path length.
The N 2 Cerenkov counters are used for rejection of the large e þ e À background in π þ π À and πK pairs detection. The identical threshold Cerenkov counter [18], was installed in each (left and right) arm (see Fig. 2

.2).
One counter is equipped with 10 PMTs, 5 upside and 5 downside, and 20 mirrors. Cerenkov light reflected by pairs of adjacent mirrors is focused onto the same PMT.
The N 2 gas radiator is used at normal temperature and pressure. These conditions determine momentum thresholds of = p e thres 20.3 MeV/c for electrons (positrons), and = π p thres 5.5 GeV/c for pions.
The sensitive volume has been cut in the kaon trajectory region to allow insertion of the C4F10 for pion identification and aerogel Cerenkov counter for kaon identification (see Fig. 5.7). Consequently, the counter length is 285 cm in the pion flight region ("long part") and 140 cm in the kaon flight region ("short part"). The Cerenkov process produces photons in proportion to the particle path length in the sensitive region.
The N 2 at atmospheric pressure has the refractive index n ¼1.000298 and the number of photons produced per unit length is dN γ /dx ¼ 780(n À1) E0.23 photons/cm. So, in the "long part" we   can have $ 65 photons and in the "short part" $ 32 photons. The analog signals from individual PMTs of each arm are fed into LeCroy 4300B ADC units and used to perform overall amplitude alignment. At the same time, the individual signals from 10 PMTs are fed into a custom-made summing module, which gives a linear sum signal fed into another LeCroy 4300B ADC unit (indexed as signal 11 for the left and 22 for the right arm). Fig. 5.16a shows the ADC spectrum for the "long part", and Fig. 5.16b shows that for the "short part" of the right arm, both taken with e þ e À trigger. Similar spectra are obtained for the left arm.

Performance.
The analysis of individual ADC spectra gives the mean number of photoelectrons reaching the first dynode for each PMT, N pe ¼ (μ/s) 2 .
In the "short part" for PMT 1, 2, 9, 10 (left arm) and 15, 16, 17, 18 (right arm), the numbers of photoelectrons are smaller due to a small number of Cerenkov photons. Therefore the ADC distribution has a small mean value and a small width (see for example ChN1 in Fig. 5.16a) due to a small number of photoelectrons.
The mean number of photoelectrons for the "long part" was found to be ≈ N 12 pe long and that for the "short part" is ≈ N 4 pe short . Then the electron rejection efficiency is $99.5% for the "long part" and $ 85% for the "short part".
When high energy pions with momenta above the threshold = π p c 5.5 GeV/ thres experience accidental coincidence within the trigger time-gate, they are erroneously labeled as "electron" by Cerenkov signals. The PSh detectors, however, can separate the pion and electron signals in the "electron" spectra (see the next section) allowing the evaluation of the Cerenkov pion contamination.

General description
PSh detector samples the early part (1-6X 0 ) of the electron shower, before the pion shower is initiated [35]. Therefore the PSh detector has a high amplitude distribution for electrons and a low amplitude one for pions. This difference provides an electron/pion separation possibility.
The new PSh detector [36] for the upgraded spectrometer has been extended to include the phase space of the kaon flight region. To improve the smaller electron rejection efficiency of the N 2 Cerenkov counter in this region, the PSh is built with two layers. The geometry and structure of the PSh [36] are presented in Fig. 5.17. It contains, as first layer a Pb converter of 10 mm thick for the first two slabs and a 25 mm one for the rest. The second layer is placed behind the first one only in the kaon flight region. It contains Pb converter slabs of 10 mm thickness. The detector slabs, placed behind the Pb converters, are plastic scintillators BICRON 408 of 750 mm high, 10 mm thick and 350 mm or 175 mm wide. 5.5.2. Efficiencies 5.5.2.1. One layer preshower. The characteristic PSh amplitude spectra are presented in Fig. 5.18. The position of the pion peak (the left-most peak) is practically unchanged with the energy (as minimum ionizing particle), but the electron distribution is   Fig. 5.11. Proton detection efficiency of the 3 aerogel counters as function of the proton momentum when the threshold is set to N pe ¼ 1.
moving to larger amplitudes at higher energies.
The PSh amplitude spectra have been measured in the DIRAC setup for both pion and electron triggers and for all PSh slabs (See Figures 5, 6, and 7 in Ref. [36]).
As the energy increases, some pion signals are also present in the electron spectra due to higher energy pions, which produce Cerenkov radiation. Therefore the Cerenkov counter cannot separate effectively high energy electrons and pions. The PSh electron spectra are contaminated with pions. The pion signals can be rejected in the analysis of the PSh electron spectra and a higher overall electron rejection for DIRAC experiment can be obtained (see Fig. 5.20).
The lower rejection efficiency ε rej (see Fig. 5.20) and pion detection efficiency π eff (see Fig. 5.19) in the outermost slabs 1, 15 and 20, are due to the fact that these slabs are partially out of the particle beam. The small number of hits in these slabs is the reason for the uncertainties larger than for other slabs. Apart from these special slabs, the electron rejection efficiency εrej of PSh is greater than 90%.

Two layer preshower.
To increase the detection efficiency of PSh, a new layer has been added in the region of kaon phase space where the Cerenkov efficiency is lower. The second layer (II) should detect the pions and electrons that fail to be detected by, or escape from the first layer (I). The second layer processes the high amplitude pions and the low amplitude electrons. Now the overall pion detection efficiency is expressed as: Here, π loss-I denotes the efficiency that pion is not detected in the first layer. The two layers pion detection efficiency π eff for the slab pairs 1 ¼(11 þ16), 2 ¼ (12þ 17), 3 ¼(13 þ18) and 4 ¼ (14þ 19) have been evaluated and plotted in Fig. 5.21. The outermost pairs (15þ 20) in both arms have not been included in the analysis due to partial hit coverage of the detector surface. Now the overall electron rejection efficiency is expressed as: Here, ε esc-I denotes the efficiency that electron rejection is not successful in the first layer. The two layers electron rejection efficiency ε rej for the slab pairs 1¼ (11þ 16), 2 ¼ (12þ 17), 3 ¼(13 þ18) and 4¼ (14 þ19) have been evaluated and plotted in Fig. 5.22.

Electron rejection in DIRAC experiment
In the DIRAC experiment, the observation of the π þ π À and π 7 K ∓ atoms and their lifetime measurement is hinged on the observation of atomic pairs as an additional peak at small Q (Qo3 MeV/c) submerged in a large background of "Coulomb" pairs (affected by a Coulomb interaction in the final state) and "non-   Coulomb" pairs (not affected by a Coulomb interaction in the final state) [5]. Note should be taken that the distribution of Coulomb pairs have a peak at small Q.
The e þ e À pairs, erroneously identified as hadron pairs, in the Q T (transverse component of Q with respect to the direction of the pair) distribution shows a very narrow peak ( $ 1 MeV/c). As a result, the e þ e À background introduces an essential bias to the observation of atomic pairs. Investigation, presented in the Section 5.5.2, shows that the direct rejection of e þ e À pairs with criteria on the amplitudes observed in the PSh detector leads to essential losses of π þ π À (π 7 K ∓ ) pairs. To prevent it, the following algorithm of e þ e À background suppression has been developed.
Initially, the PSh spectra are recorded as pion and electron spectra according to the Nitrogen Cerenkov signals. These spectra are contaminated, pions with electrons and electron with pions. The PSh detector removes this contamination. Fig. 5.23 shows the correlation of the signal from the 4th slab in the right (negative charge) and left (positive charge) arms for the pairs identified as π þ π À (left figure) and e þ e À (right figure) by the Nitrogen Cerenkov counter.
Using the cut channel, the PSh selects true electrons and pions. This cut, shown by the solid line in Fig. 5.23, defines a rectangle at the right upper part. In the low part of the pion spectra (lower than cut at 250 in Fig. 5.23-left) the PSh selects true pions and in the high amplitude part of the electron spectra (higher cut at 250 in Fig. 5.23-right) the PSh selects true electrons.
The same slab pair combination has been done for all the PSh slabs of the left and right arm. So the PSh saves 98% of π þ π À events.
In the next step, for each pair of slabs, has been defined the ratio (R ee ) of accepted (N ee accepted ) to the rejected (N ee rejected ) e þ e À events: To improve the electron rejection in the Q T spectra, the PSh rejected events are subtracted from distribution of initially accepted events with the weight R ee .
The results are presented in Fig. 5.24 (Top) for e þ e À pairs and in Fig. 5.24 (Bottom) for π þ π À pairs. The initial distributions are presented by solid lines. The distributions after the selection on the amplitude in the left and right arms of the preshower are shown with dashed lines. The criterion accepts 97.8% of π þ π À pairs and rejects 87.5% of e þ e À pairs. After the additional subtraction, the distribution contains 97.5% of π þ π À pairs, while 99.9% of e þ e À pairs are rejected.

Muon detectors (MU)
The two identical MUs in both arms are composed of 34 double-layer plastic scintillators read out with PMTs and steel absorbers with varying thickness (60 cm in the soft up to 140 cm in the hard momentum region) placed in front of the scintillator slabs for the purpose of absorbing hadrons and hadronic showers (see Fig. 5.25).
The active area of each scintillator slab is 120 Â 750 mm 2 and their thickness is either. Fig. 5.17. The preshower left arm geometry and structure. 5 or 10 mm depending on the design type (see later). The transverse area covered in each arm is 4130 Â 750 mm 2 . This detector is placed at 16.5 m from the target.
The role of the MU is to reject muons, which are a background for pions and kaons in which we are interested. Most of these muons result from the decay of pions. Those pions which decayed between the target and the DCs induce a significant error in the relative momentum reconstruction of the π þ π À . Initially, the MU was composed of 28 single-layer scintillation slabs with fish-tail light guides. However, it was found that there was a high radiation background from the beam catcher with the beam dump located right after the MU. To reduce the background, all the scintillator slabs are doubled which are read out separately, and the coincidence is taken between the overlapped slabs with a coincidence circuit based on CAEN C561 mean-timer. The coincidence scheme was described in [3]. This modification reduced significantly the influence of the background.
As acceptance of the setup should be increased in the upgrade two pairs of slabs near the axis of the beam and the four pairs in the far side of the beam were added to the MU in each arm [20]. Steel absorber has been also added.
Due to the lack of space, for the scintillator slabs newly added, the PMT is attached perpendicularly to the end of slab plane without light guide. To keep the number of photoelectrons equal  to those from the slabs in the center (4 20), the thickness of the slabs is doubled to 1 cm.
For their read out, one-inch PMT FEU-85 is used. The readout circuit is completely identical to that used in the previous installation of DIRAC described in detail in [3]. The muons are discarded during offline processing, and the fraction of events with potential muons in at least one of the arms is about 10%.

Electronics
Architecture design of the data acquisition (DAQ) system needs consideration of the time structure of the proton beam, which was described in Section 3.1. The data coming from the front-end electronics during spills are collected in the buffer memories without any software intervention. A slow data transfer to computer, check of the data consistency, event building, distribution and storing are carried out during the interval between spills.
Originally, the DAQ system was constructed with eight frontend readout branches connected to VME buffer memories [31]. Since the capacity of this system was too low for the upgrade, a new data transfer system (DTS) with a higher bandwidth was designed. After a successful implementation of one segment, fullscale DTS including the front-end part was implemented to almost all scintillation and Cerenkov counters. Next, the data transfer part was implemented to the rest of detectors by simply replacing the VME buffer memories. The upgraded DTS is shown in Fig. 6.1.

Trigger system
The trigger system of the upgraded spectrometer inherits the main features from the old spectrometer [3,8]. Thus only modified or improved items will be presented here in detail.
Although in the previous DAQ system the trigger for πK pairs has already been implemented together with the trigger for π þ π À pairs, the trigger rate for both πK and π þ π À pairs was as low as 2000 events/spill. After the upgrade, the maximum trigger rate increased 16 time to reach 32,000 events/spill. Event selection of paired particles is made in two stages namely T1 (trigger level 1; see next) and T4 (based on DC signals; see later). The first level trigger T1 is based on the following requirements: 1. Detection of at least one particle on each arm of the spectrometer. 2. The difference of arrival times of two particles at VH falls within a definite time window, which covers both true and accidental coincidences (see below). 3. Each particle is identified as anyone of e À , e þ , π À , π þ , K À , K þ or p by Cerenkov counters. 4. The vertical distance between two particles is less than 3 slabs (o 75 mm) of HH, because the maximum opening angle of 3 mrad for the atomic pair corresponds to 35 mm at HH (11.7 m downstream the target). This criterion is called the coplanarity condition.
The T1 initiates digitization of detector signals in ADC and/or TDC modules.
The coincidence time window was purposely broadened up to 40 ns to acquire accidental events with an acceptance almost equal to the true coincident events. The improvement of the simulation program used in the data analysis allowed us to reduce the number of accidentals, and the data were collected occasionally with a time window of 20 ns, which contributed to the reduction of recorded events, thus of the dead time.
In addition to the π þ π À and πK pairs, e þ e À pairs are also acquired simultaneously for the calibration purposes. The trigger for e þ e À pairs is prescaled by a factor of 6. The whole trigger system is fully computer-controlled without necessity of any manual intervention even for modification of the trigger configuration.
All the modules used for the T1 trigger are ECL-line programmable multichannel CAMAC units. Most of them are commercial modules, except for the processor which was developed at JINR dedicated to examine coplanarity. Mean-timer units are used in all VH and HH channels in order to avoid the dependence of the timing on the hit position, thus to reduce the total trigger time jitter.
At the second stage, the trigger T4 (called so for historical reasons) built with DC signals requires the conditions stated below to put constraints on the relative momentum of pairs.
The atomic pairs from the breakup of A 2π and A πK have a very small relative momentum Q, typically below 3 MeV/c. On the other hand, pairs originating from the Coulomb or non-Coulomb processes have a widely spread Q distributions. The online data selection rejects pairs having Q L 430 MeV/c or Q x 43 MeV/c or Q y 410 MeV/c.
The processor T4 reconstructs straight tracks in the X-projection of each arm of DCs to determine the relative momentum using the algorithm described in Ref. [8]. The T4 processor consists of two modules: a track finder and a track analyser. The track finder receives lists of all hit wires from the X planes of DCs. To obtain a position information of the track very quickly, a unique code, track identifier, was used instead of the drift time in the T4 logic. It contains encoded numbers for the combination of the hit wires, and is attached to each track. The rejection factor in the track finder (half T4) is about 2 with respect to the T1 rate [8]. When tracks are found in both arms, the track analyser starts processing the event. It refers the track identifiers from both arms to a look-up memory table, which consists of a set of values specifying intervals of momentum and emission angles from the target in the horizontal plane. These intervals was obtained beforehand from a dedicated simulation based on the precise geometry of the setup.
If a relevant combination is found in the look-up table, the T4 processor generates a positive decision signal which initiates the data transfer to the DAQ memories. Otherwise, the Clear and Reset signals are sent to the DAQ and the trigger systems. The T4 decision time depends on the complexity of the event and is about 3.5 ms in average. The rejection factor of full T4 (track finderþ track analyser) is around 4 with respect to the T1 rate.
As the selection criteria on the Q components for πK atomic pairs are not identical to those for ππ pairs, the track analyser does not give the same rejection rates for the ππ and πK triggers. Therefore, in earlier runs the full T4 was applied to the ππ trigger. However, after the upgrade, only the half T4 was applied to the πK trigger. In the experimental runs of 2012, where a detection of metastable ππ atoms was a main concern, the T4 was removed in order to avoid possible unexpected biases. The DAQ capacity of 32,000 events/spill for the trigger rate made it possible to accept all events after the T1 trigger. The trigger dead time, however, increased from 22% to 35%.

DAQ hardware
There are 3 types of major front-end electronics.
1. Electronics for DCs consisting of TDC boards and auxiliary controllers (N404: see Section 6.3) [9]. The TDC board for the MDC is modified at the inputs. They are custom-made in NIM standard and are located in the beam area near the detectors. Dedicated CAMAC modules are used for the control and the setting of the electronics. The total number of channels for the whole DCs is 2592 (2016 for DC and 576 for MDC). These electronics are grouped in 4 readout branches (3 DC and 1 MDC). 2. Electronics for the FERA readout system including several types of CAMAC discriminators, TDC LeCroy 3377, ADC LeCroy 4300B, and programmable module LeCroy 2366 (configured as a register and counters). These modules are made in CAMAC standard and located in the electronics hut. These electronics are used for the Y and U planes of SFD, PSh and MU (908 TDC and 40 ADC channels in total). FERA buses of this electronics are grouped in 5 readout branches (N417: see Section 6.3). 3. Combined F1-TDC-ADC boards, transmitters and auxiliary modules are made in euro-mechanic and NIM standard (D412, N414 and N414AX: see Section 6.3) and located in the experimental area close to the detectors. These DTS modules are used for the X plane of SFD, IH, VH and HH and the Cerenkov counters (726 channels in total on 51 boards) and grouped in 2 readout branches connected to DTS transmitters (N415: see Section 6.3).  During the whole data taking period up to 2010, the DC and FERA readout branches were connected to the two types of VME buffer memories LeCroy 1190 and CES HCM 1870. The capacity of these buffer memories placed an upper bound on the number of accepted triggers. The VME buffer memories were replaced by one L1P module of new DTS (see Section 6.3) in 2011.
The linear signals from the detectors must wait just before the ADC until the generation of the gate signal by the T1 trigger. In T4 trigger mode the readout of DC and FERA modules is inhibited until the T4 decision is ready.
The slowest data sources are some CAMAC modules (scalers integrating the data during each spill), VME register CAEN V259 Fig. 6.1. Topology of the DIRAC data transfer system. The abbreviations SFD stands for the scintillating fiber detectors, IH the ionization hodoscopes, HH the horizontal hodoscopes, ChF and ChN stand for the C4F10 and N2 Cerenkov counters, DC and MDC the drift/micro drift chambers, MD the MU detector, CFD a constant fraction discriminator, PSC a peak-sensing circuit. N404 is a controller of DC/MDC readout system. FERA is LeCroy Fast Encoding and ADC Readout system. Blocks 3377, 4300, 4301 denote the so-named LeCroy CAMAC units. (All other abbreviations are given in the text.) (collecting alarms from different setup components) and the beam intensity information provided by the PS via the computer network. These data are read once at the end of each spill.
Modules directly controlled are located in one VME crate, 12 CAMAC crates arranged in 2 CAMAC branches and one NIM crate (L1 modules). For the control of the VME modules, a Concurrent Technologies VP110 VME processor board is used. The program in the VME processor is linked to the VME library developed by AT-LAS group at CERN. The CAMAC crates are controlled by Wiener CC16 crate controllers via VC16 VME-CAMAC interfaces connected to the VME computer.
Beside the VME computer, the DAQ system consists of the main DAQ host, the data storage host and the online monitoring host. All the computers work under Scientific Linux CERN operating system.

Data transfer system (DTS) hardware
The DTS transmits data from the front-end Level 0 (L0) devices to the host computer. The system topology is presented in Fig. 6.1. Each L0 device selects the detector signals, digitizes them, and sends one data block per event to the Level 1 (L1) transmitters. As the input ports of the L1 transmitters are buffered, all the L0 devices can transmit the event data blocks in parallel. The L1 devices pre-process these data and send them to the Level 2 (L2) transmitter (N415). With the system clock of 40 MHz the data transfer rate is 400 Mbps of payload per port for the F1-TDC-ADC boards (D412) (see upper part of Fig. 6.1). There are 3 types of L1 transmitters: L1S with serial inputs (N414), L1P with parallel inputs (N417) and the auxiliary transmitter L1A (N414AX). The L1 and L2 transmitters are connected with low-cost coaxial cables of which the maximum transmission distance is 100 m.
The L2 transmitter is connected to the host computer with a USB 2.0 serial bus. The USB connection allows us to use any type of Operating System on any host computer and to expand easily multi-DTS. As the input ports of the L2 transmitter are buffered, all the L1 devices can transmit the event data block in parallel.
The host computer controls the whole DTS through USB 2.0 bus also. When the control data packets are addressed to the lowest level devices, then the L2 transmitter converts these packets to a serial format and sends it to these devices. The L1 and L2 transmitters are designed in NIM standard.
During the beam spill, the DTS writes, formats and collects the event data, which come from the L0 devices (write phase). Formatted event data are stacked in memory of the L2 transmitter in a consecutive order as a set of data frames. In the time interval between beam spills, the DTS transmits data to the host computer (read phase). The write phase is triggered by the accelerator synch pulse. After an adjustable time interval the DTS goes to the read phase. This phase is terminated when all data frames are transferred to the host computer.

L0 devices
Originally the F1-TDC-ADC board D412 was designed as an L0 device. Later the FERA branches [2] and the DC/MDC [9] readout systems were connected to the DTS as L0 devices via L1P transmitters N417.
6.3.1.1. F1-TDC-ADC board D412. The D412 board is a native L0 device, which was originally designed to process signals coming from PSPMs of the SFD. The D412 can measure both the arrival time and the charge of an input pulse independently in each channel. In addition to the ADC and TDC outputs, it has 16 prompt logic outputs which can eventually be used in triggering.
One D412 board is built around four TDC-F1 chips [1]. The TDC-F1 chip has two time bin sizes, a standard operation mode with a least count of 120 ps and a high resolution mode with 60 ps and has a multihit capability. The number of channels per chip is 8 in the standard operation mode and 4 in the high resolution one. The D412 board supports both modes and the number of channels per board is either 16 or 8 depending on the mode chosen.
A pulse arrival time is measured immediately by one channel of the TDC-F1chip, serving as a TDC. An ADC consists of a charge-totime converter and another channel of the chip. The input pulse triggers a voltage comparator and its output initiates a charge integrator followed by a discharger, i.e. a charge-to-time converter. As a result the TDC-F1 records two time stamps. The first one marks the pulse arrival time, and the second one marks the end of the discharge. As the time difference between these stamps is proportional to the integrated charge of the input pulse, this serves as an ADC.
Some important specifications of the ADC are: an amplitude of linear input pulse 0-400 mV, a minimum width of the input pulse 1 ns, the dynamic range of an input charge 0.4-150 pC, least count 0.4 pC, the range of charge collection time 5-25 ns, the maximum data transfer rate 40 MB/s. After a triggering signal, the D412 boards select the event data inside a preset time window, serialize and send the selected data to L1S transmitters (N414). All boards operate in parallel, essentially reducing a readout dead time. The D412 boards are housed in dedicated crates near the detectors and are connected to the detector outputs by 50 Ω short coaxial cables. The L1 transmitters inserted to NIM crates are also placed in the beam area.

L1 transmitters
The L1 transmitters accept the front-end device data, pre-format and send them to L2 devices. The input ports of the transmitters are adapted to the specific L0 devices while the output ports are standard both logically and electrically. There are three types of L1 transmitters.
6.3.2.1. N414 transmitter with serial input ports L1S. The N414 transmitter device is adapted for connecting the native D412 boards. After a conversion time in each D412 board, the event data blocks are sent to N414 in series at 400 Mbps. The N414 converts these data to 10-bit formatted words and feeds them in parallel to the buffer memories inside. After the completion of the data transfer from all D412 boards, the N414 begins reading these buffer memories in a priority mode, skipping empty memories.
6.3.2.1.1. N414AX auxiliary transmitter. The N414AX auxiliary transmitter is introduced to simplify a control between multi N414 L1S transmitters and an N415 L2 transmitter and to measure a reference time for each D412. The roles of the N414AX are the followings. First, it generates a 40 MHz system clock and control signals for the N414 transmitters and a synch reset signal for the D412 boards. Second, it generates a time interval (reference time) between the synch reset signal and a pulse arrival time (first stamp) in each D412 board. The data transfer from the N414AX to the N415 L2 transmitter is initiated by the trigger signal and is executed along with the data transfer from the N414 transmitters. Therefore, the output data format of the N414AX is quite identical with the N414.
6.3.2.1.2. N417 transmitter with parallel input ports L1P. The N417 transmitter receives data from the FERA and the DC readout subsystems. It has two parallel ports. The FERA must be connected to the first 16-bit word high priority port working at 5 MHz. The FERA data are converted to 10-bit formatted words and stored in the buffer memories. After that they are transferred to the N415 L2 transmitter, skipping empty buffers.
During this transfer interval, the DC data are fed into the second 23-bit word port at 10 MHz. They are converted to 10-bit words and stored in the buffer memories. On the receipt of a DONE signal (FERA PASS) at a completion of the FERA data transfer, a transfer of the DC data to the N415 is started. The output data format of the N417 L1P transmitter is identical with that of the N414 L1S transmitter.

L2 transmitters N415
N415 L2 transmitter is the highest-level device in the DTS segment. The N415 has 6 independent input channels. Each channel has a 7-bit address field, therefore up to 127 DTS segments can be connected to a USB 2.0 system. The N415 runs under three different time phases: a read phase, a write phase and a front-end read phase.
During a beam spill, the N415 transmitter receives 10-bit serial data from the N414AX and N417 L1 transmitters with 400 Mbps in the write phase. The serial data are converted into a parallel format and are collected in DRAM memories. The packet size received by the N415 is compared with a packet size calculated in the L1 transmitters. If an error occurs then the N415 sets a corresponding status bit in a start-of-frame packet. The host computer can process this frame as corrupted. In the write phase all DAQ channels work in parallel, and independently.
In the read phase during an interval between spills, the N415 transmits the data frames from the memories to the host computer in a consecutive order starting from the first event in the spill. The data transfer is done via a USB 2.0 port in a high-speed bulk mode. The transfer rate is actually 25 Mbps, although it depends on the host computer and the programs in operation.
In the working mode the data transfer from the front-end devices to the host computer is controlled by external signals via the N415 trigger port. The setup trigger system must generate at least 3 signals: WRITE, FER and READ. The WRITE command sets the N415 in the write phase. The FER is a front-end readout command; the trigger system generates this command to take the current event. In response to the FER, the N415 asserts a BUSY signal and holds it until this event is processed. The READ command sets the N415 in the read phase.

Lower level control
The L0 and L1 devices are controlled through a 2-wire serial bus (two twisted pairs on the L2 control connector). The host computer feeds a control data packet into the endpoint EP2 of the USB controller. If EP2 is not empty then the L2 reads data bytes from this endpoint, converts the data packet into a serial format and sends it to the L1. If a data packet is addressed to the front-end device(s), then the L1 transmitter routes this packet to the L0.

DAQ software
The main DAQ program is composed of several programs units as follows: run initialization, several types of data readout, an event builder, a data recording, a data distribution, a run-control, an online monitoring and a high voltage control. The run initialization program loads parameters into CAMAC controlled modules composed of trigger system electronics, DC and FERA front-end electronics. It begins its execution at the beginning of the DAQ program running separately. Such a role-sharing by several independent modules can significantly simplify the transition of the readout from the VME memories to the L1P transmitters.
Three programs for data readout from different electronics are called 'Reader'.
The first Reader runs on the VME computer for the readout from the LeCroy 1190 and the CES HCM 1870 VME buffer memories. The second Reader runs on the main DAQ host computer for the readout of the L2 USB buffer memories. The third Reader runs on the VME computer for the readout of the beam monitor counters and the beam intensity information.
The first Reader performs a synchronization task during the interval from start to stop of the DAQ, and reads all the CAMAC modules at the end of each spill.
These tasks are preserved as first reader after tasks for all the front-end electronics have moved to the second reader.
The third Reader is special, because the information from the PS arrives late after the end-of-spill signal, or even worse, it can be missing at all due to a trouble in the network. Therefore a timeout or no data is allowed for this readout.
The Builder program working on the main DAQ host receives the data from the Readers. After a check of consistency among the data, it builds events. Here, the data consistency means that of the time information from the Readers, the number of registered events in different readout branches and some other information from the readout electronics. Then the data are distributed to the storage and monitoring hosts.
The sharing of the data among DAQ processes is done through the shared memory buffers. On each computer needing access to the data online, there is a special program which acts to receive the data from the main DAQ hosts and puts them in the shared memory. Any number of data consumer programs, like monitoring programs, can have access to the shared memory buffer. Data consumer programs can be started/stopped at any time.
The following four programs that control a run or monitor an acquisition status are executed on the DAQ host computer and are equipped with a graphical user interface. The run-control program sets run parameters, selects a trigger type, makes a start/stop of the run. The run display program displays current status of the run, information about the last processed spill and the accumulative statistics.
The run monitor program generates vocal information messages about changes in the run status, detected errors and received alarm signals and at the same time, displays them on the monitor.
The scaler monitor program displays current and cumulated scaler values.
The main online monitoring program is written in the frame of ROOT software package (see https://root.cern.ch/). The program fills several hundreds of histograms, including time and amplitude distributions for each channel of the majority of detectors, time distributions for groups of channels of DCs and SFD, hit and multiplicity distributions, and two-dimensional correlations between hit distributions of different detectors. The program allows a selection of trigger types, for which all the above histograms should be filled. A saved set of histograms, which served as good examples, can be used as a reference to be compared with current histograms so that one can easily and quickly pinpoint if there is any anomaly in the DAQ.
Besides the main monitoring program, there is another program for automatic monitoring. This program collects a basic set of histograms for each channel (some thousands of histograms) and periodically compares them with the reference mentioned above. When a noticeable discrepancy is found in any of the histograms, it generates an alarm signal.
The last component of the software is a program for the high voltage control. This program can be used separately from other DAQ softwares. As high voltage power supplies for all detectors (except for DCs) we employ CAEN SY527 and SY1527 systems with different boards. The total number of high voltage channels is about 500. The program allows the setting of various parameters of these boards, and checks periodically their status. An alarm signal is generated in case of any error.
The control of all the components of the DIRAC setup can be performed by a single operator from a monitoring host.

Overall performance of the DIRAC spectrometer
For the success of the DIRAC experiment it is essential to have a good resolution setup to measure with a high precision the relative momentum Q in the center-of-mass system of each meson pair. The aim of DIRAC is an investigation of π þ π À , π -K þ and π þ K À atoms. The method of atom lifetime measurement assumes the observation of atomic pairs as an additional peak at small Q (o 3 MeV/c) over a background of Coulomb and non-Coulomb pairs [5]. It is to be noted that Coulomb pairs also form a peak at Q¼0 due to Coulomb interaction in the final state. To observe the peak due to the atomic pair among a large amount of background pairs, it is needed to have a high resolution for Q as well as for its longitudinal and transverse projections, Q L and Q T , respectively, with respect to the direction of the meson pair system. The characteristic parameter for the width of peaks in distributions of atomic and Coulomb pairs is the Bohr momentum of p B ¼0.8 MeV/ c for πK atoms. The resolution of the upgraded spectrometer is adjusted to be at this level.
The experimental data are fitted by a sum of simulated distributions of atomic, Coulomb and non-Coulomb pairs. The contribution of each distribution is a free parameter of the fit. An example of such a fit for the distribution of π þ π À pairs, collected in 2008-2010, is presented in Fig. 7.1. This fit allows estimations of the number of atomic pairs (n A ) and the number of produced atoms (N A ), which is deduced from the measured number of Coulomb pairs [5]. Together, these two values allow estimation of the breakup probability (P br ), which has a one-to-one correlation with the π þ π À atom lifetime [5].
Resolution of the spectrometer for laboratory momentum p, relative momentum Q as well as its longitudinal projection Q L (which is a function of p of particles), and X-and Y-components (Q X and Q Y ) of transverse projection Q T (which is proportional to the opening angle of pair measured by upstream detectors and laboratory momentum of the pair) is defined by spatial resolution of coordinate detectors and multiple scatterings in the detector planes, the setup partitions (membranes) and surrounding air.
Difference of smearings in experimental and simulated distributions, induced by wrong definition of the setup resolution, leads to bias in the estimated parameters in the fitting procedure.

General description of the Monte Carlo simulation
At the first stage, samples of Coulomb and non-Coulomb π À K þ and π þ K À pairs were generated with a distribution of the total laboratory momentum of pairs P in agreement with the experimental momentum distribution of such pairs [28]. The distributions over the relative momentum Q projections (Q L , Q X and Q Y ) are uniform for non-Coulomb pairs and modified by Gamow-Sommerfeld factor for Coulomb pairs. The vertex position is simulated uniformly along the target thickness (98 mm of nickel for 2008 or 108 mm for 2009 and 2010).
πK atoms have the same distribution in the laboratory momentum as Coulomb pairs and the atom generation points are also uniform in the target thickness. The positions of the breakup and excitation points where the pairs of mesons are generated are obtained by solving numerically the transport equations using the cross-sections for breakup and excitation [10,39]. The distribution of the relative momentum Q depends on the atomic state at the breakup point.
At the second stage, the GEANT3 based program GEANT-DIRAC [24] propagates particles through the DIRAC setup. The program has been modified to take into account the upgrades of the setup.
Coordinates of detector plane crossed by particles and energy losses in the detector volumes are registered. The membranes, air, shielding materials and collimators are included in the GEANT description in order to correctly simulate the scattering of particles.
At the third stage the response of each detector is simulated by a dedicated code at the initial phase of the offline data analysis program ARIANE. These codes use data prepared by the GEANT-DIRAC program and take into account coordinate, time and amplitude resolution of the detectors. The Cerenkov counters do not have a proper simulation of the light propagation in GEANT, but have a simulation in ARIANE that produces, event by event, a response in photoelectrons for every type of particles depending on its momentum, charge, and position.
The accuracy of the setup description is tested by comparing experimental and simulated distributions for calibration processes, which is described below.
After the calibration, the Monte Carlo procedure provides proper distributions for investigated pairs and also allows to estimate the resolution of the setup for measured parameters: laboratory momentum of particles and relative momentum of pairs.

SFD simulation
The SFD detector plays a fundamental role in the tracking of particles in the upstream part of the spectrometer. Since SFD is relatively close to the target, (distance: 281 cm), it is important that simulation of the SFD reproduces its response to pairs of tracks with small opening angles. The degree of reproducibility is immediately translated to the Q T resolution of the track-pairs. Significant improvement has been achieved for the SFD simulation in the years 2008, 2009 and 2010. The results have been presented in [13] in detail.
Only events with one track in each arm have been used in the simulation. In reality, when one charged particle hits a SFD plane, several columns occasionally fire at the same time. This is mainly due to the grazing effect; a particle hitting a plane not perpendicularly, crosses several Scifi columns. The cross talk at different levels adds to this phenomenon [23]. However, in the simulation, only one column fires. Thus to simulate the grazing effects, we have added, to every true Monte Carlo hit in the plane a firing in the neighboring columns with a probability of 20-28%, and larger cluster of hits with smaller probability. The cross-talk of PMTs has also to be taken into account and, due to their geometrical disposition, we have added to every true hit a 2-3% extra hit at a column distance of Δn ¼ 74 [23]. This procedure introduces some diffuseness to the simulated hit position. Then the offline PSC algorithm was applied to the full SFD plane (see Section 4.2.3). The threshold of the offline PSC was chosen as 20% of the most probable pulse height of the distribution. This choice reproduces correctly the hit multiplicity (number of hits recorded when one particle hits a plane).
To study one plane (e.g. X plane), the hit information from two other planes (e.g. Y and U planes) together with the track information from DC have been used in ARIANE in the reconstruction of the two tracks. This procedure predicts coordinate of a track in a plane under investigation with accuracy, estimated by Kalman filter of: They are equivalent to 1.02, 0.83 and 0.16 fiber columns for X, Y and U planes, respectively.
The average multiplicity recorded in the tracking window (1 mm around the tracking prediction) when "a pair of particles" hit the plane is m X ¼2.04, m Y ¼2.15 and m U ¼1.95, for X, Y and U planes, respectively. The agreement between the data and the simulation is quite good as shown in Fig. 7.2 for the case of X plane.
Pairs of predicted hits whose distances (measured from positive particle to negative particle) on the investigated plane are less than 20 columns were selected, and the total number of real hits found in the vicinity (within 1 mm) of these hits is shown in Fig. 7.3. The left figure shows the probability of finding only one hit within these two regions, P(1), whereas the right figure shows P (2), the probability of finding two hits. Fig. 7.4 shows the overall efficiency of the X plane experimentally observed in comparison with the simulation. The agreement is quite good. The average detection efficiency for a pair of particles in this plane is 94.7% including the dip in the middle, and 96.6% outside the dip. The latter corresponds to the square of the efficiency calculated (0.976) in Section 4.2.3.

Multiple scattering
The thicknesses of the detectors in the spectrometer are minimized, especially with the upstream detectors, in order to reduce as much as possible the smearing effect of the multiple scattering in the reconstruction of particles. Despite this, particles are anyway scattered in the detectors planes and it is fundamental to simulate and reproduce the effect of the multiple scattering with a precision better than 1% in order to control the systematic error due to this effect. The multiple scattering in different detectors has been measured experimentally in 2003 [21] placing samples of the detectors between planes of DC. Detailed study has been performed in the past and the results were applied to the 2001-2003 data analysis [26]. The simulation of the multiple scattering has been modified, taking into account the effective thickness of the detectors measured.
Since then, two of the upstream detectors have been modified, SFD X and Y planes. The latest results [14] show that the multiple scattering angle due to the SFD X plane is 10% smaller than in the SFD detector, which was installed up to 2003, while the SFD Y plane is unchanged.
The study was performed using π þ π À experimental and Monte Carlo (MC) data. In a first approximation the two tracks of a prompt ππ pair are originating from a single space point inside the target. The tracks are reconstructed starting from the downstream part of the detector toward the upstream detectors. The variable x 1 (x 2 ) is the π À (π þ ) final track extrapolated to the target plane in the X coordinates. For Y coordinates, similar variables are y 1 and y 2 .
The experimental error in the measurement of the tracks determines the width of Δx ¼x 2 À x 1 and Δy¼y 2 À y 1 which we call vertex resolution, since if everything goes well, these quantities must be very small. The values of Δx and Δy depend mainly on. the SFD space resolution (momentum independent). the detailed material description for the upstream detectors and target (multiple scattering is nearly inversely proportional to the particle momentum). the distance between target and upstream detector (very detailed knowledge with sufficient precision).
At first our data sample has been divided into several  where c and ms denote the momentum dependent and independent components of the RMS of the vertex resolution, respectively. The symbols p i and β i denote the momentum and the speed in unit of the speed of light of the negatively (i¼-) and positively ( þ) charged particles. The quantity Z representing therefore the actual momentum dependence is expressed as We assume that the constants c and ms are the same for negatively and positively charged particles, and determine them by fitting as a function of Z. Fig. 7.5 shows the agreement between data and MC for the variance of the target vertex distribution as function of Z, on the left for the X plane of the SFD, on the right for the Y plane. In order to have a unique parameter that allows us to estimate how well we reproduce the multiple scattering in the simulation, we introduce a weighted average of the variances in Fig. 7.5 s Δx . For a 10% change in the multiple scattering angle our s Δx varies by 4%. The difference between data and simulation, for what concerns the SFD detector, is now 3.1 Â 10 À 4 for X projection and 5.5 Â 10 À 4 for Y.

Tuning of the setup using lambda and anti-lambda particles
In order to check the general geometry of the DIRAC experiment, we use the Λ and Λ̅ particles that decay in our setup into pπ À and π þ p. The details of this study are reported in [27].
The Λ mass is very well determined [16]. Comparing the value reconstructed in our data with the published one, we can be confident that our geometrical description is correct. The main factors that can influence the value of the Λ mass are the position of the aluminum membrane (which is used as exit plane of the magnetic field) and the opening angle of the downstream arms. We fix the position of the aluminum membrane at z AL ¼143.385 cm and the opening angle of the downstream arms has been modified by 10 mrad from the nominal measurements.
Experimental distributions of the reconstructed Λ and Λ̅ masses are presented in Fig. 7.6. They have been fitted with a sum of a normal distribution and a polynomial, the latter to describe   This confirms that the geometry of the DIRAC experiment is well described. The width of the lambda mass distribution is another tool that we use to evaluate the accuracy of the reconstructed momenta of the particles. The width depends mainly on the multiple scattering in the upstream detectors, and the aluminum membranes at the exit from the magnet, and on the resolution and alignment of the DC. The multiple scattering in the upstream detectors has been measured using target vertex (see Section 7.4). Once the multiple scattering in the upstream detectors is determined, we attribute the remaining difference between experimental and simulated data to the error in the reconstructed momenta that affects mainly the resolution of Q L (to which DC is mainly responsible, but also other downstream detectors). From the MC simulation we obtain [15,27] a value for the lambda width that is underestimated by 6-7% with respect to the lambda width in the experimental data. This discrepancy is common for all momentum bins and for both lambda and anti-lambda particles. This problem can be fixed by introducing purposely a Gaussian smearing in the reconstructed momenta. We multiply a factor which follows a normal distribution with mean 1, and the standard deviation j Â 0.01% to both momenta of protons and anti-protons. Then we evaluate the difference in the lambda mass distribution between the data and MC by using a quality of agreement χ 2 value, which is a sum of the difference squared in different mass bins between 0.004 and 0.008 GeV/c 2 .
As shown in Fig. 7.7, a best agreement is obtained when the smearing is 0.07% RMS for j¼7. We then apply the smearing of 0.0007 to the reconstructed momenta, and, as expected, the data and simulated distributions are in perfect agreement, as shown in Fig. 7.8.
The Q L distribution of the π þ π À can be used as a test for checking the geometrical alignment. Since the π þ π À system is symmetric, the corresponding Q L distribution should be centered at 0. Fig. 7.9 shows the experimental distribution of the longitudinal momentum of pion pairs for transverse momenta Q T o 4 MeV/c. The distribution is centered at 0 with a precision of 0.2 MeV/c.

Momentum resolution
The resolution of the laboratory momentum is obtained with simulated Λ particles, taking into account the momentum smearing (see Section 7.4) and using the equation: where p gen and p rec smeared are the generated and reconstructed (smeared with j ¼7) laboratory momenta of particle, respectively. The MC distributions of Δp/p are fitted with a Gaussian for different momentum ranges and different particles. The s parameter of normal distribution is shown in Fig. 7.10, giving accurately the laboratory momentum resolution. It is seen that the spectrometer is able to reconstruct momentum with a relative precision between 2.8 Â 10 À 3 and 4.4 Â 10 À 3 for particles with momenta between 1.5 and 8 GeV/c.
The resolution of the projections of the relative momentum Q components has been obtained with simulated πK events, comparing generated and reconstructed values of Q projections. The dependences of the setup resolution of Q X , Q Y and Q L on the laboratory momentum for πK pairs are presented in Fig. 7.11.
For Q L projection, the resolution is determined by the resolution of upstream and downstream coordinate detectors, multiple scattering in the IH, mylar membrane before magnet, aluminum membrane after magnet, surrounding air and the DC. Achieved resolution of s QL ¼ 0.85 $ 0.90 MeV/c (Fig. 7.11) is at the level of Bohr momentum of πK atoms.
The main contribution to the uncertainty of Q T measurement is the multiple scattering in the target, which provides an error of the order of 0.8 MeV/c. The resolution of the setup is determined by the resolution of the opening angle of the pair measured with the upstream coordinate detectors, the multiple scattering in the mylar membrane after the target, in the MDC detector, in the SFD detector and in the surrounding air. This resolution is designed to be sufficiently good so as not to seriously increase the error induced by multiple scattering in the target. The values achieved of s Qx ¼0.17 $ 0.20 MeV/c and s Qy ¼0.17 $ 0.20 MeV/c fulfill this requirement.
The influence of the different effects to the measured value of the breakup probability have been investigated in [38]. The systematic errors induced by the imperfection of the description of the setup are collected in Table 7.1. Analysis has been done for one-dimensional distribution of events in Q L and for two-dimensional distribution of events in (Q L, Q T ), which have different sensitivities to different sources of systematic errors.
The size of the systematic errors induced by the setup description is small and allows performing the measurement of πK atom lifetime with the expected accuracy.

Conclusion
The upgrade of the DIRAC spectrometer has been carried out with the aim of extending the measurement of lifetime of the ground state π þ π À atoms in the original spectrometer to that of π ∓ ± K atoms, and to detect long-lived excited states of π þ π À atoms. The upgrade resulted in a success of the first measurement of the Fig. 7.11. Q x (top left), Q y (top right) and Q L (bottom) resolution of the momentum for π À K þ events (open) and π þ K À events (black).  lifetime of π ∓ ± K atoms, and improvement in the statistical uncertainty from 3.1 to 2.2% and the total uncertainty including systematic error from 4.3 to 3.0% for the lifetime of π þ π À atoms. SFD and IH belong to key elements in the upstream detectors, which should work in a high intensity beam of $2 Â 10 11 /s. SFD with a high spatial resolution comparable to that of chambers made it possible to identify charged particle pairs originating from hadronic atoms, and determine the relative momentum within each pair. Th shortcomings of SFD which misidentify double charged particles very close to each other as single were compensated by IH which can tell double from single based on the ionization measurement.
The SFD and the IH are the keys as upstream detectors that work in the strong intensity beam such as 2 Â 10 11 /s. The SFD made it possible to identify particle pairs originating from atoms and determined their relative momenta with its high spatial resolution comparable to that of chambers. The short-comings of the SFD which sees two particles as one when they are very close, was backed up by the IH with its capacity of separating a passage of one and two charged particles.
Large number of background particles were rejected from the candidate of true events under measurement by using downstream detectors with excellent performance, namely Cerenkov (with aerogel, C 4 F 10 , N 2 radiators), Preshower, and Muon detectors. The good time resolutions of VH and upstream detectors were also helpful in significantly reducing background.
DCs with high spatial resolution, and the spectrometer magnet whose field was carefully mapped, allowed precision measurement of the momenta of charged particles. To achieve high precision, we minimized the mass of the upstream detectors. The lambda decay width, which we measured with a precision comparable to the world record level, was used to monitor the spectrometer performance.
Use of the newly developed F1-TDC-ADC modules in the readout of most of the detectors allowed to record both the timing and the pulse-height of each hit simultaneously, and made a high-precision measurement and efficient background rejection possible.
A key point in identifying charged particle pairs originating from hadronic atoms is how precisely one can separate the true pairs from background ones consisting of similar kind of particles. The main signature of the atomic pairs is the small relative momentum of the two particles in the pair in comparison with backgrounds. For clean separation, the ability of the spectrometer to achieve precision measurement of the relative momentum mentioned above is of primary importance. Simulation study of the spectrometer to reproduce the momentum distributions of all the competing processes, however, is also important for the separation. Precision measurement became possible with both the performance of the upgraded spectrometer and meticulous offline analysis.
It should be noted that the upgraded spectrometer has a large acceptance for hadronic atoms of 2-9 GeV/c. While DIRAC experiment was carried out with a 24 GeV/c proton beam at CERN PS, it can be installed in other accelerators of higher energies, where the production cross section of hadronic atoms should be larger.