Beam Distribution Input

phase space ellipse

Fig. 20 Phase space ellipse in the coordinate plane of position \(q\) (realized as \(x\), \(y\), and \(t\)) and associated conjugate momentum \(q\) (realized as \(p_x\), \(p_y\) and \(p_t\)).

Particle beam user input in ImpactX can be done in two ways.

The first option is to characterize the distribution via the intersections of the phase space ellipse with the coordinate axes and the correlation terms of the canonical coordinate pairs.

\[\begin{split}\begin{align} \lambda_q &= \sqrt{\frac{\epsilon}{\gamma}} \\ \lambda_p &= \sqrt{\frac{\epsilon}{\beta}} \\ \mu_{qp} &= \frac{\alpha}{\sqrt{\beta \gamma}} \end{align}\end{split}\]

The units are \([\lambda_q] = \mathrm{m}\), \([\lambda_p] = \mathrm{rad}\), and \([\mu_{qp}] = 1\). To convert between normalized and unnormalized emittance, use the relation \(\epsilon_\mathrm{n} = (\beta\gamma)_\mathrm{ref} \cdot \epsilon\) which uses the momentum of the reference particle. Attention: Here, \((\beta\gamma)_\mathrm{ref}\) are the Lorentz variables for the reference particle momentum and not the Courant-Snyder parameters.

The second option is to specify the distribution via the Courant-Snyder / Twiss parameters \(\alpha\) and \(\beta\) along with the unnormalized (geometric, 1-RMS) emittance \(\epsilon\) for all the spatial coordinates. Recall the Courant-Snyder relation \(\gamma\beta - \alpha^2 = 1\) for conversion from \(\gamma\) values to our input conventions.

Distribution Sampling and the Covariance Matrix

In ImpactX, beam sampling is performed under the assumption that the initial beam distribution centroid (mean phase space vector) coincides with the phase space origin. The covariance matrix \(\Sigma\) is defined by \(\Sigma_{ij}=\langle{\zeta_i\zeta_j\rangle}\), where \(\zeta\) denotes the vector of phase space coordinates, and indices \(i,j\) specify the components of \(\zeta\).

Let \(P\) denote a phase space probability density with unit covariance matrix (i.e., equal to the identity matrix). To produce a phase space density with a target covariance matrix \(\Sigma\), we write \(\Sigma\) in terms of its (lower) Cholesky decomposition as:

\[\begin{equation} \Sigma = LL^T, \end{equation}\]

where \(L\) is a lower triangular matrix.

Define a beam distribution function \(f\) by:

\[\begin{equation} f(\zeta)=\kappa P(L^{-1}\zeta),\quad\text{where}\quad \kappa=|\det L|^{-1}. \end{equation}\]

Then \(f\) has the desired covariance matrix \(\Sigma\). Samples from \(f\) are obtained by sampling from \(P\) and performing the linear transformation \(\zeta\mapsto L\zeta\).

Let \(P\) above denote a 2D probability distribution that is radially symmetric, in the sense that:

\[\begin{equation} P(\zeta)=G(||\zeta||^2)=G(q^2+p^2),\quad\quad \zeta=(q,p) \end{equation}\]

Here \(q\) denotes a position coordinate (e.g., \(x\), \(y\), or \(t\)) and \(p\) denotes the corresponding conjugate momentum.

Then the resulting distribution \(f\) has 2D elliptical symmetry, in the sense that:

\[\begin{equation} f(\zeta)\propto P(L^{-1}\zeta)=G(||L^{-1}\zeta||^2)=G(\zeta^TS\zeta),\quad\quad S=\Sigma^{-1}. \end{equation}\]

The argument of \(G\) is a quadratic form in \((q,p)\), and it is convenient to express this quadratic form as:

\[\begin{equation} \zeta^TS\zeta = \frac{q^2}{\lambda_q^2} + 2\mu_{qp}\frac{qp}{\lambda_q\lambda_p}+\frac{p^2}{\lambda_p^2}=\frac{1}{\epsilon}\left(\gamma q^2+2\alpha qp + \beta p^2\right). \end{equation}\]

Here \(\alpha\), \(\beta\), and \(\gamma\) denote the Courant-Snyder Twiss functions, and \(\epsilon\) denotes the rms (unnormalized) emittance.

The associated covariance matrix may be written explicitly in terms of the above parameters as:

\[\begin{split}\begin{equation} \begin{pmatrix} \lambda_q & 0 \\ 0 & \lambda_p \end{pmatrix} \begin{pmatrix} 1 & \mu_{qp} \\ \mu_{qp} & 1 \end{pmatrix}^{-1} \begin{pmatrix} \lambda_q & 0 \\ 0 & \lambda_p \end{pmatrix} = \epsilon \begin{pmatrix} \beta & -\alpha \\ -\alpha & \gamma \end{pmatrix}. \end{equation}\end{split}\]

Note: In the special case that \(\mu_{qp}=0\), we have \(\lambda_q=\sigma_q\) and \(\lambda_p=\sigma_p\), where \(\sigma_q=\langle{q^2\rangle}^{1/2}\) and \(\sigma_p=\langle{p^2\rangle}^{1/2}\).