Hi @simonspa,
I am relatively sure posting links to the public Athena repo is perfectly fine Especially given its Apache 2.0 license.
I don’t think it’s on the athena public repo yet. It’s still a work in progress and it’s on the gitlab of one of my colleagues. I think I can post a few lines of code that use the electric field in calculation, however.
double num_e = vsat_e/ecrit_e;
double den_e = pow(1+pow((electricField/ecrit_e),beta_e),(1/beta_e));
double mobility_e = r_e*num_e/den_e;
double num_h = vsat_h/ecrit_h;
double den_h = pow(1+pow((electricField/ecrit_h),beta_h),(1/beta_h));
double mobility_h = r_h*num_h/den_h;
Here, the “e” and “h” refer to quantities pertaining to electrons and holes, respectively. The “vsat” refers to (I think) the saturation velocity and “ecrit” refers to (again, I think) the critical temperature. Both “vsat” and “ecrit” depend solely on the temperature.
Where would you like to extract the value from? Once you are running Allpix Squared or before, e.g. in the mesh plotter?
In order to calculate the mobility, I only really need a single value of the electric field (which I think is taken from the position that the charges are deposited). I was thinking that I would extract them from the histogram file that allpix generates, the one that contains all the modules as directories:
How can I extract the value of the electric field from this file? I’m assuming I’ll probably have to write a ROOT macro like I’ve done to calculate things like the charge collection efficiency or the tangent of the Lorentz Angle.
Sidenote: I don’t know what the technical name for the output files of allpix are. I’ve been calling the above file the “histogram file” (while it’s variable name is “root_file”) and the other file the “data file” (which contains the trees used to calculate things like charge collection efficiency, but only uses “file_name” in the config file), but these are just what I use.
As for your final point:
What these calculations usually take is the saturation velocity in your sensor. If you deposit a single blob of e/h pairs deep in your sensor with magnetic field and create linegraphs for an event, you will see that they will (given high enough bias) have a constant drift to the right, resulting in a straight line drift path. Only in this saturation regime you can actually calculate the Lorentz angle meaningfully.
This makes sense. I’ve been working with a non-zero magnetic field the whole time I was working with Allpix, so the deflection thing is known to me. I’ve recently begun using an electric field that includes modelling for radiation damage and traps, so my particle drifts looks different as well.
This angle isn’t the best, but the electrons seem to curve as they head towards the electrode at z=0.15mm.
Cheers,
Damir