This thesis introduce my work on transverse and longitudinal non linear dynamics of an electron beam in ThomX, a novel X-ray source based on Compton backscattering.

In this work I implemented in simulation code theoretical models to calculate transverse and longitudinal non linear dynamics under Compton back scattering. The processes studied include collective effect such as longitudinal space charge, resistive wall and coherent synchrotron radiation, intra beam scattering. I also implemented a longitudinal feedback algorithm and studied the effect of the feedback's delay in the simulation to explore its effects on beam dynamics. This code allows to perform a full 6D simulation of the beam dynamics in a ring under Compton back scattering taking into account the feedback stabilisation for the 400 000 turns (∼ 20 ms) of one injection cycle. One important feature is that this simulation code can be run on a computer farm.

Using this code I investigated the electrons dynamics in ThomX and the flux of scattered Compton photons. I analysed the relative contribution of each physical phenomena to the overall beam dynamics and how to mitigate their disruptive effect.

As part of my work on longitudinal phase feedback I also measured and analysed properties of the ELETTRA RF cavity to be used on ThomX.

Résumé

Ce document présente mon travail sur la dynamique transverse et longitudinale non linéaire d'un faisceau d'électrons dans ThomX, une nouvelle source de rayons X basée sur la rétrodiffusion Compton.

Au cours de ce travail j'ai développé un code de simulation contenant les modéles théoriques pour calculer la dynamique non linéaire transverse et longitudinale sous l'influence de retrodiffusion Compton. Les processus étudiés incluent les effets collectifs tels que la force de charge d'espace longitudinale, les effets de la résistivité des parois, le rayonnement synchrotron cohérent et la diffusion interne au faisceau. J'ai aussi simulé un algorithme de boucle de rétroaction longitudinale et étudié l'effet de la latence de la boucle dans les simulations pour comprendre son effet sur la dynamique du faisceau.

Ce code permet d'effectuer une simulation compléte en 6 dimensions de la dynamique d'un faisceau dans un anneau sous l'effet de retrodiffusion Compton en prenant en compte la stabilisation par boucle de rétroaction pour les 400 000 tours (20ms) d'un cycle d'injection. L'une des fonctionnalités importantes de ce code est qu'il peut-être exécuté sur une ferme d'ordinateurs. En utilisant ce code j'ai étudié la dynamique des électrons dans ThomX et le flux de photons Compton diffusés. J'ai analysé la contribution relative de chaque phénomène physique à la dynamique globale du faisceau et comment minimiser leurs effets disruptifs.

Dans le cadre de mon travail sur la boucle de rétroaction sur la phase longitudinale j'ai aussi mesuré et analysé les propriétés de la cavité RF ELETTRA à utiliser sur ThomX.

Introduction

Recent progress in the field of lasers and electrons acceleration technology has opened the possibility to create a monochromatic high energy and hight intensity source of γ-rays and X-rays based on the Compton Back Scattering (CBS) of laser photons on relativistic electrons.

The idea of generation of high energy photons based on Compton backscattering was proposed in 1951-52 by H. Motz [START_REF] Motz | Applications of the radiation from fast electron beams[END_REF] and K. Landecker [START_REF] Landecker | Possibility of frequency multiplication and wave amplification by means of some relativistic effects[END_REF]. Later the method of Compton back scattering was developed by R. H. Milburn [START_REF] Milburn | Electron scattering by an intense polarized photon field[END_REF]. But the availability of intense photon source technique in that time was very low and due to the small cross-section of Compton back scattering (σ c ∼ 6.6 * 10 -29 m 2 ) it was not possible to use this method for practical applications.

In the last 10 years the progress in laser and acceleration techniques have given us the possibility of producing X-ray based on laser Compton back-scattering with relativistic electrons and receive an output flux rate of 10 12 -10 13 photons/sec, an angular divergence of few mrad, with an energy of scattered photons of a few tens of keV . The rather low initial energy of the electrons in the range of 30 -200 M eV , much lower than that of synchrotron sources, give the possibility to build a compact storage ring. For example for the ThomX machine which is being designed for an electron energy of 50 M eV , will have a circumference of 16 m and a footprint of an 70 m 2 . This gives the possibility to install X-ray light sources based on Compton back-scattering such as ThomX in hospitals and universities or industry factores directly.

Applications of hight energy X-rays

The main characteristics of X-ray sources based on Compton back-scattering such as compactness, small cost and the parameters of the beams generated such as energy bandwidth, luminosity and monochromaticity make it comparable with modern synchrotron sources and make them attractive for a wide spectrum of application such as:

• Medical applications and X-ray microscopy, scanning X-ray microscopy of biological samples. Angiography.

• X-Ray topography and diffraction, the study of phase transitions, express the topography of semiconductor crystals;

• Study of environment (analysis of pollutant and etc.);

• Cultural heritage (Non destructive analysis of painting and other arts objects)

In the following pages we will look more at some of these applications.

Radiography (X-ray) -Non-Destructive Testing X-ray based radiography is a method of non-destructive testing of materials and products in order to detect defects.

The penetrating capability is determined by the energy of the X-ray photons. For this reason the thick objects and objects made of heavy metals such as gold and uranium require higher energy X-ray sources for their investigations, but for thin objects it is enough to use a source with medium energy of X-ray photons.

X-ray absorption in material depends on the thickness d of the absorber and the coefficient of absorption µ and is determined by I = I 0 exp -µd , were I-is the intensity of the radiation coming through absorber, I 0 is the intensity of the initial radiation. X-ray radiation is widely used in all industries related to metal forming. It is also used to control aircraft, food, plastics, and to test complex devices and systems in electronics.

X-ray based radiography is used to find deep cracks and bubbles inclusions in cast and welded steel products up to 80 mm thick and in products made of light alloys up to 250 mm thick. Industrial X-ray units with a radiant energy of 5 -400 keV ; have been created for this purpose [START_REF]The Great Soviet Encyclopedia[END_REF] (for comparison ThomX can produce X-ray with energy above 45 keV ).

Another interesting application of non destructive X-ray method is to study painting canvases in order to establish their authenticity or to locate additional layers over under the top layer of a masterpiece [START_REF] Dik | Visualization of a lost painting by vincent van gogh using synchrotron radiation based x-ray fluorescence elemental mapping[END_REF].

X-ray spectral analysis and X-ray fluorescence analysis

The X-ray spectral analysis (XSA) was invented by English physicist G. Moseley who noted that Cu lines are stronger than Zn lines in brass spectrum in 1913 [START_REF] Moseley | The high frequency spectra of the elements[END_REF]. In the laboratory of the geochemisist V. M. Goldsmith the first X-ray spectroscopist A. Hadding determined the chemical composition of several minerals. With X-rays two chemical elements unknown before but predicted by D.I. Mendeleev were discovered: in 1923 D. Hevesy and D. Koster found the 72-th element (Hf) and in 1925 the couple Nodduck discovered the 75-th element (Re) of the periodic table. The next step in XSA development was the use of secondary (fluorescent) characterizing radiation by R. Glokker and H. Shriber in year 1928. It marked the invention of a new kind of XSA the X-ray fluorescent analysis (XFA). It turned out that the realization of the new method is easier and increases the limit of detection by up to 1 -2 orders of magnitude better than in XSA, on the primary spectrum. The full description of fundamental bases of XSA can be found in the many works including monographs that were published in the last few years [START_REF] Revenko | X-ray spectral fluorescence analysis of natural materials[END_REF][START_REF] Verhovodov | X-ray analysis. differential account of physical processes[END_REF].

One applications among other of the XFA method is the investigation of different ores and mineral compounds. The method is based on the capability of atoms to emit characteristic radiation under the action of exiting X-rays. The frequency of the X-rays is adjusted with atomic number of the elements presented in the illuminated compound. The fluorescent spectrum includes information about the elements in the compound of the illuminated object and the intensity of the spectrum lines about the relative concentration of these elements. In this way the concentration of elements can be recorded at the level of 10 -8 . The polarization of the radiation exiting with Compton Scattering reduces the background radiation by 10 -100 times in comparison with X-ray tube radiation [START_REF] Revenko | X-ray spectral fluorescence analysis of natural materials[END_REF].

Among objects that can be investigated there are:

• Atmospheric aerosols;

• Ground precipitation and water suspension;

• Algae, plankton;

• Insects, water suspensions of rivers, lakes and seas;

• Mountain rocks, F e -M n concretions and ground precipitation;

• Organs, tissues, blood, blood plasma.

One of the possible method to improve the characteristics of X-ray fluorescence analysis is using of the full outside reflection of the beam generated by X-ray radiation. This is because the initial radiation is directed under a very small angle (0.03 • -0.08 • ) or injected inside capillaries (capillary optics), or on the sample, prepared as a thin film on a reflecting plate object (X-ray fluorescence analysis with total external reflection, TXRF). It can be explained by the fact that in the X-ray radiation region the index of refraction is equal practically to one though a little bit less because vacuum is the densest media for Xrays [START_REF] Blokhin | The physics of X-rays[END_REF]. The reflected radiation intensity with angle close to critical is practically equal to the intensity of the initial exiting beam. There are very tough requirements on the quality of capillary wall surface or reflector: roughness it has to be less than 1 µm, and the divergence out of the plane surface not bigger than 0.1 -0.05 λ, where λ is the wavelength of the X-ray. Quartz glass is used as a material for the reflector. In such way the sensitivity increase is especially effective under monochromatic initial radiation, in particular using radiation produced with a generator based on Compton scattering. Table 1.1: Elements determined with XFA in biological materials

Material

Elements detected Plants O,Na,Mg,Al,Si,P,S,Cl,K,Ca,Ti,V,Cr,Mn,Fe,Ni,Cu, Zn,Ge, As, Br, Rb, Sr, Zr, Nb, Mo, Ag, Cd, Ba, Hg, Pb, Bi, U Hear S, K, Ca, Ti, Cr, Mn, Fe, Ni, Cu, Zn, Se, Br, Sr, Pb, Hg Bones Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, Fe, Co, Ni, Cu, Zn, Br, Rb, Sr, Zr, Nb, Sn, Pb, U Liver, kidneys and other K, Ca, Ti, V, Mn, Fe, Ni, Cu, Zn, Br, Rb, Sr, Zr Blood, plasma and serum P, K, Ca, Cr, Mn, Fe, Ni, Cu, Zn, As, Br, Rb, Sr, Ba, Pb

X-ray diffraction analysis

Diffraction of the X-ray radiation gives important information about solid substances, namely about the atomic structure and the shape of crystals, and about fluids, amorphous substance and big molecules. The diffraction method is applied for an accurate determination of interatomic distances, tension and defects, for the determination of single crystals orientation. Using a diffraction image one can identify the presence of unknown materials and determine the nature of this material. It is difficult to overestimate the importance of the diffraction testing method for progress in modern physics because in the long run modern understanding of the matter properties is based on data about the position of atoms in different chemical compounds, the types of atoms connections and the damages of the atomic structure. The main tool to get this information is diffraction Xray analysis. X-ray diffraction crystallography is extremely important for determination of big molecule structures such as molecules of ribonucleic acid acid (RNA) containing the genetic code of living organisms.

Methods of diffraction analysis

Laue Method

In the Laue method a continuous ("white") spectrum of X-rays is directed on a fixed crystal. For specific values of period d the whole spectrum wavelength satisfying Bragg law is chosen automatically. So, the Lauegramms obtained in such way can be used to estimate the directions of diffracted rays and, hence, the orientation of crystals planes, crystals symmetry and to conclude important deduction about the presence of imperfections in the crystal, the white dots corespond to diffracted X-rays. In figure 1.1 an example of Lauegramm [START_REF] Blokhin | The physics of X-rays[END_REF] is presented. X-ray film was installed on the opposite side of the initial X-ray beam.

Figure 1.1: Lauegramm. X-rays with wide spectrum distribution pass through a fixed crystal. X-ray diffracted beams on the Lauergramm correspond to the spots. [START_REF] Blokhin | The physics of X-rays[END_REF] Debye-Scherrer method.

In the Debye-Scherrer method monochromatic X-ray radiation is used at fixed wavelength (λ), but the angle of incidence θ is varied. This allows to use objects made of many small crystals with random space orientation such as powder. Diffracted beams form cones with axes along the initial X-ray beam. The angle between the beam axis and the ring is called the scattering angle (θ). According to Bragg's law, each ring corre-sponds to a particular reciprocal lattice vector G in the sample crystal. This leads to the definition of the scattering vector as: G = 4π λ sin(1/2θ). Debyegramm obtained in such way is shown in figure 1.2 contains accurate information about space period d, i.e. about structure of the crystal [START_REF] Blokhin | The physics of X-rays[END_REF] As the informations obtained from Debyegramm and Lauegramm are different, the two method complement each other. Each line is caused by diffraction of initial X-ray radiation on one separate plane of atoms [START_REF] Blokhin | The physics of X-rays[END_REF].

Two beams differential angiography

Diseases of the human cardiovascular system are the most wide spread among the population of industrial countries. This leads to high rate of disablement and as a result to a top position among reasons of human death. Early diagnostic of these diseases is very important for choice of medical treatment strategy and forecast of patient life. In diagnostics the preferences are taken to the safest and the most accurate methods of testing. Obtaining high-quality images of human organs and blood vessels is extremely important in diagnostic and treatment of different diseases. During the last decades many physical methods of visualization such as X-rays, ultrasonic, radioisotopes, impedance and others were developed. Development of the visualization methods required joint efforts of physicists, chemists, engineers and physicians. Some other methods are less harmful for humans than X-rays (NMR, ultrasonic), but at the moment no single method can substitute to X-ray diagnostic completely [START_REF] Ando | Medical Applications of Synchrotron Radiation[END_REF].

Radiological investigations of arteries and veins after injection of contrast substance (angiography) is used for the diagnostic of heart disease and imperfections of cardiovascular system of human being. Angiography allows to find inflammatory, tumor and parasitical affections of human organs and assists to choose the most rational method of disease treatment. Angiography studies the functional state of vessels and blood current. The methods of image production with the help of X-rays have been under development since the X-ray discovery in 1895 by Wilhelm Roentgen.

