How to calculate the induced signal caused by alpha in Gem

Hi,based on The questions about the induced current - #26 by XiCheng, I wrote a program to calculate the induced signal caused by alpha in air in the Gem detector.Here is some information about my code(attached below).
I used Ansys to build a single-layer Gem model with cathode (0 Volt) at the bottom, gem in the middle, and anode (1500 volt) at the top. The drift region is 3 mm and the induction region is 1 mm. In addition, SRIM was used to calculate the ionization data of alpha in air (“EXYZ_Helim_inAir.txt”," Helium_10keV-10MeV_in_Air.txt" ).

I want to simulate the ionization of alpha in the drift region, avalanche in the gem, then calculate the induced signal on the anode, and visualize the whole process using the driftView.But encountered the following problems.
1.I ’ m not sure the weighting field is calculated correctly because fieldView.PlotContourWeightingField ( ’ anode ', ’ e ’ ) and fieldView.PlotContour ( ’ e ’ ) ; the results are very similar.
2.I feel that TrackSrim and TrackSrim are very similar, so I use them separately. TrackTrim can output normally, but use TrackSrim to output ’ DriftLineRKF : : DriftLine : Cannot retrieve drift velocity at initial position (0.002369, -0.004027, -0.000000). ***Break ****segmentation violation '.
( a ) What are the possible reasons for TrackSrim to cause error 'DriftLineRKF: : DriftLine:Cannot retrieve drift velocity at initial position ’ ? How should I solve it ?
( b ) What are the advantages of TrackSrim and TrackSrim, I mean, how do I determine which one to choose ?
3.The driftline is very strange, unlike the alpha ionization trajectory.Is something wrong with the code below?

 while (track.GetCluster(xc, yc, zc, tc, nc, ec, extra))
    {
      cout << "xc= " << xc << " yc= " << yc << " zc= " << zc << "nc= " << nc << '\n';
      drift.SetIonSignalScalingFactor(nc);
      drift.DriftIon(xc, yc, zc, tc);
      drift.SetElectronSignalScalingFactor(nc);
      drift.DriftElectron(xc, yc, zc, tc);
      // double xe = 0., ye = 0., ze = 0., te = 0.;
      // int status = 0;
      // drift.GetEndPoint(xe, ye, ze, te, status);
      // ze = -1.e-10;
      // drift.DriftElectron(xe, ye, ze, te); // ye
    }

4.On the basis of simulating alpha ionization, I want to simulate the avalanche of electrons in the gem, and then calculate the induction signal of the anode, how should I modify the original code?
5.The calculated induction signal seems to be only caused by electrons. If I want to calculate the induction signal caused by ions, what should I do ?
srim.zip (985.5 KB)
the file"EXYZ_Helim_inAir.txt" is too big to upload

I think @hschindl could help

Hi ! @hschindl,Sorry to disturb you.Can you give me some help?

Based on Weird signal shape for proportional counter - #6 by hschindl
I used microscopic tracking and DriftLineRKF to calculate the induction signal generated by a single electron at anode separately, and the results are strange. I do not know whether the code is wrong or the drift electric field calculated by Ansys is wrong?
single_eletron.txt (4.6 KB)

I had a quick look and I don’t see anything obviously wrong with the code…

But “ne” is calculated to be 1(using aval.AvalancheElectron),and to be 2.06835e-06 electrons(using DriftLineRKF). Is something wrong with the gas setting or the electric field calculated by ansys? Do you have time to take a look ?

This is my generate.C of gas.

#include <iostream>
#include "Garfield/MediumMagboltz.hh"
#include "Garfield/FundamentalConstants.hh"
using namespace Garfield;
int main(int argc, char *argv[])
{
  const double pressure = 760*2;
  const double temperature = 293.15; //
  MediumMagboltz gas("Ar", 0.94, "CO2", 0.03, "H2O", 0.03, "O2", 20.9, "N2", 78.1);
  gas.SetTemperature(temperature);
  gas.SetPressure(pressure);
  // Set the field range to be covered by the gas table.
  const size_t nE = 30;
  const double emin = 100.;
  const double emax = 100000.;
  // Flag to request logarithmic spacing.
  constexpr bool useLog = true;
  gas.SetFieldGrid(emin, emax, nE, useLog);
  const int ncoll = 10;
  // Run Magboltz to generate the gas table.
  gas.GenerateGasTable(ncoll); // 
  // Save the table.
  const std::string filename = "gas_" + std::to_string(pressure) + ".gas";
  gas.WriteGasFile(filename.c_str());
}

and this is my setting of TRIM calc

Apologies for the delayed reply (you are asking many questions at the same time not all of which are trivial/quick to answer).
I will try to run your program and see if I can reproduce the Cannot retrieve drift velocity... error message. TrackSrim should not create clusters outside an active medium (and in any case shouldn’t see-fault) but there may be a bug; I’ll take a look.
TrackSrim and TrackTrim are indeed similar in scope (and they both use output from the TRIM/SRIM family of programs).

TrackSrim takes the average properties (dE/dx, straggling parameters) computed by SRIM, distribute the energy loss over a discrete set of “clusters” and randomises the energy loss over a track segment (using a Landau, Vavilov or Gaussian distribution). TrackTrim takes directly a list of trajectories + energy losses for individual tracks from TRIM. For more details please see the examples on the website).

By default, DriftLineRKF should also calculate the avalanche growth (but just integrating the Townsend coefficient along the drift line, without taking into account the spatial growth/diffusion). If you switch on the calculation of the ion tail, the ion signal should, in theory, also be computed. In a GEM the signal is typically dominated by the electron component though (the GEM foil acts a bit as a shield).

1 Like

Looking forward to your reproduce and reply!

Thanks a lot! I’ll see the examples again

Do you mean that DriftLineRKF can simulate avalanche of electrons in a gem without taking into account the spatial growth / diffusion? In my case ( the primary particle is alpha, and in gem detector ), finally want to get the induction signal on the anode, if only using DriftLineRKF, Is the calculation result accurate ?

gas_2atm_10-100000-nE30 .gas.txt (108.0 KB)

Oh,This is my latest gasFile.

@hschindl ,sorry to disturb you. Could you help me check what might be wrong?Thanks a lot.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.