Skip to content

Calculation of charged particle ionization using Heed

A detailed description of the model used in Heed can be found in this paper by Igor Smirnov.

In this example, we calculate the energy loss and ionization pattern of a charged particle traversing a gas layer of 1 cm.

Detector description

Gas mixture

We use Ar/CO2 (90:10) at atmospheric pressure as filling gas.

MediumMagboltz gas("ar", 90., "co2", 10.);
gas.SetPressure(760.);
gas.SetTemperature(293.15);

Geometry

The detector volume is a box with a width of 1 cm along x. For simplicity, we use a uniform electric field (100 V/cm).

// Gas gap [cm].
constexpr double width = 1.;

ComponentConstant cmp;
cmp.SetArea(0., -10., -10., width, 10., 10.);
cmp.SetMedium(&gas);
cmp.SetElectricField(100., 0., 0.);

Sensor sensor(&cmp);

Heed

The class TrackHeed provides an interface to Heed. As primary particle we use a 120 GeV/c pion.

TrackHeed heed(&sensor);
// Set the particle type.
heed.SetParticle("pi");
// Set the particle momentum (in eV/c).
heed.SetMomentum(120.e9);
// Print out some information (stopping power, W value, ...) after initialisation.
constexpr bool verbose = true;
track.Initialise(&gas, verbose);

We are now ready to calculate a track.

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

Looping over the "clusters" along the track, we calculate the total energy loss and the total number of electron/ion pairs produced. In this context, the term "cluster" refers to the energy loss in a single ionizing collision of the primary particle and the electrons produced in this process.

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

By default, Heed tracks the δ-electrons emerging from a collision and calculates the secondary electrons ("conduction electrons") produced in the energy degradation cascade. The cluster object has a container of all the "conduction electrons" associated to it. In a full simulation one would then proceed by calculating electron and ion drift lines starting from their coordinates.

// Calculate another track.
heed.NewTrack(x0, y0, z0, t0, dx0, dy0, dz0);
// Loop over the clusters.
for (const auto& cluster : track.GetClusters()) {
  // Loop over the conduction electrons belonging to the cluster.
  for (const auto& electron : cluster.electrons) {
    // Get the coordinates of the conduction electron.
    double xe = electron.x;
    double ye = electron.y;
    double ze = electron.z;
    double te = electron.t;
    // Calculate electron and ion drift lines starting from xe, ye, ze
    // ...
  }
}

Photon transport

Heed can also be used for simulating photoabsorption in gases.

// Setup gas, sensor etc.
// ...
// Setup Heed (the particle type does not matter in this case).
TrackHeed heed(&sensor);
// Photon energy (in eV)
const double e0 = 5900.;
// Initial position and starting time of the photon
const double x0 = 0.;
const double y0 = 0.;
const double z0 = 0.;
const double t0 = 0.;
// Photon direction (null-vector: randomize direction)
const double dx0 = 0.;
const double dy0 = 0.;
const double dz0 = 0.; 
auto cluster = heed.TransportPhoton(x0, y0, z0, t0, e0, dx0, dy0, dz0);

Source files

Example applications can be found in the directory Examples/Heed of the Garfield++ source tree.

  • edep.C simulates energy loss and ionization spectra in Ar/CO2,
  • fe55.C (contributed by Lucian Scharenberg) simulates the spectrum of an 55Fe source in Ar/CO2,
  • qdepSi.C simulates energy loss and ionization spectra in silicon,
  • rangeSi.C simulates the range of delta electrons in silicon.