1 Introduction

The interaction of either charged or neutral particles with crystals is an area of science under development. Coherent effects of ultra-relativistic particles in crystals allow the manipulation of particle trajectories thanks to the strong electric field generated between crystal planes and axes [13]. Important examples of the interaction of neutral particles in crystals include production of electron–positron pairs and birefringence of high energy gamma quanta [46]. Radiation emission due to curved trajectories in bent crystals has been seen to enhance photon production through bremsstrahlung, channeling radiation, parametric X-ray radiation, undulators [711] and recently through volume reflection and multiple volume reflection [12, 13]. The inelastic nuclear interaction rate is known to be modified by channeling and volume reflection [14].

Various applications of orientational phenomena with crystals have been proposed and investigated such as

  • beam steering, [15]

  • extraction and collimation in circular accelerators and [1619]

  • splitting and focusing of external beams [20].

Bent crystals have also been proposed as beam collimators [21] and extractors [2225] for the LHC. Indeed, with recent optimizations in manufacturing techniques [26, 27] and crystal holders [28], bent crystals have been produced with record deflection efficiencies [29]. As a consequence of this and the reduction of the nuclear interaction rate for channeled positive particles [14], the use of collimation systems based on bent crystals has proven to lower beam losses throughout the SPS synchrotron for protons [30] and for Pb ions [31, 32].

The study of coherent effects for the interaction of particles with aligned structures have always exploited opportunities furnished by numerical simulations with the most advanced computers and computational methods of the current period. Various approaches have been adopted.

The binary collision model allows the determination of the trajectory of a low energy particle in a crystal with high precision, but it is computationally expensive due to the need to solve the equation of motion of a particle with an integration step smaller than the cell distance between two neighboring atoms, which is typically less than \(1 {\AA }\). As an example, the Monte Carlo code by Oen and Robinson [33] was capable of predicting the experimental results observed in 1963 [34].

By adopting the continuum approximation [35], the equation of motion can be solved in one dimension for planar channeling with an integration step of up to 1 \({\upmu }\)m for GeV particles [3641], with a high computational cost for each particle due to the necessity of integrating over the full particle trajectory. As an example of the capability of such a method, in 1987 Vorobiev and Taratin predicted the volume reflection phenomenon in bent crystals [3] which was first observed in 2006 by the H8RD22 collaboration [42]. In 2013, an approach based on the numerical integration of classical relativistic equations of motion in a dynamical generation was developed for the MBN Explorer software package in order to study relativistic phenomena in various environments such as crystals, amorphous bodies and biological media [43]. A Fluka model for the simulation of planar channeling of positive particles in bent crystals relies on the continuum potential approximation was proposed in 2013 [44].

Thanks to the large amount of data [14, 29, 4559] with track reconstruction resolutions of \(<\) \(10\,{\upmu }\)rad, [46] Monte Carlo codes based on the experimental cross sections of orientational phenomena were developed [57, 60]. With this model, very high computational throughput is achieved but the scaling of dechanneling models is inaccurate due to the lack of a dedicated campaign of measurement. Moreover such an approach is not suitable to describe the cross section variation of physical phenomena for channeled particles.

Nowadays Monte Carlo simulations of the interaction of particles with matter are usually done with downloadable toolkits such as Geant4 [61] and Fluka [62]. Such Monte Carlo codes are continuously expanded and improved thanks to the collaborative effort of scientists from around the world. Geant4, an object-oriented toolkit, has seen a large expansion of its user community in recent years. As an example, applications simulated by Geant4 range from particle transportation in the ATLAS detector [63] to calculations of dose distribution curves for a typical proton therapy beam line [64], and from radiation analysis for space instruments [65] to early biological damage induced by ionizing radiation at the DNA scale [66].

A version of Geant4 with the first implementation of a physical process in a crystal was released with the process of phonon propagation [67, 68], but no orientational effects for charged particles were developed at that time. The concurrent presence of many physical processes forces the use of an integration step greater than a \({\upmu }\)m to limit the computational time. As a result, the full solution of the equation of motion is not suitable. An alternative approach would be to simulate orientational effects using experimental data, but such data (channeling of negative particles in bent crystals, for example) do not currently exist.