The physical processes of radiation interaction with substance are the foundation of any method of medical image visualization. It has to be noted that the object investigated has to be semitransparent to radiation. Therefore, in case of full absorption of radiation and total absence of interaction it is impossible to get any image of an object. X-ray photon interacting with the electron shell of atoms of the substance investigated can eject electrons from the shell (photoelectric effect) or be scattered on the electrons of the target atoms by Compton effect. For quantitative description the statistical characteristics of these processes the value of cross section of the interaction is used. The cross sections of the statistical processes determines the probability of absorption or transmission of a photon through the substance. The values of the cross sections depends on the electron density of the substance, i.e. on atomic number Z and on the photon energy. With higher X-ray (photon) energy the cross sections of both processes are decreased exponentially as shown in figure 1.3 [START_REF] Suortti | Medical applications of synchrotron radiation[END_REF].

The Compton scattering cross section decreases smoothly as a function of energy character of decreasing while the line of the photoelectric effect cross section has sharp jumps due to threshold character of electron ejected out of the atomic shell. A photon with energy E γ less than binding energy in an atom E b can not eject the electron out of its orbit.

For an X-ray photon with an energy E γ > E b the value of the probability to eject an electron is increased by step function. In general X-ray diagnostic systems the dependence of interaction cross section on the atomic number of the object investigated Z is used. The base for two beams X-ray angiography is the dependence of the interaction cross section on the X-ray photon energy. In the photon energy range we are interested in (1-100keV ) the photoelectric effect is the dominating process of the X-ray radiation interaction with a substance. Under photoelectric effect an initial photon is absorbed transferring its energy to an electron of an atom and eject it out of the atomic shell. The energy of the emitted electron is equal to energy of the absorbed photon minus the binding energy of the electron in the shell of the atom. The absorption function of the radiation due to the cross section of the process has a decreasing exponential character with sharp jumps at photon energy values which correspond to binding energies of the electron shells. Today iodine compounds are the most widespread X-ray contrast substance used in medical diagnostic systems. For iodine the rate of the jump in cross section of photon absorption at K-edge of absorption is equal to 8. This means that in an iodine substance a photon with energy, for example, 33.1 keV will be absorbed with a probability 8 times less than a photon with energy 33.2 keV . The tissue and bones of a human body are equally translucent for X-ray photons of these energies, i.e. the probability of photon absorption is the same for both items. If one can get the first image for flux of photons with energy 33.1 keV (monochromatic X-ray beam) and the second image for flux of photons with energy 33.2 keV the image of the radiation absorption with bones and other tissues will be the same for both cases while absorption with X-ray contrast substance will be quite different. So, fixing the images in digital data and then subtracting one from another one can separate the image of vessels with contrast substance. Hence, for two beams X-ray angiography method realization one has to have two monochromatic, collimated X-ray beams, scanning systems, two registration systems for transmitted X-ray beams registration with high positioning accuracy and software of processing and visualization of the images produced.

The development of a project of coronary angiography of humans has been initiated in Stanford Linear Accelerator Center (SLAC) as early as 1979 [START_REF] Rubenstein | Synchrotron radiation and its application to digital subtraction angiography[END_REF], [START_REF] Thomlinson | Medical applications of synchrotron radiation[END_REF]. Today angiography using synchrotron radiation has become the general method of investigation and diagnostic Figure 1.3: Absorption coefficients of iodine, bone and soft tissue. [START_REF] Suortti | Medical applications of synchrotron radiation[END_REF] of ischemia in industrialised countries. The further development of the method makes it useful not only for the diagnostic of coronary vessels in initial stage of myocardium infarct but also for general estimation of the state of cardiovascular system of an individual. In the USA more then one million angiogrames are produced every year and this number is growing. The method is becoming more common in Europe and Japan too.

In figure 1.4 the layout of angiogram production at a synchrotron radiation source is presented [START_REF] Arfelli | Synchrotron light and imaging systems for medical radiology[END_REF].

For the procedure described above the following photon beam parameters are required: With these requirements the method allows to get an image of the cardiovascular system with a resolution of about 0.5 × 0.5 mm 2 .

From the requirements of angiographic devices presented above it follows that for successful realization of the method on the base of Compton scattering X-ray generator the following tasks have to be done:

1. Production of photon beam with energy E 0 = 33.156 ± 0.15 keV with intensity of about 10 11 -10 12 phot/(mm 2 × s).

2. Development of a monochromator and optical system to transport photon beam (beam line) satisfying the above requirements.

3. Development of the whole beam line for coronary angiography including problems with installation and alignment of optical elements of the beam line.

4. Development of a detection system for the photon beam.

5. Development of a control system of the beam line.

6. Development of software.

Two beams X-ray angiography is a highly efficient, safe, profitable method of beam diagnostics. The conditions of angiography realization are development and construction of modern sources of X-ray radiation (synchrotron radiation sources, X-ray generators based on Compton Scattering); development of flat digital detector of X-rays allows to produce X-ray images in digital form with high speed of data collection and very low radiation dose.

Compton back scattering

Compton back scattering is the collision of a photon with a relativistic electron. We define the photon's energy as ε 0 , the electron energy as E 0 , the rest energy of the electron as mc 2 and γ = E 0 /mc 2 and we assume E 0 ≫ ε 0 . The photons will be scattered in a cone with an opening angle of ∼ 1/γ around the direction of motion of the electrons. The kinematic of the scattering process is presented in figure 1.5. We will consider the case of linear Compton back scattering. We neglect the probability of simultaneous collision of one electron with two and more photons. We will use the model presented in [START_REF] Ginzburg | Colliding ge and gg beams based on the single-pass e + ecolliders (VLEPP type)[END_REF] . Energy of scattered photon ε γ is dependent on the angle θ γ as:

ε γ = ε γm 1 + θγ θ 0 2 (1.1)
where ε γm is the maximum scattered photon energy,

θ 0 = mc 2 E 0 √ x + 1, with x = 4Eε γ0 (mc 2 ) 2 cos 2 α 0 2 (1.2)
ε γ0 is the energy of the laser photon. Photons with energy ε γ > ε γm are scattered angle θ γ > θ 0 , and photons with energy ε γ < ε γm are scattered photons θ γ < θ 0 . Now rewrite θ γ from (1.1):

θ γ = θ 0 ε γm ε γ -1 (1.3)
Introducing a new parameter normalized phonon energy on electron energy

y = ε γ E 0 ≤ y m = ε γm E 0 = x (x + 1) (1.4)
we can write the scattered photon angle as function of it's energy in the following form:

θ γ (y) = θ 0 y m y -1 (1.5)
Then scattering electron angle is:

θ e (y) = θ γ y 1 -y (1.6)
Now expand expression for maximum energy of scattered photons and replacing γ = E 0 mc 2

ε γm = 4γ 2 ε γ0 cos 2 α 0 2 4γ ε γ0 mc 2 cos 2 α 0 2 + 1 (1.7)
Then in case of a small interaction angle between the photon and the electron beams α 0 ≪ 1 and with the condition 4γ 2 ≪ E 0 ε γ0 , it means that the energy of the scattered photon is much less than the energy of the electron beam and we will have:

ε γm ≈ 4γ 2 ε γ0 (1.8)
It means that using relativistic electron bunches with relatively small energy we can receive radiations with energy in X-ray range. For example for an electron beam energy 50 M eV the maximum photon energy will be 45 keV .

Substituting (1.8) in (1.5) and (1.7). Then we get:

θ 0 = 1 γ 4γ ε γ0 mc 2 -1 ≈ 1 γ (1.9)
and substituting (1.9) in (1.1) we can write the scattered photon energy dependence on the scattering angle:

ε γ = 4γ 2 ε γ0 1 + θ 2 γ γ 2 = 4ε γ0 1 γ 2 + θ 2 γ (1.10)
The maximum scattered photon energy ε γm versus the electron beam energy E 0 for a laser with photon energy ε γ0 = 1.24 eV or λ = hc ε γ0 = 1 µm is shown in figure 1.6. It is clear that it is possible to produce a photon beam with photon in an energy range from keV up to several M eV . This covers up most of all needs of all known science and technological applications of the X-rays and γ-rays.

ε γ 0 = 1.24 [eV ]; α 0 ≪ 1; ε γ m [M eV ]

Compton cross-section

The energy spectrum of scattered photons is differential cross-section of a linear Compton scattering in laboratory coordinate system been given by [START_REF] Telnov | Principles of photon colliders[END_REF]:

1 σ c dσ c dy ≡ f (x, y) = 2σ 0 xσ c 1 -y + 1 1 -y -4r(1 -r) + 2λ e P c rx(1 -2r)(2 -y) (1.11)
where λ e -is the average helicity of an electron, P c -is the degree of circular polarization (equal to an average helicity) | λ e |≤ 1 2 ; | P c |≤ 1 2 and total Compton cross-section σ c is defined as the sum of the non polarized cross-section σ np c with the polarisation term 2λ e P σ 1 :

σ c = σ np c + 2λ e P σ 1
(1.12)

σ np c = 2σ 0 x 1 - 4 x - 8 x 2 ln(x + 1) + 1 2 + 8 x - 1 2(x + 1) 2
(1.13)

σ 1 = 2σ 0 x 1 + 2 x ln(x + 1) - 5 2 + 1 x + 1 - 1 2(x + 1) 2 (1.14) r = y x(1 -y) (1.15)
σ 0 = π e 2 mc 2 = 2.5 * 10 -29 m 2 (1.16)
As shown on equetion 1.11 and [START_REF] Drebot | Compton scattering of polarized electron beam[END_REF] the influence of polarization effects on the differential cross-section of Compton scattering becomes noticeable when the initial electron beam energy E 0 is about 5 GeV . The differential cross-section of a linear Compton scattering for different energy of electrons beam is presented in figure 1.7. Also it should be noted the significant dependence of the differential cross-section of a linear Compton scattering on initial energy of electron beam. This fact has to be taken into account in numerical calculations with electron beam with energy spread of about one or more percent. The formula 1.5 gives the dependence of the angle of scattered photons on their energy, their angular distributions in unit of solid angle dΩ can be written as:

dσ dΩ = σ c πθ 2 0 y m f (x, y(θ γ )) 1 + θγ θ 0 2 2
(1.17

)
where y(θ γ ) = ym 1+(θγ /θ 0 ) . The dependence of the differential cross-section in unit of solid angle from the scattering angle of photons for different energy of electron beam is presented in figure 1.8.

The angular spectrum of the scattered photons in the plane of interaction: accordingly:

dσ c /dy [m 2 ] E 0 =45 [MeV] E 0 =50 [MeV] E 0 =55 [MeV]
dσ dθ γ = 2πθ γ dσ dΩ (1.19)
Differential cross-section in unit of angle on scattering angle of photons in the plane of interaction is presented in figure 1.9.

According to equation (1.5) by replacing θ γ by θ 0 εγm εγ -1 in to (1.17) we get the energy spectrum of the scattered photons in unit of solid angle. The differential crosssection in unit of solid angle in dependence of energy of scattered photons is presented on figure 1.10

dσ c /dΩ [m 2 /rad] E 0 =45 [MeV] E 0 =50 [MeV] E 0 =55 [MeV]

Scattering reaction yield

In case of the scattering of two ultra relativistic cylindrical bunches of particles with radius R, travelling towards each other along X axis with uniform particle density distribution in both bunches the number of scattered particles per second N will be given as following:

N = σN 1 N 2 πR 2 f (1.20)
where σ is total cross-section of the scattering N 1 , N 2 are the number of particles in the both bunches, f is a repetition bunch rate.

In case of bunches interacting with functions of density distribution F 1 (x, y, z) and F 2 (x, y, z) moving towards each other, the number of scattered particles can be defined as [START_REF] Landau | The classical theory of fields[END_REF]:

N = f σ ∞ -∞ F 1 (x, y, z)F 2 (x, y, z)v rel dxdydz (1.21)
where v rel = (1 -cos(α 0 ))c is the relative speed of the bunches [START_REF] Landau | The classical theory of fields[END_REF].

dσ c /dθ γ [m 2 /rad] E 0 =45 [MeV] E 0 =50 [MeV] E 0 =55 [MeV]
Figure 1.9: differential cross-section in unit of angle on scattering angle of photons in the plane of interaction for different energy of electron beam.

Consider the interaction of two ultra relativistic bunches with Gaussian density distributions moving towards each other in the laboratory coordinate system for any angle a 0 in the plane XY , the scheme of interaction is presented in figure 1.11. Lets consider that centre mass of bunches are coincident in time.

In this case for the particles of the bunch 1 (see figure 1.11) the coordinate dependence on time can be written as:

x 1 = x (1.22) y 1 = y -s z 1 = z (1.23) s = ct
This distribution function is written as:

F 1 (x, y, z, s) = N 1 (2π) 2/3 σ x1 σ y1 σ l1 e -1 2 x 2 σ 2 x1 + (y-s) 2 σ 2 y1 + z 2 σ 2 l1
(1.24) where σ x1 , σ y1 is transverse size, σ l1 is longitudinal size of bunch 1.

dσ c /ε γ [m 2 /eV ] E 0 =45 [MeV] E 0 =50 [MeV] E 0 =55 [MeV]
For particles of the bunch 2 (see figure 1.11) the time dependence of the coordinates will be:

x 1 = -cos(α 0 )x -sin(α 0 )y (1.25) y 1 = sin(α 0 )x -cos(α 0 )y -s z 1 = z,
And the distribution function is written as:

F 2 (x, y, z, s) = N 2 (2π) 2/3 σ x2 σ y2 σ l2 e -1 2 x 2 σ 2 x2 + (y-s) 2 σ 2 y2 + z 2 σ 2 l2 (1.26)
where σ x2 , σ y2 is transverse size, σ l2 is longitudinal size of bunch 2.

After integration of equation (1.21) we the get number of scattered particles in unit of time.

N = 1 √ 2π σ 2 y1 + σ 2 y2 σN 1 N 2 f σ 2 x1 + σ 2 x2 + (σ 2 z1 + σ 2 z2 ) tan( α 0 2 ) (1.27)
In case the bunches do not cross the interaction point at the same time, let's call ∆x, ∆y then transverse misalignment and ∆z the longitudinal misalignment. The number of scattered photons becomes [START_REF] Ivashchenko | Nestor reference orbit correction[END_REF]:

