I want to calculate the time of the electrons drifting to the collecting plate when proton passing through the gas ionization chamber, which function I should use and how to confirm the coordinates of the collecting plate because the model is imported from the ansys.
It depends on the class that you are using for simulating the electron drift.
With AvalancheMicroscopic
and AvalancheMC
you can do something like this:
for (const auto& electron : aval.GetElectrons()) {
const auto& endPoint = electron.path.back();
const double driftTime = endPoint.t;
}
See also Examples/Gem/gem.C · master · garfield / garfieldpp · GitLab
With DriftLineRKF
you can use the function GetDriftTime
.
Hi,
Thanks for your help. I have used the DriftLineRKF in my code, so I choose to use the GetDriftTime, however there must be something wrong like the code used below
DriftLineRKF drift;
drift.SetSensor(&sensor);
drift.SetMaximumStepSize(0.01);
drift.GetDriftTime();
I can’t get the result of the drifttime
You first need to simulate a drift line (drift.DriftElectron(...)
).
Thanks for your help
I add the code like thisDriftLineRKF drift; drift.SetSensor(&sensor); drift.SetMaximumStepSize(0.01); drift.DriftElectron(-11.7, 20.42, -7.53, 0.); drift.GetDriftTime();
and the result is like this
I still can’t get the result
GetDriftTime
returns a double
; if you want to print out the drift time you need to do something like
std::cout << "Drift time: " << drift.GetDriftTime(); << " ns\n";
Hi,
Thanks a lot for your reply and kindly help.
I have got the results like this:
But the other plot shows the collecting time is nearly about 450ns to the balance
So would you please explain the different results for me ? Thanks a lot.
What exactly does the plot show? The signal from a single electron? Or from all electrons on a charged-particle track?
it’s the IntegrateSignals, looks like all lectrons on a charged-particle track and then normalized.
Ok. So to what starting point does the drift time (239 ns) correspond to? If it’s for an electron that has to drift all the way through the chamber then I would indeed expect it to be identical to the duration of the signal; but maybe it’s an electron released somewhere in the middle of the gap?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.