In this paper we present a general model for the simulation of orientational effects in straight and bent crystals for high energy charged particles. The model is based on the continuum potential approximation but does not rely on the full integration of particle motion. The model has been implemented in Geant4, and validated against experimental data.

2 Model

In this section the models for channeling and volume reflection are presented. Since they are based on the continuum potential approximation, a resume of the Lindhard work and its range of applicability is presented here.

2.1 Continuum approximation

The continuum approximation was developed by Lindhard to describe channeling and its related phenomena, but can be extended to all orientational phenomena because the same approximations hold. Coherent effects are primary phenomena; they govern the paths of primary particles, and not secondary ones, which are determined by the path, as Lindhard stated [35]. Thus, four basic assumptions can be introduced for particles under orientational conditions:

  • scattering angles may be assumed to be small. Indeed, scattering at large angles implies complete loss of the original direction.

  • Because the particle moves at small angles with respect to an aligned pattern of atoms and because collisions with atoms in a crystal demand proximity, correlations between collisions occur.

  • Since the wave length of relativistic particle is small compared to the lattice constant, a classical picture can be adopted.

  • The idealized case of a perfect lattice may be used as a first approximation.

Under these assumptions, the continuum approximation can be inferred, and the potential of a plane of atoms \(U(x)\) can be computed by taking the average of the detailed potential along the direction of motion of the particle.

$$\begin{aligned} U(x) = N d_{p}\int \int _{-\infty }^{+\infty }dydzV(\mathbf {r}) \end{aligned}$$
(1)

where \(d_p\) is the interplanar distance, \(N\) is the atomic density and \(V(\mathbf {r})\) is the potential of a particle-atom interaction. By using the screened Coulomb potential approximation for \(V(\mathbf {r})\), the interplanar potential becomes

$$\begin{aligned} U(x)&= 2{\pi }N d_{p}Z_{1}Z_{2}e^{2}a_{TF}\exp \left( -\frac{x}{a_{TF}}\right) \nonumber \\&= U_{max}\exp \left( -\frac{x}{a_{TF}}\right) \end{aligned}$$
(2)

where \(Z_{1}\) and \(Z_{2}\) are the atomic numbers of particle and ion, respectively, \(e\) is the elementary charge, \(a_{TF}\) is the Thomas-Fermi radius and \(U_{max}\) is the maximum of the potential.

The basis of the continuum approximation relies on the qualitative assumption that many consecutive atoms contribute to the deflection of a particle trajectory. Thus, for relativistic particles, the time of collision \({\Delta {t}}\approx {\Delta }z/c\) multiplied by the momentum component parallel to the plane of atoms, \(p_{z}{\sim }p{\cos }\theta \), must be large compared to the distance \(d_z\) between atoms along the particle direction, where \(p\) is particle momentum, \(p_{z}\) is the momentum component along the particle direction and \(\theta \) is the angle between the particle direction and the crystal plane orientation. Since the collision time is approximately \({\sim }r_{min}/(v{\sin }\theta )\), where \(r_{min}\) is the minimal distance of approach, the condition for the continuum approximation to hold is

$$\begin{aligned} \frac{{\Delta {z}}}{c}p{\cos }{\theta }\approx \frac{r_{min}}{\theta }{\gg }d_z \end{aligned}$$
(3)

In the most restrictive form \(r_{min}\) is determined by the condition that the transverse kinetic energy cannot exceed the transverse potential energy at \(r_{min}\).

$$\begin{aligned} \frac{1}{2}p\beta \theta ^2=U(r_{min}) \end{aligned}$$
(4)

Therefore, from previous equations, a condition can be derived for which the continuum approximation is still valid:

$$\begin{aligned} \frac{a_{TF}}{d_{z}\theta }\left( 1-\frac{p\beta }{2U_{max}}\theta ^2\right) \gg 1 \end{aligned}$$
(5)

Two terms appear in this condition. One refers to the Lindhard angle of channeling \(\theta _{L}=\sqrt{2U_{max}/(p\beta )}\), which determines the maximum angle for channeling. The other is more interesting because it implies that \(\theta <{a_{TF}}/{d_z}\sim 0.5{\AA }/1{\AA }\sim 0.5\) is very large compared to \(\theta _L\) at high energy. Thus, the continuum approximation is still valid for angles greater than \(\theta _{L}\) as long as that particle does not approach closer than \(r_{min}\) to a nucleus.

