Spin tune mapping as a novel tool to probe the spin dynamics in storage rings

Precision experiments, such as the search for electric dipole moments of charged particles using storage rings, demand for an understanding of the spin dynamics with unprecedented accuracy. The ultimate aim is to measure the electric dipole moments with a sensitivity up to 15 orders in magnitude better than the magnetic dipole moment of the stored particles. This formidable task requires an understanding of the background to the signal of the electric dipole from rotations of the spins in the spurious magnetic fields of a storage ring. One of the observables, especially sensitive to the imperfection magnetic fields in the ring is the angular orientation of stable spin axis. Up to now, the stable spin axis has never been determined experimentally, and in addition, the JEDI collaboration for the first time succeeded to quantify the background signals that stem from false rotations of the magnetic dipole moments in the horizontal and longitudinal imperfection magnetic fields of the storage ring. To this end, we developed a new method based on the spin tune response of a machine to artificially applied longitudinal magnetic fields. This novel technique, called \textit{spin tune mapping}, emerges as a very powerful tool to probe the spin dynamics in storage rings. The technique was experimentally tested in 2014 at the cooler synchrotron COSY, and for the first time, the angular orientation of the stable spin axis at two different locations in the ring has been determined to an unprecedented accuracy of better than $2.8\mu$rad.

Precision experiments, such as the search for electric dipole moments of charged particles using storage rings, demand for an understanding of the spin dynamics with unprecedented accuracy. The ultimate aim is to measure the electric dipole moments with a sensitivity up to 15 orders in magnitude better than the magnetic dipole moment of the stored particles. This formidable task requires an understanding of the background to the signal of the electric dipole from rotations of the spins in the spurious magnetic fields of a storage ring. One of the observables, especially sensitive to the imperfection magnetic fields in the ring is the angular orientation of stable spin axis. Up to now, the stable spin axis has never been determined experimentally, and in addition, the JEDI collaboration for the first time succeeded to quantify the background signals that stem from false rotations of the magnetic dipole moments in the horizontal and longitudinal imperfection magnetic fields of the storage ring. To this end, we developed a new method based on the spin tune response of a machine to artificially applied longitudinal magnetic fields. This novel technique, called spin tune mapping, emerges as a very powerful tool to probe the spin dynamics in storage rings. The technique was experimentally tested in 2014 using polarized deuterons stored in the cooler synchrotron COSY, and for the first time, the angular orientation of the stable spin axis at two different locations in the ring has been determined to an unprecedented accuracy of better than 2.8 μ rad.

I. INTRODUCTION
Our very existence hinges on the net baryonic content of the Universe. In the big bang paradigm, the baryon asymmetry of the Universe is generated during the offequilibrium expansion of the Universe due to baryon number and CP non-conserving processes [1]. The standard nodel (SM) possesses a topological baryon number violation [2] and the CP-violation can be successfully parametrized by the nonvanishing phase of the Cabibbo-Kobayashi-Maskawa (CKM) mixing parameters [3].The baryonic abundance predicted by the SM, however, is some nine orders of magnitude smaller than the experimentally observed one [4][5][6]. That clearly calls for CP-violating mechanisms beyond the CKM parameterization within the SM (for a discussion of alternative approaches to the matterantimatter asymmetry, see [7] and references therein).
Electric dipole moments (EDMs) become only possible when parity P and time-reversal invariance T (and CP by virtue of the CPT theorem) are broken. Hence the search for EDMs of hadrons and leptons constitutes an important window toward new physics beyond the SM. An EDM would precess in the electric field precisely as the magnetic dipole moment (MDM) does in a magnetic field. The nuclear magneton μ N ¼ eℏ=2m N c ≈ 10 −14 e cm sets a natural scale for the MDM of nucleons and light nuclei. The EDM calls for a P violating weak interaction, the price for which to pay is a factor of ∼ 10 −7 , and one pays extra a factor of ∼ 10 −3 for CP violation [8]. Hence the natural scale for the EDM of nucleons is given by In the SM the CP symmetry is violated due to flavor changing transitions. To generate a flavor-neutral EDM one has to change the flavor back invoking the weak interaction once again, which entails an exceedingly small lower bound on the nucleon EDM from the SM of So far stringent upper bounds have been set on the EDM of neutral atoms, molecules and neutrons, which can readily be subjected to strong electric fields still being at rest. In these investigations one usually looks for a shift of the spin precession frequency caused by an electric E-field parallel or antiparallel to the B-field (for a review see [9]). For the neutron (n) EDM, an upper bound of d n < 2 × 10 −26 e cm has been reached [10,11]. The ultimate sensitivity anticipated in the present neutron EDM experiments may reach d n ∼ 10 −27 e cm.
The parallel fields approach does not work for charged particles, such as protons (p), deuterons (d) and other nuclei though. Here the electric field must be part of what confines charged particles on a closed orbit in a storage ring. On a purely statistical basis, the sensitivity to the proton and deuteron EDMs can be higher than that of the neutron. In addition, the existing bound on the neutron EDM does not preclude much larger proton, deuteron and helion ( 3 He) EDMs (for a comprehensive discussion, see [12]). The principal point is that there are no model-independent sum rules relating EDMs for n, p, d and 3 He-they all probe different aspects of generic mechanisms of CP violation.
The present study, carried out by the JEDI Collaboration (Jülich Electric Dipole moment Investigations) [13] in September 2014 at COSY, 1 is motivated by ideas on the search for EDMs of protons and deuterons using a storage ring [13,16]. It is part of an extensive world-wide effort to push further the frontiers of precision spin dynamics of polarized particles in storage rings. We developed a new method to map out the spin tune response of a machine with respect to artificially introduced magnetic field imperfections. The theoretical background to this method and its experimental vindication are prerequisites to the planned precursor EDM experiments at COSY [13], and will also have an impact on the design of future dedicated EDM storage rings.
The present investigation is part of the preparations for the search for the deuteron EDM at COSY, using a radiofrequency (rf) Wien filter (WF) [17,18]. The idea is to look for an EDM-driven resonant rotation of the stored deuteron spins from the horizontal to vertical direction and vice versa, generated by the rf Wien filter at the deuteron spin precession frequency. The rf Wien filter per se is transparent to the EDM of the particle, its net effect is a frequency modulation of the spin tune. This modulation couples to the EDM precession in the static motional E-field of the ring, and generates an EDM-driven up-down oscillation of the polarization [19].
On the other hand, the EDM interaction with the horizontal motional electric field tilts the vertical stable spin axis inwards or outwards the ring. This tilt constitutes another static EDM observable, dual to the EDM-driven resonant spin rotation. Any offset and misalignment of magnetic elements in the ring produces horizontal and/or longitudinal imperfection magnetic fields as well. A rotation of the MDM in these magnetic imperfections is indistinguishable from that of the EDM in the horizontal motional electric field. In practice, those imperfection magnetic fields cannot readily be compensated for element by element and thus emerge as a principal background to the search for the EDM using a rf Wien filter.
Recently, the JEDI collaboration has developed a method to measure the spin tune of deuterons to a relative precision of nine decimal places in 100 s cycles [20]. 2 This very high precision can be applied to provide a diagnostics tool to quantify the magnetic ring properties. Specifically, the imperfections are known to affect the spin tune [25,26]. The new technique is based on the introduction of artificial imperfections in the ring and to study the spin tune as a function of the spin kick in these artificial imperfections. Such a mapping of the spin tune response enables one to determine the orientation of the stable spin axis at the location of the artificial imperfections, and we report here about the first ever direct measurement of the stable spin axis in a storage ring. Preliminary results are reported in [27]. In the present experiment the two electron cooler solenoids, placed in the opposite straight sections of COSY, have been utilized as makeshift artificial imperfections. Remarkably, such a two-solenoid setup with pure longitudinal magnetic fields allows one to deduce both longitudinal and horizontal components of the stable spin axis at two positions in the ring.
The further presentation is organized as follows. In Sec. II, we present a brief theoretical introduction to the experimental investigations. The principal results of the exploratory study using COSYare reported in Sec. III. They do fully confirm the principal theoretical expectations on the impact of magnetic imperfections on the spin tune. We have shown for the first time, that the angular orientation of the stable spin axis can be controlled to an accuracy of about 2.8 μ rad. The experimental data exhibit certain systematic effects that have been uncovered in the course of the data analysis, those stemming from beam-orbit distortions by the misaligned solenoids are discussed in Sec. IV. In the analysis of systematic effects, we invoked simulations based on the orbit-and spin-tracking code COSY-Infinity [28]. The interpretation of the experimental findings and possible applications of the spin-tune mapping technique are reviewed in Sec. V. A summary is given in Sec. VI, where we emphasize our points on the utility of the spin tune as a probe to characterize the MDM background in searches for the EDMs of charged particles. The Appendices (A, B, C, D, E, and F) are reserved for technical aspects on the statistical and the systematic accuracy of the spin tune determination and on the theoretical background behind the spin tune mapping.

