Numerical study of the photoelectron cloud in KEKB Low Energy Ring with a three-dimensional particle in cell method

124402-1 A three-dimensional particle in cell simulation code has been developed to study the photoelectron cloud instabilities in KEKB LER. In this report, the program is described in detail. In particular, typical simulation results are presented for the photoelectron motion in various kinds of magnetic fields. The simulation shows that a solenoid is very effective in confining the photoelectrons to the vicinity of the vacuum chamber wall and in creating a region free of photoelectrons at the vacuum pipe center. The more uniform the solenoid field is, the more effectively does it suppress the electron-cloud buildup. Multipacting can occur both in a drift region and in a dipole magnet, and the heat load deposited on the chamber wall due to the lost electrons is important in these two cases. Electron trapping by the beam field as well as by various magnetic fields is an important phenomenon, especially inside quadrupole and sextupole magnets. Our numerical results qualitatively agree with the experimental studies.


I. INTRODUCTION
In April 1999, a blowup of the vertical size of the positron beam was observed with the threshold beam current 450 mA in the KEKB Low Energy Ring (LER) [1].It proved to be one of the most serious luminosity limitations for KEKB.As a countermeasure, thousands of so-called C-yoke permanent magnets were installed in the KEKB LER in May 1999 and March 2000.They were attached to the outside of the vacuum chambers to confine the electrons to the vicinity of the chamber walls.A C-yoke consists of two permanent magnets and a C-shaped iron yoke.The magnets are attached every 10 cm along the drift space between ring magnets.For short bunch trains and low beam currents, the C-yoke magnets were effective in confining the electron cloud and reducing the beam-size blowup.Therefore, in September 2000 the C-yoke magnets were replaced by solenoid magnets, in order to better remove the photoelectrons near the beam.At the beginning of January 2002, the total length of the solenoids covering otherwise field-free areas around the ring circumference reached to 2180 m.This corresponds to about 95% of the total drift region.The experimental studies demonstrated that the solenoid magnets are very efficient in reducing the vertical beam size as well as the tune shift due to the electron cloud [2].No blowup was observed up to the so far highest beam current of 1300 mA.Thus the luminosity has greatly benefited from the solenoid installation.A three-dimensional particle in cell (PIC) program CLOUDLAND has been developed to study the effects of various magnetic fields on the photoelectron formation, distribution, heat load, multipacting, and so on.A threedimensional irregular mesh is applied in CLOUDLAND, which enables the program to solve the general threedimensional problem.Image currents, arbitrary magnetic fields, space charge of electron cloud, and secondary emission are all taken into account in the program.In the following, the program and examples of simulation results are described in detail.The results qualitatively agree with the experimental observations.