N = A y A x A z √ 2π σ 2 y1 + σ 2 y2 σN 1 N 2 f σ 2 x01 + σ 2 x2 + (σ 2 z1 + σ 2 z2 ) tan( α 0 2 ) (1.28)
where

A y = exp - ∆y 2 tan 2 (α 0 ) 2(σ 2 x1 + σ 2 x2 + (σ 2 z1 + σ 2 z2 ) tan( α 0 2 )) A x = exp - ∆x 2 2(σ 2 x1 + σ 2 x2 + (σ 2 z1 + σ 2 z2 ) tan( α 0 2 )) A z = exp - ∆z 2 2(σ 2 y1 + σ 2 y2 )

Numerical simulation

For the numerical simulations of Compton scattering we use the code CAIN written by K. Yokoya. CAIN is a stand-alone FORTRAN Monte-Carlo code for the interaction involving high energy electrons, positrons, and photons [START_REF] Yokoya | User Manual of CAIN[END_REF]. The main advantage of using this code for us it is that the code CAIN give to us possibility of using non Gaussian distribution of electrons. This give us the possibility to integrate the code CAIN as a function in a 6D tracking code to simulate Compton scattering with longitudinal and transverse dynamics of the electron bunch, to see the evolution of the electron beam under Compton scattering in the ring and how this evolution will influence the flux of scattered photons.

This code was already bench-marked [START_REF] Sun | Theoretical and simulation studies of characteristics of a compton light source[END_REF][START_REF] Akagi | Production of gamma rays by pulsed laser beam Compton scattering off GeV-electrons using a non-planar four-mirror optical cavity[END_REF]. A comparison of the analytical calculation of the flux of scattered photons with a longitudinal laser misalignment and result of numerical simulations made in CAIN is shown in figure 1.12.

For this comparison was done set of the simulations in CAIN for different longitudinal laser misalignment and compare with analytical calculation made by using equation 1.28. As we we can see in figure 1.12 numerical simulations made by the code CAIN have excellent agreement with the analytical approach.

General Layout and working scheme of the ThomX X-ray generator

ThomX is a project of X-ray source based on the Compton scattering of laser photons and relativistic electrons. The electron bunch is stored in a storage ring allowing to collision it with the laser pulse on each turn. The beam life time is around 400 000 turns, corresponding to 20 ms. The use of a circular electrons storage ring give a significant advantage over linac-based Compton sources where electrons can be used only once to produce a high flux.

ThomX as X-ray source consists of 6 main parts which are presented in figure 1.13 and listed below:

Interaction

Point with Fabry Perot Cavity.

Laser.

As we can see ThomX can be split for three main component: Injector, Ring, Laser and FP cavity. The working scheme of ThomX source is described in figure 1.14. An electron beam is produced in the electron gun described on table 1.2 and is accelerated in the acceleration section up to the injection energy of 50 -70 M eV . The transfer line guide the bunch to the injection section. After the beam is injected in the ring described on table 1.3. The beam is stored with a repetition frequency of 17.8 M Hz

In parallel a high energy laser pulse is injected and amplified in a optical resonator with a frequency of 35.6 M Hz. This Fabry-Perot cavity is integrated in a low beta and zero dispersion region of the ring. Parameters of Fabry-Perot cavity and laser is described on table 1.4 Once the electron bunch and laser pulse are synchronised collisions take place with an interaction angle of two degrees and X-rays are produced by Compton Back Scattering. The laser bunch have a repetition frequency in the Fabry-Perot cavity 2 times higher than the electron bunch in the ring. From the interaction point the Compton X-rays are extracted towards a X-ray-line to the end users.

Chapter 2 Storage ring RF system

In a low energy ring like ThomX, the natural damping time is long (∼ 1 s) that a stationary stable condition can never be reached during the beam storage time, which is as short as 20 ms. On the other hand, it is sufficient to maintain the instability growth time larger than the beam storage time in order to keep at tolerable level their effect on the beam. That requires very strong attenuation of the cavity HOM impedances, typically by a few 10 3 . There are essentially two methods of coping with such HOM impedances, either a strong de-Qing of the HOM resonances [START_REF] Marhauser | First tests of a hom-damped high power 500mhz cavity[END_REF][START_REF] Schwarz | Development of a moveable plunger tuner for the high power RF cavity for the PEP-II B Factory[END_REF] or a tuning of their frequencies away from the beam spectral lines to prevent resonant excitations. With the former it is difficult to reach attenuation factors larger than a few 10 2 over a wide frequency range. The latter, which consists in controlling the HOM frequencies, is better suited to a small circumference machine like ThomX, where the beam spectral lines spacing (18 M Hz) is very large as compared to the HOM bandwidth. As far as the HOM density is not too high and that they can be tuned far enough from the beam spectral lines (δf ≪ f HOM /Q o ), it should be possible to reduce their effective impedances ("seen" by the beam) down to tolerable levels : R ef f ≈ R s /(2Q o δf /f HOM ) 2 ≫ R s . That led us to choose the ELETTRA type cavity which allows applying this technique in combining three tuning means. The HOM frequencies are precisely controlled by proper setting of the cavity water cooling temperature over the range 60 ± 25 • C with a stability of ±0.05 • C, while the fundamental frequency is recovered by means of a mechanical tuning which changes the length of the cavity. Besides, a movable plunger provides another degree of freedom for tuning the HOM. In order to insure a fine control of the HOM frequencies, a good knowledge of their characteristics is mandatory. The main parameters of the fundamental and the HOMs have therefore been calculated using the Eigenmode solver of the 3D Electromagnetic HFSS [START_REF]Hfss[END_REF] and CST MWS [START_REF]Cst -computer simulation technology[END_REF] codes and compared the results with the measured values on the cavity [START_REF] Khaldi | Simulations and rf measurements of the fundamental and higher order modes of the thomx 500 mhz cavity[END_REF].

The selection of 500 M Hz as RF frequency leads to a quite good compromise in terms of cavity fundamental and HOM impedances, space requirements as well as the availability of RF power sources and other components.

One 500 M Hz single cell cavity of the ELETTRA type, powered with a 50 kW CW solid state amplifier (SSA), will provide the required RF voltage of 500 kV . It is made out of OFHC copper and equipped with 8 equatorial outlet ports: 3 large ones for the input power coupler, the pumping system, the plunger tuner and 5 smaller ones for vacuum and RF monitoring. It is water cooled by means of copper pipes brazed on its external wall surface. Its temperature can be set over the range 60 ± 25 • C with a stability of ±0.05 • C by re-circulating the cooling water through an appropriate heat exchanger (cooling rack). The cavity cutoff tube (ø 100 mm) will be connected to the standard elliptical vacuum chamber (a=40mm, b=28mm) by means of two tapers, made of 316 L stainless steel and bellows. The cavity assembly is shown in Recently synchrotron SOLEIL has worked out modules, which can deliver up to 650 W at 500 M Hz with a gain of 16.5 dB and an efficiency of 64 % [START_REF] Marchand | Development of High RF Power Solid State Amplifiers at SOLEIL[END_REF]. About a hundred of such modules will be combined for achieving the required 50 kW power. A 10 kW prototype unit (16 modules) was successfully tested and validated by mid of 2012 at SOLEIL and the complete 50 kW CW SSA will be tested on a dummy load, by the end of 2013.

Low Level RF and Feedback Systems

The task of a Low Level RF (LLRF) system is to control the amplitude and phase of the cavity accelerating voltage and its resonance frequency. Three LLRF prototypes, including a fast longitudinal feedback (LFB) are being developed in parallel. The first version consists in separate analog control loops for frequency, amplitude and phase; the second version is based on analog IQ modulation/demodulation technique and the third one on digital FPGA processing. The cavity voltage shall be controlled with typical stability of ±0.2 % and ±0.2 • by means of the conventional phase and amplitude loops (either analog or digital) of few kHz bandwidths. In addition the LFB, namely a fast phase feedback, combined with a high gain RF feedback acting directly on the accelerating cavity [START_REF] Sreedharan | Thomx llrf[END_REF], will provide the longitudinal damping of a few 10 µs, which is required to preserve the beam quality during its storage time of 20ms. This LFB shall cope with the beam oscillations, caused by injection transients as well as by the longitudinal HOM excitations, in addition to the frequency tuning technique. Besides, a transverse feedback (TFB), based on FPGA processing, similar to that used in SOLEIL [START_REF] Kobayashi | Transverse Feedback Development at SOLEIL[END_REF], and acting on a dedicated stripline kicker shall cope with the transverse modes of both planes, horizontal (H) and vertical (V).

Simulations and measurements

The characteristic parameters of a cavity mode are its resonant frequency, its unloaded quality factor Q 0 , its R/Q (shape factor) and its shunt impedance, Rs = (R/Q).Q 0 . They have been computed with the HFSS and CST MWS codes using Eigenmode solver with cylindrical symmetry for the longitudinal and transverse modes of the cavity, including its 30 cm long stainless steel tapers. On the other hand, the frequency and the loaded quality factor, Q L of the modes have been measured on the cavity at ambient temperature and under vacuum using a vector network analyzer (VNA) in transmission mode. The unloaded quality factor Q 0 values are deduced by taking into account the coupling coefficients of the input power coupler and monitoring pick-up.

Fundamental Mode Parameters

Table 2.1 shows a comparison between the computer simulations and measurements I did of the parameters of the accelerating mode, that is the T M 010 fundamental mode of the cavity. The shunt impedance is defined as Rs = V 2 acc /2P d , where V acc is the accelerating voltage (transit time factor included) and P d is the cavity wall dissipation.

HOM Parameters

Simulations and measurements have been performed also for the HOMs of the cavity, terminated with its two tapers. The results are listed, in Table 2.2 and 2.3 for the monopole and dipole modes, which are trapped into the cavity, namely with a resonance that is lower than its tube (ø 100 mm) cut-off frequencies, 2.3 GHz for monopole and 1.83 GHz for dipole modes. The two polarizations, H and V, of the dipole modes, are not Preliminary simulations show that it is possible to achieve this goal by applying the HOM tuning technique (temperature + plunger) as described in [START_REF] Thomx | Cdr of thomx[END_REF]. Figure 2.2 shows the impedances of the HOMs which are trapped in the cavity and the ones which propagate into the tapers, with frequencies up to 4 GHz, the cutoff frequency of the standard ring vacuum chamber. Although the "propagating modes" are much less critical than the "trapped modes", their impedances are still above the specified thresholds. As it will be hard to cope with all these modes only by applying the tuning technique, one need to rely on the LFB and TFB in order to bring additional damping. Adjustable HOM Frequency Shifter (HOMFS)

The HOMFS is a plunger moving into one of the three equatorial ports, as shown in Figure 2.1, for shifting the resonant frequencies of harmful HOMs if a stable condition cannot be achieved only by temperature tuning. Figure 2.3 shows the HOMFS effects on the trapped monopole and dipole modes for its full displacement range of 35 mm. The fundamental as well as the HOM frequencies vary linearly with the plunger position. Except for a few modes which are less sensitive, frequency shifts of 1 MHz or more are achieved.

Electromagnetic parameter calculations using CST and HFSS codes as well as measurements have been performed on the ThomX cavity. The results show that a strong attenuation of the cavity HOM impedances is required in order to preserve the beam quality in the storage ring. It will be achieved by a proper control of the HOM frequencies in combining three tuning means and by the use of feedbacks for providing additional damping.

Chapter 3 Beam dynamics at ThomX

In this chapter I describe the theoretical models of beam dynamics which I use in the simulation code. The 6D beam dynamics can be split in two main part the transverse motion and the longitudinal motion. They are coupled by non diagonal elements in the transport matrices or by the coupled system of the equations of motion in Hamiltonian formalism. In this chapter I also present models of calculation for collective effects such as longitudinal space charge, resistive wall, coherent synchrotron radiation and intrabeam scattering.

Models of transverse motion at circular accelerators

There are two main models to describe transverse motions of charged particles in a circular accelerators:

• Transport matrices.

• The Hamiltonian Formalism with Perturbation theory.

Transport matrices model

The motion of a particle in a magnetic field can be described in local coordinate system moving jointly with the particle by the arbitrary curve determined by the curvature h = 1 ρ = dφ ds by the moving equations:

x ′′ -h 2 x = -h - hxx ′ + 2hx ′2 1 -hx + (3.1) e pc 1 + x ′ 1 -hx 2 (x ′ y ′ B x -[(1 -hx) 2 + x ′2 ] B y + (1 -hx)z ′ B s ) y ′′ = - hxy ′ + 2hx ′ y ′ 1 -hx + (3.2) e pc 1 + x ′ 1 -hx 2 (x ′ y ′ B x -[(1 -hx) 2 + x ′2 ] B y + (1 -hx)z ′ B s )
Where B x , B y , B s are the component of the magnetic field, p is the momentum of the particle, ρ is the radius of curvature for the synchronous particle, φ is the azimuthal angle of the bending magnet.

The solution of equations 3.1, 3.2 may be represented in a matrix form. This matrix is introduced in works of A. Chao [START_REF] Chao | Some Linear Lattice Calculations Using Generalized Matrices[END_REF].

Using matrices we can change a coordinates of particle in phasespace due to propagation through the magnetic elements into the accelerator.

        x 2 x ′ 2 y 2 y ′ 2 s 2 δ e 2         = M f rom 1to 2         x 1 x ′ 1 y 1 y ′ 1 s 1 δ e 1         (3.3)
Knowing all matrices for each element of the accelerator we can obtain the total transport matrix of the accelerator

M T OT = M n * M n-1 * ... * M 2 * M 1 (3.4)
Using only one transport matrix for all accelerator makes the simulations faster in comparison with propagation element by element.

We can also make the propagation element by element:

        x n x ′ n y n y ′ n s n δ e n         = M f rom n-1 to n         x n-1 x ′ n-1 y n y ′ n-1 s n δ e n-1         ...         x 2 x ′ 2 y 2 y ′ 2 s 2 δ e 2         M f rom 1to 2         x 1 x ′ 1 y 1 y ′ 1 s 1 δ e 1         (3.5)
Thanks to this matrix we can estimate all the main parameters of the beam and check if the coordinates of the particles do not go out of the acceptance of the accelerator.

The matrix of the main electromagnetic elements of accelerator structures were calculated by K. L. BROWN [START_REF] Brown | A first-and second-order matrix theory for the design of beam transport systems and charged particle spectrometers[END_REF].