A. Spin dynamics with EDM
The spin dynamics in a storage ring is governed by the Frenkel-Thomas-Bargmann-Michel-Telegdi (FT-BMT) equation [29][30][31][32] extended to include the EDM effects [33,34]. We start with an ideal storage ring with static vertical magnetic field ⃗ B ¼ B ⃗e y , and horizontal electric field ⃗e z is the particle velocity in units of the velocity c of light [( ⃗e x , ⃗e y , ⃗e z ) form a right-handed coordinate system]. We use the system of units ℏ ¼ c ¼ 1. Let the stored particle of mass m and of electric change q have a nonvanishing EDM, Here η plays for the EDM the same role as the g-factor does for the MDM, μ ¼ gq=2m. With allowance for an EDM, the FT-BMT equation for the spin precession takes the form [33,34] where the spin precession angular velocity is given by 2 The related effort to extend the high precision frontier in spin physics at storage rings includes beam polarimetry to better than 10 −5 [21,22], lengthening of the spin coherence time beyond 1000 s [23], and phase locking the spin precession in a storage ring [24].
Here G ¼ ðg − 2Þ=2 describes the magnetic anomaly. The EDM part in ⃗ Ω s is proportional to the Lorentz force, while the MDM part receives a contribution from the motional magnetic field ∝ ⃗ β × ⃗ E. In the standard spinor formalism [25,26], the spin transfer matrix per turn in a ring R equals where ⃗σ stands for the Pauli matrices and ⃗c is a unit vector pointing along the local spin precession axis. The angular velocity of the spin precession equals where f R is the revolution frequency of the particles in the ring, and ν s the spin tune, i.e., the number of spin revolutions per turn. The EDM produces two important effects. Firstly, it tilts the stable spin axis (also called spinclosed orbit) away from the vertical direction in a plane perpendicular to the particle velocity, described by where Second, besides this tilt, the EDM interaction also modifies the spin tune from the canonical ν s ¼ Gγ to The resulting spin kick in the WF causes an rf modulation of the spin tune. As Morse, Orlov, and Semertzidis showed [19], when the rf WF frequency is locked to the spin precession frequency (f WF ¼ f s ), the rf modulation of the spin tune couples to the EDM interaction with the static motional ⃗ E-field ∝ ⃗ β × ⃗ B and generates an up-down rotation of the particle spins.
The strength of such an EDM-driven spin resonance is given by (see the detailed discussion in Appendix A) Hereafter, ⃗c denotes the stable spin axis of the ring [ ⃗c is a static quantity, defined at the location of the rf WF, before the rf was activated, see also Eq. (7)], χ WF the spin kick in the WF, and ⃗w the magnetic field axis of the WF. For an ideal WF, ⃗w ¼ ⃗e y and j ⃗c × ⃗wj ¼ sin ξ EDM . The EDM resonance strength manifestly vanishes if ξ EDM ∝ d ¼ 0. A full derivation of the on-resonance case [Eq. (14)] is given in Appendix A 1, the off-resonance case is treated in Appendix A 2.

Orientation of the stable spin axis as a static EDM signal
The second option, elaborated in more detail in the subsequent Sec. II C, is to measure directly the angular orientation of the stable spin axis [see Eq. (10)]. If it were possible, measuring this static quantity may prove more advantageous than measuring the resonance strength ϵ, which is suppressed by the small factor χ WF ≪ 1 [see Eq. (15)]. The issue is false EDM signals, which are of major concern throughout the present study.
C. Imperfections and spin tune mapping approach to the determination of the stable spin axis Realistic all-magnetic storage rings are laden with in-plane imperfection magnetic fields, induced by misalignments, rolls and offsets of magnetic elements. The interaction of the MDM with such imperfection fields therefore also contributes to the tilt of the stable spin axis, which, to first order, is given by Thus, imperfection magnetic fields provide the major background to the EDM signal. This point about the false EDM signal from imperfections has already been raised in the discussion of the bound on the muon EDM from the BNL muon g − 2 experiment [35]. Understanding the imperfection content of a storage ring is therefore among the top priorities for an EDM measurement using a magnetic machine, and this was precisely the principal task of the JEDI experiment at COSY.

Spin tune mapping in a ring with a single artificial imperfection
An extremely precise observable at our disposal is the spin tune [20], which is prone to the imperfection magnetic fields. In order to apply the precise measurement of the spin tune as a tool to probe the imperfection magnetic fields, two artificial solenoidal magnetic imperfections, S 1 and S 2 , were activated in the ring (see Fig. 1).
In the following, the idea of spin tune mapping using a single, artificially introduced imperfection is exposed. In anticipation of the modification of the spin tune by artificial imperfections, we define the spin tune for a ring without artificial imperfections by where ν 0 s denotes the unperturbed spin tune.
In such a situation, the spin transfer matrix of the artificial imperfection (AI) is given by where χ AI denotes the spin rotation angle of the imperfection, and ⃗ k its spin rotation axis. The total spin transfer matrix of the ring in the presence of the AI is given by the product where by definition ν s ðχ AI ¼ 0Þ ¼ ν 0 s and ⃗cðχ AI ¼ 0Þ ¼ ⃗c, thus Here, Δν s ðχ AI Þ denotes the change in spin tune from the unperturbed value ν 0 s when the artificial imperfection is activated.
For the sake of illustration of the idea of spin tune mapping, take the perturbative expansion which is a quadratic function of χ AI . In case the spin rotation axis of the artificial imperfection is in the ring plane, then ð ⃗c · ⃗ kÞ ¼ c x k x þ c z k z . Mapping the spin tune as function of χ AI and the orientation of ⃗ k would enable one to determine both projections of c x and c z of ⃗c (see Fig. 1).
However, the determination of c x calls for an AI with a horizontal magnetic field which would cause unwanted vertical collective beam orbit excursions. In the above idealized example, the induced orbit excursions have been ignored. In principle, distortion-free AIs using a static Wien filter could be realized, but may require inaccessibly large electric fields to ensure vanishing Lorentz forces (estimates are given in Appendix E). Fortunately enough, there exists a simple solution with pure longitudinal magnetic fields, which is free of orbit distortions. The vector ⃗c indicates the spin closed orbit before solenoid S 1 , when S 1 and S 2 are switched off. The two arcs are denoted by A 1 and A 2 , P shows the location of the polarimeter, S RF the location of the rf solenoid, and I indicates the injection. The beam orbits in clockwise direction in the machine.

Spin tune mapping in a ring with two solenoids
Specifically, using two solenoids S 1 and S 2 as AIs in the ring (as shown in Fig. 1), well apart in opposite straight sections, constitutes the simplest option. Let t A 1;2 and t S 1;2 be the spin transfer matrices of the two arcs and of the two solenoids. The spin transfer matrix T for the full ring then reads In the absence of imperfections, t −1 Spin-wise this amounts to the apparent transport of the second imperfection downstream of the first one, generating one combined local AI, given by Let the spin transfer matrices in the arcs A j (j ¼ 1, 2) be, where θ j ≃ πν 0 s is the spin rotation angle in arc A j around the direction of ⃗ m j ≃ ⃗e y . The spin transfer matrices in the two solenoids S j are given by with ⃗n j ≃ ⃗e z . Upon the above apparent transport of the imperfection, one finds where the spin rotation axis is transformed from ⃗n 2 to The last line of the above equation is an approximation that holds when ⃗m 1 ð≃ ⃗e y Þ and ⃗n 2 ð≃ ⃗e z Þ are orthogonal, and when ½ ⃗n 2 × ⃗m 1 ≃ − ⃗e x . Consequently, this apparent transport amounts to a rotation of the axis of solenoid S 2 by an angle θ 1 ≃ πν 0 s . This rotation is denoted by the upper index r in Eq. (27). We thus managed to generate a local artificial imperfection with an apparent horizontal component of the magnetic field without excitation of transverse beam excursions.
Thus, the spin transfer matrix of the combined artificial imperfection is given by where ⃗ k AI ¼ cos Finally, to an accuracy adequate for the purposes of the present investigation (see Appendix C), where the spin kick angles χ AE and the imperfection parameters a AE are given by Consequently, the determination of a AE amounts to the determination of the projections of the stable spin axis ⃗c onto a plane spanned by the vectors ⃗n 1 and ⃗n 2 r . Note the different status of the four terms in Eq. (30). The first two terms, proportional to sin 2 ð 1 2 χ AE Þ, are uniquely predicted with absolute normalization. The last two terms, proportional to sin χ AE , enter with unknown coefficients a AE , to be determined experimentally.
For weak AIs, the left-hand side of Eq. (30) can be further approximated as cosðπν 0 s Þ − cosðπ½ν 0 s þ Δν s ðχ 1 ; χ 2 ÞÞ ≃ πΔν s ðχ 1 ; χ 2 Þ sin πν 0 s . Then, the right-hand side of Eq. (30) entails a saddle point of Δν s ðχ þ ; χ − Þ in the ðχ þ ; χ − Þ-plane. Simple algebra yields the location of the saddle point (sp) χ sp AE at so that the determination of the location of the saddle point amounts to a measurement of the imperfection parameters a AE .
It should be noted that we could equally have applied the above described trick of Eq. (22) to the apparent transport of the imperfection S 1 to the location of S 2 . That would not have changed anything apart from the interchange of subscripts 1 and 2 in Eqs. (27) to (31). Consequently, modulo to this interchange, our findings for a AE are applicable to the orientation of the stable spin axis at the location of both solenoids S 1 and S 2 .
Furthermore, the same trick can be readily extended to the simultaneous transport of both AIs to any location in the ring. Evidently, the spin tune of the ring loaded with AIs is invariant under such a virtual transport. However, as soon as the AIs are moved to different positions in the ring, the spin rotation angles θ j in arcs of the ring [see Eq. (24)], the corresponding spin rotation axes ⃗m j , the rotated imperfection axes ⃗n r j as given by Eq. (27), and the corresponding spin transfer matrix of Eq. (28) will all depend on the actual sectioning of the ring. For this reason, the imperfection parameters a AE constitute properties of the ring that change when the locations of the AIs in the ring are altered.

III. EXPLORING MAGNETIC IMPERFECTIONS OF THE COSY RING
A. Experimental setup and data taking One of the goals of the investigations at COSY (carried out in September 2014) was to explore the spin closed orbit by introducing AIs, as exposed in the previous section. For that purpose the drift solenoid of the 2 MeV electron cooler (solenoid S 1 in Fig. 1, see [36] for details), and the difference of fields of drift and compensation solenoids of the 120 keV electron cooler (solenoid S 2 in Fig. 1, see [37] for details) have been used as makeshift AIs. They are located in the opposite straight sections and the longitudinal artificial imperfection magnetic fields were adjusted by two separate power supplies.
At first, the vertically polarized deuteron beam was injected and accelerated to the kinetic energy of T ¼ 270 MeV. Subsequently, the beam was prepared for 75 s by cooling and bunching. Afterwards the beam was extracted onto the carbon target. Then the initial vertical polarization of the particle ensemble was flipped into the horizontal plane by means of a resonant rf solenoid S rf [38] (see Fig. 1). Subsequently, the particle spins perform an idle precession around the vertical axis in the horizontal plane of the machine with a frequency where ν 0 s denotes the spin tune and f R the revolution frequency of the particle bunch. The initial vertical deuteron vector polarization provided by an atomic beam source was alternated from up to down states. One run typically contained 6 cycles, in order to allow us to estimate the fluctuations due to instabilities of COSY.
The experimental scheme is illustrated in Fig. 2. The first baseline spin tune measurement interval lasted for ΔT 1 ¼ 20 s after the spins of the particle ensemble had been flipped into the horizontal plane. Then the currents of both solenoids S 1 and S 2 were ramped during a short time interval of 2-3 s to the specified values (see also Fig. 12 in Appendix D). The solenoids remained switched on for a longer time period ΔT 2 ¼ 25 s in order to obtain approximately the same statistical accuracy for the determination of the spin tune compared to the first time interval ΔT 1 . Afterwards, the solenoids were ramped down for a still longer ΔT 3 ¼ 35 s to provide a second baseline measurement. A comparison of the two baseline spin tune measurements allows one to keep track of potential spin tune drifts within each cycle.
The spin kicks χ i (i ¼ 1, 2) induced by the currents I i of the two solenoids are given by where Bρ denotes the magnetic rigidity of the ring, and F i the corresponding calibration factors, which in free space are given by Ampere's law in terms of the coil winding numbers [37]. For the drift solenoid S 1 of the 2 MeV electron cooler I 0 1 ¼ 0. For S 2 , the nominal current I 0 2 corresponds to the normal operation regime of compensating the longitudinal field integrals from the main drift solenoid, the toroids and the two compensation solenoids. In our study the drift and toroid solenoids and the corresponding steerers were run at the nominal current. In S 2 the AI was generated by ramping the currents of the two compensation solenoids away from the nominal I 0 2 and then back to I 0 2 at the end of ΔT 2 . The ranges of the applied field integrals using the two solenoids S 1 and S 2 are listed in Table I.
One necessary requirement to determine the spin tune in each time interval ΔT i (i ¼ 1, 2, 3) to high accuracy is a  Table I. long horizontal polarization lifetime. This was achieved by tuning the sextupole magnets in the ring to correct for decoherence effects like emittance and momentum spread of the beam [23].

