# Query about the statistical model used in AvalancheMC

I have few questions about the avalanche model used in AvalancheMC. I am a PhD student working in detector simulation it is very necessary to understand for me the following questions. I will be thankful to you is you please answer all these.

1. Is that model derived from the yule-furry model. If yes the as i know yule furry model does not take into account attachment; however here i have seen attachment is introduced.

2. what is the length of the subdivision of a drift step? is it probth=0.01? how do we get the value?

3. What is the physical interpretation of the sum of alpha and eta (alps[i] + etas[i])?

4. Is it possible to get explanation of the following portion of the code from AvalancheMC

``````// Subdivision of a step.
constexpr double probth = 0.01;
// Compute the number of subdivisions.
const int nDiv = std::max(int((alps[i] + etas[i]) / probth), 1);
// Compute the probabilities for gain and loss.
const double p = std::max(alps[i] / nDiv, 0.);
const double q = std::max(etas[i] / nDiv, 0.);
// Loop over the subdivisions.
for (int j = 0; j < nDiv; ++j) {
if (ne > 100) {
// Gaussian approximation.
const int gain = int(ne * p + RndmGaussian() * sqrt(ne * p * (1. - p)));
const int loss = int(ne * q + RndmGaussian() * sqrt(ne * q * (1. - q)));
ne += gain - loss;
ni += gain;
} else {
// Binomial approximation
for (int k = ne; k--;) {
if (RndmUniform() < p) {
++ne;
++ni;
}
if (RndmUniform() < q) --ne;
}
}
``````

Hi, welcome to the ROOT forum!

I think @hschindl can help here.

1. Correct. In a scenario without attachment, the avalanche size distribution (for a flat electric field) you get using `AvalancheMC` should correspond to a Yule-Furry distribution.

2. The probability that an electron ionises over a small step dx is given by αdx and the probability for attachment is given by ηdx. The idea is to choose the step size dx such that αdx and ηdx are small compared to 1. The value 0.01 is somewhat arbitrary though, another number << 1 should also do the trick.

3. It doesn’t really have a physical interpretation.

4. Can you be a bit more specific?

Thank you, sir, for your reply. It really helped me to clear my concepts. I have a few more questions regarding the below portion of the code.

``````// Subdivision of a step.
constexpr double probth = 0.01;
// Compute the number of subdivisions.
const int nDiv = std::max(int((alps[i] + etas[i]) / probth), 1);
// Compute the probabilities for gain and loss.
const double p = std::max(alps[i] / nDiv, 0.);
const double q = std::max(etas[i] / nDiv, 0.);
``````

I understood that αdx and ηdx is corresponding probabilities of ionisation and attachment within length dx. Therefore the total probability is (α+ η)dx (Please correct me if I am wrong) and (α+ η) is total probability per unit length (in Garfield++ unit it is per cm).

1. Here in the above code probth=0.01. How probth corresponds to dx? is probth unit less?
2. From this line “const int nDiv = std::max(int((alps[i] + etas[i]) / probth), 1);”, here we are dividing (α+ η)/probth , that means nDiv has unit of number of subdivisions per unit length. Do we here subdivide the total probability per unit length into equal 0.01 segments (Please correct me if I am wrong)?
3. if we choose probth=0.001 or further small value does it affect the gain? if yes what is the proper criteria to choose it?

Hi,

1. Yes, `probth` is dimensionless (it’s a probability). You want to choose the number of steps `nDiv` such that (α+η)dx is around `probth`.

2. `alps[i]` and `etas[i]` are the Townsend coefficient and attachment coefficient integrated over a drift line segment, so they are also dimensionless. `nDiv` is the number of subdivisions of the drift line segment.

3. Changing `probth` to 0.01 should, in theory, not affect the average gain (but the simulation will take longer because you have more steps).

1 Like

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