Drift element:         1 L 0 0 0 0 0 1 0 0 0 0 0 0 1 L 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1         (3.6)
Where L is the length of the drift space.

Quadrupole lens:

         cos √ KL sin √ KL √ K 0 0 0 0 - √ K sin √ KL cos √ KL 0 0 0 0 0 0 cosh √ KL sinh √ KL √ K 0 0 0 0 √ K sinh KL cosh √ KL 0 0 0 0 0 0 1 0 0 0 0 0 0 1          (3.7)
Where L is the effective length of the quadrupole lens, K = eG pc is the force of the quadrupole lens, G = ∂By ∂y = ∂Bx ∂x is the gradient of magnetic field. Bending magnet (dipole):

          cos A x sin Ax √ Kx 0 0 0 h √ Kx (1 -cos A x ) - √ K x sin A x cos A x 0 0 0 -h √ Kx sin A x 0 0 cosh A y sinh Ay √ Ky 0 0 0 0 -K y sinh A y cosh A y 0 0 -h √ Kx sin A x -h √ Kx (1 -cos A x ) 0 0 1 -h K 3/2 x (A x -sin A x ) 0 0 0 0 0 1           (3.8) with A x = √ K x L, A y = K y L,
where L is the effective length of the orbit of the synchronous particle inside a bending magnet,

K x = (1 -n)h 2 , K y = nh 2 , n = -ρ B 0 ∂B ∂x
is the normalized field gradient of the bending magnet measured on optical axes (x = 0, y = 0). In case of uniform field (n = 0, K x = h 2 = (1/ρ) 2 , K y = 0 ) the matrix for the bending magnet becomes simple.

           cos √ K x L sin √ KxL √ Kx 0 0 0 h √ Kx (1 -cos √ K x L) - √ K x sin √ K x L cos √ K x L 0 0 0 -h √ Kx sin √ K x L 0 0 1 sinh √ KyL √ Ky 0 0 0 0 0 1 0 0 -h √ Kx sin √ K x L -h √ Kx (1 -cos √ K x L) 0 0 1 -h K 3/2 x ( √ K x L -sin √ K x L) 0 0 0 0 0 1            (3.9)
Transport matrices can be used to obtain linear characteristics of the magnetic structure of the accelerator and their characteristic. Matrices allow to make linear particle tracking, but due to limited accuracy for a large number of turns the rounding errors in the matrices will accumulate. It is also difficult to take in to account non linear effects using method of transport matrices.

The Hamiltonian Formalism

The Hamiltonian Formalism has several uncontested advantages:

• Opens the possibility to consider nonlinear forces in the same way as linear;

• The method allows to obtain not only the solutions of equations of motion, but also the integrals of motion.

In this chapter we go briefly through the basic concept of Hamiltonian formalism to obtain the dynamics in accelerators. In real space we can write the Lagrangian L(q, q, t), where q is the coordinate and q is the time derivative of it, t is the time, i = x, y, s:

L(q i , qi , t) = T ( qi ) -U (q i , t) (3.10)
here T is the kinetic energy and U is the potential energy. Then the equation of motion in Lagrange form:

d dt ∂L ∂ qi - ∂L ∂q i = Q i (3.11)
here Q i is forces not defined from a potential.

The Hamiltonian can be defined as:

H(p, q, t) = i qi p i -L(q i , qi , t) (3.12)
and in this case the equations of motion can be rewritten with the first derivative only:

ṗ = - ∂H ∂q i + Q i ; qi = ∂H ∂q i ; ∂L ∂t = - ∂H ∂t ; (3. 13
)
where p is the canonical momentum. If Q i = 0 all forces can be described by potentials (see equation 3.13) and can be reduced to canonical Hamiltonian equations:

ṗ = - ∂H ∂q i ; qi = ∂H ∂q i ; (3.14)
where H(p i , q i , t) represent the energy of the system, p i , q i the momentum and coordinate of the particles. Solving equations 3.14 for p, q as functions of time give us the possibility to follow the trajectory of the particle in phasespace (p, q). Canonical transformation is changing of canonical coordinates (q, p, t) → (Q, P, t) can be done by using the generating function [START_REF] Landau | [END_REF].

G 1 (q i , Q i ) : p i = ∂G 1 ∂q i ; P i = ∂G 1 ∂Q i ; H = H + ∂G 1 ∂t ; (3.15) G 2 (q i , P i ) : Q i = ∂G 2 ∂P i ; p i = ∂G 2 ∂Q i ; H = H + ∂G 2 ∂t ; (3.16) G 3 (p i , P i ) : q i = - ∂G 3 ∂q i ; Q i = ∂G 3 ∂Q i ; H = H + ∂G 3 ∂t ; (3.17) G 4 (Q i , P i ) : q i = - ∂G 4 ∂q i ; P i = - ∂G 4 ∂Q i ; H = H + ∂G 4 ∂t ; (3.18)
Using the canonical transformations 3.15-3.18 it is possible to transform the initial equations 3.14 to a form easier to solve.

In the electromagnetic field the Lorentz force on the charged particle can be written as:

dm v dt = e -∇φ - ∂ A ∂t + v × rot A (3.19)
here φ, A are the electric and magnetic potentials, v is the speed of the particle, e is the charge of the particle. As the kinetic momentum is p i = mv i + e c A i , for this force the Hamiltonian will be written as:

H = 1 2m p -A 2 + eφ (3.20)
In the case of relativistic particle knowing that ds = c 1 -v 2 c 2 dt, the component of momentum and the Hamiltonian can be written as:

p i = mv i 1 -v 2 c 2 + eA i (3.21)
H = mc 2 1 -v 2 c 2 + eφ = c p -e A 2 + mc 2 + eφ (3.22)

Longitudinal dynamics

In this chapter I describe the main effects which have an impact on the longitudinal motion of a single bunch in the ring. The electrons will lose energy due to Compton Back Scattering, synchrotron radiation and collective effects. These losses must be compensated by adding energy to the electrons at the RF cavity. These effects with depend on the length of the orbit and the momentum of the the particle in the ring will create a longitudinal dynamics that is described in this chapter.

Representation of the bunch by macro-particles

In the ThomX ring the charge of the injected electron bunch is 1 nC. This corresponds to about N e ∼ 10 10 electrons in a single bunch. To simulate the full beam life time ∼ 20 ms this would require a huge amount of memory and computer time to simulate each electron individually. To reduce the memory requirement and the computation time we gather electrons in groups called macro-particles. The charge of a macro-particle is named weight. In my simulations a typical macro-particle weight is of the order of 6 * 10 5 . This means that full bunch can be represented by 10 000 macro-particles.

Each macro-particle behaviour in the longitudinal phase space is described by the following canonically conjugate coordinates [START_REF] Chao | Physics of collective beam instabilities in high energy accelerators[END_REF]:

δE = E -E 0 E 0 ; Φ = 2π h L 0 s , (3.23)
where E 0 represents the synchronous particle nominal energy, E is the energy of the macroparticle under study, h is the RF cavity harmonic number, L 0 is the ring circumference and the length of the synchronous orbit and s is the macro-particle displacement from the synchronous particle (S > 0 if the macro-particle is ahead of the bunch). Hence δE is the macro-particle normalized relative energy and Φ is its phase.

Dependence of the longitudinal coordinate on energy (Phase advance)

For the study of accelerators able to confine beams with large energy spread, one needs to take into account not only the linear part of the orbit deviation from the synchronous one, but non linear terms as well [START_REF] Bulyak | Synchrotron dynamics in compton x-ray ring with nonlinear momentum compaction[END_REF] ∆x

≈ D 1 p + D 2 p 2 + ... (3.24)
where D 1 and D 2 are the dispersion functions of the first and second orders, respectively. And the momentum p ≡ (γ -γ s )/γ s is equal to the relative deviation of the particle energy from the synchronous one (γ s is the Lorentz factor of the synchronous particle).

Accordingly, the relative path increase of a (flat) orbit is

L -L 0 L 0 = 1 L 0 1 + ∆x ρ 2 + d∆x ds 2 ds (3.25) ≈ α c1 δE + α c2 δE 2 + ... (3.26)
where ρ(s) is the local radius of curvature. The coefficients α c1 and α c2 are determined as

α c1 = 1 L 0 D 1 ρ ds (3.27) α c2 = 1 L 0 D ′2 1 2 + D 2 ρ ds (3.28)
Consequently, the momentum compaction factor α c (momentum compaction factor is the coefficient that shows the dependence of the length of the orbit on the momentum of the particle in the ring) can be written as

α c = 1 L 0 dL dδE ≈ α c1 + α c2 δE + ... (3.29)
Using that ∆L is the orbits difference for each particle with the synchronous one will be the same than the difference of longitudinal displacement from the synchronous particle ∆S. We can write that

∆S = ∆L ≈ L 0 α c1 δE + α c2 δE 2 + ... (3.30)
In such way writing this equation in term of turns and macro-particles we get:

S j,i = S j-1,i -T pr α c1 cδE j,i -T pr α c2 cδE 2 j,i (3.31)
where j is the turn number, i is the macro particle number, T pr = L 0 /c is the revolution period. Where in the equation 3.31 α c1 the is a first order (linear) momentum compaction factor and α c2 is the second order (quadratic) momentum compaction factor.

This equation gives the correlation between the longitudinal coordinate and the relative energy spread through the momentum compaction (phase advance).

Energy compensation in the RF cavity

In the RF cavity each particle recovers a part of the energy lost while travelling around the ring. When a particle enters the RF cavity, its normalized energy difference with the reference (synchronous) particle δE j , becomes δE j+1 according to:

δE j+1,i = δE j,i + eV RF E RF cos(-φ s + ω RF S j,i /c) (3.32)
where j is the turn number, i is the number of macro particle, e is the electron charge, V RF is the voltage in the RF cavity, E RF is the RF beam energy, ω RF = 2πh/T pr is the angular RF frequency, h is the harmonic number, φ s = acos(E loss /V RF ) is the synchronous phase that is defined so that the synchronous particle gains in the RF cavity all the energy lost (E loss ) due to synchrotron radiation and other physical phenomena.

The system of equations 3.31 and 3.32 have an oscillatory solution. Thos oscillation called synchrotron oscillations and will be described in section 3.2.5.

Effect of the Synchrotron Radiation

Synchrotron Radiation is emitted during the propagation at locations where charged particles (electrons in our case) are accelerated radially (bending magnets). This radiation takes energy from the bunch of electrons.The energy loses in one revolution can be written as [START_REF] Helm | Evaluation of synchrotron radiation integrals[END_REF]:

U sr = 2 3 r e E 4 0 (mc 2 ) 3 I 2 (3.33)
where r e is classical electron radius, I 2 is a one of synchrotron radiations integrals defined as:

I 2 = 1 ρ 2 ds = i l i ρ 2 i (3.34)
we can also defined I 3 and I 4

I 3 = 1 |ρ 3 | ds = i l i |ρ 3 i | (3.35) I 4 = (1 -2n)η(s) ρ 3 ds = i l i ρ 3 i < η > i -2l i nη ρ 3 (3.36)
where l i is the the integration length and ρ i is the bending radius of the magnetic elements, n = dB dx ρ B , η(s) is dispersion function. As we can see in the formula 3.33 losses from the synchrotron radiation depends on the energy of the electrons. The electrons in a bunch have different energy's (δE is the energy spread) this leads to different energy losses depending on the electrons energy [START_REF] Wolski | The accelerator physics of linear collider damping rings[END_REF].

This uneven distribution of energy losses provides to damping of the synchrotron oscillation of the bunch. To take in to account this effect we need to calculate the damping factor D:

U damping = DδE (3.37)
which can be defined as:

D = 2 L c α ǫ (3.38)
where α ǫ is defined [START_REF] Helm | Evaluation of synchrotron radiation integrals[END_REF] as:

α ǫ = r e 3 E 0 mc 2 3 c L (2I 2 + I 4 ) (3.39)
To take into account quantum nature of radiation we can calculate the relative energy deviation due to quantum excitation effect: the randomness of the emission introduces a sort of noise, causing the growth of the oscillation amplitude in the longitudinal phase space.

σ ε = 55 32 √ 3 mc E 0 mc 2 I 3 2I 2 + I 4 (3.40)
The energy lose by synchrotron radiation for ThomX will be U sr ≈ 1.6 eV . For this energy loss the damping time will be τ ≈ E Usr T 0 ≈ 1.7 s for an energy of electron E 0 = 50 M eV and period of T = 56 ns. It is clearly show that ThomX is no damping ring.

Period of oscillations longitudinal positions (S), Synchrotron oscillation

The longitudinal position of the electron in the bunch is given by a system of two equations (3.31) and (3.32). In this paragraph we calculate the period of oscillations of the electrons in the longitudinal plane (synchrotron oscillation). For this we will take into account only the first order of the momentum compaction factor α c1 and we didn't take into account the synchrotron losses, damping and quantum excitation. In reality we can assume that the synchrotron losses, damping and quantum excitation is constant and they are neglected while taking the derivative of the equation (3.45).

S j,i = S j-1,i -T pr α c1 cδE j,i (3.41)
replace δE j,i in the equation (3.42) using the equation (3.41)

S j,i -S j-1,i = -T pr α c1 c δE j-1 + V RF E RF cos(ω RF S j-1,i /c -φ s ) (3.42)
Now again replace δE j-1,i using the equation (3.41)

S j,i -S j-1,i = -T pr α c1 c δE j-2 + V RF E RF cos(ω RF S j-2,i /c -φ s ) (3.43) + V RF E RF cos(ω RF S j-1,i /c -φ s )
Now when we observed a pattern, we can write the equation (3.43) as series:

S j,i -S j-1,i = -T pr α c1 c δE 0 + V RF E RF j-1 k=0 cos(ω RF S k,i /c -φ s ) (3.44)
Now write S j,i -S j-1,i like dS i di and the sum changes into an integral.

dS i di = -T pr α c1 c δE 0 + V RF E RF j-1 k=0 cos(ω RF S k,i /c -φ s )di (3.45)
Now take the derivative of the equation (3.45)