II. METHOD
The positron bunch is longitudinally divided into a number of slices according to a Gaussian distribution.Such slices interact with photoelectrons transversely and are propagated according to the transfer matrix of the linear optics.Photoelectrons are emitted when positron slices pass through a beam pipe with length L, which is usually chosen as 1 or 2 m.In the simulation photoelectron yield of 0.1 is assumed and 30% of the photoelectrons are taken to be produced by reflected photons, i.e., randomly distributed around the chamber.The center of the photoelectron energy distribution is assumed to be 5 eV with an rms (root mean square) energy spread of 5 eV.In our simulation, the photoelectrons are represented by macroparticles, which move in three-dimensional space under the force: (1) where F space is the space charge force of the photoelectron, F p is the force due to the electric field of the positron beam, and F B is the force exerted by the external magnetic field.The direct simulation of particle-particle interactions is most easily implemented and it has a high accuracy.
PHYSICAL REVIEW SPECIAL TOPICS -ACCELERATORS AND BEAMS, VOLUME 5, 124402 (2002) 124402-1 1098-4402=02=5(12)=124402(13)$20.00  2002 The American Physical Society 124402-1 However, the efficiency of such an approach is low due to the very large number of particles and hence very long CPU time.For this reason, a mesh method seems to be applied by most particle simulation programs.The regular mesh as applied in the study of beam-beam simulations cannot satisfy here because of the complex shape of the vacuum chamber, e.g., the antechamber in PEP-II and in the future KEKB upgrade.In our code, an irregular mesh is used, so that the solver can be applied to a general geometry.The vacuum chamber of KEKB LER is of a round shape with a radius of 50 mm.Figure 1 shows an example mesh for the KEKB-LER vacuum chamber.
Figure 2 shows one 20-node brick element employed by the solver.The charge Q 0 of a macroparticle is assigned to each node i of the brick element inside which the photoelectron is located according to the shape function where For the isoparametric element, the charge assignment scheme in Eq. ( 2) has all the characteristics of a charge assignment function, i.e., it fulfills the relations where r is the position of the photoelectron, and r i is the position at node i.The property of the shape function in Eq. ( 4) guarantees the charge conservation.
Figure 3 shows the distribution of the macroparticle and charge at the mesh node in one transverse section.The number of elements in this transverse section is 276, which is a small number.It already shows a good representation of the real electron-cloud distribution.
This method could be called a cloud-in-a-Cell (CIC) scheme [3].However, it is different from the so-called general CIC schemes which are commonly applied for multiparticle simulations in two aspects.First, the general CIC method applies a regular mesh.By contrast, our scheme uses an irregular mesh, which allows the treatment of complex boundary problems, such as the very flat beam case and the antechamber.Secondly, our scheme refers to a finite element method.Many types of elements can be considered in the finite element calculation.Higher-order elements, which means high order nonlinear terms of the potential, improve the accuracy of the calculation and are far superior to the nearest-grid-point assignment applied by the general CIC.Therefore, our scheme offers two clear advantages: the possibility to treat arbitrary boundaries and a high accuracy.In addition, an adaptive mesh can be applied if the electrons are concentrated in a small region, in analogy to similar treatments for long-range beam-beam simulations.
The electron cloud (both the density and the distribution) changes with time.However, since the electron motion is slow, in a good approximation, we can assume a quasistatic condition.At each moment, the scalar potential satisfies ÿ=" 0 : (6) Equation ( 6) can be solved by the finite element method.
FIG.The finite element equation is where the stiffness matrix A depends only on the mesh and B represents the source term.The matrix A is extremely sparse and there are well-known methods for handling such linear problems, e.g., conjugate gradient method, and profile or frontal techniques.If the vacuum chamber is of a round shape, as in the KEKB LER, we can also alternatively use a Green function to compute the potential.The potential at R for a particle distribution fR 0 is obtained using the Green function GR; R 0 as where L is the period length of the vacuum chamber, is the pipe radius, R 0 is the source position, and R is the potential position, k 2=L.We here use cylindrical coordinates with the z axis oriented along the axis of the pipe, R r; ; z, R 0 r 0 ; 0 ; z 0 .After finding the potential, the force on each particle is interpolated using the same shape function in order to conserve the momentum.In the general PIC method, the field at each node is first calculated using the difference scheme and the field at each particle is interpolated based on the fields at all nodes.Unlike the general PIC method, we directly calculate the field at each particle using the potential at the mesh nodes instead of the mesh-defined field, namely, we compute where r @ @x i @ @y j @ @z k: (11) One example of the potential and field of the electron cloud in one transverse section is shown in Fig. 4. The field is automatically perpendicular to the potential contour according to Eq. (10).Note that the distribution of the photoelectrons is three dimensional.The positron bunch is represented by a rigid Gaussian distribution.The kick on the photoelectrons is given by the Bassetti-Erskine formula [5] y i x Nr e c 2 x;y x y s fx; y; with fx; y w x iy where x and y are the positron bunch rms transverse sizes, r e is the classical electron radius, c the speed of light, N the particle number in the slice, and wx iy the complex error function.
The image charge effect is also included in the program.The shape of the vacuum chamber in KEKB LER is round.Therefore, the image current is easily found.In case of an arbitrary chamber shape, a PIC calculation can be applied to the positron bunch in the same way as to the photoelectron cloud.
The magnetic field along the beam chamber can be an arbitrary three-dimensional field.The typical magnetic fields, in which we are interested for the KEKB LER, are solenoid, dipole, quadrupole, and sextupole.
According to Furman [6], Seiler [7], and Kirby [8], the yield of the true secondary emission can be written as Yts E; max 1:11x ÿ0:35 1 ÿ e ÿ2:3x 1:35 exp0:51 ÿ cos; where, x E p 1 0:71 ÿ cos=" max [6], E p is the primary electron energy, " max is the energy of the maximum secondary emission yield, max is the maximum secondary emission yield for perpendicular incidence, and is the incidence angle with respect to the surface normal.
The initial energy distribution of the true secondary emission is taken to be a half-Gaussian centered at 0 with an rms spread of 5 eV.
The emission angles of the true secondary photoelectrons are distributed according to dN=d / cos sin or dN=d / cos, where denotes the angle with respect to the surface normal, and is the solid angle.
The parameters used in the simulation are summarized in Table I.

