Introduction

DarkProp is a Monte Carlo simulation code for the propagation of dark matter particles in a medium. It was originally developed for simulating the Earth attenuation effect of the cosmic ray boosted dark matter (CRDM).

Overview of the simulation

The simulation of dark matter (DM) propagation includes the following procedures:

  1. Prepare a DM particle with momentum and position sampled from specific initial conditions.

  2. Repeat propagation and scattering processes

    • propagation:

      Sample a length \(l\) according to the mean free path. Then the DM particle travel the distance \(l\) in a straight line along the momentum direction.

    • scattering:

      Sample the momentum of the DM particle after scattering using the differential cross section.

  3. Terminate the simulation based on some conditions, for example

    • Particle escapes the medium.

    • Particle’s kinetic energy is below a certain threshold.

Once the trajectories of the particles are obtained, we can do any interesting analysis.

The two core steps of the simulation are propagation and scattering, which are explained in the next two sections.

Propagation

Suppose we have a beam of DM particles with intensity \(I\) traveling inside the Earth. The number density of the crustal component nucleus \(N\) is \(n_N\). We are interested in how many particles can freely travel a distance longer than \(L\). The change in intensity \(\mathrm{d}I\) when the particles travel a small distance \(\mathrm{d}z\) is

(1)\[\mathrm{d}I = - I \sum_N n_N \sigma_{\chi N}^\mathrm{tot} \mathrm{d}z,\]

where

(2)\[\sigma_{\chi N}^{\mathrm{tot}} \equiv \int_0^{q^2_{\max}} \frac{\mathrm{d}\sigma_{\chi N}}{\mathrm{d}q^{2}}\mathrm{d}q^2\]

is the total cross section of DM-nucleus (or DM-electron) scattering, where \(q\) is the momentum transfer. The cross section may depend on the energy of the incident DM particle, and \(n_N\) may vary with location. The solution of Eq. (1) is

(3)\[I = I_0 \exp(-\int_0^L \frac{\mathrm{d}z}{\lambda}),\]

where \(I_0\) is the intensity at \(L = 0\), and we defined the mean free path \(\lambda\) as

(4)\[\lambda^{-1} = \sum_N \lambda_N^{-1} \equiv \sum_N n_N \sigma_{\chi N}^{\mathrm{tot}}.\]

The key point is that \(I / I_0\) can be considered as the probability that a single particle freely passes a distance greater than \(L\), therefore

(5)\[P(\hat{l} > L) = \exp\left(-\int_0^L \frac{\mathrm{d}z}{\lambda}\right),\]

where \(\hat{l}\) denotes the random variable of distance. Then the cumulative distribution function (CDF) is

(6)\[F(L) \equiv P(\hat{l} \leqslant L) = 1 - \exp\left(-\int_0^L \frac{\mathrm{d}z}{\lambda}\right).\]

We can draw a sample of \(\hat{l}\) by the inverse CDF method

(7)\[\hat{l} = F^{-1}(\xi),\]

where \(\xi\) is a random number drawn from a uniform distribution between 0 and 1. So the question of sampling a free path \(L\) reduces to solving \(L\) from the equation

(8)\[\int_0^L \frac{\mathrm{d}z}{\lambda} = -\ln(1-\xi).\]

The specific form of \(\lambda\) depends on the cross section and the Earth model.

Scattering

Before scattering, we need to determine what kind of nucleus the DM particle collides with. This can be sampled using the probability of scattering on species \(N\)

(9)\[P_N = \frac{n_N \sigma_{\chi N}^{\mathrm{tot}}}{\sum_{N'}n_{N'} \sigma_{\chi N'}^{\mathrm{tot}}} = \frac{\lambda}{\lambda_N}.\]

The probability density function (PDF) of momentum transfer squared \(q^2\) is the normalized differential cross section

(10)\[p(q^2) = \frac{1}{\sigma_{\chi N}^{\mathrm{tot}}} \frac{\mathrm{d}\sigma_{\chi N}}{\mathrm{d}q^{2}}.\]

The \(q^2\) and the corresponding recoil energy \(T_r\) of the target nucleus can be sampled from this distribution.

For elastic scattering, the scattering angle (between \(\vec{p}_i\) and \(\vec{p}_f\) in laboratory frame) can be obtained from kinematics

(11)\[\cos\theta = \frac{p_i^2 - T_r (T_i + m_\chi + m_N)}{p_i p_f},\]

where subscripts \(i\) and \(j\) stand for the initial and final states, respectively.

Implementation of the Code

We designed two abstract base classes to implement above processes, the darkprop::Particle class and the darkprop::Medium class. General speaking, the Particle class implements the total cross section in Eq. (2), the sampling of the recoil energy using Eq. (10), and the calculation of the scattering angle from the sampled recoil energy (e.g. Eq. (11) for elastic scattering). The Medium class implements the sampling of the free path in Eq. (7) and the scattering probability in Eq. (9). Using such an abstraction, various DM and medium models can be implemented by inheriting these two base classes. See Basic Interface and Implemented Models sections for details.