dS 2 i d 2 i ∼ -T pr α c1 c V RF E RF cos(ω RF S k,i /c -φ s ) (3.46) Using cos(a + b) = cos(a)cos(b) + sin(a)sin(b) and because ω RF S k,i /c ≪ 1 we replace cos(ω RF S k,i /c -φ s ) by ω RF cos(φ s )S k,i /c. dS 2 i d 2 i ∼ -T pr α c1 V RF E RF ω RF cos(φ s )S k,i (3.47)
As we can see we get the equation for an harmonic oscillator with the form ẍ = -ω 2 x.

And we can easily find that our period for the oscillations T = 2π ω will be

T s ∼ 2π T pr α c1 V RF E RF ω RF cos(φ s ) [turns] (3.48) T s ∼ 2π T pr α c1 V RF E RF (2πh/T pr )(E loss /V RF )
[turns] (3.49)

T s ∼ 2πE RF α c1 hE loss [turns] (3.50)
We must consider this period to choose the delay time for the phase feedback in the RF cavity (described in section 3.2.6). IF the delay time for the phase feedback RF is bigger than 1 4 T s of the period longitudinal oscillations the feedback RF will destroy the beam.

For the ThomX storage ring this period T s ≈ 40 turns corresponding to a frequency f s = 0.025 (1/turns) = 500 kHz for a circumference of the ring of 16.8 m. In figure 3.1 we see how this theoretical approach is in excellent agreement with the simulations.

Beam phase feedback on the RF cavity

To compensate the longitudinal oscillations described in the previous section it is possible to use an additional feedback phase. This adds a term φ f b,j in equation (3.32):

δE j+1,i = δE j,i + eV RF E RF cos(-φ s + ω RF S j,i /c + φ f b,j ) (3.51)
This phase gives us an amendment for the RF cavity term taking into account real displacement of the longitudinal position of the bunch.

φ f b,j = -K * < S j-d-1,i > (3.52)
Where d is the feedback delay time expressed in turns, K is a normalizing factor which equals:

K = K f b πh/(T pr * c) (3.53)
The parameter K f b is the "gain" of the feedback.

It should be noted that the delay time in the equation (3.52) must agree with the period of longitudinal oscillations otherwise there is a risk to get in the opposite phase and as a consequence to get a resonance that destroy the beam. In figure 3 On this plot we can clearly see that even for a such small gain as K f b = 1 100 a badly chosen delay time of feedback system will destroy the bunch quickly. This mean that the delay time can be in the range of [0 to Ts 4 ] ± nT s (n ∈ N).

Collective effects

The interaction of a beam of charged particles with it is own electromagnetic fields (wake fields) induced in the vacuum beam pipe wall can lead to collective effects and modify the beam dynamics. The most significant consequence associated with these collective effects is instability of transverse and longitudinal dynamics. If resonance conditions are achieved a small deviation of beam energy or phase can be amplified by the wake fields. That positive feedback can lead to an increase of the amplitude of the synchrotron oscillations and as consequence reduce the quality of the beam and even destroy the beam.

Wake field formalism

Collective effects can be estimated using the wake field formalism. The normalized integral over the electro-magnetic force (Lorentz force) due to the fields excited by a point charge or delta function distribution is called the wake function [START_REF] Zotter | Impedances and Wakes in High-Energy Particle Accelerators[END_REF]. Wake function is the response function to the excitation by the point charge. In the case of ultra-relativistic bunches the wake function is determined only by the form and electro-magnetic parameters of the structure of the beam pipe.

In this thesis we will look only at longitudinal instabilities produced by collective effects. In such case the wake function can be presented as the integral of the longitudinal component of the E(s) electric field parallel to v the speed of the particles.

W (s) = - 1 q ∞ -∞ E(s -s ′ )ds ′ (3.54)
Interaction between the wake field and the bunches of charged particle with an arbitrary longitudinal distribution is defined as wake potential V (s) by a convolution of the wake function with the longitudinal charge density n(s) [START_REF] Chao | Physics of collective beam instabilities in high energy accelerators[END_REF]:

V (s) = - ∞ 0 W (s -s ′ )n(s ′ )ds ′ (3.55)
The longitudinal charge density n(s) is normalized as

∞ -∞ n(s)ds = 1.

The longitudinal space charge (LSC)

The longitudinal space charge is a collective effect which occurs from interaction of the charged particles in the moving bunch with the bunches electromagnetic field ("selffields"). These "self-fields" depend on the velocity and the charge of the bunch, geometry and materials of the vacuum beam pipe. Interaction of the bunch with these "self-fields" will influence the energy loss, the betatron tunes shift, the synchronous phase and the tune shift, instabilities. In this work we restrict ourselves to the influence of the space charge on the energy losses. where L = -Z 0 L 0 4πcγ 2 (2 ln(b/a) + 1), a = 1 2 (σ x + σ y ), σ x,y is the transverse size of the bunch, b = γσ s , σ s is the longitudinal size of the bunch, γ is the relativistic factor, R is the resistivity and L is the inductivity of the vacuum pipe wall, Z 0 = 4π/c ≈ 377 Ω is the impedance of free space.

The influence of the longitudinal space charge wake field on the beam dynamics is presented on page 67.

Resistive Wall (RW)

Resistive Wall instability comes from the electrons in the bunch inducing currents on the beam pipe wall. Due to the finite resistivity of the walls, these currents extend behind the position of the relativistic electrons bunch. The electro-magnetic fields of this currents acts on the particle arriving later and may increase their oscillation amplitudes, energy deviation... To take into account RW wake field we use the short-range wake fields assuming a constant conductivity [START_REF] Bane | The short-range resistive wall wakefields[END_REF] we obtain as: In the above, E(s) is the wake electric field [START_REF] Bane | The short-range resistive wall wakefields[END_REF] :

W (s) = -e ∞ -∞ E(s -s ′ )n(s ′ )ds
E(s) = -16e b 2 1 3 e -s/s 0 cos √ 3s s 0 - √ 2 π ∞ 0 dx x 2 e -x 2 s/s 0 x 6 +8
with s 0 = cb 2 The influence of the Resistive Wall wake field on the beam dynamics is presented on page 70.

Coherent Synchrotron Radiation (CSR)

Coherent Synchrotron Radiation (CSR) is a phenomenon that originates from coherent superposition of electromagnetic waves radiated by ultrarelativistic electrons. In case of bunches with high density of particles and if the length of the bunch starts to be comparable with synchrotron radiation wavelengths (for ThomX λ ≈ 1 mm and σ t = 4 ps) the electromagnetic waves which are emitted by different electrons start to have small phase differences. As a result, they add up coherently. This coherence gives us a quadratic dependence of the intensity of the radiation on the charge of the bunch. As a consequence this coherent radiation creates inside the bunch a relatively strong electromagnetic field. Interaction of this electromagnetic wave with particles inside the bunch radiation of an electron in the tail of the bunch can interact with an electron in the head of the same bunch (radiation of an electron in the tail of the bunch can interact with an electron in the head of the same bunch) can provide beam instability and as a result, it can destroy the beam in the accelerator. The interaction of the electrons with their own electromagnetic field is taken into account with terms composed of two parts [START_REF] Evain | Spatio-temporal dynamics of relativistic electron bunches during the micro-bunching instability in storage rings[END_REF] :

V csr sh (s) = V crs f ree-space + V shielded (3.56)
V crs f ree-space is the term that accounts for the wake field of CSR for the free-space term when an electron bunch is circulating along a circular trajectory [START_REF] Saldin | On the coherent radiation of an electron bunch moving in an arc of a circle[END_REF]:

V crs f ree-space = - 2πR 4πǫ 0 eN e ∞ 0 1 (3R 2 ) 1/3 dn(s -s ′ ) ds 1 (s′) 1/3 ds ′ (3.57)
Where R is the bending magnet radius, ǫ 0 is the vacuum permittivity.

V shielded is the term that accounts for the shielded effect induced by the beam pipe. In the approach proposed in [START_REF] Murphy | Longitudinal wake field for an electron moving on a circular orbit[END_REF] the beam pipe is represented by two infinite parallel plates separated by a height 2h. In this case we have

V shielded (s) = 2πR 4πǫ 0 eN e 1 2h 2 +∞ -∞ n(s -s ′ )G 2 1 2h 2 R h 1/2 s ′ ds ′ (3.58)
where G 2 is the scaling functions defined by J.B. MURPHY et al [START_REF] Murphy | Longitudinal wake field for an electron moving on a circular orbit[END_REF], equation 5.22b.

The influence of CSR wake field on beam dynamics is presented on page 70.

Intra Beam Scattering

During their motion in a storage ring, the electrons undergo transverse oscillations due to the Coulomb forces inside the beam and the magnetic elements in the ring. Collisions between the particles occur due to their relative motions leading to an emittance increase. This effect is called Intra Beam Scattering (IBS). In collisions with large momentum transfer the particles may be ejected beyond the separatrix, causing a decrease of the beam lifetime (single Touschek effect). Stochastic collisions with small momentum lead to an increased emittance without loss of electron (multiple Touschek effect [START_REF] Duff | Single and multiple touschek effects[END_REF]). This increase reduces the density of the beam and as a consequence will reduce the flux of the photons produced by Compton Back Scattering and will affect their energy distribution.

Models

At present, IBS is described by different models depending on the beam energy and the type of particles. All these different approaches for electrons can be summarized in the framework of the two main models proposed by Bjorken-Mtingwa [START_REF] Mtingwa | Intrabeam scattering[END_REF] and Piwinski [START_REF]Proceedings of 9th International Conference on High-Energy Accelerators[END_REF].

The main difference between the two is that Piwinski model is based on classical mechanics whereas Bjorken-Mtingwa is based on quantum mechanics [START_REF] Chao | Handbook of Accelerator Physics and Engineering[END_REF].

As shown in [START_REF] Antoniou | Intrabeam scattering studies at the swiss light source[END_REF] (figure 3.6) the Bjorken-Mtingwa (BM) model agree better with other models by K. Bane [START_REF] Bane | A simplified model of intrabeam scattering[END_REF] and K. Kubo, S. Mtingwa and A. Wolski (CIMP) [START_REF] Kubo | Intrabeam scattering formulas for high energy beams[END_REF] in comparison with the Piwinski's model. Thus, for our study we have chosen the Bjorken-Mtingwa model.

Numerical Simulations

For numerical simulation of the effects of IBS one needs to calculate the growth increments ("times") T x,y,e for the emittance ε x,y (horizontal and vertical) and the energy spread σ e of the electron beam. Using these increments one can calculate the changes of emittance and energy spread.

ε x,y n+1 = ε x,y n (1 + T rev /T x,y ) 2 (3.59) σ e n+1 = σ en (1 + T rev /T e ) (3.60)
For our calculations we have chosen the formalism proposed by Mtingwa [START_REF] Kubo | Intrabeam scattering formulas for high energy beams[END_REF]. We calculate the increment by taking the integral of equation 3.61

1 T i = 4πA(log) ∞ 0 λ 1 2 [det(L + λI)] 1 2 T rL (i) T r((L + λI) -1 ) -3T r L (i) (L + λI) -1 dλ (3.61) Were i = x, y, e. A = r 2 0 cN 64π 2 β 3 γ 4 ε x ε y σ s σ e (3.62) (log) = ln γ 2 σ y ε x r 0 β x (3.63) L (e) = γ 2 σ 2 e   0 0 0 0 1 0 0 0 0   (3.64) L (x) = β x ε x   1 -γφ x 0 -γφ x γ 2 Hx βx 0 0 0 0   (3.65) L (y) = β y ε y   0 0 0 0 γ 2 Hy βy 0 0 0 0   (3.66)
To evaluate the integral (3.61) we need to calculate amplitude functions β x,y , φ x , H x,y to obtain the matrix element for the matrix L for each optical elements on the ring. To make numerical integration of the equation (3.61) for each value of L (e,x,y) . We use Matlab with a integration boundaries 0 up to 10 11 . This give as a precision of 10 -22 comparing with the same integration on MATHEMATICA with boundary from 0 up to infinity is achieved.

Doing the simulation made using this solution we spend around 60 sec per simulation on one turn in the storage ring. Such a time is too hight for the simulation of a large number of turns. We noticed that the contribution of the IBS effect give almost a linear increase of the emittance and energy spread over small ranges. To reduce the calculation time we use the following strategy: we use the values of the growth increments (see equation 3.59) calculated on a previous turn. The integration of the IBS equation 3.61 is done only when the difference for energy spread calculated during the last calculation and the current value is greater than a set value. This method give us good accuracy and saves time for the simulations.

Next what we try to get a better accuracy for IBS. By using some linear extrapolations for the calculations of growth increments (see equation 3.59):

T i,n = T i,n-1 + T i,nl -T i,nlp nl -nlp (3.67)
Were i = p, x, y are longitudinal and transverse coordinates, n is the number of current turn, nl is the number of turn since IBS has calculated (evaluate the integral 3.61), nlp is the number of turns when was calculated IBS before nl. Also we notice that the changes given in energy spread during IBS is considerably smaller than those from Longitudinal Dynamics. So we decided to change the conditions under which we will recalculate IBS (evaluate the integral 3.61). We make it in several steps. First step if condition 3.68 is valid it means that the contribution of IBS effects is 100 time smaller than other. In case of changes of energy spread greater than 5% IBS will calculated. Next step is checking changes on emittance.

|ε x,nl -ε x,n |/ε x,n > 10 -2 (3.70)
If the change of emittance during the last calculations of IBS is more than 1% we recalculate (evaluate the integral 3.61) IBS.

As we can see from figure 3.7 we receive a good agreement between method of calculating IBS with using or without using approximation. Accordingly we can use the extrapolations to get a result close to reality and save a factor 10 -100 in the duration of simulations.

At this point it is important to notice that the effect of IBS is strongly dependent from the parameters of the bunch such as geometrical size of the bunch and energy distributions. For bunch with smaller sizes the effect of IBS will be bigger and for bunch with bigger sizes the effect of IBS will be smaller. This dependence is illustrated in figure 3.8 for different initial bunch length.This give an understanding that during simulations of IBS together with other physical phenomenon due to increase of bunch length effect of IBS will be smaller compare with simulations with only IBS.

Chapter 4 Description of the simulation code

