How to set the gas gain

Excuse me, is that SetGainFluctuationsPolya() from driftlineRKF class to set the gas gain?

Yes, it sets the avalanche size distribution to be used. The first argument is the shape parameter of the Polya function (θ = 0 corresponds to an exponential distribution, with increasing θ the distribution becomes more and more “rounded”). The second argument is the average gas gain.

I have another problem. I want to plot a signalview of ion. So that i fixed my code like follow, but still coun’t get the ion signal, where is the wrong?

the signal from the “primary” ions is indeed quite small. To simulate the signal of the ions that are produced in the avalanche, please add a line drift.EnableIonTail() to the program (like [here](Examples/DriftTube/mdt.C · master · garfield / garfieldpp · GitLab, but not commented out).

I also noticed that there was a bug with the plotting of the ion drift lines that are produced in the avalanche. I’ve just committed a fix, so you would need to git pull and rebuild the project to be able to visualise these drift lines correctly.

You mean after I add drift.EnableIonTail(), the signal which are ploted is effected by both electron and ion? Also I saw that the drift line became to red, but not drifted to cathode, is that the bug you said? And what is git pull mean?

Yes (by the electrons and the ions that are produced in the avalanche).

Yes. To be precise, the ion drift lines were actually simulated, but not displayed correctly.

Go to the directory to which you cloned the Garfield++ source code (the one that $GARFIELD_HOME should point to), and type git pull, then re-build the project.

Is there any options after command “get pull” ,it prompt me to choose a repository…

Hmm, that’s strange… How did you get hold of the Garfield++ source code in the first place? I assume you typed git clone ... ?

I downloaded the compressed package from the official website hahah :laughing:

Ah, ok. In that case you have to download it again…

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