III. NUMERICAL EXAMPLES
In this section, the buildup, distribution, heat load, and trapping of electrons in a few typical magnetic fields are discussed.

A. Effect of C-yoke magnet and solenoid field on the confinement of the photoelectrons
Permanent C-yoke magnets were attached to vacuum ducts to sweep out the electrons in May 1999 and March 2000.The magnet field in a C-yoke magnet with quadrupole configuration is modeled as B z ÿbk sinkzxy: Where a 0:3 T=m, b 0:2 T=m, 2=k 0:1 m, and a 0, b 0:5 T=m, 0:2 m for the equal polarity and alternating polarity, respectively.The photoelectron cloud density near the beam is nonzero for all C-yoke magnet configuration as shown in Fig. 5 for equalpolarity quadrupole configuration.The transverse magnetic field is stronger than the longitudinal field in some locations along the chamber.The relatively stronger transverse field may guide the electrons into the chamber center, which is undesirable.This conclusion holds true for adjacent C-yokes of both equal and opposite polarity.Adjacent solenoids can be arranged with constant or alternating current direction in the coil.We refer to these two arrangements as the equal or alternating polarity configurations.The magnetic field in the equal-polarity configuration can approximately be expressed as B y x; y; z ÿ0:5B 0 ky coskz: For the opposite polarity configuration, the longitudinal filed is and the transverse field components are the same as for the equal-polarity case.We assume B z0 30 G, B 0 20 G, and 2=k 1 m, so as to approximate the field of the real machine for the equal-polarity configuration.There is no electron cloud at the chamber center for the equal-polarity solenoid as shown in Fig. 3(a).The reason is that the longitudinal magnetic field confines the photoelectron motion to the vicinity of the vacuum chamber wall.The more uniform the solenoid field, the more effective is the confinement.In the alternating polarity configuration, the transverse field between two adjacent solenoids is stronger than the local longitudinal field and may allow some photoelectrons to penetrate into the center of the chamber.Therefore, the equal-polarity configuration is better than the opposite polarity one.This is consistent with the experiment study [9].Compared with the C-yoke magnets, solenoids of equal polarity are much preferred, in view of the vanishing electron-cloud density at the chamber center.The electrons at the center are suspected to cause the beam-size blowup according to the Ohmi and Zimmermann model [10].Figure 6 displays the photoelectron distribution at the chamber wall, i.e., the distribution of photoelectrons which hit the wall, for the case of a solenoid field.If photoelectrons impinge on the chamber wall, they are either lost or produce secondary electrons.The solenoid field is nonuniform in the longitudinal direction, which renders the lost cloud distribution dependent on the longitudinal position.The radius of the gyration motion is small in a strong field region with a z coordinate from 0 to 0.5 m in Eq. ( 18) and Fig. 6, and hence the electron hits the wall near its emission point.On the other hand, the electron at the weaker field region, z coordinate equal to ÿ0:25 m, drifts with a big radius and hits the chamber wall far from its emission point.This is clearly shown in Fig. 6.The azimuthal distribution of the lost photoelectrons depends on the current direction in the solenoid coil, because the deflection angle of the photoelectrons depends on the sign of the magnetic field.As a consequence, the electron current measured by a photoelectron monitor will depend on both the longitudinal position of the monitor and the current direction in the solenoid coil.In a solenoid field, the photoelectrons cannot gain much energy from the positron bunch, because they are confined to the vicinity of the wall, far from the chamber center, by the solenoid magnetic field.Therefore, there is little or no multipacting in the solenoid case.The heat load on the chamber wall due to the photoelectron bombardment is also small for the same reason.It can be concluded that solenoids work well, providing both zero photoelectron density at the chamber center and a lower heat load on the chamber wall due to the absence of multipacting.