The continuum potential approximation can be extended to regions closer than \(r_{min}\) to the atomic position by treating in more detail atomic displacement in the structure. In fact, since the crystal temperature is usually higher than 0 \(K\) degree, atoms vibrate around their center of mass. By averaging the thermal vibration amplitude over space and time, the probability density function for the position of atoms can be derived. Thus, the continuum approximation can be extended to regions closer to the center of vibration of atoms. Because the averaging is due to thermal fluctuations, such an approximation is not valid at very low temperatures and the limits of the continuum approximation must be kept in mind.

2.2 Channeling

When a charged particle hits a crystal aligned with an atomic plane it can be trapped by the strong electromagnetic field between two planes, thus undergoing planar channeling. Channeled particles follow the direction of the crystal plane, oscillating between or across planes if the particle charge is positive or negative, as shown in Fig. 1a. Under channeling conditions positive particles penetrate deeper into the crystal relative to the un-aligned orientation because the trajectory is repelled from the nuclei. On the other hand, negative particles interact more frequently because of their attraction to zones with high densities of nuclei.

Fig. 1
figure 1

\(400~\)GeV/c particles interacting with Si (110) planes (dotted lines). Curves 1 and 2 refer to channeled particles while curves 3 and 4 refer to over-barrier particles. Dashed (dot-dashed) lines represent negative (positive) particles. a Trajectories as a function of transverse position (X) and penetration depth (Z). b Trajectories as a function of transverse position (X) and transverse angle (\(\theta _{X}\)). Continuum planar potential (continuous line) and transverse energies for c positive and d negative particles

The continuum interplanar potential for main planes in crystals [69] can be approximately described by a harmonic potential well for positive particles, as shown in Fig. 1c. However for negative particles, being attracted by nuclei, the interplanar potential must be reversed and becomes non-harmonic with a minimum in the middle of the potential well, as shown in Fig.  1d. Because the trajectory is strongly affected by such a potential, positive and negative particles under channeling trace different shapes in phase space (see Fig. 1b).

Channeling holds for particles with transverse energy \(E_{x,\theta }\) lower than the maximum of the potential well depth \(U_{0}\), i.e., \(E_{x,\theta }<U_{0}\). Such particles follow the channeling plane or axes until they exit the crystal or are dechanneled. The dechanneling mechanism behaves the same for both straight and bent crystals. If all the processes which lead to dechanneling are disabled, a particle remains under channeling for the entire crystal length as long as \(E_{x_{in},\theta _{in}}<U_{0}\), where \(x_{in}\) and \(\theta _{in}\) are the impact position and incoming angle with respect to the channeling plane. Thus, conservation of transverse energy allows the treatment of channeling through a knowledge of the initial impact position on a crystal channel \(x_{in}\) and the angle with respect to the crystal plane \({\theta }_{in}\):

$$\begin{aligned} E_{x_{in},\theta _{in}} = U(x_{in}) + \frac{1}{2}p{\beta }{\theta _{in}}^{2} . \end{aligned}$$
(6)

Solving the equation of motion requires point-by-point knowledge of the transverse position and transverse momentum of an oscillating particle. However, by choosing a crystal which extends along the beam for more than one oscillation period of a channeled particle, the energy level occupied by a particle in the electrostatic potential well generated between atomic planes or axes is the only physical quantity to link initial to final parameters in a real-case study. By imposing a continuous and uniform distribution in position \(x_{out}\) for a channeled particle of energy \(E_{t}\), an outgoing angle \(\theta _{out}\) is generated by evaluating

$$\begin{aligned} \theta _{out} = \sqrt{2p{\beta }(E_{t} - U(x_{out}))} \end{aligned}$$
(7)

Therefore, information regarding \(x_{in}\) and \({\theta }_{in}\) can be condensed into a single variable \(E_{t}\), which determines the occupied energy level of a channeled particle and allows the computation of the outgoing distribution of channeled particles by means of \(E_{t}\) and the continuum potential.