B. Analysis method
The method to unfold the fast spin precession in the horizontal plane and thus to determine the spin tune is described in the previous JEDI publication [20] and is outlined in Appendix D. The EDDA detector is operated as a polarimeter to measure count rates in each of the four detector quadrants (up, right, down, left) [39]. The beam particles are brought into interaction with the carbon target of the polarimeter by stochastic heating of the beam.
Six measurement cycles with alternating polarization states (up, down) were taken for each solenoid setting, each measurement taking about ΔT 1 þ ΔT 2 þ ΔT 3 ¼ 80 s. In each of the three time intervals (i ¼ 1, 2, 3), the spin tunes ν s i were determined, and subsequently two spin tune jumps were determined, where n ON denotes the turn number when the solenoids are switched on, and n OFF the turn number when the solenoids are switched off (see Fig. 12 in Appendix D). Measurements containing six-cycle runs were repeated and spin tune jumps were measured on a mesh of spin kicks χ 1 versus χ 2 , and this procedure is referred to as spin tune mapping.
In a stable ring with perfectly stable solenoid power supplies, within each cycle the two baseline spin tunes ν s 1 and ν s 3 , and the corresponding spin tune jumps Δν s 1 and Δν s 2 must coincide. This is not quite the case with COSY as is. A drift of the spin tune within each cycle, from cycle to cycle of the same run, and from run to run was already observed during our previous experiment [20]. This drift could arise from a walk of the solenoid currents I 1;2 , from a temperature dependence of the magnetic fields, or from hysteresis effects in the main dipole magnets causing a continuous displacement of the beam orbit and a resulting change of the beam axis with respect to the magnetic axes of the solenoids.
The cycle-to-cycle variations in the machine are clearly demonstrated by the graph of unperturbed spin tune ν s 1 , shown in Fig. 3. The RMS of this distribution must be regarded as a cycle-to-cycle systematic uncertainty of the baseline spin tune, which amounts to δν syst The cycle-to-cycle statistical uncertainty of the baseline spin tune is evaluated in Appendix D, and the values are given in Table VII. For the first time interval ΔT 1 it amounts to δν stat Similarly, we regard the difference of the baseline spin tunes ν s 1 − ν s 3 (see Fig. 15 in Appendix D) and the difference of the two spin tune jumps Δν s1 − Δν s2 within a cycle as a systematic error due to ring instabilities. This difference comes out much larger than the statistical accuracy to which the spin tunes in the three time intervals of the same cycle can be determined.
The best estimate for the statistical, systematic and quadratically combined errors of the spin tune jumps δΔν s per cycle is derived in Appendix D, and amounts to Since, depending on the measurement scheme, the above given statistical error can be made small, in the subsequent data analyses and simulations the systematic error δΔν syst s is used. Remarkably, the within-the-cycle walk of the spin tune ν s 1 − ν s 3 (shown in Fig. 15 in Appendix D) is almost an order of magnitude smaller than the cycle-to-cycle walk (shown in Fig. 3).
One serendipitous finding of a systematic effect was that the operation of the COSY ionization beam profile monitor (IPM) [15] causes spin tune jumps as large as ∼ 10 −6 . This finding indicates the high sensitivity of the spin tune to the seemingly small electromagnetic perturbations in the ring.  Since the observed IPM effects are large, all cycles with IPM ON were excluded from the data analysis.
As we had no a priori idea about the strength of the imperfection fields, a first exploratory map (Map 1) was recorded using a coarse mesh. Later on, during about 33 h a second map (Map 2) was recorded with twice smaller mesh spacing. Initially, Map 2 contained 9 × 9 ¼ 81 data points. After runs with IPM switched ON had been discarded, and one row of measurements was not recorded properly, Map 2 altogether contained 60 data points. While Maps 1 and 2 are fully consistent with each other, in view of the higher statistics in the following the experimentally observed data for Map 2 are considered, and are depicted in the left panel of Fig. 4.

C. Confirmation of the saddle point of the spin tune map
The observed spin tune map shown in Fig. 4 clearly confirms the theoretically expected saddle point property. The graph shows where the shape of the surface of the spin tune map is produced by the numerator, given by Eq. (30). For deuterons sin ðπν 0 s Þ < 0, and according to Eq. (30), fðν 0 s ; χ þ ; χ − Þ is a sum of the convex function of χ þ and the concave function of χ − .
Each data point has been assigned a quadratically combined error bar, given by Eq. (36). The principal fitted parameters are the ring imperfections a þ and a − . By virtue of Eq. (30), the missing cross terms assure that these parameters are basically uncorrelated.

Validation of the fitting procedure
The employed fitting procedure is illustrated by a simulation using the spin-tracking code COSY-INFINITY ( [28], for applications to spin tracking at COSY, see [40]). The simulations assume a single particle with nominal momentum orbiting on the closed orbit. We used a model for the spin-tune jump described by Eq. (20). We assumed an ideal ring and vanishing EDM, so that at every point along the orbit the stable spin axis is precisely oriented along the y-axis. An additional 5 T mm solenoid is placed in arc A 1 (same location as S RF in Fig. 1). According to the COSY-INFINITY simulations, this solenoid generates an imperfection which produces a c z different from zero of at the location of solenoid S 1 . Now, we want to use a single solenoid in the simulation to determine the value of c z using spin tune mapping. To this end, we produced a set of 53 spin tune jumps, based on Eq. (20) with uncertainties given by Eq. (36), equally spaced in χ AI . Then we fit the resulting set of data points using Eq. (20). As expected, the resulting fit is of good quality, yielding a χ 2 =N dof ¼ 50.27=52, and the input value for c z [given in Eq. (38)] and the fitted value of c fit z are perfectly consistent with each other, If it were not for the systematic errors to be discussed below, it would have been possible to determine c z to an accuracy of δc z ≈ 3.5 × 10 −7 . To put this number into perspective, supposing a similar accuracy of the determination of c x would entail a resolution of the angle of the stable spin axis δξ EDM ∼ 3.5 × 10 −7 . Then, in the absence of machine imperfections at T ¼ 270 MeV, Eq. (10), corresponds to a resolution of the deuteron EDM of about 2. Fitting the map of residuals As we have seen above, there exists a run-to-run variation of ν 0 s . We account for that by evaluating the theoretically expected spin tune jump function fðν 0 s ; χ þ ; χ − Þ [Eq. (37)] at the average ν 0 s as measured in the corresponding run.
The fit to the spin tune jump Map 2 with a AE as free parameters yields with an enormous χ 2 =N dof ¼ 22017=58. According to Eq. (32), the saddle point is located at In order to understand the reason for the large χ 2 =N dof , we investigate the map of residuals, shown in Fig. 4 (right panel). This map exhibits a similar saddle point pattern with an amplitude at the level of about one per cent of the observed spin tune jumps Δν s ðχ þ ; χ − Þ.
The observed saddle point property hints at the possibility to fit the residuals by a function reminiscent of Eq. (37), where we allow for an additional scaling of effects stemming from χ þ and χ − π sinðπν 0 s ÞΔν res We assign to the residuals the error bars of the corresponding spin tune jumps. Such a fit yields, with a χ 2 =N dof ¼ 235.5=55, which improves by about a factor of 100 the χ 2 =N dof ¼ 22017=56 found for the simplified formalism, given in Eq. (37). Now the full spin tune jump takes the form This guess for the functional dependence of the map of residuals [Eq. (30)] suggests that the spin tune jumps can still be described by Eq. (37) at the expense of rescaling the spin kick angles viaχ The variables χ AE are somewhat obscure, because they mix the effects of the two solenoids. One may prefer to apply the rescaling to the individual solenoids, described bỹ This empirical finding looks as if the actual spin kicksχ 1;2 are different from what is given by Ampere's law applied to the readout currents of the solenoid power supplies. 3 In the simplified formalism, given in Eq. (31), the parameters a AE were related to projections of the spin stable axis onto the AI axes ⃗n 1 and ⃗n r 2 . This interpretation is somewhat obscured by the yet unknown systematic effects behind the residuals, which also contribute to To summarize, Eq. (30), constrained by assuming an ideal alignment of solenoids S 1 and S 2 , only contains two free parameters a AE . This approach obviously misses the experimental data on the spin tune jump by Δν res s which numerically amounts to about 1% of Δν s (see Fig. 4). However, in view of the achieved record-high precision of the spin tune determination, even this small mismatch becomes statistically very relevant. We must therefore conclude that Eq. (30) does not account for certain substantial systematic effects. Specifically, we shall discuss in the following, whether an apparent rescaling of the spin kick angles, given in Eq. (47) is borne out by realistic physics mechanisms. A more detailed discussion of such a mechanism and the quantitative description in terms of a fit will be presented in Sec. IV E.