The ThomX ring has been designed with three different codes. The first design of the linear and non linear transverse optics has been performed with the BETA code [START_REF] Payet | Beta code[END_REF]providing small beta functions at IP (0.1 m) as well as large dynamical aperture and magnet multipole tolerances. A second step was performed with the TRACYIII [START_REF] Nishimura | Tracy, a tool for accelerator design and analysis[END_REF] code dedicated to long symplectic tracking and Frequency Map Analysis (FMA) to cross check the particles motion stability obtained with the BETA code. Up to this stage, no collective effects are included and a dedicated codes has been developed including a collection of wake field as well as the non linear dynamics. It is a 6D multi-particles symplectic tracking restricted for perfect hard edge drift, quadrupoles and dipoles of finite length. Other higher order elements, such as sextupoles, are treated in the thin length approximation. The Radio Frequency cavity is simply treated as a longitudinal cosine kick. The mapping through elements are given by the exact Hamiltonian solution presented on page 38 for the drift, dipole (including small curvature) and dipole edge effect. The quadrupole mapping is restricted to small radial angles. It as been compared to various codes (TRACYIII, EL-EGANT, BETA and MADX) on the SOLEIL and ThomX ring with special care on the dipole and dipole edge effects [START_REF] Zhang | Dipole fringe field effects in the thomx ring[END_REF]. The various collective effects are:

• Broad band impedance model p. 48.

• Longitudinal Space Charge p. 48.

• Restive Wall p. 49.

• Intra Beam Scattering p. 52. This code is developed with the Matlab software as an open toolbox in which additional effects can be easily implemented as, for instance, Compton Back Scattering (CBS). In addition, the tracking method can be set to linear or non-linear with or without the previous collective effects. 57

Architecture

To achieve this task the programming language MATLAB was chosen. The code can be split on 2 main parts:

• A starting shell in which the beam profile is prepared or loaded.

• A main loop inside which the processes occurring during one turn of the electron beam in the ThomX ring will be simulate.

The principal scheme of the starting shell is presented in Figure 4.1:

In the starting shell we set the initial parameters of the simulations, both physical and local. Physical parameters contain information about of the electron bunch at injection, the laser pulse and the parameters of the accelerator ring. Local parameters contain flags to select the type and length in number of turns of the simulation and the path to load the initial data and save the final data of simulation. Important feature of the starting shell is to save all informations at the end of the simulation to have the possibility to run the next simulation exactly at the place where the previous simulation was finished. This gives the possibility to be independent from the limit of the computational time during simulations of a large number of turns. Also starting the shell can run several simulations with different parameters values for electron beam and laser pulse and for the accelerator ring. This open the possibility to scan for different regime at injection, study the influence of errors in misalignment of synchronisation of the electron bunch and the laser pulse at the interaction point of the Compton scattering and many other things.

Performance

The Main loop simulates the beam propagation through the accelerator ring during one turn with the selected physical phenomena. The scheme of the main loop is presented on If rf lags.track bunch LIN = 1 linear beam propagation of the beam through transport matrices of the accelerator and propagation through the RF cavity will be simulated.

If rf lags.track bunch wake = 1 non linear beam propagation of the beam using the Hamiltonian formalism will be simulated taking into account non linear effects and simulating propagation through RF cavity with longitudinal phase feedback taking into account delay time. In starting shell a protection is added which does not allow rf lags.track bunch LIN and rf lags.track bunch wake to be set at the same time. In this non linear simulation we can add additional flags to simulate the collective effects:

• rf lags.LSC wake; simulate LSC • rf lags.RW wake; simulate RW • rf lags.CSR shielded wake; simulate CSR Collective effects can be simulated all together or separately to study each effect more in detail.

Each flag can run the function to calculate the wake-field for the corresponding collective effect. These wake-field are represented by a kick applied to the bunch at different locations along the ring.

If rf lags.IBS = 1 the growth time due to Intra Beam Scattering averaged around the ring and the corresponding emittance increment added to bunch will be calculated.

If rf lags.CBS = 1 it will a run function to modify the 6-D phase space to 14-D beam profile used by the CAIN code and run the code CAIN to simulate Compton Back Scattering of the electron bunch with the laser pulse. After CAIN finishes the simulation the 14-D beam profile will be transformed back into the 6-D phase-space. Profile of scattered photons will be saved in the output directory.

After each of theses functions a checking function is called to verify if a particle went out of the acceptance of the accelerator. Particles which go out of acceptance are deleted from the bunch.

Chapter 5

Results of the simulations and their interpretation

Linear tracking

To study the beam dynamics in ThomX it is important to do simulations of linear tracking of the electron beam through the accelerator ring. To minimize the oscillations due to mismatching in the longitudinal plane between bunch length and energy spread, we use the formula 5.1 proposed in [START_REF] Wiedemann | Particle accelerator physics[END_REF] to match the bunch length to the energy.

σ s 2 = c|η c | Ω σ e (5.1)
were Ω the synchrotron frequency and η c is the momentum compaction. Using this expression we can obtain a matched bunch length σ s = 0.007 m and energy spread σ s = 0.3% for ThomX.

As we can see from the figure 5.1, injecting a matched beam and simulating linear tracking has perfect beam evolution during all injection cycle (20 ms). As we can see the amplitude of the synchrotron oscillations is around of 10 -18 which can be assumed as 0 due to rounding errors during matrix multiplications and limited number of macro particles in the bunch.

Unfortunately injecting a matched beam in ThomX is not possible. Technical parameters of the gun, the linear accelerator and the injection section will inject in the ring a bunch with a banana shape as profile in the longitudinal phase space as shown in figure 5.2.

Injecting a non matched bunch with a banana shape profile and using linear tracking we clearly see in figure 5.3 that now we have large amplitude of synchrotron oscillations for phase and energy spread.

-0.5 0 0.5

Non Linear tracking using Hamiltonian formalism

It is very important take in to account non linear effects such as the influence on the dynamics of the electrons in the ring of the second order of momentum compaction presented on section 3.2.2. In figure 5.4 we see the non linear tracking of a non matched beam compared with linear tracking of the same beam.

Non Linear tracking with longitudinal phase feedback

As we can see in figure ?? in the longitudinal plane the electron bunch have large synchrotron oscillations. These large oscillations will also have negative impact on the flux of scattered photons due to longitudinal misalignment at interaction point (equation 1.28). Due to the small energy losses of the synchrotron radiation ≈ 1.6 eV the damping time (τ ∼ 1.7 s) is much bigger an injection cycle (20 ms). It mean that to damp the amplitude of the synchrotron oscillations we have to use a longitudinal phase feedback. As shown page 48 the longitudinal phase feedback has two main parameters delay time and gain.

In figure 5.5 is presented how the longitudinal phase feedback with a time delay of 0 and K f b = 1/10 damp the amplitude of synchrotron oscillation during the first 300 turns after injection.

On the figures 5.6 and 5.7 we show the longitudinal phase space simulated for different As we can see on this figure 5.7 for a feedback time delay of 9 turns the longitudinal feedback ceases to operate and the reason of that is now correction in phase occurs at the wrong phase of synchrotron oscillation at as 1/4 of period it (see section 3.2.6).

On next the figure presented result of simulation made for feedback time delay = 41 turns and as we can see longitudinal phase feedback works well for this time delay. Therefore it is possible to use electronics for a feedback system with a time of reaction ≈ 2 µs.

Non Linear tracking with Longitudinal Space Charge

In figure 5.9 simulations with and without Longitudinal Space Charge (LSC) are presented.

As we can see due to the Longitudinal Space Charge the wake field of the beam explodes and get to a stable regime only after loosing macroparticle that go outside the energy acceptance.

To reduce this negative influence of Longitudinal Space Charge wake field on the beam we can use longitudinal phase feedback (FB). In figure 5.10 are presented simulations of tracking with Longitudinal Space Charge wake field with longitudinal phase feedback (FB) and without.

As we can see from these simulations presented in figure 5.10 the longitudinal phase feedback (FB) totally reduces the effect of Longitudinal Space Charge wake field in the longitudinal plane.

Non Linear tracking with Resistive Wall

Similarly we make simulations to see the influence of Resistive Wall wake fields presented on p. 49. As we can see from these simulations in figure 5.11 the influence of Resistive Wall wake fields is much smaller than Longitudinal Space Charge wake field and can be totally reduced by the longitudinal phase feedback (FB).

Non Linear tracking with Coherent Synchrotron Radiation

Looking at simulations to track the bunch with Coherent Synchrotron Radiation (CSR) wake field we notice that for an initial charge of the electron bunch of 1 nC the effect of the CSR wake field is so strong that it destroys the beam immediately after injection: after 4 turns 33% of macro-particle will be lost (see figure 5.12 and 5.13).

As we can see from the simulations presented in figure 5.12 after 3 turns the beam starts to reach the limit of the energy acceptance and after 5 turns we loose almost half of the particles in the bunch because they are outside the energy acceptance. Such a short time (0.2 µs ≈ 4 turns), so quickly after injection does not allow to use feedback system. Coherent synchrotron radiation (CSR) wake field has a linear dependence on the injected charge of the bunch (see equation 3.57 page 50). In figure 5.13 we see the dependence of the final charge of the bunch and the number of surviving macro particles on the initial charge of the bunch.

As we can see if injected charge of the bunch will be 0.8 nC in this case we reduce effect of CSR.

Reducing only the initial bunch charge we save the number of particles in the bunch but our bunch breaks into several small bunches as shown in figure 5.14 and this will have a negative effect on the flux of scattered photons.

To make bunch lengthening faster we should change optics to have higher dispersion. This dispersion now has the profile presented in figure 5.15.

Changing the dispersion gives the possibility to move the limit charge of the injected bunch from 0.8 nC to 1 nC. In figure 5.16 is presented the particle losses during tracking simulations for different initial charge of the bunch with the new dispersion function.

As we can see from figure 5.16, 1 nC now start be the critical charge for injection. Also we see two different situations at charge of the bunch 1 nC: when bunch save 100% of the injected charge and when it looses about 50% of the charge. Let's look on phase space evolution of this two different cases with exactly the same initial parameters (except for the seed of the (pseudo) random number generator).

Looking further this dependence on the initial charge will be reflected on the number of Compton scattered photons as presented in figure 5.17. The beam break up seen in figure 5.18 leads to large amplitude oscillations of the barycentre of the bunch, leading to losses of ∼ 50% of the electrons in the bunch. We can see these from the bump in figure 5.21, 5.22 at around 1.1 ms . The split bunch increases so much that one of the parts goes out of the acceptance. Changing the lattice gives the possibility to increase the limit charge for the injected bunch but does not reduce the problem of the bunch break up.To reduce this destructive effect of CSR wake field as shown in figure 5.16 one must reduce the initial charge of bunch. But as we can see from figure 5.17 and from equation 1.28 reducing the charge of injected bunch of electrons we also reduce the flux of scattered photons due to Compton back scattering.

Another way is to operate the injection with a different setting: apply an energy offset to the electrons to compensate the first turns CSR losses by running the linac slightly off-crest in order to fix the bunch lengthening and to mitigate the CSR risks. The last method gives us the possibility to damp the amplitude of the oscillations and to mitigate the destructive effects of CSR.

To simulate the energy offset we simply add a constant value to the energy spread of As we can see from figure 5.24 without longitudinal feedback and without initial energy offset the beam explodes and looses more than half of the particles. As we can see from this simulations with feedback we save ≈ 60% of the particle in the bunch but another ≈ 40% of the particle are lost (bump around 0.8 ms), as described page on 75 and presented in figure 5.21 and 5.22.

But if we inject the beam with an energy offset of 0.1% and make two simulations without and with longitudinal phase feedback the result of this simulation is presented in figure 5.26 and 5.27 (respectively).

If we increase the initial energy offset up to 0.5% (figure 5.28) and 1% (figure 5.29) respectively the situation will be similar to that with initial energy offset of 0.1%. As we see from the beam evolution in the longitudinal phase space (figures 5.30 and 5.31) using an initial energy offset puts the barycentre of the bunch in a position where the synchrotron motions together with the longitudinal phase feedback prevent the creations of micro-bunching seeds due to the wake field of Coherent synchrotron radiation (CSR). The mitigation of the destructive effects of CSR wake field using an initial energy offset is a complicated dynamics effects to which several processes contribute, including synchrotron motions, feedback, mismatched beam profile (banana shape) and initial energy offset.

Simulation of the effect of Intra Beam Scattering

To understand the effect of Intra beam scattering on the flux of scattered photons I made three simulations with the same initial bunch distribution (matched beam) and simulated the linear tracking with:

• Compton Back Scattering (CBS).

• Intra Beam Scattering (IBS).

• Intra Beam Scattering and Compton Back Scattering (IBS+CBS).

With these simulations we can compare the influence of IBS and CBS on the beam dynamics under linear tracking. As we can see for the evolution of the relative energy spread, CBS is dominant whereas for the horizontal emittance the dominant effect is IBS.

We have seen in formula 1.27 that the flux of scattered photons is inversely proportional to the beam size. As due to IBS the transverse size of the bunch increases (see figure 5.33) the flux will decrease. The evolution of the flux of scattered photons is presented in figure 5.34.

But Intra Beam Scattering changes not only the geometrical sizes of the electron bunch but it also increases the energy spread of the particles in the longitudinal plane and the horizontal plane. As a result the energy distributions will be changed also. Figure 5.34 shows the energy spectrum of the scattered photons for simulations with and without To see influence of increases of the horizontal emittance on the energy distribution of scattered photons due to IBS we look at the distribution of the number of scattered photons versus energy spectrum to the angle of scattering. It is hard to see that the spectrum made with IBS has a broader profile. To see this difference clearly we slice this distribution by angular bin of 0.3 mrad and we calculate the full width half maximum of each slice in the energy plane (figure 5.36). This highlights the different width of the two energy spectrum. Also to see this difference we can see if we normalise the distribution of scattered photons versus the energy spectrum to the angle of scattering on the number of scattered photons and subtract one distributions from another as presented in figure 5.37.

On this figure 5.37 now we clearly can see that the distribution of the scattered photons with IBS has a wider width (red) and that without IBS the scattered photons have a sharper distribution in energy spectrum. Now we can clearly see that the effect of IBS has some influence on the energy spectrum of the scattered photons and some influence on the flux of scattered photons (see figure 5.34).

Comparison of the effect of all the processes on the Compton flux