For bent crystals the model is still valid. The sole difference relies on the modified potential in the non-inertial reference frame orthogonal to the crystal plane or axis. In fact, the centrifugal force acting on the particle in this frame pulls down the potential barrier resulting in a shallower potential well. Thus, the condition for channeling holds with a modified maximum potential and transverse energy related to the non-inertial reference system.

The presence of torsion in a crystal spoils channeling efficiency in bent crystals [28]. Indeed, the orientation of the channeling angle with respect to the beam direction changes with the impact position on the crystal surface. Since a beam has a finite size, two particles with the same direction and the same impact position on the potential well but different impact positions on the crystal surface have different transverse energies. This effect is introduced in the simulation by changing the plane direction with respect to the impact position on the crystal surface.

Another important parameter for channeling in bent crystals is the miscut [70], which is the angle between the lateral surface of a crystal and the atomic planes. Only the trajectories of particles channeled near a crystal edge are affected by the presence of the miscut, because it modifies the total length of the bent plane of channeling. This effect is introduced by defining the plane orientation independently of the crystal volume.

2.3 Dechanneling and volume capture

Particles which no longer satisfy the channeling condition have suffered dechanneling. Unchanneled particles which enter the channeling state undergo volume capture. Dechanneling and volume capture take place when particles interact incoherently with nuclei or electrons. Indeed, a channeled particle can acquire enough transverse energy to leave the channeling state by exceeding the maximum of the potential well, or an unchanneled particle can lose energy and decrease its transverse energy by passing under the maximum of the potential well.

All physical phenomena occurring for a channeled particle are strongly affected by the occupied energy levels. As shown in Fig. 3, the average density of material seen by a particle traversing a crystal aligned with its planes is strongly affected by the transverse energy of the particle. Thus, the probability of interaction with nuclei and electrons has to be weighted as a function of the transverse energy. Kitagawa and Ohtsuki [71] demonstrated that there is a linear dependence between the incoherent interaction rate and the material density. Therefore, the modified cross section \({\sigma }(E_{t})\) of each phenomenon is

$$\begin{aligned} {\sigma }(E_{t}) = {\sigma }_{am}\frac{n(E_{t})}{n_{am}} \end{aligned}$$
(8)

where \({\sigma }_{am}\) is the cross section in amorphous material, \({n_{am}}\) is the density of the amorphous material and \({n(E_{t})}\) is the modified density.

Since each incoherent phenomenon produces a variation of transverse energy \({\Delta }{E_{t}}\), the maximum distance traveled by a channeled particle is limited by the probability of passing over or under the potential barrier during each step. As an example, the modified rms \({\sigma }_{is}(E_{t})\) for incoherent scattering on nuclei depends approximately on the square root of the traversed material density [72]. Thus, the step can be limited by the condition

$$\begin{aligned} |U_{0}-{E_{t}}|=|\Delta {E}|={\Delta }\left( {p\beta }{\theta }^2\right) \approx {p\beta }\frac{n(E_{t})}{n_{am}}\Delta \left( {\sigma }_{is,am}^2\right) \end{aligned}$$
(9)

where \({\sigma }_{is,am} \sim \frac{13.6 MeV}{p\beta }\sqrt{\frac{z}{X_0}}\) is the rms of the incoherent scattering in the amorphous material, \({\beta }\) is the particle velocity in units of the speed of light and \(X_0\) is the radiation length of the material. Thus, the step \({\Delta }z\) is

$$\begin{aligned} {\Delta }z \sim X_{0}\frac{p\beta }{E_s^{2}}\frac{n_{am}}{n(E_{t})} |{\Delta }E| \end{aligned}$$
(10)

Such an approach can be applied to all the concurrent incoherent processes to determine the maximum step size by comparing the contributions. The model is still valid for positive and negative particles since no restriction has been applied.

The same response for the interaction probability is not obtained by averaging the density over an oscillation period. Therefore, this model must be adapted for crystals with lengths along the beam greater than one oscillation period. On the contrary, by integrating the particle trajectory it is possible to determine the interaction probability for each step depending on the position in the channel. Thus, the peculiar characteristic of channeling in the first layers of a crystal can not be described by the averaging used in the model developed in this paper.

2.4 Volume reflection