IV. SYSTEMATIC LIMITATIONS OF SPIN TUNE MAPPING
A. Evidence for steering effect of solenoids One obvious source of systematics is the misalignment of the solenoid axes with respect to the beam trajectory. In such a case, the magnetic field of a solenoid exhibits vertical and horizontal field components which are proportional to the solenoid field χ AI and the angles of rotation ξ x;y of the solenoid around the x-and y-axis, respectively. To a first approximation, a misaligned solenoid can be regarded as an ideal solenoid complemented by one horizontal and one vertical steerer dipole magnet. The steering effect of the misaligned solenoid, i.e., the momentum rotation angle ϑ, is related to the solenoid spin kick χ AI via [see Eq. (34)] The transverse magnetic fields affect the spin tune of the ring both directly and indirectly via excursions of the beam which change the orbit length and also affect the magnetic imperfections acting on the spin in all magnetic elements of the ring. Even the sign of the impact on the spin tune cannot be readily predicted. Preliminary experimental findings on the effect of steerer magnets on the spin tune have been reported elsewhere [41,42].
The drift solenoid S 1 of the 2 MeV electron cooler is operated independently from the toroidal magnetic fields and the related steerers. The case of solenoid S 2 in the 120 keV electron cooler is more complex [37]. During standard operation, the longitudinal field integral R B z dz of the drift solenoid and the two toroidal magnets is compensated for by the field integral of the two compensation solenoids up-and downstream of the main electron cooler solenoid. During the spin tune mapping experiment, the two compensation solenoids were operated using an additional power supply, whereby the field integral of the electron cooler could be adjusted (see Table I).
In S 2 , the effect of the transverse toroid fields is compensated for by two sets of steerers upstream of the compensation solenoid and downstream of a family of quadrupoles (and vice versa for the second compensation solenoid at the downstream end of the drift solenoid). The principal point is that even the reference trajectory runs along the compensation solenoid at a finite angle, and operating the compensation solenoid at a current I 2 , which differs from the nominal current I 0 2 , inevitably generates unwanted transverse fields along with the uncompensated longitudinal AI field required for spin tune mapping. At the moment there are no spin tracking codes available which fully account for the fields of the toroidal magnets in the 120 keV electron cooler.
In Fig. 5 the experimentally observed orbit excursions along the ring are shown as function of the spin kicks χ 1 or χ 2 in each of the two solenoids when the second solenoid is switched off, i.e., only single solenoids, either S 1 or S 2 are active. The observed beam excursions are quite substantial. Solenoid S 1 perturbs the orbit mostly in the horizontal plane, i.e., S 1 predominantly provides a vertical magnetic field. Solenoid S 2 shifts the orbit in both the horizontal and vertical plane. It should be noted that the orbit displacement is approximately linear in both planes as function of χ 2 (see bottom pair of panels in Fig. 5). Quantitative estimates for the solenoid rotation angles, derived from the simulations carried out with COSY-INFINITY, will be discussed in more detail in Sec. IV B).
Since the particles are removed from the beam by the interaction with the target, collective orbit displacements should therefore also affect the count rate in the polarimeter. In Fig. 6 the observed count rate for one particular cycle is shown. The first spike occurs when the solenoids S 1 and S 2 are switched on, and fades away because of the absorption of beam particles at the target. The effect should be reversible, and indeed a drop in the count rate is observed at the end of the time interval T 2 when the 3 The power supply of the compensation solenoid (type SM 30-200) provides a current control stability of 100 ppm and a temperature coefficient of 60 ppm /K. The power supply of the drift solenoid of the 2 MeV electron cooler (type BPS SW MODULE PUISS BIP 30=22) has an absolute current calibration of 0.1%, an output stability of 20 ppm, and a temperature coefficient of 5 ppm=K. Presently, for the two solenoids S 1;2 , 16 bit power supply controllers (type PSC-ETH) are used. solenoids are turned off. Subsequently, due to continuous heating of the beam, the count rate approaches again the previous level.
After the AIs in the two solenoids S 1 and S 2 are switched off, the spin tune jumps are not always perfectly reversible (see Appendix D). Such effects accumulate and the spin tune drifts from injection to injection, as reported in [20]. There is an indication for a similar irreversibility with respect to the orbit position, and in Fig. 7 one example is shown. From the average values of the vertical beam positions, listed in Table II, it is clearly seen that within errors, the vertical position of the beam is not recovered when solenoid S 2 is switched OFF at the end of the time interval to the steering effect of the misaligned solenoids. In order to evaluate the situation, we resort again to the spin-and orbittracking code COSY-INFINITY [28]. For instance, when the solenoid is rotated around the y-axis by an angle ξ y , then its axis is given by ⃗ k ¼ cos ξ y ⃗e z þ sin ξ y ⃗e x , and a horizontal magnetic field proportional to sin ðξ y Þχ AI ≃ ξ y χ AI will be generated, causing vertical excursions of the beam orbit. Rotations around the x-axis will generate a vertical magnetic field and horizontal excursions of the beam.
Excursions of the orbit change the torque exerted on the spin by the magnetic elements in the ring. Thus, the simplified prediction of the spin tune jumps, given in Eq. (30), needs to be revised. Here we evaluate the salient features of the steering effect in a simplified model using only one solenoid as an AI, as described by Eq. (20).
Specifically, now the spin transfer matrix of the ring excluding the solenoid is given by where 2πq R s ðξ; χ AI Þ denotes the spin-phase advance in the ring excluding the solenoid [not to be confused with the spin tune ν s ðξ; χ AI Þ, which is defined for the full ring including the solenoid]. The spin-transfer properties of the ring only depend on the beam orbit. An ideally aligned solenoid (ξ ¼ 0, χ ≠ 0) does not disturb the beam orbit, and leaves the spin advance in the ring unchanged from the canonical 2πν 0 s , therefore, q R s ðξ ¼ 0; χ AI Þ ≡ ν 0 s , i.e., equal to the spin tune of the ring when the solenoid is switched off. Now, we proceed to the decomposition Here the last two terms describe the change of the spin transfer properties of the ring that are caused by the orbit excursions, where Δq R s ðξ; χ AI Þ ¼ q R s ðξ; χ AI Þ − ν 0 s is the first systematic effect, which changes the spin phase advance per turn by 2πΔq R s ðξ; χ AI Þ. The last two terms of Eq. (52) can be regarded as an extension of Eq. (21), which leads to cos ðπq R s ðξ; χ AI ÞÞ − cos ðπν s ðξ; χ AI ÞÞ Here emerges yet another systematic effect in the form of Δ ⃗cðξ; χ AI Þ, which denotes the change of the spin rotation axis in the ring caused by the orbit excursions. The approximation in the final form of Eq. (54) is valid to a quadratic accuracy, which allows us to put q R s ðξ; χ AI Þ ≃ ν 0 s . Then the first two terms in the last line of Eq. (54) precisely reproduce the result for an ideally aligned solenoid, given earlier in Eq. (21). The final result can be written as  Table II.
where the last two terms can precisely be interpreted as the residuals, defined in Eq. (43), COSY-INFINITY allows us to evaluate the spin-transfer matrix per turn with full allowance of the beam orbit excursions, Now we can evaluate the desired spin-transfer matrix of the ring without solenoid, Next we compare the so-determined t R to the COSY-INFINITY result for the unperturbed ring matrix t R ðν 0 s ; ⃗cÞ, evaluated with the solenoid switched off. This allows us to estimate the effect of beam steering on the spin tune via and on the orientation of the stable spin axis via ⃗cðξ; χ AI Þ ¼ ⃗cð0; χ AI Þ þ Δ ⃗cðξ; χ AI Þ: As soon as the misaligned solenoid is switched on, it will change the beam orbit all over the ring, the solenoid itself included. Because of the orbit excursions inside the 120 keVelectron cooler, its description as a simple solenoid S 2 already constitutes an approximation. This entails a caveat of Eq. (58)-the use of t −1 S ðξ; χ AI Þ evaluated assuming a fixed orientation of the solenoid axis ⃗ k with respect to the beam axis. Arguably, even so the above approximations provide a qualitative idea on Δq R s ðξ; χ AI Þ and on Δ ⃗cðξ; χ AI Þ.
C. Scaling properties of the orbit excursion effects on the spin transfer 1. Orbit settings First we need to understand to which extent the steering effect of the solenoid depends on the unknown orbit settings. The default orbit of COSY-INFINITY corresponds to a situation when all steerers are turned off. The best we can do at this point is to compare the simulation results for different combinations of vertical and horizontal steerers. In the following, we use for the discussion the four specific orbit settings, listed in Table III.

Scaling properties of orbit excursions vs. solenoid misalignment
In the top four panels of Fig. 8, we compare the initial beam orbits and the orbit excursions for the two orbit sets 1 and 2 (see Table III) of the vertical steerers found using simulations with COSY-Infinity. Solenoid S 2 with a spin kick of χ 2 ¼ 12.98 mrad is rotated around the y-axis in the angular range of −8 mrad < ξ y < 8 mrad in steps of 4 mrad. The steering effect of the rotated solenoid causes vertical orbit excursions. The principal finding is that despite the striking difference between the two orbits, the corresponding excursions are identical, which evidently stems from the linear beam optics.
The orbit excursions are also proportional to the strength of the AI induced by S 2 , i.e., they scale as ξ y χ 2 . We also checked that the beam orbit excursions do not change when the beam rotation angles in individual steerers are varied. The horizontal orbit excursions from the vertical steering effect of the solenoid are at least two orders in magnitude smaller than the vertical ones and can safely be neglected.
The bottom four panels show the results when the horizontal steerer sets 3 and 4 (see Table III) are activated,   (Table III), when solenoid S 2 is switched off. The panel for Δy½mm shows the vertical orbit excursions with respect to the absolute beam positions when solenoid S 2 is switched on with a spin kick angle χ AI ¼ 12.98 mrad, and rotated around the y-axis by ξ y ¼ −8ð○Þ; −4ð□Þ; 4ð△Þ, and 8ð▽Þ mrad. The observed excursions are linear in ξ y . Bottom four panels: Same as top four panels, but here for rotations of solenoid S 2 around the horizontal x-axis with ξ x ¼ −8ð○Þ; −4ð□Þ; 4ð△Þ, and 8ð▽Þ mrad for the steerer sets 3 and 4. exhibited by the simulated orbit distortions, shown in Fig. 8. The corresponding solenoid misalignment angles can be estimated as ξ y ðS 1 Þ ∼ 1-1.5 mrad; ξ x ðS 1 Þ ∼ 6 mrad; A full-fledged COSY-INFINITY simulation of the complicated magnetic field structure of solenoid S 2 is not yet available, therefore we are limited to the semiquantitative estimates, given in Eq. (61).