I made simulations of all physical effects included in the code and studied how they change the beam dynamics and as consequence how they affect the flux and energy distributions of scattered photons. I made simulations with all these effects together to see how they will affect the beam simultaneously and modify the influence of each other.

For this we make two set of simulations one without longitudinal feedback (F B 0 EnOf 0) and another with longitudinal feedback and with an initial energy offset of 1% (F B 1 EnOf 1). The last one give us the possibility to remove the destructive effect of CSR seen in the previous chapter.

All these simulations were done with the "banana shape" distributions of the electron bunch and non linear 6-D bunch tracking. Figure 5.38 shows that the influence of IBS on the flux of scattered photons will be reduced when it is considered together with non linear 6-D tracking. This is due to the increase of emittance and energy spread with this process.

When LSC is added to the simulations presented in figure 5.39 we clearly see the effect of longitudinal feedback (FB) that does not give the possibility to the LSC wake field to increase the energy spread and reduce the amplitude of the oscillations mean energy as shown in figure 5.10. The difference of flux at the beginning is explained by the initial increase of the horizontal emittance due to the initial energy offset.

The effect of RW is presented in figure 5.40. It will also be reduced by the longitudinal FB, but compared with the LSC influence of the RW on the beam dynamics is much smaller and in this case we see a big effect on the flux due to the initial energy offset. But as shown in the chapter about of CSR (see page 70) an initial energy offset is necessary to reduce the destructive effect of CSR and we can see it on the evolution of the number of macro particles in the bunch in figure 5.42. This influence of the initial energy offset on the beam dynamics together with longitudinal FB is presented in figure 5.41.

The factors that cause this difference in flux in figure 5.41 are the loss of electrons due to CSR and the different positions of the centre of mass for the electrons without longitudinal feedback as presented in figure 5.42.

The initial energy offset will lead to an increase of transverse size of the bunch and therefore a reduced a flux. However this energy offset mitigates the destructive effect of CSR leading to less electron losses and more stable bunch position and delivers higher flux.

From the simulation presented in figure 5. [START_REF] Murphy | Longitudinal wake field for an electron moving on a circular orbit[END_REF] we can clearly see that for the ThomX ring the dominating physical phenomena which provide the biggest beam losses and as The effect of the method I have proposed to mitigate the effect of CSR is shown in figure 5.41. By implementing longitudinal FB and injecting the beam with an initial energy offset the flux of scattered photons is improved by 33%.

Full comprehensive simulation of one injection cycle

The code that I developed opens the possibility to make a full comprehensive simulation of the electron's bunch dynamics in the ThomX ring, turn by turn, during one injection cycle of ∼ 20 ms taking in account the following physical phenomenons described earlier in this work:

• Non linear 6D tracking.

• Compton Back Scattering with pulse energy of 30 mJ.

• Longitudinal Space Charge.

• Restive Wall effect.

• Coherent Synchrotron Radiation.

• Intra Beam Scattering.

• introducing longitudinal phase feedback and initial energy offset of 1%.

This simulation describe the evolution of main electron's beam characteristic at the injection and interaction points such as the evolution of the horizontal size of the electron bunch and of the horizontal size of the electron bunch (figure 5.44), the evolution of the electron bunch length and of the longitudinal position of the electron's bunch centre mass (figure 5.45), the evolution of the energy spread and of the mean energy (figure 5.46). Also we can see the evolution of the longitudinal phasespace presented in figure 5.47 allowing us to estimate the transition from the turbulent regime to the Gaussian distribution of the particles in the bunch. At the same time the information about the scattered photons were saved and we can easily obtain their flux and energy distribution as presented in figure 5.49. Chapter 6

Conclusion

In this document I presented my work on transverse and longitudinal non linear dynamics of an electron beam in a Compton X-ray source storage ring.

This is important in the framework of the ThomX project, a novel X-ray source based on Compton backscattering. ThomX is a compact electron storage ring and the beam dynamics studies of the machine parameters I did will allow the electron beam to meet the high quality requirements at the point of collision with the laser photons. I investigated the influence of the electrons' beam parameters on the flux and the energy distribution of the Compton photons. I also studied the influence of misalignments and synchronisation errors on this flux.

To achieve this I worked an a code that takes into account the main physics factors of a beam dynamics like Compton recoil, intrabeam scattering and Touscheck effect.

Thanks to this code I found a strong influence of non linear effects and non matched injection on the beam dynamics. I presented the possibility to apply a longitudinal feedback and the effect of the feedback's delay in the simulation to explore its damping effect and a direct RF feedback. In this context I took part in measurement and analysis of the RF cavity for ThomX. I also introduced collective effects such as longitudinal space charge, resistive wall and coherent synchrotron radiation that affect the beam in the accelerator. This allows having a full 6D simulation of the beam dynamics in a Compton ring taking into account the feedback stabilisation for the 400 000 turns (∼ 20 ms) of one injection cycle. This code has the important feature of combining 6D non linear tracking with collective effects, longitudinal phase feedback, intrabeam scattering and Compton backscattering in the same simulation. This simulation code can be run on a computer farm. 101 CHAPTER 6. CONCLUSION Intra Beam Scattering is one of the most calculation intensive process but I implemented a simplified method that reduces the computation time by a factor 100 without significant increases in uncertainties.

I checked that the effects of intrabeam scattering is very strong at the injection due to the short bunch length and small transverse emittances and its effect become smaller with growing beam size. I also showed that the effect of intrabeam scattering on the energy distributions of the scattered photons is caused by the increase of the transverse momentum of the electron bunch. I verified that the negative impact of some collective effects such as longitudinal space charge and resistive wall and injection mismatch can be attenuated by the implementation of a longitudinal phase feedback. I found that the effect of coherent synchrotron radiation is dominating the beam dynamics due to very the short bunch length at the injection. I present a strategy to reduce the destructive and disruptive influence of coherent synchrotron radiation by the using longitudinal feedback together with an initial linac energy offset.

In the future the code I developed and these simulations will help the operators of ThomX to have a good understanding of the beam dynamics, especially during its commissioning phase due to start in 2015.

1

 1 Applications of hight energy X-rays . . . . . . . . . . . . . . . . . . . . . . 1.2 Compton back scattering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Compton cross-section . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.2 Scattering reaction yield . . . . . . . . . . . . . . . . . . . . . . . . 1.2.3 Numerical simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 General Layout and working scheme of the ThomX X-ray generator . . . . 2 Storage ring RF system 3 Beam dynamics at ThomX 3.1 Models of transverse motion at circular accelerators . . . . . . . . . . . . . 3.1.1 Transport matrices model . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 The Hamiltonian Formalism . . . . . . . . . . . . . . . . . . . . . . 3.2 Longitudinal dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Representation of the bunch by macro-particles . . . . . . . . . . . 3.2.2 Dependence of the longitudinal coordinate on energy (Phase advance) 3.2.3 Energy compensation in the RF cavity . . . . . . . . . . . . . . . . 3.2.4 Effect of the Synchrotron Radiation . . . . . . . . . . . . . . . . . . 3.2.5 Period of oscillations longitudinal positions (S), Synchrotron oscillation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.6 Beam phase feedback on the RF cavity . . . . . . . . . . . . . . . . 3

Figure 1 . 2 :

 12 Figure 1.2: Debyegram produced by passing an X-ray beam trough multi-crystals object.Each line is caused by diffraction of initial X-ray radiation on one separate plane of atoms[START_REF] Blokhin | The physics of X-rays[END_REF].

1 . 2 . 3 .

 123 Photon beam energy above E 0 = 33.156 keV for iodine and below E 0 = 50.329 keV for gadolinium Photon beam intensity: 9.10 * 10 10 phot/mm 2 s Energy spread of photon beam: ±150 eV 4. Monochromatic photon beam size: better than 0.1 × 150 mm 2 . 5. Time of exposure: less than 2 µs.

Figure 1 . 4 :

 14 Figure 1.4:The typical experimental set-up for transvenous coronary angiography with synchrotron radiation.[START_REF] Arfelli | Synchrotron light and imaging systems for medical radiology[END_REF]

Figure 1 . 5 :

 15 Figure 1.5: Kinematics of the scattering process.

Figure 1 . 6 :

 16 Figure 1.6: Dependence of the maximum scattered photon energy on the energy of the electrons for a laser photons energy ε γ0 = 1.24 eV .

Figure 1 . 7 :

 17 Figure 1.7: Energy spectrum of scattered photons for different energy of electron beam E 0 : red E 0 = 45M eV , blue E 0 = 50M eV , green E 0 = 55M eV .

Figure 1 . 8 :

 18 Figure 1.8: differential cross-section in unit of angle from scattering angle of photons for different energy of electron beam for different energy of electron .

Figure 1 . 10 :

 110 Figure 1.10: differential cross-section in unit of solid angle in dependence of energy of scattered photons for different energy of electron beam.

Figure 1 . 11 :

 111 Figure 1.11: Interaction between two bunches with Gaussian density distributions.

Figure 1 . 12 :

 112 Figure 1.12: Comparison of the theoretical formula 1.29 for the Compton flux (in red) with the flux calculated by simulations in CAIN (in blue). The horizontal axis corresponds to different misalignments of the longitudinal laser position (laser timing) at the interaction point.

Figure 1 . 13 :

 113 Figure 1.13: Layout of the ThomX source. [23].

2 .

 2 Linear accelerating section to accelerate electrons to 50 -70 M eV . 3. Transfer line. 4. Storage ring with circumference 16.8 m.

Figure 1 . 14 :

 114 Figure 1.14: Operation scheme of the ThomX source. [23].

  Figure 2.1.

Figure 2 . 1 :

 21 Figure 2.1: ThomX cavity assembly (front and back views).

Figure 2 . 2 :

 22 Figure 2.2: Shunt impedance spectrum for (a) monopole and (b) dipole modes.

Figure 2 . 3 :

 23 Figure 2.3: Frequency shift vs. HOMFS position (a) for monopole and (b) for dipole modes.

Figure 3 . 1 :

 31 Figure 3.1: Oscillations of the longitudinal positions and spectrum of the oscillation observed during simulations.

  .2 is presented the dependence of the amplitude of longitudinal position of the bunch of electrons from different time delay d in the equation (3.52) of longitudinal phase feedback for ThomX, for K f b = 1 100 .

Figure 3 . 2 :

 32 Figure 3.2: Dependence of the amplitude of the longitudinal position of the bunch of electrons from different time delay.

Figure 3 . 3 :

 33 Figure 3.3: Scheme LSC

Figure 3 . 4 :

 34 Figure 3.4: Scheme of RW

2πσ 1 3

 1 , c being the speed of light, b the tube radius, and σ the conductivity of the walls.

Figure 3 . 5 :

 35 Figure 3.5: Scheme CSR

Figure 3 . 6 :

 36 Figure 3.6: The IBS effect at the horizontal plane as calculated by Piwinski, B-M, Bane and CIMP for the nominal (left) and low energy (right) lattice [48].

  ∆σ e,n < |σ e,n -σ e,n-1 |/100 (3.68) In this case we don't need to calculate IBS again. Also we check: |σ e,nl -σ e,n |/σ e,n > 5 * 10 -2 (3.69)

Figure 3 . 7 :

 37 Figure 3.7: Comparison between IBS and IBS extrapolation algorithm on an example of implementation of IBS on energy spread of electron bunch.

Figure 3 . 8 :

 38 Figure 3.8: Evolution of the normalized (left) energy spread of the bunch and (right) transverse emittance versus time. Each quantity is normalised to its value at injection.

Figure 4 . 2 .

 42 The flags specified in the starting shell select the type of simulation. The following flags are implemented in the code:• rflags.IBS; simulate IBS • rf lags.CBS; simulate CBS • rf lags.track bunch LIN ; simulate linear bunch propagation • rf lags.track bunch wake; simulate non linear bunch propagation Each of them can be set to either 0 (N O) or 1 (Y ES).

Figure 4 . 1 :

 41 Figure 4.1: The structure of the initial part of the code.

Figure 4 . 2 :

 42 Figure 4.2: Structure of the main loop.

Figure 5 . 1 :

 51 Figure 5.1: Evolution on phase space matched beam during linear tracking 20 ms or 400000 turns.

Figure 5 . 2 :

 52 Figure 5.2: Initial longitudinal beam profile of the bunch non matched banana shape (left) and matched beam (right).

5. 2 .-Figure 5 . 3 :

 253 Figure 5.3: Evolution of the phase space matched and non matched beam during linear tracking over 20 ms or 400000 turns (left). Zoomed plots for the first 1000 turns (right).

66CHAPTER 5 .Figure 5 . 4 :

 554 Figure 5.4: Comparison of linear and non linear tracking of a non matched beam made only for the first 300 turns after injection (left). Non linear tracking of a non matched beam for 100 000 turns (right).

Figure 5 . 5 :Figure 5 . 6 :

 5556 Figure 5.5: Non linear tracking with and without longitudinal phase feedback during the first 300 turns after injection.

68CHAPTER 5 .Figure 5 . 7 :

 557 Figure 5.7: Non linear tracking with longitudinal phase feedback for feedback time delay of 5 turns corresponding to a more realistic feedback model (left). Non linear tracking with longitudinal phase feedback for feedback time delay of 9 turns correspond to 1/4 of period synchrotron oscillation (right).

Figure 5 . 8 :

 58 Figure 5.8: Non linear tracking with longitudinal phase feedback for feedback time delay of 41 turns that corresponds to the period of synchrotron oscillations.

Figure 5 . 9 :

 59 Figure 5.9: Evolution of (left) energy spread of the bunch and (right) position of energy barycentre of the bunch. Blue line is simulation with LSC and red without LSC.

Figure 5 . 10 :

 510 Figure 5.10: Evolution of (left) energy spread of the bunch and (right) position of energy barycentre of the bunch. Blue line is simulation with FB and red without FB.

1 Figure 5 . 11 :

 1511 Figure 5.11: Evolution of (left) energy spread of the bunch and (right) position of energy barycentre of the bunch with the influence of Resistive Wall wake field. Blue line is simulation with FB and red without FB.

Figure 5 . 12 :

 512 Figure 5.12: Evolution of the longitudinal phase space under the influence of Coherent synchrotron radiation (CSR) wake field.