When charged particles cross a bent crystal tangent to its planes they are “reflected” in the direction opposite to the bending curvature. This is called volume reflection. In fact, the particle is deflected by the continuous potential barrier of one plane, but immediately leaves the channel because the barrier of the opposite plane is lowered due to bending, and thus the particle cannot be trapped under channeling. Therefore, the condition for volume reflection holds when the projection of the particle momentum on the direction of a plane changes sign. Volume reflection and related phenomena limit the maximum allowed step length. Indeed, particles can be captured into a channeling state if they lose enough transverse energy to fulfill the channeling condition \(E_{x}<U_{0}\). Thus, the step length must be comparable to the oscillation period near the turning point. The distance of a particle to the tangency point in a bent crystal must be evaluated at each step to set the step size at the proximity of the interesting region.

For a slightly bent crystal, the mean deflection angle for volume reflection is approximately \(\sim 1.4\theta _{L}\) for positive particles [46] and \(\sim 0.8\theta _{L}\) for negative particles [73], where \(\theta _{L}=(2U_{0}p\beta )^{1/2}\) is the Lindhard angle [35]. In fact, a positive particle spends more time in a zone within which the particle has higher transverse velocity, while the opposite is true for a negative particle, as shown in Fig. 2a. By decreasing the radius of curvature, the mean deflection angle decreases. Indeed, the deflection angle of volume reflection depends on the transverse energy at the turning point. The more the crystal is bent, the larger is the angular spread [46]. In Fig. 2b the potential in the non-inertial reference frame orthogonal to the crystal plane is shown. The maximum energy difference delimits the reflection region. The potential shapes the trajectories of particles with transverse energies a bit above the maximum of the potential. These are the so-called over-barrier particles. By approximating the potential in the reflection region with a linear function, the volume reflection angle becomes proportional to the position of the turning point. Thus, the deflection angle can be generated by adopting a continuous and uniform distribution proportional to the reflection region of the potential barrier (see Fig. 2b).

Fig. 2
figure 2

a Simulation of volume reflection for positive (dot-dashed line) and negative (dashed line) particles with the same initial transverse energy in the non-inertial reference frame orthogonal to the crystal plane. Dotted lines are crystal planes. The higher momentum of positive particles near the turning point results in a larger deflection angle for volume reflection. b Continuum planar potential in the non-inertial reference frame orthogonal to the Si (110) plane for \(p\beta /R=17.3\) eV/Å. Dotted lines delimit region of volume reflection

2.5 Average density

The average density seen by a particle undergoing orientational effects is a very important parameter for the model proposed in this paper. As shown in Fig. 3 the average density is strongly affected by the transverse energy for channeled and over-barrier particles. The computation is made with the DYNECHARM++ code [41] in which all incoherent processes are disabled. The DYNECHARM++ code is based on the full solution of the equation of motion in the continuum potential and allows the computation of electric characteristics of the crystal through the ECHARM calculation method [74, 75]. Therefore, the density as a function of transverse energy for complex atomic structures and for many planes and axes can be computed.

Fig. 3
figure 3

a Ratio of average density of nuclei and electrons to density of an amorphous material as a function of the transverse energy of a positive channeled particle. Continuous lines represent the DYNECHARM++ calculation while dashed lines represent the fast model. Over-barrier particles experience greater density as a result of different motion in the crystal lattice. b Same as a but for a negative channeled particle. Note the difference in vertical scales

The calculation of average density by DYNECHARM++ is very accurate, but can be very slow. Thus, a fast version has been developed to compute the average density. By integrating the density of all the possible states in which a particle with transverse energy \(E_t\) can exist, the approximate average density \(\mathrm {\overline{\rho }}(E_{t})\) can be computed.

$$\begin{aligned} \mathrm {\overline{\rho }}(E_{t})=\int _{U(x)<E_{t}}{\rho }(x)dx \end{aligned}$$
(11)

Since no approximation was imposed on \(U(x)\) and \({\rho }(x)\), this approximation is still valid for any potential and average density function. Experiments with orientational effects rely mostly on the use of crystal planes with low Miller indexes. For these the averaged nuclei density \(\mathrm {\overline{\rho }}(x)\) is analytically derived starting with the density of nuclei function averaged over thermal and space fluctuations

