Dear experts,
I’m facing a problem of ion signal. I’m in air filled a plane parallel geometry (the gap between the electrodes is 1 mm and the voltage is at 500 V.) trying to get the induced curent by the electron, anions and cations generated by the track of a proton with TrackHeed.
I think my code is working well since I manage to have a nice working driftview
of the track, the electron, the cations and the anions once the electrons attached to O_2 molecules.
I managed to get the signal induced the electrons for a certain amount of tracks (100 in this case) but no signal is output by the positive or negative ions. On these 100 tracks the simulation couts 826 electrons and 425 attachment electrons so i expect 826 cations and 425 anions. Should’nt we see this amount of ions in the signal ?
I have checked all the forum in search of clues but nothing help me to make this work.
I load my ions mobilities:
gas.LoadIonMobility(path + "/share/Garfield/Data/IonMobility_N2+_N2.txt");
gas.LoadNegativeIonMobility(path + "/share/Garfield/Data/IonMobility_O2-_air.txt");
I use ViewSignal``,
AvalancheMicroscopic for the electrons and ``DriftLineRKF
for the ions with drift.EnableIonTail()
and drift.EnableSignalCalculation()
I managed to see a tiny signal by cheating putting an artificial drift.SetIonSignalScalingFactor(10)
but this signal is completely flat during more than 1000 ns.
Is it normal in your opinion ? Thank you in advance, once again, for your answers.
Kind regards
Pierre G.
PS: I attached a piece of my code
for (int i = 0; i < nEvents; ++i) {
std::cout << "Event: " << i+1 << "/" << nEvents << "\n";
// total number of electrons
int nsum = 0;
// number of attached electrons
int asum = 0;
// energy loss
double esum = 0;
// Initial position and direction
double x0 = 0., y0 = 0., z0 = 0., t0 = 0.;
double dx0 = 1., dy0 = 0., dz0 = 0.;
sensor.NewSignal();
track.NewTrack(x0, y0, z0, t0, dx0, dy0, dz0);
for (const auto& cluster : track.GetClusters()) {
esum += cluster.energy;
for (const auto& electron : cluster.electrons) {
aval.AvalancheElectron(electron.x, electron.y, electron.z, electron.t, 0.1, 0, 0, 0);
// Loop over the electron avalanches.
for (int j = 0; j < aval.GetNumberOfElectronEndpoints(); ++j){
nsum ++;
double xe1, ye1, ze1, te1, e1;
double xe2, ye2, ze2, te2, e2;
int status;
aval.GetElectronEndpoint(j, xe1, ye1, ze1, te1, e1, xe2, ye2, ze2, te2, e2, status);
drift.DriftIon(xe1, ye1, ye1, te1);
//drift.SetIonSignalScalingFactor(10);
if (status == -7) {
asum ++;
drift.DriftNegativeIon(xe2, ye2, ye2, te2);
}
}
}
}
vec_totalElectron.push_back(nsum);
vec_attachedElectron.push_back(asum);
vec_energyLoss.push_back(esum);
}