Ring steerers and baseline spin transfer parameters
As a prelude to the numerical simulations of the steering effect of a misaligned solenoid, we first look at the effect of ring steerers on the spin transfer properties of the ring. The COSY-INFINITY simulations of the impact of steerers were performed starting with the default ideal orbit when all steerers are turned off, i.e., when ν 0 s ¼ Gγ. The strength of the ring steerers is conveniently defined by the momentum rotation angle (kick) ϑ x;y . Correspondingly, for a misaligned solenoid it is given by Eq. (50). We reiterate that horizontal steering is caused by momentum rotations by the angle ϑ y around the vertical magnetic field B y of a steerer (and vertical steering by ϑ x in the horizontal magnetic field B x ).
Evidently, the noncommutation of spin rotations in the horizontal magnetic field of vertical steerers and in the vertical magnetic field of dipole magnets is similar to that in the solenoid and dipole fields. Therefore, vertical steerers would generate magnetic imperfections c x;z and spin tune shifts, similar to those generated by the solenoids [see Appendix B, Eqs. (B9) and (B10)].
We demonstrate this property in panels 1 and 3 of Fig. 9, where we show the spin tune shifts versus the momentum rotation angle ϑ x for vertical steerer magnets activated in the injection straight section and arc A 1 (the corresponding spin rotation angles equal χ x ≃ ν 0 s ϑ x ). We also show the results when ϑ x using one steerer in a straight section is varied on the background of one steerer in arc A 1 , operated at a fixed ϑ x ¼ 1 mrad. The fixed steerer in the arc shifts the location of the minimum of the spin tune shift vs. ϑ x , whereas the coefficient of the quadratic term in panels 1 and 2 is the same to better than 1% accuracy.
The case of the horizontal steerers is quite different. Here, the magnetic fields of the ring steerers and the dipole fields in the arcs are pointing along the same y direction. The spin rotation in the horizontal steerer will closely follow the momentum rotation. A naive estimate for the shift of the spin tune is wrong for the reason that the momentum rotation in the steerer will be corrected for by the horizontal focusing fields, and because of the vanishing dispersion in the straight section the orbit lengthening and corresponding energy shift by the horizontal steerer kick have a negligible impact on the spin tune. Indeed, the results from simulations with COSY-INFINITY, shown in panel 6 of Fig. 9, indicate a very strong suppression with respect to the naive Eq. (62), For a steerer in the straight section, the effect computed using COSY-INFINITY is about two orders of magnitude smaller than for a steerer in the arc, where the horizontal dispersion takes the largest value. We conclude that in contrast to the horizontal magnetic field B x of the vertical steerers, the vertical magnetic fields B y of the horizontal steerers do not affect the stable spin axis. For the case of our interest, the steerer effect of misaligned solenoids, located in the straight sections, amounts to ϑ y ≈ ξ x χ AI =ð1 þ GÞ < 0.1 mrad. Correspondingly, the results shown in panel 4 indicate the expected spin tune shift from solenoid rotations around the x-axis way below the uncertainty with which the spin tune jumps can be determined [see Eq. (36)].

Scaling properties of the stable spin axis ⃗c vs. solenoid misalignment
Next we turn to the second systematic effect, outlined in Eq. (54), i.e., the change of the spin rotation axis in the ring caused by the orbit excursions. Specifically, in panels 1, 4, 7, and 10 of Fig. 10, we show the horizontal and longitudinal projections of Δ ⃗cðξ; χ AI Þ, determined from simulations using COSY-INFINITY for the misaligned solenoid and different steerer settings. The angles of solenoid rotation ξ y around the y-axis are indicated in panel 3, the ones for rotation around the x-axis (ξ x ) in panel 9.
In principle, Δc x;z are functions of the two variables ξ and χ AI . However, according to our simulations, for rotations of solenoids around the y-axis, the steering effect is proportional to the product of the two, described by e.g., where ⃗ C y ¼ ðC y x ; C y z Þ denotes the slope parameters for solenoid rotations around the y-axis, as illustrated in Fig. 10. Here the straight lines join points for largest ξ x;y ¼ AE16 mrad and largest χ AI ¼ AE12.98 mrad. In order to avoid overcrowding the figure, points at intermediate values of χ AI ∈ ½−12.98; 12.98 mrad were omitted. For smaller values of ξ x;y , in order to avoid overlapping of points, we only show the results for the outermost values of χ AI , one for χ AI > 0 and one for χ AI < 0. These points coincide exactly with the straight line connecting the points at ξ x;y ¼ AE16 mrad.
Furthermore, close inspection of panels 1 and 4, which correspond to a rotation of the solenoid around the y-axis, shows that the slopes C y x;z remain unchanged going from one orbit setting to another one.
The case of rotations of solenoids around the x-axis is quite distinct. In Sec. IV C 3 we argued that the horizontal steerers should not affect the stable spin axis. However, slow spiraling of the beam trajectory in the misaligned solenoid [see Eq. (50)] will introduce a weak coupling of the horizontal and vertical betatron motion. Indeed, panels 7 and 10 of Fig. 10 show nonvanishing Δ ⃗c x ðξ; χ AI Þ which are found to be about two orders of magnitude smaller than Δ ⃗c y ðξ; χ AI Þ, shown in panels 1 and 4. This orbit spiralling induces orbit excursions of higher order in ξ and χ AI , and the resulting C x x;z become superpositions of terms ∝ ðξ − ξ 0 x;z Þ 2 χ AI and ∝ ξχ AI 2 . Here, for each value of ξ only the end points at χ AI ¼ AE12.98 mrad are shown, joined by lines which have been drawn to guide the eye through the points at intermediate χ AI ∈ ½−12.98; 12.98 mrad.
We note that Δ ⃗c x ðξ; χ AI Þ does not depend on the orbit setting, as evidenced by the comparison of panels 7 and 10. For the purposes of the subsequent analysis of the residuals of the spin tune map, the numerically small effect of Δ ⃗c x ðξ; χ AI Þ can be neglected.

Scaling properties of the spin-phase advance in the ring vs. solenoid misalignment
It is convenient to define symmetric and antisymmetric combinations of Δq R s ðξ; χ AI Þ, introduced in Eq. (59) via As we shall see, these functions exhibit different scaling properties as function of ξ and χ AI . In the case of Δ þ ðξ; χ AI Þ, there is a strong difference between rotations around the y-and x-axes. For rotations around the y-axis, the simulation results for Δ þ ðξ; χ AI Þ, shown in panels 2 and 5 of Fig. 10, e.g., suggest the scaling law The slope D y is consistent with being a constant, which is independent of the orbit settings. This is evident from a comparison of panels 2 and 5. The simulation results for the slope parameter D y are summarized in Table IV. The simulation results for the antisymmetric combination Δ y − ðξ; χ AI Þ are shown in panels 3 and 6 for solenoid rotations around the y-axis. These results suggest the scaling law Again, the straight lines join points for largest ξ x;y ¼ AE16 mrad and largest χ AI ¼ AE12.  (Table III). The second row of panels 4-6 show the same parameters for orbit set 2. The corresponding situation for rotations of S 2 around the x-axis is depicted in panels 7-12. Note that in order to emphasize the different scaling properties, Δc x;z (first column of panels) and Δ − (third column) are plotted as a function of the variable χξ, while Δ þ (second column) is plotted as a function of the variable χ 2 ξ. To avoid overcrowding of data points, for each ξ only the end point results at χ AI ¼ AE12.98 mrad are shown. In panels 1 to 6, 9 and 12, the points for all ξ fall on the same straight line. In panels 7, 8, 10, and 11, the actual dependence on χ AI is shown by the curves drawn to guide the eye (see text for more explanations). straight line given by ξ x;y ¼ AE16 mrad. One notices, however, that Δ y − ðξ; χ AI Þ is no longer independent of the orbit setting.
The case of rotations around the x-axis, shown in the two bottom rows of Fig. 10, is a special one. Specifically, the magnitude of Δ x þ ðξ; χ AI Þ (shown in panels 8 and 11 of Fig. 10) is three orders of magnitude smaller than jΔ y þ ðξ; χ AI Þj for rotations around the y-axis (shown in panels 2 and 5), and is way smaller than the accuracy of the experimental determination of the spin tune. Just for the sake of completeness, we mention that at fixed ξ, the simulated Δ x þ ðξ; χ AI Þ exhibit a linear dependence on χ AI 2 . This linear dependence is indicated in panels 8 and 11 by straight lines, which indicate that both slope and offset parameters depend on ξ. These parameters are uneven functions of ξ.
As mentioned in Sec. IV C 3 (and as shown in the upper panels of Fig. 9), the horizontal steerers in the straight section have a very weak influence on the total spin tune ν s ðξ; χ AI Þ. Namely, the spin kick in the vertical magnetic field of the misaligned solenoid, given by is to a high precision canceled by the combined action of the rest of the first straight section, the arcs and the second straight section. Technically, the cancellation of the spin kick in the rest of the ring entails a fairly large slope of the This expectation is perfectly consistent with the numerical results shown in panels 9 and 12 of Fig. 10.

D. Orbit excursion effects from solenoids S 1 vs. S 2
Let the two solenoids S 1 and S 2 be located in the two straight sections exactly opposite to each other, and let the COSY ring be a precisely symmetric one. Then from the perspective of COSY-INFINITY, simulations with activated S 1 would have differed from the case of activated S 2 only by the relative positions of the activated solenoid to the activated steerers, i.e., by the orbit setting. Consequently, in the case of perfect symmetry, the slopes C x;z and D, which were determined from the COSY-INFINITY simulations for the activated solenoid S 2 , would hold for solenoid S 1 as well.
In COSY the solenoids S 1 and S 2 are at asymmetric locations with different β-functions. Correspondingly, for the same values of ξχ, the beam orbit excursions could change from an activated S 1 to an activated S 2 . Indeed, this is evident from a comparison of the patterns of beam orbit excursions along the ring, shown in the top and bottom panels of Fig. 5, where solenoids S 1 and S 2 were activated individually. Similarly, the steering effect in the spin transfer properties of the ring from S 1 could be different than from those induced by S 2 .
The findings for rotations of solenoids S 1 and S 2 around the y-axis are different. The last two entries in Table IV list the results for two orbit settings, one with a vertical and another one with a horizontal orbit steerer set. The scaling properties of the steering effect of solenoid S 1 exhibits the same independence on the orbit setting as the one observed for S 2 . However, the absolute values of the spin transfer parameters C y x;z and D y for the two solenoids are different.