$$\begin{aligned} \rho (x)=\frac{1}{u_T\sqrt{2\pi }}e^{-\frac{x^2}{2u_T^2}} \end{aligned}$$
(12)

where \(u_t\) is the thermal vibration amplitude. Thus, the average density is

$$\begin{aligned} \mathrm {\overline{\rho }}(E_{t})=\mathtt{{erf}}(x | U(x)=E_{t}) + 1 \end{aligned}$$
(13)

where \(E_{t}\le U_{0}\) and \(U(x)=U_{0}\) at \(x=d_{p}/2\). Fast calculation models do not take into consideration the time spent in a particular region by a particle. The model can be applied to compute density for both positive and negative particles. In Fig. 3 the average density ratio of electrons and nuclei is shown for both the fast model and DYNECHARM++.

3 Geant4 implementation

The Geant4 toolkit allows new physical processes to be added to the standard ones it already provides. Thus, a process can be added to already developed simulations with minor modification of the code. As a consequence, the influence of the new process on existing experimental apparatus can be studied. As an example, with the addition of the channeling process, the influence of channeling on the production of secondary particles in a crystal collimation scheme as well as in a crystal extraction scheme can be simulated.

A new process must provide its mean interaction length and how particle properties are affected by the interaction. Indeed, at each step, the toolkit computes for all the processes their mean interaction length and the shortest one limits the maximum step the particle can traverse in a geometrical volume. If the process occurs, the particle parameters are modified by the process. Then, the particle moves to the new position and the routine takes place for a new step.

The model proposed in this paper has been implemented by a process describing the orientational process, and wrappers that modify the material density in existing processes. In addition, the capability of calculating the crystal electrical characteristics have been inserted to allow the simulation of orientational processes with no need for external software.

3.1 Channeling process

The class used for the implementation of orientational processes is called \(\mathtt {ProcessChanneling}\). It inherits from the virtual class which defines the behavior of discrete physical phenomena (\(\mathtt {G4VDiscreteProcess}\) class). Because the particles may undergo channeling only in a crystal, the channeling process is valid only in a volume with a crystal lattice.

When a particle crosses the boundary between two geometrical volumes, one with and one without a crystal lattice, the channeling process limits the step of the particle and checks if the particle is subject to orientational effects. A uniformly distributed random number is generated to determine the impact position of the particle on the crystal channel \(x_{in}\) and, consequently, to compute the initial potential energy \(U_{0}\). The particle momentum is projected on the channeling plane to evaluate the transverse momentum. The initial transverse energy \(E_{x_{in},\theta _{in}}\) is computed through Eq. 6. Thus, \(E_{x_{in},\theta _{in}}\) is used to find the modified density \(\overline{\rho }(E_{t})\). If the particle satisfies the channeling condition, \(E_{x_{in},\theta _{in}}<U_{0}\), the channeling process proposes to the Geant4 core an alignment of the particle momentum with the direction of the channeling plane. The condition for channeling is recomputed until the particle exits the volume with the crystal lattice.

Volume reflection occurs only for bent crystals under the condition defined in Sect. 2.4. Under volume reflection, the particle momentum vector is rotated by the volume reflection angle around the axis orthogonal to the channeling plane.

3.2 Crystal

The class for the description of a crystal structure (XVPhysicalLattice class) was introduced into Geant4. In order to define a geometrical volume as a crystal, the class has to be attached to a physical volume.

This class collects the crystal data, such as unit cell (XUnitCell class) and bases (XLogicalBase class). The base contains the kind and disposition of the atoms. The unit cell groups the unit cell information, i.e., the sizes and the angles of the cell, and holds a vector of pointers to as many bases as needed. The information stored in a unit cell may be used to compute electrical characteristics under the continuum approximation of the channeling processes.

3.3 Wrappers

At each step in a crystal, the particle momentum can be modified by any of the Geant4 processes. Such modifications vary the transverse energy of a particle and may cause dechanneling, that is, the overcoming of the potential well maximum. As stated in Sect. 2.3, the average densities of nuclei and electrons change as a function of the transverse energy of the particle. Thus, these densities should be recomputed at each step and used to modify the cross section of the physics processes which depend on the traversed quantity of matter (see Sect. 2.5).

