The question about induced current

I imported a ansys model to the Garfield++, firstly I got the induced current,but when I changed the weight.lis, the induced current turns to be empty

Not only the induced current, the drift line plot also seems to be empty. Are there any error or warning messages in the program output?

Hi,
Thanks a lot for your reply
I have changed the gas from helium to P10, the current signal is still empty.


I don’t know what’s the reason for that, even I changed all to the original condition under which I got the induced current last night, the result disappeared.

According to the output of your program, there are three clusters, at y = 19.4619, y = 19.0312 and y = 17.9103. The weighting potential in this region is zero as you can see from the contour plot.

Hi,
Thank you for your reply
my starting point is " tr.NewTrack(-11.7, 20.1, -7.53, 0., 0., -1., 0.);" And in this region there is the weighting potential. I don’t know why the proton generate the clusters in these three places. So what should I know in the next to get the current .

If I remember correctly, the positions of the clusters are taken from the TRIM output file.

Ah, I know it now.
Does that mean if I want the cluster in the range of region needed, then I can set the length of the tracks in the TRIM.

Hi,
I have changed the EXYZ files, there are results now, but how to increase the clusters? Is there any method?

Hi,
what do you mean by “change the clusters”? The energy loss intervals and the length of the track (thickness of the layer) are set in TRIM. Typically a TRIM output file will contain many tracks and there will be some fluctuations from track to track.

HI,
Thanks for your reply
because of the clusters are too small and the induced current are little, So I want to know if there is any way to increase the clusters such as increase the proton’s energy or the simulation time of the TRIM or other else.

If you want to increase the amount of energy that a proton deposits in your detector you need to increase the gas density or increase the size of the detector. The average energy loss per track length also depends on the energy of course, as you mentioned. It has a minimum at βγ around 3…4 and increases towards lower momenta (Bethe Bloch curve).

Ah, Thanks a lot for your reply
if the gas is fixed ,then how to increase the gas density. The size of the detector is also unchangeable,
What I can change is the number of the proton traversing in the detector ,however I don’t know where to set.

Every time you call NewTrack you simulate a proton track.

Hi,
Thanks a lot for your reply

are these code for the NewTrack?

 tr.NewTrack(-11.7, 20.4, -7.53, 0., 0., -1., 0.);
  // Loop over the clusters.
  double xc, yc, zc, tc, ec, ekin;
  int ne = 0;
  while (tr.GetCluster(xc, yc, zc, tc, ne, ec, ekin)) {
    if (ne == 0) continue;
    // Simulate electron and ion drift lines starting 
    // from the cluster position. 
    // Scale the induced current by the number of electron/ion pairs 
    // in the cluster.
    std::cout << "yc = " << yc << "; ne = " << ne << "\n";
    drift.SetElectronSignalScalingFactor(ne);
    drift.DriftElectron(xc, yc, zc, tc);
  }

But where is the number of the proton?

This piece of code simulates the induced current from one proton track.

Ah, I know it know. Does that mean the final result should multiply the number of the protons?

If there are no fluctuations of the deposited energy from track to track then you could do that. But you can also simulate multiple proton tracks. In fact, in the program I sent you as an example a couple of months ago, the above piece of code was in a for loop. You just need to set the number of iterations to how ever many tracks you want to simulate. Just make sure to comment out the line ClearSignal at the start of the for loop, otherwise you will reset the signal histogram for every track.

1 Like

Hi,
Thanks a lot for your reply
I have modified the code , is that right?

const unsigned int nTracks = 10E8;
  size_t nClusters = 0;
  for (unsigned int j = 0; j < nTracks; ++j) {
    sensor.ClearSignal();
    // Simulate an ion track.
  // tr.NewTrack(-11.7, 18.9427, -7.53, 0., 0., -1., 0.);
    tr.NewTrack(-11.7, 20.4, -7.53, 0., 0., -1., 0.);
   // Loop over the clusters on the track.
    double xc = 0., yc = 0., zc = 0., tc = 0., ec = 0., extra = 0.;
    int nc = 0;
    while (track.GetCluster(xc, yc, zc, tc, nc, ec, extra)) {
      ++nClusters;
      // Loop over the electrons in the cluster.
      for (int k = 0; k < nc; k++) {
        double xe = 0., ye = 0., ze = 0., te = 0., ee = 0.;
        double dxe = 0., dye = 0., dze = 0.;
        track.GetElectron(k, xe, ye, ze, te, ee, dxe, dye, dze);
        drift.DriftElectron(xe, ye, ze, te);
      }
    }
  }
  std::cout << nClusters << " clusters...\n";
  driftView.SetArea(-16.704, 17.292, -6.704, 20.5927);
  driftView.Plot(true);

No, I don’t think so.

What this will do is simulate 10^8 times the induced current from a single proton track.
If you want to simulate the signal of multiple tracks arriving at the same time, you need to comment out the line sensor.ClearSignal(); (as I told you in my previous reply).
But I’m not sure if this is what you want to do. Can you please explain what exactly you want to simulate? Otherwise it’s very difficult to help.

Why 10^8 tracks by the way? That’s a huge number. Did you also simulate 10^8 projectiles in TRIM?

Hi,
Thanks a lot for your reply
comment out the line ClearSignal at the start of the the for loop?
I am just trying to match the actual experimental data, the number of protons accelerated by a single laser are about 10E7 to 10E9.

const unsigned int nTracks = 10E8;
  size_t nClusters = 0;
  sensor.ClearSignal();
  for (unsigned int j = 0; j < nTracks; ++j) {
    // Simulate an ion track.
  // tr.NewTrack(-11.7, 18.9427, -7.53, 0., 0., -1., 0.);
    tr.NewTrack(-11.7, 20.4, -7.53, 0., 0., -1., 0.);
   // Loop over the clusters on the track.
    double xc = 0., yc = 0., zc = 0., tc = 0., ec = 0., extra = 0.;
    int nc = 0;
    while (track.GetCluster(xc, yc, zc, tc, nc, ec, extra)) {
      ++nClusters;
      // Loop over the electrons in the cluster.
      for (int k = 0; k < nc; k++) {
        double xe = 0., ye = 0., ze = 0., te = 0., ee = 0.;
        double dxe = 0., dye = 0., dze = 0.;
        track.GetElectron(k, xe, ye, ze, te, ee, dxe, dye, dze);
        drift.DriftElectron(xe, ye, ze, te);
      }
    }
  }