B. Multipacting in drift region and dipole magnet
In a drift region, the photoelectrons are attracted by the space charge field of the positron bunch and, therefore, a large photoelectron density builds up at the chamber center.The photoelectron density at the chamber center is 10 13 m ÿ3 , which is 5 times larger than the average volume density due to the stronger attractive force of the positron beam there.The transverse distribution of the photoelectron cloud in a drift region is shown in Fig. 7.The photoelectrons near the chamber center cloud receive more energy from the passing positron bunches than those near the wall.Such higher energy photoelectrons may cause significant multipacting when they hit the chamber wall.Heat load is an additional serious problem in a drift region because the photoelectrons are strongly accelerated by the positron bunches and the rate of photoelectron loss on the wall is large.Therefore, the drift region is considered to be the most dangerous case with respect to both beam dynamics and heat load.
Figure 8 shows the photoelectron cloud distribution inside a dipole magnet.Two multipacting strips are clearly visible in the figure .There is no experimental study on the electron cloud inside a dipole magnet in KEKB LER.The CERN SPS experiments [11] exhibited two similar multipacting strips in a dipole magnet.There is little multipacting in the center region, because the photoelectrons with horizontal coordinate close to zero receive further energy, exceeding the energy value at which the secondary emission yield is bigger than 1.The typical energy of the photoelectrons decreases from the horizontal center towards both sides.In other words, the energy of the photoelectrons decreases with the horizontal coordinate jxj as shown in Fig. 9.It is well known that the true secondary emission yield is smaller than 1 for photoelectrons with both very high and low energy.As a result, multipacting occurs in two regions on either side of the chamber center.The position of the multipacting region depends on the energy of the photoelectrons, which is determined by the interaction of photoelectrons and positron bunches.Therefore, the filling pattern of the beam, including bunch current and bunch spacing, can alter the regions with strong multipacting.In general, when the bunch current increases, the multipacting region moves towards larger jxj on either From the energy of an electron hitting the chamber wall, the secondary emission yield is calculated.Values larger than 1 imply that multipacting can happen.The computed yields are consistent with the simulated charge distribution of the lost electrons on the wall, as illustrated in Fig. 9.

C. Photoelectron trapping in beam electric field and magnetic fields
Photoelectrons can be trapped by the beam field and by magnetic fields, or by a combination of fields.Experimental study in CESR found that photoelectrons can be trapped in the combined dipole magnetic field and quadrupole electrostatic leakage field from the distributed ion pumps [12].As predicted by Chao [13], the beam field is the most effective trapping field due to its periodic focusing force.The mirror magnetic field, such as a quadrupole or sextupole field, is the most effective magnetic trapping field.Some electrons can also be trapped in a periodic solenoid field because it is also a type of mirror field.But the number of the trapped electrons is much smaller than that of the quadrupole and sextupole fields' cases.Electrons can also be trapped in a dipole magnet.However, in this case, the trapping in the direction of the magnetic field (typically vertical) is accomplished by the space charge field of the positron beam and the electron cloud instead of by the magnetic field.The mechanism of electron trapping for different field configurations is studied in this section.

Trapping in the beam field
In a drift region, the photoelectrons near the bunch can receive linear beam kick from the bunch and can get temporarily trapped in the beam potential, as shown in Fig. 10, and will thus oscillate around the bunch [14].The photoelectrons near the beam perform about one oscillation during the passage of a positron bunch in the KEKB-LER case.However, in the case of proton bunches the electrons can oscillate for many periods due to the longer bunch length.
Photoelectrons at large amplitudes do not move much during the bunch passage due to their long oscillation period.They simply receive a nonlinear kick from the beam.Most photoelectrons with large amplitude can still be trapped as shown in Fig. 11.Photoelectrons can be trapped for long or short times, which depend on its initial condition.Photoelectrons are emitted from the chamber wall with a small initial energy, and they oscillate under  the influence of the focusing beam force.The electrons gain energy during the process, approaching the chamber center.The energy and the radial position of the trapped electron are modulated by the beam kick.As a result, photoelectron trapping in the beam field is one important phenomenon.This mechanism leads to the uniform distribution of the photoelectron cloud in the beam chamber although most photoelectrons are emitted in a horizontal direction (primary photoelectron), and then such a round distribution of the cloud causes the same coupled bunch instability in horizontal and vertical directions.This is consistent with the experimental study [15].The cloud distribution shown in Fig. 7 is roughly uniform in the azimuth angle due to the trapping effect.There are more photoelectrons along the emission direction of the primary photoelectron, because these electrons mainly oscillate in the horizontal plane instead of in a circle around the chamber center, due to their small initial vertical velocity and initial coordinate.The photoelectron has a short decay time during the bunch train gap because the trapping mechanism depends on the positron or proton bunch.Therefore, a bunch train gap is very effective to terminate the trap.