E. Spin tune mapping with allowance for misalignment of solenoids
Taking into account the considerations of Sec. III C 2 and the above Secs. IV C 2 to IV C 5 for guidance, we proceed further with the analysis of the recorded spin-tune map by substituting in Eq. (30) The single-solenoid simulations using COSY-INFINITY, which strongly suggest this rescaling, could have missed Simple allowance for the above individual rescaling factors k 1;2 ¼ 1 þ K 1;2 without the cross talk term F ¼ 0 already yields an acceptable Fit 1 with χ 2 =N dof ¼ 226=56 (see Table V). The allowance for the cross talk term F ≠ 0 between the two solenoids S 1 and S 2 leads to a still better quality Fit 2 with χ 2 =N dof ¼ 137=55.
where we have approximated ð ⃗ C · ⃗ kÞ ≃ ð ⃗ C · ⃗e z Þ ¼ C z . Now recall the point that in the basic Eq. (30), only the two terms proportional to sin 2 ð 1 2 χ AE Þ come with uniquely prescribed coefficients, while the terms ∝ E renormalize the unknown a Ã AE [see also Eq. (49)]. For that reason, it only makes sense to compare the quadratic term in Eq. (72) to the corresponding term in the residuals extracted from the fit function, given in Eq. (71) We recall that contributions to the spin tune shifts from rotations of solenoids around the x-axis are negligibly small. Then the COSY-INFINITY simulation results for K i for the two solenoids S i (i ¼ 1, 2) will be dominated by the contribution from the solenoid rotations around the y-axis, described by where S i as an argument denotes the parameters of the respective solenoid. The evaluation of the vertical steering effect, using for the misalignment angles the estimates given in Eq. (61), yields There are substantial cancellations between the contributions from D y and C y z on the right-hand side of Eq. (74). The effect is larger for solenoid S 2 . The simulation results have the same sign but are one order in magnitude smaller than the fitted K fit i , listed in Table V.

G. Simulation of two tilted solenoids in an otherwise ideal ring
Take a toy model consisting of two solenoids S 1 and S 2 that are embedded in a ring with ideally aligned magnetic elements and with all ring steerers turned off, so that along the complete orbit the stable spin axis ⃗c ¼ ⃗e y and ν 0 s ¼ Gγ. Next we assign to the two solenoids the rotation angles given in Eq. (61), i.e., ξ y ðS 1 Þ ¼ 1.5 mrad, ξ x ðS 1 Þ ¼ 6 mrad, and ξ y ðS 2 Þ ¼ 8 mrad, ξ x ðS 2 Þ ¼ 8 mrad.
Now COSY-INFINITY is used to generate a grid of 9 × 9 ¼ 81 spin tune jumps Δν s as function of the same χ 1 and χ 2 as those used to produce Map 2, and each of the generated spin tune jumps is associated to a statistical error of δΔν syst s ¼ 3.23 × 10 −9 [see Eq. (36)]. Fitting the so simulated spin-tune map by Eq. (71) yields the results summarized in Table VI.
First, the results show that the fits are of the expected good quality. Second, the so obtained K fit 1;2 have the same sign as the earlier estimates K sim 1;2 , given in Eq. (75). Third, the present K fit 1 and the earlier estimated K sim 1 are of the same magnitude, although we do not see obvious reasons why K fit 2 is about 3 times larger than the estimate for K sim 2 of Eq. (75). Fourth, within the error bars the fitted a Ã AE are consistent with zero, as expected for an ideal ring. This can be taken as additional evidence for the credibility of estimates based on simulations with COSY-INFINITY.
Finally, it should be noted that the pseudoexperimental data discussed in this section were generated assuming the true solenoids S 1;2 . Fits to these pseudodata assumed either a fixed cross talk parameter F ¼ 0, or treated F as a free parameter yield basically identical χ 2 =N dof . In the latter case, the resulting F differs from zero by a mere 1.7σ. In contrast to that, the experimental spin-tune map has been taken with the full-fledged magnet system of the 120 keV cooler, which we attempted to approximate by a simple solenoid S 2 . The results presented in Table V do clearly show that the cross talk parameter F is 10σ away from zero. The allowance for this cross-talk term F entails a substantial improvement of the fit quality of the measured spin-tune map from χ 2 =N dof ¼ 226.4=56 down to χ 2 =N dof ¼ 137.5=55. We also observe a simultaneous reduction of the magnitude of the fitted rescaling parameters K fit 1;2 . We interpret the above comparison as a significant hint that the magnet system of the 120 keV electron cooler, consisting of solenoids, toroids and steerers, is not yet properly implemented into COSY-INFINITY. The approximation that this magnetic system can be treated as a simple solenoid is most likely in part responsible for the discrepancy between the simulated and empirically-determined results for K 1;2 . Another part may stem from the fact that the simulations using COSY-INFINITY do not take into account either the finite emittance of a stored cooled beam (of about 1 to 2 μm [15]), or the nonvanishing momentum dispersion δp=p ≃ 10 −4 , or the stochastic heating process used for extraction, and the associated gradual removal of particles from the periphery of the beam in the target. Nevertheless, the comparison of simulated and empirically determined results provides an important insight into the significance of solenoid misalignment effects.
In the future, it will be possible to go beyond the present interim solution. Recently, it was shown that the troublesome electron cooler magnets, including the involved steerer magnets, can be switched off on flattop without beam loss.

V. INTERPRETATION OF THE RESULTS AND POSSIBLE APPLICATIONS OF THE SPIN TUNE MAPPING TECHNIQUE
The spin tune mapping determines the parameters a Ã AE [Eq. (71)]. The pitfalls of the makeshift two solenoid scheme contributes systematic uncertainties to the interpretation of those a Ã AE . To get rid of these uncertainties, it is imperative to have an alignment of solenoids S 1;2 as ideal as possible, such that they do not disturb the beam orbit.
According to the simulations based on COSY-INFINITY, it is of prime importance to eliminate the vertical steering effect of the solenoids, i.e., to keep the beam orbit a planar one. The parameters a Ã AE are projections of the stable spin axis ⃗c onto a plane spanned by the vectors ⃗n 1 and ⃗n 2 r . This plane is very close to the ring plane, and the stable spin axis points in a direction very close to the normal of this plane, i.e., along the direction of ½ ⃗n 1 × ⃗n 2 r . We estimate the accuracy to which the projections c x;z onto the ring plane can be controlled, using the approximation of Eq. (27), which entails ð ⃗c · ⃗n 1 Þ ≈ c z ; Solving the last equation for c x;z , we obtain where the δa Ã AE denote the uncertainties of a Ã AE , as listed in Table V. Our principal finding can be summarized by stating that the angular orientation of the stable spin axis with respect to the plane defined by its normal vector ½ ⃗n 1 × ⃗n 2 r can be determined to a statistical accuracy better than 1.7 μ rad.
A slight trouble with the two-solenoid scheme is that the exact orientation of the normal vector ½ ⃗n 1 × ⃗n 2 r cannot be determined to such a high precision, because besides the uncertainties of the solenoid axes, the vector ⃗n 2 r depends also on the imperfection content of ⃗m 1 , the spin rotation axis in arc A 1 . This is an intrinsic feature of the twosolenoid scheme used in the experiment based on the makeshift devices that were already available at COSY. In our derivation of the combined AI, we could equally have arranged for the transport of the spin rotation in solenoid S 2 over the arc A 2 [see Eq. (27)]. Consequently, the orientation of the stable spin axis can be controlled in both straight sections.
This complication could have been avoided, if we had arranged for the local AI supplementing a solenoid S 1 by a static Wien filter, generating a horizontal magnetic field, as discussed briefly in Appendix E.
The above shortcoming of the two-solenoid scheme does not present a major impediment to some of the future applications of the spin tune mapping technique. For instance, recall the driven rotations of the particle spins in a rf WF. Here, the attainable spin rotation angle is proportional to the spin coherence time τ SCT . The JEDI collaboration has already achieved very long spin coherence times τ SCT ≥ 1000 s [23]. Evidently, one can only take full advantage of the large spin coherence time, if the spin resonance condition f WF ¼ f s is maintained, and the experimentally observed walk of the spin tune is compensated for during times t ≃ τ SCT .
One possibility is to let the spin tune drift in the cycle and to adjust f WF accordingly to match the resonance condition. The other possibility is to keep f WF fixed in the cycle and to maintain the resonance condition f s ¼ f WF in the cycle by adjusting one solenoid field. This way, spin tune mapping becomes a tool to maintain the resonance condition. Both approaches demand for a continuous determination of the spin tune. The corresponding experimental technique has already been developed by the JEDI collaboration (see [20]). In order to measure the spin tune, one needs a horizontal polarization, and it would be appropriate to observe the buildup of a vertical polarization component in the beam as function of time starting with the particle spins precessing in the horizontal plane.
The second point is that by fine tuning the spin rotations in the two solenoids, one can bring the stable spin axis of the ring, including the solenoids themselves, to a desired direction with the above stated angular precision. An illustration of such a precision alignment of the stable spin axis is presented in Appendix F.

