Skip to content

Generation of charged particle ionization using data computed by SRIM

SRIM is a program for calculating the energy loss and range of ions. In this example, we import a table of energy loss, range, and straggling computed by SRIM and generate electron clusters along a track which are statistically compatible with these average quantities.

Detector description

We use argon at atmospheric pressure as filling gas.

MediumMagboltz gas("ar");
gas.SetPressure(760.);
gas.SetTemperature(293.15);

For simplicity, we use a constant electric field. The detector volume is a box with a length of 1.5 cm along x.

ComponentConstant cmp;
constexpr double width = 10.;
constexpr double length = 1.5;
cmp.SetArea(0., -0.5 * width, -0.5 * width, length, 0.5 * width, 0.5 * width);
cmp.SetMedium(&gas);
cmp.SetElectricField(1000., 0., 0.);

Sensor sensor(&cmp);

SRIM

As a starting point, we need a SRIM output file (see this file for an example). The file contains the following data

  • a list of kinetic energies at which losses and straggling have been computed;
  • average energy lost per unit distance via electromagnetic processes, for each energy;
  • average energy lost per unit distance via nuclear processes, for each energy;
  • projected path length, for each energy;
  • longitudinal straggling, for each energy;
  • transverse straggling, for each energy.

Note that these tables contain only average quantities, not their distribution. The TrackSrim class tries to generate individual tracks that statistically reproduce the above quantities. As a first step, the SRIM output file is read.

TrackSrim tr(&sensor);
// Read SRIM output from file.
const std::string file = "Alpha_in_Ar.txt";
tr.ReadFile(file);

In addition to the stopping, range and straggling tables, the file also contains the mass and charge of the projectile, and the mass density of the target medium. These properties are also imported and stored by TrackSrim when reading the file.

Next we specify the initial kinetic energy of the projectile (which needs to be within the range of energy covered by the SRIM output file).

// Set the initial kinetic energy of the particle (in eV).
tr.SetKineticEnergy(1.47e6);

By default, TrackSrim retrieves the other material properties that are needed for simulating ionisation spectra (work function, Fano factor, electron density) from the Medium at the track's starting point.

We can make some plots to visualize the SRIM tables and can print out the tables as a cross-check.

tr.PlotEnergyLoss();
tr.PlotRange();
tr.PlotStraggling();
tr.Print();

SRIM is aimed at low-energy nuclear particles which deposit large numbers of electrons in a gas. The grouping of electrons to a cluster is therefore somewhat arbitrary. By default, TrackSrim will try to produce on average 100 clusters on the track. In this example we specify a target cluster size, i. e. the average number of electrons per cluster.

// Specify how many electrons we want to be grouped to a cluster (on average).
tr.SetTargetClusterSize(500);

Depending on the energy of the particle traversing the gas, various energy loss fluctuation models may be applicable. The SRIM output does not specify the model to use. By default, TrackSrim uses a combined model which is described in this note. This model uses a Landau distribution for small steps, a Vavilov distribution for medium steps and a Gaussian distribution for long steps. Other models can be activated using the function TrackSrim::SetModel.

We are now ready to simulate a track.

// Initial position
double x0 = 0., y0 = 0., z0 = 0., t0 = 0.;
// Direction of the track.
double dx0 = 1., dy0 = 0., dz0 = 0.;
tr.NewTrack(x0, y0, z0, t0, dx0, dy0, dz0)`

Looping over the "clusters", we calculate the total number of electron/ion pairs produced along the track.

// Total number of electrons produced along the track
int nsum = 0;
for (const auto& cluster : track.GetClusters()) {
  nsum += cluster.n;
}

The cluster object also contains the coordinates and time of the cluster (x, y, z, t), the energy loss (energy) and the kinetic energy of the ion at this point in the trajectory (ekin).

Source files

The source code of the example application above can be found in the directory Examples/Srim of the Garfield++ source tree.