In order to modify the cross section of existing processes and to preserve code re-usability for future releases of Geant4, wrapper classes for the discrete and continuous processes were developed. For both these classes, the interaction length of discrete processes is resized proportionally to the modified material density. For the energy loss of the continuous processes, the traversed length is resized in proportion to the modified average density. For each wrapped process a wrapper object must be instantiated. The wrappers need only the average density to recompute the process cross section. Thus, in principle, it may work independently of the channeling process.

4 Examples of calculation

Model validation has been completed by comparison with published experimental data. Experiments studying the efficiency of channeling vs. incoming angle [29], the rate of inelastic nuclear interaction under channeling [14], and the channeling efficiency dependence on radius of curvature for bent crystals [76], were simulated for positive particles. For negative particles, simulations of the dechanneling length for high energy pions [58] was performed. Comparing simulations to experiments allowed both the precision of the model and the quality of the Geant4 implementation to be checked.

A bent crystal was modeled as a small fraction of a toroid with a bending radius on the order of a meter and a length on the order of a mm along the beam direction, matching the dimensions used in the experiment. Though torsion can be simulated, it was set to zero for all the current simulations. This has no effect on the agreement of simulation with data, even though the experimental data have been corrected for torsion. In addition, the miscut value has no influence because only particles impinging far from crystal edges have been used in the analyses.

As in the experimental setups, three silicon detectors were inserted into the simulation along the beam direction to track the particle. For measurement of the rate of inelastic nuclear interaction, two scintillators were added to reproduce the experimental setup of Ref. [14]. To speed up simulation, volumes other than crystal and detectors have been filled with galactic vacuum (\(\mathtt {G4\_Galactic}\) material).

4.1 Positive particles

In Fig. 4, the channeling efficiency as a function of incoming angle is superimposed on experimental results (Fig. 3 of Ref. [29]) and a Monte Carlo simulation with complete integration of the trajectories. The maximum efficiency for channeling in Geant4 is in good agreement with experimental data as well as efficiency in the tails. However, fair agreement is obtained in the region between maximum efficiency and tail, with \(\sim 5~\%\) deviation in efficiency. In this region the model lacks accuracy because the trajectories were not completely integrated. Thus, such behavior is to be ascribed to the shape of the interplanar potential used in simulation for both the models.

Fig. 4
figure 4

Deflection efficiency for a narrow beam as a function of the incoming beam direction with respect to plane direction of a (110) Si bent crystal. Empty squares are the results of a Geant4 simulation with the model described in the paper, filled squares are experimental measurements and circles are simulations with complete integration of the particle trajectory. The figure is partially a reproduction of Fig. 3 of Ref. [29]. Filled blue squares are experimental data, open red squares are Geant4 simulation, black open circles are Monte Carlo simulations with full integration of the trajectories

Figure 5 should be compared with Fig. 5 of Ref. [14]. The rate of secondary particles as a function of the beam angular spread is shown normalized to an amorphous condition. The standard Geant4 release without the channeling extension has been used for simulations with amorphous Si and with no crystal. Simulations are in agreement with experimental data. The channeling extension allows the correct modification of the cross sections of incoherent phenomena, reducing the rate with respect to amorphous materials. Discrepancies are observed for small angles and the slope of the two curves are different.

Fig. 5
figure 5

Dependence of the inelastic nuclear interaction rate of protons on the beam angular spread of a 400 GeV/c incident proton beam channeling (blue line). Monte Carlo simulation with Geant4 are superimposed (red line). Gray line shows the background measurement with no crystal along the beam. Experimental data have been taken from Fig. 5 of Ref. [14]

Table 1 presents the deflection efficiency for channeling vs. radius of curvature. Experimental data and DYNECHARM++ simulations are taken from Ref. [76]. As the critical radius \(R=R_c\) is approached, the discrepancy between experimental data and simulation increases. Such behavior is also recorded for DYNECHARM++ simulations. As stated in Ref. [76], the discrepancy must be ascribed to the lack of knowledge of the exact density distribution between atomic planes. An important feature of Geant4 is its capability to evaluate the number of particles which suffer nuclear interaction or are scattered at large angles. In Table 1 the fraction of “lost” particles , i.e., which do not hit the last detector, is reported.