VI. SUMMARY AND OUTLOOK
We reported about the first ever attempt for the in situ determination of the spin stable axis of polarized particles in a storage ring. The experiment, carried out by the JEDI Collaboration in September 2014 at COSY, was motivated by the search for electric dipole moments (EDMs) of protons and deuterons using a storage ring [13,16]. On a purely statistical basis, a sensitivity to the proton and deuteron EDMs at the level of σjd p;d j < 10 −29 ecm looks feasible [43]. Such an upper bound on the CP-and time reversal invariance violating EDM would be 15 orders of magnitude smaller than the magnetic dipole moment, allowed by all symmetries. Correspondingly, one needs to eliminate spurious effects from the interactions of the MDM of particles with the magnetic fields in a storage ring. The issue becomes extremely acute for the methodical precursor experiments planned at the all-magnetic storage ring COSY, which, in a first step, will make use of a rf Wien filter. This calls for pushing the frontiers of precision spin dynamics at storage rings.
The principal aim of the present experiment was to explore the imperfection magnetic field content of the COSY ring. Our approach was to probe the integral effect of the imperfections acting in the ring plane using a modulation of the spin tune of the stored particles by tunable spin rotators inserted in the ring. The point is that the spin tune can be utilized as a high-precision diagnostics tool, as it can be measured to a precision of nine decimal places for 100 s cycles and still higher precision for longer measurement cycles.
In the present exploratory study, the drift (and compensation) solenoids of the two electron coolers installed in COSY have been used as two makeshift spin rotators. An encouraging point is that already these two AIs offer the possibility to fully control the angular orientation of the stable spin axis at two locations in the ring. Our principal conclusion is that the spin tune mapping emerges as a very useful tool to control the spin closed orbit with an accuracy, never achieved before. We uncovered several systematic effects which need further scrutiny, but these do not compromise the fundamentals of the spin tune mapping technique.
Specifically, we demonstrated that with the interim setup presently available at COSY, the orientation of the stable spin axis ⃗c can be determined to a statistical accuracy δc x;z ∼ 1.7 μ rad, and eventually to an even higher precision. There are reasons to anticipate a further reduction of χ 2 =N dof with custom-tailored solenoids. In the meantime, the results of Fit 2, given in Table V, suggest the scaling factor S ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi 137.5=55 p ∼ 1.6. Including this scaling factor, our final estimate for the accuracy of the angular orientation of the stable spin axis is δc x;z ¼ 2.8 μ rad or better.
In the future, it will be possible to substantially reduce the systematic effects by employing dedicated solenoids during the spin tune mapping measurements, while the electron cooler magnets and involved steerers are switched off. We mentioned also the use of double-helix magnets, which can simultaneously produce both a longitudinal and horizontal magnetic field. In the latter case, such a device must be complemented with a static electric field in order to operate it in the Wien filter mode. We anticipate that the spin tune mapping technique will prove most useful for the calibration of various devices to be employed in highprecision EDM searches at all magnetic and hybrid magnetic-electric storage rings.
An analysis of the data taken within a very limited scope of the exploratory beam time at COSY has identified certain systematic background effects to the EDM signal. The AIinduced distortions of the beam orbit emerge as the most unwanted one. This makes it imperative to orient the AI field in future investigations to ensure orbit-distortion-free operation, and to also upgrade the beam position monitors.
The initial motivation for the study was to identify the background from imperfection magnetic fields in view of the precursor experiment searching for the EDM using a rf Wien filter. As a spin-off, we identified that the orientation of the stable spin axis constitutes yet another static observable which is also sensitive to the EDM. As for COSY, a tentative accuracy for the deuteron EDM at is feasible. The static and rf WF approaches both suffer from the same systematic background from imperfection fields. As we have seen above, the spin rotation signal in the rf WF approach is suppressed by the weak spin kick in the WF. Nevertheless, the importance of the planned rf WF experiment stems from the point that it provides a testing ground for further perfection of the technique by measuring tiny spin rotations of the kind to be measured in the ultimate EDM experiments at future dedicated EDM storage rings.
Although COSY was never intended to be used as an EDM ring, our findings will serve as a plumb line for an upgrade of COSY and even the modest constraints on the proton and deuteron EDMs would be an indispensable step toward the development of dedicated high-precision EDM storage rings. The FT-BMT equation [given in Eqs. (4), (5)] constitutes a homogeneous and linear equation and the EDM resonance can only be a parametric one. The rf excitation of collective betatron oscillations of the beam is a no go for a precision experiment, because such collective effects produce unwanted and hard to control systematic errors with respect to the determination of the EDM signal. The Wien filter condition for vanishing Lorenz force, given in Eq. (12), makes the rf WF entirely EDM transparent. But it leaves a nonvanishing sum of the ⃗ B WF and the motional cross product ⃗ β × ⃗ E WF , described by Eq. (13). The Wien filter axis is denoted by the unit vector ⃗w, which points in the direction of ⃗ B WF . According to the FT-BMT equation, the rf WF generates a spin rotation of the MDM of a particle around ⃗w [19] with the spin transfer matrix, given by The corresponding spin rotation angle amounts to [see Eq. (13)] where L WF is the length of the rf WF, E WF is the electric field amplitude, and f WF is the rf frequency. In addition, an allowance is made in Eq. (A2) for the phase shift Δ WF with respect to the phase of the spin precession angle θ s ðnÞ ¼ 2πν s f R t ¼ 2πν s n, where n denotes the number of revolutions. Wherever appropriate, we work to the lowest order in a small parameter χ WF ≪ 1. In the ideal case, the Wien filter axis ⃗w ¼ ðw x ; w y ; w z Þ ¼ ð0; 1; 0Þ points along the vertical direction. The evolution of the spinor wave function ψ of the stored particle per turn is described by the one turn map where T is the spin transfer matrix of the ring including the AIs, if they are switched on [see Eq. (19)]. We factor out the rapid precession of the spin around the ⃗c-axis. 4 In the conventional interaction representation ψðnÞ ¼ T n ηðnÞ, where ηðnÞ describes the envelope over the rapid oscillations of the spin, ηð0Þ ¼ ψð0Þ. The evolution equation for ηðnÞ is given by where ⃗ UðnÞ ¼ 2 sin 1 2 χ WF ðnÞ × fcos θ s ðnÞ½ ⃗w − ð ⃗c · ⃗wÞ ⃗c − sin θ s ðnÞ½ ⃗c × ⃗w þ ð ⃗c · ⃗wÞ ⃗cg ðA5Þ is the instantaneous spin rotation axis in the rotating frame.
Here the three vectors, ⃗c; form an orthonormal set. Schematically, the interplay of the above introduced vectors is shown in Fig. 11. Equation (A4) has the formal solution where T n denotes n ordering. In the resonance regime of where the integer K is the harmonic number, the large-n behavior of ηðnÞ is evaluated using the Bogolyubov-Krylov-Mitropolsky averaging method [44]. It amounts to keeping in the sum P n k¼1 ⃗σ · ⃗ UðkÞ only the linearly rising terms and neglecting the terms which oscillate with constant amplitude. The result is where the resonance strength ϵ is given by Eq. (14), and denotes the stable spin axis in the rotating frame. Its orientation depends on how the stable spin axis ⃗c and WF axis ⃗w are tilted. The envelope ⃗ S env ðnÞ is given by where ⃗ Sð0Þ is the initial polarization vector. The spin resonance strength ϵ, given by Eq. (14), is the product of the MDM spin rotation amplitude in the rf WF (χ WF ) and the sine of the angle ξ cw between the stable spin axis ⃗c and the rf WF axis ⃗w. It should be noted that ϵ is independent of the phase shift Δ WF . The generic solution for the spin evolution as function of time, however, depends on Δ WF , and we shall comment on that below.