Trapping in quadrupole and sextupole magnets
It is interesting that more than 90% of the photoelectrons can remain seriously trapped in a quadrupole or sextupole magnetic field during the bunch train gap, as shown in Fig. 12 [16].The photoelectron density is almost constant during the train gap in these two fields, which implies a long electron lifetime.On the other hand, the density decays quickly in a dipole magnet.Figure 13 shows a typical trapped-electron orbit in a normal quadrupole field during the train gap.The drift time is about 960 ns.The trapped electron spirals in an ever-tighter orbit along the magnetic field line when the field becomes stronger, converting more and more translational energy into energy of rotation until its velocity along the field line vanishes.Then the electron turns around, still spiraling in the same sense, and moves back along the same field line.A similar phenomenon is observed in the sextupole magnets.The electron-trapping phenomena are quite similar to the plasma trapping in a mirror magnetic field.
We consider the case of no electric field, which is almost realized for the electron cloud during the bunch train gap, if the space charge potential of the electron cloud is negligible compared with the magnetic potential  in a normal magnet.Since the direction of the magnetic force acting on the electron is perpendicular to the electron velocity, the electron kinetic energy is conserved, The motion of the electron in the magnetic field can be regarded as the superposition of the gyration motion around the guiding center and the motion of the guiding center.The gyration motion of the electron is a rapid rotation around the magnetic field line.The motion of the guiding center is the average motion over the gyration.
Consider the case in which the magnetic field slowly varies in space.The variation is assumed to be sufficiently slow so that the magnetic field at the electron position hardly changes during the cyclotron motion.This is true for our case where the magnetic field is strong except for the central region of the chamber and the electron energy is low, which means a small Larmor radius and a short period.While the period of a spiraling electron changes as it moves into regions where the magnetic field is weaker or stronger, the product T E, the period T times the energy E of the gyration motion, is almost a constant.It is not an exact constant, but if the rate of change is slow enough, e.g., if the field changes rather slowly, it comes very close.A certain quality, an ''adiabatic invariant,'' is almost kept at a constant value.In a more general way, the action of a system with canonical variables q and p, defined by is a constant under a slow change in an external parameter.Here H represents an integral over one period of the motion.Therefore, for such a quasiperiodic motion, there exist two adiabatic invariants given by [17] (24) where is the magnetic moment, v ? is the gyration velocity, s m ?=jejB is the Larmor radius, and v k is the parallel or longitudinal velocity which is parallel to the magnetic field.J ? and J k are called the transverse and parallel adiabatic invariants, respectively.
As the guiding center of the electron moves along the field line, the magnetic field strength at the position of the electron changes.Because the magnetic moment and kinetic energy of the electron are conserved, the kinetic energy of the parallel motion varies according to the relation Equation ( 27) implies that the guiding center motion along the field line behaves like a particle motion in a magnetic potential energy m B. In quadrupole and sextupole magnets, the magnetic field is a mirror field, in which the magnetic field is weaker at the center and stronger at both ends of the mirror field line.When the guiding center of the electron moves along the field line from a weaker field region to a stronger field region, the parallel velocity decreases and the gyration velocity increases, and the electron is heated.Therefore, the electron spirals in an ever-tighter orbit because the period of gyration motion and parallel velocity become smaller and smaller.When the electron comes to the point where the parallel velocity vanishes, the electron direction of motion is reversed.The parallel velocity of the reflected electron is increased when it moves along the field line and gets the maximum value at the weakest field point (mirror point).Then it continues a similar motion along the other side of the mirror point.Such kind of trap is called a magnetic-mirror trap.The motion of an electron in a mirror field is depicted in Fig. 14.
Figure 15 shows the electron's cloud distribution just before a bunch interacts with the cloud during the bunch train passage.Clearly the electron density is higher near the mirror points.The central region is not an adiabatic region due to the weak field there.Electrons moving along these diagonal field lines can receive a larger amount of parallel energy and may be lost before the next positron bunch arrives.