Table 1 Measured channeling efficiency (\(\%\)) (Exp.), and simulated efficiency calculated with Geant4 (G4) and with DYNECHARM++ (D++) methods, and the fraction of particles which do not hit the last detector for the Geant4 simulation (G4 (lost))

4.2 Negative particles

In Ref. [58] the interaction of \(150\) GeV/c negative pions with a bent Si crystal has been studied in order to measure the dechanneling length for negative particles. A dechanneling length of \(1.54\pm 0.05\) mm was obtained by Geant4 simulation with the density computed by DYNECHARM++ code, compared to \(0.71\pm 0.05\) mm with the density computed by the new Geant4 model (see Fig. 6a). The dechanneling rate is increased due to the stronger incoherent scattering with nuclei and electrons. Thus, the model for negative particles is very sensitive to the interaction rate in one oscillation period, since a big discrepancy between the two simulations exists. Indeed, the discrepancy of the dechanneling lengths becomes large for the channeling efficiency, which goes from \(26.8\pm 0.5~\%\) to \(6.2\pm 0.5~\%\). As a consequence, by computing accurately the average density experienced by a particle the model is able to output the measured dechanneling length.

Fig. 6
figure 6

a Geant4 simulation of the distribution of deflection angle of \(150\) GeV/c \(\pi ^-\) passed through a \(1.91\) mm long silicon crystal bent at \(R\) = \(19.2\) m along (110) planes. Only particles hitting the crystal within an angle of \(5\) \(\upmu \)rad are selected. The average density experienced by a channeled particle has been computed by DYNECHARM++ (Geant4 a.) and an algorithm implemented in Geant4 (Geant4 b.). Experimental data was published in Ref. [58]. The dechanneling length was evaluated with the method proposed in the same reference. b Geant4 simulation for the same crystal with \(150\) GeV/c \(\pi ^-\) (a. and b.) and \(150\) GeV/c \(\pi ^+\)

The same configuration was used to simulate channeling of \(150\) GeV/c \(\pi ^+\). The comparison between positive and negative pions is shown in Fig. 6b. The deflection efficiency for \(\pi ^+\) is \(\sim 70~\%\), which is greater than for \(\pi ^-\). This result demonstrates that the channeling model developed for Geant4 allows positive and negative particles to be managed differently thanks to the wrapper classes.

4.3 Computation time

The Geant4 code has been compared to the DYNECHARM++ code in order to evaluate advantages of the approach proposed in this paper in terms of computation. The same initial conditions have been used as in Ref. [41]: a \(400\) GeV/c proton beam interacting with a \(1.94\) mm thick (1 1 0) Si bent crystal with a \(38\) m radius of curvature. The Geant4 single-threaded version 10.00b has been adopted and only a discrete single scattering model [77] has been added to its list of physics processes. The computer was the same as that used for DYNECHARM++ test, i.e. a personal computer with 8 GB of RAM and an Intel(R) Core(TM) i7-2600K CPU running at 3.40GHz. Computation time was approximately 14 ms per particle in Geant4 vs. 38 ms per particle in DYNECHARM++, in spite of the greater complexity of the Geant4 code. This result is explained by considering the number of steps required by the two models adopted for the simulation. Full integration of trajectories requires step sizes much smaller than the oscillation period in the potential well. On the contrary, the Geant4-based model allows the use of a step size comparable to the oscillation period.

5 Conclusions

The exploitation of orientational processes in crystals to manipulate particle trajectories is currently a topic of intense interest in physical research, with possible applications for the LHC for beam collimation [21] and extraction [24, 25, 78]. A physical model suitable for the Monte Carlo simulation of such processes has been developed. This model relies on the continuum potential approximation. The model makes use of the transverse energy in the non-inertial reference frame orthogonal to the channeling plane in order to discriminate between channeled and unchanneled particles. The average density experienced by a channeled particle is evaluated in order to compute the modification of the cross section for hadronic and electromagnetic processes. The model represents an extension of the Geant4 toolkit. The code has been validated against data collected by experiments at CERN. It demonstrates that Geant4 is able to compute the deflection efficiency for channeling and the variation of the rate of inelastic interactions under channeling.