Figure 5 . 13 :

 513 Figure 5.13: Dependence of the final charge on the initial charge of the bunch.

Figure 5 . 14 :

 514 Figure 5.14: Evolution of the longitudinal phase space this influence of Coherent synchrotron radiation (CSR) wake field for initial bunch charge 0.8 nC. We can see that after 3000 turns the bunch has split.

Figure 5 . 15 :

 515 Figure 5.15: Dispersion η (left) and amplitude function (right) for the new lattice compared with the old lattice.

Figure 5 . 16 :

 516 Figure 5.16: Particle losses during tracking simulations with Coherent synchrotron radiation (CSR) wake field for different initial charge of the bunch with new dispersion function. Each blue cross correspond to a simulation (There are 10 simulations with different random seed for each charge).

Figure 5 . 17 :

 517 Figure 5.17: The number of Compton scattered photons for different initial charge of the injected bunch (There are 10 simulations with different random seed for each charge).

Figure 5 . 18 :

 518 Figure 5.18: Evolutions of longitudinal phase space. Left is for CSR without beam break up and losses. Right is for CSR with beam break up leading to losses.

Figure 5 .

 5 Figure 5.19 and 5.21 present the evolution of the mean energy spread and phase of the beam for the simulations presented in figure 5.18.

76CHAPTER 5 .

 5 RESULTS OF THE SIMULATIONS AND THEIR INTERPRETATION

Figure 5 . 22 :

 522 Figure 5.22: Oscillations of the rms relative energy spread and longitudinal bunch length of the electron beam in case of destructive effect of CSR wake field with simulations made without collective effect. The bump around 1.1 ms described page 75 and correspond to particle losses.

Figure 5 . 23 :

 523 Figure 5.23: Initial longitudinal beam profile of the bunch non matched banana shape without energy offset (blue) and with energy offset 1% (green), bucket seperatrix (red). Simulations were done with different values of initial energy offset, introducing a progressive offset in energy (0, 0.001, ... 0.01) with and without longitudinal phase feedback (for this simulations I use FB time delay = 0) At the beginning I made simulations without longitudinal phase feedback and initial energy offset.

Figure 5 .

 5 Figure 5.25 shows the same simulations but with longitudinal phase feedback.

Figure 5 .

 5 Figure 5.27 shows that using a longitudinal feedback reduces the number of particles lost and damps the amplitude of the synchrotron oscillations. Thanks to this feedback

Figure 5 . 24 :

 524 Figure 5.24: Evolution of the phase space (left) and phase space of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation without feedback and initial energy offset.

Figure 5 . 25 :

 525 Figure 5.25: Evolution phase space (left) and phase space of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation with feedback but without initial energy offset.

Figure 5 . 26 :

 526 Figure 5.26: Evolution of the phase space (left) and phase space portrait of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation without feedback but with initial energy offset of 0.1%.

Figure 5 . 27 :

 527 Figure 5.27: Evolution of the phase space (left) and phase space portrait of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation with feedback but with initial energy offset of 0.1%.

Figure 5 . 28 :

 528 Figure 5.28: Evolution of the phase space (left) and phase space portrait of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation with feedback but with initial energy offset of 0.5%.

Figure 5 . 29 :

 529 Figure 5.29: Evolution of the phase space (left) and phase space portrait of the bunch (right up) with longitudinal particle distribution (right down) after 20000 turns made during simulation with feedback but with initial energy offset of 1%.

Figure 5 . 30 :

 530 Figure 5.30: Evolution of the longitudinal phase space under the influence of Coherent synchrotron radiation (CSR) wake field with (blue) initial energy offset of 1% and without (red) with longitudinal phase feedback.

Figure 5 . 31 :

 531 Figure 5.31: Evolution of the longitudinal phase space under the influence of Coherent synchrotron radiation (CSR) wake field with (blue) initial energy offset of 1% and without (red) with longitudinal phase feedback.

Figure 5 . 32 :

 532 Figure 5.32: Evolution of the normalized (left) energy spread of the bunch and (right) transverse emittance versus time. Each quantity is normalised to its value at injection.

Figure 5 . 33 :Figure 5 . 34 :

 533534 Figure 5.33: Evolution of the normalized horizontal size of electron bunch at injection (right) and at interaction point (left)

Figure 5 . 35 :

 535 Figure 5.35: Distribution of the scattered photons,energy spectrum versus angle of scattering made in the case with IBS (left) and without (right).

Figure 5 . 36 :

 536 Figure 5.36: Full width half maximum of the energy spectrum of angular slices of width 0.3 mrad of the scattered photons with IBS (red) and without IBS (blue).

  photons energy (KeV)

Figure 5 . 37 :

 537 Figure 5.37: Difference of normalised distribution of scattered photons, energy spectrum versus angle of scattering.

  Flux [photons/ms]IBS 1 FB 0 EnOf 0 LSC 0 RW 0 CSR 0; Flux=3.9e+11 IBS 0 FB 0 EnOf 0 LSC 0 RW 0 CSR 0; Flux=3.9e+11 IBS 1 FB 1 EnOf 1 LSC 0 RW 0 CSR 0; Flux=3.6e+11 IBS 0 FB 1 EnOf 1 LSC 0 RW 0 CSR 0

Figure 5 . 38 :

 538 Figure 5.38: Effect of IBS. Evolution of the flux (top), of the horizontal emittance of the electron bunch (left bottom), of the energy spread of the electron bunch (right bottom).Simulations without longitudinal feedback (F B 0 EnOf 0; red and blue) and with longitudinal feedback and with initial energy offset 1% (F B 1 EnOf 1; magenta and cyan), with IBS (red and magenta) and without (blue and cyan)

Figure 5 . 39 :

 539 Figure 5.39: Effect of LSC. Evolution of the flux (top), of the horizontal emittance of the electron bunch (left bottom) and of the energy spread of the electron bunch (right bottom)

Figure 5 . 40 :

 540 Figure 5.40: Effect of RW. Evolution of the flux (top), of the horizontal emittance of the electron bunch (left bottom)and of the energy spread of the electron bunch (right bottom)

Figure 5 . 41 :

 541 Figure 5.41: Effect of CSR. Evolution of the flux (top). Evolution of the horizontal emittance of the electron bunch (left bottom). Evolution of the energy spread of the electron bunch (right bottom)

Figure 5 . 42 :

 542 Figure 5.42: Evolution of the number of particle in the bunch (top), of the horizontal size of the electron bunch (left center), of the horizontal position of the barycentre of the electron bunch (right center), of longitudinal size of the electron bunch (right bottom) and of the longitudinal position of the barycentre of the electron bunch (right bottom).

  /ms] IBS 0 FB 0 EnOf 0 LSC 0 RW 0 CSR 0; Flux=3.9e+11 IBS 1 FB 0 EnOf 0 LSC 0 RW 0 CSR 0; Flux=3.9e+11 IBS 0 FB 0 EnOf 0 LSC 1 RW 1 CSR 0; Flux=3.4e+11 IBS 0 FB 0 EnOf 0 LSC 1 RW 1 CSR 1; Flux=2.7e+11 IBS 1 FB 0 EnOf 0 LSC 1 RW 1 CSR 0; Flux=3.3e+11 IBS 1 FB 0 EnOf 0 LSC 1 RW 1 CSR 1; Flux=2.7e+11 IBS 1 FB 1 EnOf 1 LSC 1 RW 1 CSR 1; Flux=3.9e+11

Figure 5 . 43 :

 543 Figure 5.43: Evolution of the flux with the influence of different collective effect with and without the longitudinal feedback and an initial energy offset of 1%. The flux given in the legend is the total photons produced during this simulation.

Figure 5 . 44 :

 544 Figure 5.44: Evolution of the horizontal size of the electron bunch (left) and of the horizontal size of the electron bunch (right).

Figure 5 . 45 :

 545 Figure 5.45: Evolution of the electron bunch length (left) and of the longitudinal position of the electron's bunch centre mass (right).

Figure 5 . 46 :

 546 Figure 5.46: Evolution of the energy spread (left) and of the mean energy (right).

Figure 5 . 47 :Figure 5 . 48 :

 547548 Figure 5.47: Evolution of the longitudinal phasespace.

  photons energy (KeV)

Figure 5 . 49 :

 549 Figure 5.49: Comparison of the energy spectrum of the scattered photons for the flux of the first 10000 turns after injection and of 10000 turns after 240000 turns.

Table 1 .

 1

	2: Injector
	Charge	1 nC
	Laser wavelength and pulse power	266 nm, 100 µJ
	Gun Q and Rs	14400, 49 M W/m
	Gun accelerating gradient	100 M V /m @ 9.4 M W
	Normalized r.m.s emittance	8πmm mrad
	Energy spread	0.36%
	Bunch length	3.7 ps
	Table 1.3: Ring
	Energy	50M eV (70M eV possible)
	Circumference	16.8 m
	Crossing-Angle (full)	2 degrees
	β x,y @ IP	0.1 m
	ε x,y (without IBS and Compton) Bunch length (@ 20 ms)	3 * 10 -8 m 30 ps
	Beam current	17.84 mA
	RF frequency	500 M Hz
	Transverse / longitudinal damping time	1 s/0.5 s
	RF Voltage	300 kV
	Revolution frequency	17.84 M Hz
	σ x @ IP (injection)	78 µm
	Tune x / y	3.4 / 1.74
	Momentum compaction factor α c	0.022
	Final Energy spread	0.6%
	Table 1.4: Laser and FP cavity
	Laser wavelength	1030 nm
	Laser and FP cavity Frep	35.68 M Hz
	Laser Power Laser Pulse Power FP Cavity finesse / Gain	50 -100 W 1.4 -2.6 µJ 30000 / 10000
	FP waist	70 µm

Power Circulating in the FP Cavity ∼ 0.07 -0.7 M W

Table 2 .

 2 1: Fundamental Cavity Mode L0 (T M 010 )

				Computed values Measured values
				CST	HFSS
		Freq. (M Hz)	499.9	499.89	500
		Q L		-	-	15512
		Q 0		44876	44426	41308
		R S (M Ω)	3.56	3.51	-
		R S /Ω (Ω)	79.3	79	-
		Loss factor (V /nV ) 124.5	124	-
		HFSS computed values		Measured values
	Mode Freq. (M Hz)	Q 0	R s (kΩ) R/Q (Ω) Freq. (M Hz)	Q L	Q 0
	L 1	948.65	45658	1340	29.3	950.6	32700 41954
	L 2	1064	60609	37.5	0.6	1055.8	5460 47001
	L 3	1422	53267	249	4.67	1419.5	13900 30648
	L 4	1517.2	62722	320	5	1514.4	27500 44385
	L 5	1618	72579	622	8.8	1602	16930 36805
	L 6	1880.7	53604	22.5	0.41	1877.6	36500 49494
	L 7	1951	77784	119	1.53	1949.8	8180 61776
	L 8	2098	55807	0.1	0.0018	2072.7	53000 57664
	L 9	2128	77985	583	7.4	2123.8	16600 39840

distinguished here. The goal of keeping the instability growth times larger than 20 ms requires HOM impedances lower than 0.5 GHz.kΩ for the monopole modes and 5 kΩ.m -1 for the dipole modes. One therefore can deduce from the results below that these HOM, which are trapped into the cavity, have to be attenuated by factors up to a few 10 3 . Table 2.2: Longitudinal (monopole) modes.

Table 2 .

 2 3: Transverse (dipole) modes.

		CST computed values		Measured values
	Mode Freq. (M Hz)	Q 0	R s (kΩ) R/Q (Ω) Freq. (M Hz)	Q L	Q 0
	D 1	744.2	47966	3.6	76	742.4	44300
	D 2	749.4	50421	13	258	745.5	7640
	D 3	1114	40971	12.8	314	1115	17880
	D 4	1224	95336	0.23	2.55	1213.4	57000
	D 5	1250	39726	4.5	114	1239.7	35400
	D 6	1311	62710	0.2	3.1	1303	49900
	D 7	1561	29480	0.03	1	1556	18200
	D 8	1643	40494	3.2	79	1646	30900
	D 9	1717	75798	1.3	17.5	1711.4	26500
	D 10	1723	44231	2.3	50.5	1718.3	58500
	D 11	1779	46762	1.6	33	1770.3	39200
	D 12	1811	38748	1.24	32	1820	31900

  Figure 5.19: Oscillations of mean relative energy spread (middle) and phase (bottom) of the electron bunch over the total duration of the injection and zoom over the first 50 µs (top) with simulation the effect of CSR wake field with simulations made without collective effect. NP is the number of remaining macroparticle in % after 100 000 turns. Figure5.21: Oscillations of mean relative energy spread and phase of the electron beam in case of destructive effect of CSR wake field with simulations made without collective effects. The bump around 1.1 ms is described page 75 and correspond to particle losses.

	mean relative -0.005 0 -0.01 0 0.005 0.01 mean relative energy dE/E0 energy dE/E0 10	-4 0.2 LD CBS CSR were splitting and beam losses occur NP=50% LD CBS CSR without beam losses NP=97% LD CBS 0.4 0.6 0.8 1 1.2 1.4 1.6 x 10 -3 LD CBS time [s]
	0 0 1 -5 0 5 -1 0 -10 phase [deg] phase [deg]	0.2 0.2	0.4 0.4	0.6 0.6	0.8 0.8 time [s] time [s]	1 1	1.2 1.2	1.4 1.4	1.6 x 10 -3 1.6 x 10 -3
	0 0 2 4 6 x 10 -3 0.2 0 0.2 -5 0 5 10 x 10 -3 LD CBS CSR were splitting and beam losses occur NP=50% 0.4 0.6 0.8 1 1.2 1.4 1.6 x 10 -3 0.4 0.6 0.8 1 1.2 1.4 1.6 x 10 -3 time [s] LD CBS rms relative energy dE/E0 [%] time [s] 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0 0.005 rms relative energy dE/E0 [%] 0.01 0.015 LD CBS CSR without beam losses NP=97% LD CBS 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0 0.01 0.02 0.03 Bunch length (rms) [m] Bunch length (rms) [m] x 10 -3 time [s]
					time [s]				x 10 -3
	Figure 5.20: Oscillations of rms relative energy spread and longitudinal bunch length of
	the electron beam with simulation of the effect of CSR wake field with simulations made
	without collective effect.