Trapping in the periodic solenoid field
Solenoid magnets have been installed in the LER ring in order to reduce the photoelectron density near the beam.The periodic solenoid field can also trap a few electrons, but typically less than 1% of the total.The trapping mechanism is still the mirror magnetic field trap.Figure 16 shows the trajectory of a trapped electron in a sinusoidal solenoid field as described in Eqs. ( 18)-(20) with B z0 30 G, B 0 20 G, and 2=k 1 m.The solenoid field strength along the trajectory is also shown in the same figure in order to compare the trajectory and field strength.The electron is trapped in the wake field region with the mirror point located at Z ÿ250 mm, which is the midpoint of the two adjacent solenoids.Therefore, the trapped electrons stay around the center point of the two adjacent solenoids.
Note that the mirror field trap strongly depends on the electron velocity v k0 and v ?0 .According to Eqs. ( 22), (24), and (26), the trap occurs if where B 0 is the field at one position with velocity v k0 and v ?0 , and B max is the maximum field along the field line.Equation (28) shows that a photoelectron could be trapped if its kinetic energy of gyration motion increases.Different from the quadrupole and sextupole fields, the solenoid field line applied here is along the longitudinal direction, which is the beam direction.The photoelectrons moving longitudinally along the field lines can receive gyration motion energy from the transverse beam field.During the passage of a positron bunch, the position of the photoelectrons does not change and the photoelectrons simply receive energy because the positron bunch length is much shorter than the period of the gyration motion.A similar statement applies to the quadrupole and sextupole cases.However, the electron motion has very different characters in solenoid and quadrupole/sextupole fields.First, a solenoid field is a longitudinal field and a quadrupole field is a transverse field.The electron in the solenoid field moves in the beam direction, which means the electron meets the positron bunch with different time spacing.On the other hand, the electron in the quadrupole field meets the positron bunch periodically due to its very slow movement along the beam direction.Second, the periods for one electron to move along the mirror field line, which is the period of the parallel motion, as shown in Figs. 13 and  16, are quite different.The period depends on the magnetic field.In quadrupole and sextupole cases, for KEKB parameters it is close to 2 times that of the bunch spacing, which indicates the resonance of the interaction between the electron and positron bunch.This period is much longer in the solenoid case.It is about 210 times of the bunch spacing in Fig. 16.Third, the solenoid field is weaker than the quadrupole field.As a result, the trajectory of an electron in the solenoid field can be easily changed by the positron beam field.Therefore, in a solenoid field the electrons are accelerated by the passing positron bunches in a random fashion, and, even after a long time, the gyration energy acquired can be too small to fulfill the trapping condition, Eq. (28).All these characters make the trapping in a solenoid more difficult than in a quadrupole or sextupole field.

Trapping in dipole magnet
The electrons effectively move only along the vertical field lines due to the strong vertical magnetic field.The uniform dipole magnetic field cannot trap any particle.However, the space charge field of the positron beam and electron cloud oriented in a vertical direction can trap the particle in the vertical plane.The mechanism is similar to the beam field trapping in a drift region, but here the trapping refers to a one-dimensional motion instead of to a two-dimensional motion.This motion resembles a circle in the drift region as shown in Fig. 11.Simulation shows that the photoelectrons can be easily trapped in the two multipacting strips, where the space charge field of the electron cloud is strong and is in the vertical direction.

D. Heat load of photoelectron cloud
The lost photoelectrons, which hit the chamber wall, can cause a temperature increment of the vacuum chamber.The heat load depends on the quantity and energy of the photoelectrons, which hit the vacuum chamber wall.Figure 17 shows the lost photoelectron charge and heatload azimuth angle distribution for different magnetic fields.
In a drift region, the photoelectrons can receive more energy from the beam and the quantity is larger due to the multipacting.Therefore, the electron flux on the wall is higher and so is the heat load.The heat-load azimuth angle distribution is roughly uniform due to the beam trapping effect as explained in Sec.IIIC1.
Multipacting occurs along two strips in the dipole magnet.Both the lost charge and the heat-load distribution show peaks at these two multipacting regions.The electron flux on the wall is not peaked at the central region with jxj 0, because multipacting does not happen there.However, the heat load is peaked at the chamber center due to the higher energy of the electrons here.
There is a lower heat load in solenoid and quadrupole and sextupole cases where multipacting could not occur.In the solenoid case, the energy of the photoelectron is lower because the photoelectron is confined away from the beam.Electrons can be deeply trapped by quadrupole and sextupole magnets fields, but the electron cannot effectively receive energy from the beam.Therefore,  both the loss rate and the energy of the photoelectrons are lower in the solenoid, quadrupole, and sextupole magnets.The interaction of electrons with the positron beam strongly depends on the magnetic field.Therefore, the heat-load azimuth angle distribution is also magnetic field dependent as shown in Fig. 17(b).It is always peaked at locations where the magnetic field is oriented along the radial direction, as illustrated in the figure for the quadrupole magnet.