Off-resonance case
The off-resonance case is of practical interest when the rf frequency of the WF f WF does not exactly follow the spinprecession frequency f s [Eq. (33)], for instance, because of the spin tune walk in runs with long spin coherence time. We parametrize the fractional mismatch of the two frequencies via It is convenient to reabsorb the mismatch effect into the spin transfer matrix of the rf WF, Repeating the analysis described in Appendix A 1, one finds still a solution of the form of Eq. (A9) with the spin rotation axis in the rotating frame equal to The angle ρ u provides a convenient parameterization for the frequency mismatch, FIG. 11. Sketch of the relative alignment of the spin closed orbit vector ⃗c, the rf field vector ⃗w, ⃗ k ∝ ð ⃗c × ⃗wÞ and ⃗m ∝ ð ⃗ k × ⃗cÞ, upstream of the rf Wien filter.
The corresponding resonance strength is given by The generic solution for the evolution of the envelope of the rapid oscillations of the polarization vector ⃗ SðnÞ is still given by Eq. (A11). The explicit dependence on the turn number n (hereafter we suppress the arguments of ϵ) reads where Sð0ÞÞ 2 1=2 ; and The projection of the envelope ⃗ S env ðnÞ onto the spin precession axis ⃗u is conserved, ⃗u · ⃗ S env ðnÞ ¼ ⃗u · ⃗ Sð0Þ. The precessing component of the spin envelope rotates in the plane defined by the two unit vectors ⃗n a and n b . The orientation of this plane depends on the tilt of the axes ⃗c and ⃗w, the relative phase Δ WF between the rf field and the spin rotation, and the initial orientation of the polarization ⃗ Sð0Þ. This result generalizes the considerations given in [25] (see also the more recent analysis in [45]). Below we illustrate the salient features of this solution for the offresonance case by two typical examples.
a. Evolution of polarization starting with initial spin along the stable spin axis of the ring When initially the spins are oriented along the (approximately vertical) stable spin axis ⃗c, i.e., ⃗ Sðn ¼ 0Þ ¼ ⃗c, the solution for the envelope is described by Whether ⃗ SðnÞ would cross the ring plane from the initial upper hemisphere into the lower one or not, depends on the angle ρ u . (i) If jρ u j < π=4, the up-down oscillation amplitude exceeds the offset value and the polarization will flip the sign. (ii) If cos 2 ρ u < sin 2 ρ u , the vertical component of the polarization does not flip the sign. (iii) Far away from the resonance, i.e., if cos 2 ρ u ≪ sin 2 ρ u , the axis of the driven spin motion approaches ⃗c and the driven motion reduces to weak nutations. (iv) The offset components appear also in the horizontal projections of the polarization.
b. Evolution of polarization starting with initial spin perpendicular to the stable spin axis of the ring Here one starts with the spin in the plane spanning the vectors ⃗ k and ⃗m. The prime signal of the rf-driven spin rotations is the buildup of a (vertical) polarization along the stable spin axis ⃗c of the ring [see Eqs. (7), (17))]. For instance, for ⃗ Sð0Þ ¼ ⃗ k [given by Eq. (A6)], the evolution of the spin envelope is described by ⃗ S env ðnÞ ¼ ⃗cf− cos ρ u sin ρ u cos Δ WF þ sin ρ u cos ρ u cos Δ WF cosðϵnÞ þ cos ρ u sin Δ WF sinðϵnÞg þ ⃗ kfcos 2 ρ u cos 2 Δ WF þ ðcos 2 ρ u cos 2 Δ WF þ sin 2 ρ u Þ cosðϵnÞ þ cos ρ u sin Δ WF sinðϵnÞg þ ⃗mfcos 2 ρ u sin Δ WF cos Δ WF − cos 2 ρ u sin Δ WF cos Δ WF cosðϵnÞ þ sin ρ u sinðϵnÞg: The vertical polarization buildup is sensitive to the phase Δ WF . It is suppressed by a factor cos ρ u , while its polarization offset is suppressed by a further factor sin ρ u . The offset of the polarization oscillations is manifest in the horizontal projections as well.
c. Spin motion frequency spectrum and utility of the phase of the rf Wien Filter In the experiment, one determines the up-down and leftright asymmetries in the scattering of beam particles extracted onto the carbon target [20]. The time dependence of these asymmetries is generated by the interplay of the rf driven rotation of the envelope of the polarization with the resonance strength ϵ and the rf driven motion with the frequency f WF (the spin tune ν s for the idle spin precession enters via the offresonance parameter δ WF Þ. It is described by the equation ψðnÞ ¼ TðnÞψð0Þ; For the sake of completeness, we present here the generic evolution law omitting the derivation, ⃗ SðnÞ ¼ ⃗cð ⃗ Sð0Þ · ⃗uÞð ⃗c · ⃗uÞ þ ⃗cf½ð ⃗ Sð0Þ · ⃗cÞ − ð ⃗ Sð0Þ · ⃗uÞð ⃗c · ⃗uÞ cos ðϵnÞ þ ⃗cð ⃗ Sð0Þ · ½ ⃗u × ⃗cÞ sin ðϵnÞg þ ð ⃗ Sð0Þ · ⃗uÞ where the unit vector ⃗ d⊥ ⃗c is given by and the phases ρ AE are defined by The comprehensive analysis of this evolution law goes way beyond the scope of this publication, and we mention here only its salient features: (i) Besides the obvious frequencies ν WF f R and ϵf R =2π, the full frequency spectrum of the spin motion includes the side bands f AE ¼ ðν WF AE ϵ=2πÞf R . (ii) In the presence of imperfection fields and in the off-resonance regime, the stable spin axis ⃗c is tilted with respect to the up-down and left-right segmentation of the detector elements of the polarimeter [21,22]. Consequently, the Fourier spectrum of the updown oscillations shall contain, besides the frequency ϵf R =2π, also the frequencies ν WF f R and f AE . (iii) All Fourier amplitudes shall exhibit a nontrivial dependence on the phase shift Δ WF , which enters implicitly via the axis ⃗u. This dependence can be utilized as a cross check of the rf WF operation.

APPENDIX B: SPIN TRANSFER MATRIX IN AN IMPERFECTION-LOADED RING
Spin-wise the MDM interaction with the imperfection magnetic fields mimics the EDM interaction with the motional electric field in the FT-BMT equation, given in Eqs. (4), (5)). The equation for the spinor wave function of the stored particle ΨðθÞ is where F x;z ∝ B x;z =B y ≪ 1, and the EDM interaction with the motional ⃗ E-field enters under the umbrella of F x . We proceed to the customary interaction representation in which Here t R ðθÞ is the spin transfer matrix without ring imperfections, and uðθÞ satisfies the equation where ⃗aðθÞ ¼ ½F x ðθÞ cos ðGγθÞ − F z sin ðGγθÞ ⃗e x þ ½F z ðθÞ cos ðGγθÞ þ F x sin ðGγθÞ ⃗e z ðB4Þ is the imperfection field in the reference frame which rotates with the ideal spin tune frequency Gγf R . A formal solution of Eq. (B3) is uðθÞ ¼ t imp R ðθÞΨð0Þ, where t imp R ðθÞ is given by the θ-ordered exponential To the second order in the imperfection fields, the spin transfer matrix per turn is given by This entails E ≃ 1 and completes the derivation of Eq. (21). The omitted terms are of the fourth order, an example is ∼c 2 j χ 2 i .

APPENDIX D: ERROR ANALYSIS OF SPIN TUNE JUMPS
Each time interval ΔT i (i ¼ 1, 2, 3) is analyzed using first a first guess of the spin tune q s i . Subsequently, keeping this input q s i fixed, we allow for the additional timedependent variation of the phase of the spin precession, which is monitored as function of turn number n, For each macroscopic time interval representing about Δn ¼ 10 6 turns ≈ 1.3 s, one phase value φ s i ðnÞ is determined based on the available statistics corresponding to ≈5000 events. The time walk of the spin tune in each interval i is then given by Following the findings described in [20], an allowance is made for a linear drift of the spin tune, i.e., a parabolic fit of the phase is performed using φ s i ðnÞ ¼ 2πa i þ 2πN i b i xðnÞ þ πN i c i xðnÞ 2 − 1 3 ; ν s i ðnÞ ¼ q s i þ b i þ c i xðnÞ: Here xðnÞ ¼ ðn − n 0 i Þ=N i , and 2N i represents the number of particle turns in each of the time intervals ΔT i , and n 0 i refers to the midpoint of each interval, so that −1 < x < 1.
Such an expansion in the basis of orthogonal functions ensures a minimal correlation between the expansion parameters b i and c i . In the absence of such correlations, the standard deviations of the fitted parameters in each time interval i ¼ 1, 2, 3 are expected to satisfy which is perfectly confirmed by the ratio of fitted results, listed in Table VII, σ a ∶σ b ∶σ c ¼ 1∶ð1.737 AE 0.016Þ∶ð6.748 AE 0.079Þ: ðD5Þ Figure 12 shows the measured dependence of the phase φ s i as function of turn number n during one particular cycle for the three time intervals ΔT i . The chosen example is one of the few cases, where c 2 differs from 0 in the time interval ΔT 2 .
For a total of 359 cycles considered in the analysis, the calculated ratio of c 2 =σ c 2 ¼ 0.85 AE 2.00 indicates that the quadratic term is small and that its consideration in the data analysis is statistically not justified (see Fig. 13). For the solenoid-off time intervals ΔT 1 and ΔT 3 , the ratios c 1 =σ c 1 and c 2 =σ c 2 are found to be entirely negligible (see Table VII). VII. Uncertainties of the fitted linear phase-parameters σ b i =σ a i , σ c i =σ a i , b i , and c i =σ c i for the three time intervals ΔT i , averaged over all 359 cycles. The corresponding distribution for c 2 =σ c 2 is shown in Fig. 13, the distributions of σ b i are shown in Fig. 14  The magnitude of the spin tune jump Δν s is thus determined from where the quadratic phase parameters c i have been neglected because of their statistical insignificance. An example is shown in Fig. 12 (bottom panel). The spin tune jump Δν s is computed from the average of the two spin tune jumps Δν s 1 and Δν s 2 , In Fig. 14, the distributions of σ b i for the three time intervals are shown for all 359 cycles. The fitted parameters of the baseline spin tune in each of the three time intervals are given in Table VII. Using all 359 cycles, the parameters b i are determined with a statistical uncertainty in the range 4 × 10 −10 − 8 × 10 −10 .
Since the q s i in Eq. (D7) carry no uncertainty, using the σ b i given in Table VII, the statistical error of Δν s is given by Thus, the spin tune jumps for runs consisting of 6 cycles can be determined to a statistical precision of δΔν stat s ¼ 7.0 × 10 −10 .
In order to estimate the systematic error of the spin tune jumps, the distribution of the difference between the baseline spin tunes ν s 1 − ν s 3 in the time intervals ΔT 1 and ΔT 3 is used (see Fig. 15). The width of this distribution is used as an estimate of the systematic error of the spin tune jumps, yielding δΔν syst s ¼ 3.23 × 10 −9 .

APPENDIX E: STATIC WIEN FILTER OPTION FOR LOCAL ARTIFICIAL IMPERFECTION
Here we briefly mention the static Wien filter as an option for a local AI which generates simultaneously horizontal and longitudinal magnetic fields. This can be FIG. 13. Statistical distribution of c 2 =σ c 2 , the ratio of the quadratic parameter c 2 to its error, for the second time interval ΔT 2 for all 359 cycles, which yields c 2 =σ c 2 ¼ 0.8 AE 2.0. achieved by using a double helix solenoid [46] which can readily be fit into the ring. The Lorentz force from the horizontal magnetic field must be compensated for by a corresponding vertical electric field.
The results of the present study call for a longitudinal magnetic field integrals up to R B z dz ¼ 10-15 T mm. For a 0.5 m long solenoid with B x ¼ 0.03 T, this calls for a corresponding electric field E y ¼ βB x ¼ β · 10 MVm. Such strong electric fields will be a challenge but are still in the admissible ballpark.
The demand on the electric field can be relaxed, though, if such a static Wien filter with a double helix solenoid could be just a supplement for fine tuning the two main solenoids. Hopefully, the intrinsic imperfections of the COSY ring can be further reduced after the precision geodetic survey of the ring magnetic elements has been completed, and the magnetic elements have been aligned more precisely.

APPENDIX F: ARTIFICIAL IMPERFECTIONS AS A TOOL TO ALIGN THE STABLE SPIN AXIS
We demonstrate the possibility to align the stable spin axis by an artificial imperfection, using a model defined by Eqs. (17) and (18). Let the axis of the AI point along ⃗ k in the xz plane. We decompose the stable spin axis of the ring without artificial imperfections into components along the vertical direction c y ⃗e y and the in-plane component ⃗c ∥ ¼ c x ⃗e x þ c z ⃗e z . With AI switched on, we would like to align the stable spin axis of the ring along the vertical direction ⃗e y .
Let ⃗c ∥ be determined by spin tune mapping. We demand that the total spin rotation matrix T of the ring with the AI switched ON [see Eq. (19)] yields a vanishing in-plane component of the stable spin axis, thus ⃗c T ¼ sin 1 2 χ AI ½cos ðπν 0 s Þ ⃗ k þ c y sin ðπν 0 s Þð ⃗e y × ⃗ kÞ þ sin ðπν 0 s Þ cos 1 2 χ AI ⃗c ∥ ¼ 0: One can readily solve this equation for χ AI and the orientation of the AI axis ⃗ k. Upon some algebra we find A denotes the rotation matrix of unit determinant, The AI axis ⃗ k must point counter to the imperfection vector ⃗c ∥ rotated by an angle θ p such that tan θ p ¼ c y tan ðπν s Þ: ðF4Þ In the approximation of ⃗c ¼ ⃗e y , this corresponds to a rotation by an angle θ p ¼ πν s . The AI must be run at a spin kick angle