E. Buildup of electron cloud
Figure 18 shows the average and center volume density in different magnetic fields as a function of time for a train with 200 bunches spaced by 7.86 ns and followed by a long bunch train gap.The decay time during the bunch train gap in the field-free case is the shortest, because there is no magnetic field to confine the photoelectrons.On the other hand, the decay time is very long in quadrupole and sextupole magnets due to the deep trapping.The primary photoelectrons do not much contribute to the buildup of the photoelectron cloud in normal dipole, quadrupole, and sextupole magnets.While in quadrupole and sextupole magnets the buildup is dominated by magnetic trapping; in the dipole magnet multipacting is the dominant process.As a result, the average cloud density in these three fields is almost a linear function of time during the cloud buildup as illustrated in Fig. 18(a).
The photoelectron density near the beam is zero in the case of the solenoid and small for the quadrupole and sextupole.The deeply trapped photoelectrons in the quadrupole and sextupole magnets may contribute to the coupled bunch instabilities.On the other hand, the photoelectron densities near the beam are much larger for the drift and the dipole field, which indicates that the photoelectrons in the drifts and dipoles are mainly responsible for the single-bunch blowup of the positron beam.

IV. SUMMARY AND CONCLUSIONS
A complete three-dimensional PIC program has been developed.It provides a powerful tool to study the electron-cloud problem.The numerical results are qualitatively consistent with the experimental observations and with simple theoretical models, in many aspects.
A uniform solenoid is found to be the most effective field for confining the photoelectrons to the vicinity of the vacuum chamber wall.Indeed, even a realistic equalpolarity periodic solenoid is more efficient than any other kind of magnet.The solenoid reduces the photoelectron central density to nearly zero, and it also significantly lowers the heat load to the chamber wall.Strong multipacting occurs both in drift regions and in the dipole magnet, resulting in a significant central density of electrons.Therefore, these two regions are thought to be the main contributors to the single-bunch beam-size blowup.In quadrupole and sextupole fields, a large number of electrons can be trapped by a magnetic-mirror mechanism and survive a long gap between bunch trains.These deeply trapped electrons can cause coupled bunch instabilities.

FIG. 3 .
FIG. 3. Charge assignment of the PIC method.(a) Transverse distribution of the macroparticles in a solenoid field.(b) Transverse distribution of the charge on the mesh obtained by the charge assignment.

max 1. 5 − 10 FIG. 4 .
FIG. 4. (Color) Potential and field interpolation of the PIC method.The color shows the potential; the arrows denote the field direction and strength.

FIG. 5 .
FIG. 5. Electron-cloud distribution in the C-yoke quadrupole with equal polarity configuration.

FIG. 9 .
FIG. 9. (Color) Mechanism of multipacting in the dipole magnet.Blue dots show the energy of photoelectrons which hit the chamber wall.Red dots represent the secondary emission yield of the photoelectrons which hit the wall.The black solid line is the charge distribution of the lost photoelectrons, which is normalized by the number 10 12 in order to compare the charge distribution with the secondary emission yield clearly.

FIG. 12 .
FIG.12.Photoelectron average volume density in different magnetic fields as a function of time for a train with 200 bunches spaced by 7.86 ns and followed by a long gap.
FIG. 17. (Color) Charge and heat-load azimuth angle distributions of photoelectrons lost to the chamber wall in different magnetic fields.(a) Charge distribution; (b) heat-load distribution.
FIG. 18. (Color) Photoelectron average volume densities and volume densities at pipe center in a different magnet field as a function of time for a train with 200 bunches spaced by 7.86 ns and followed by a long bunch train gap.(a) Average volume densities; (b) volume densities at pipe center.

TABLE I .
KEKB-LER parameters used in the simulation.