Failed to get the current signal

Dear Keino,

Thank you for getting in touch with us.

It seems that you are using the SetWeightingField function to import the weighting potential instead of the intended SetWeightingPotential function. To indicate to the AvalancheMicroscopic class that the weighting potential should be used for the signal calculations instead of of the weighting field, its UseWeightingPotential function can be used.

I hope this helps.

Kind regards,


Thank you very much for your reply! I’ll try to give it a try.

Thank you very much for your reply! I tried, but the result is still the same no pulse signal output, my classmate had run with this code and got the signal successfully.

I can’t figure out why that is, so I came to ask you for advice.

That is strange indeed. Could you provide me with the terminal output when running the script?


Did you try to plot the weighting potential first, to see if it is correctly loaded?

I faced a similar issue recently because of the line 481 in For some reason my weighting potential was set to invalid, so it was ignored by garfielpp afterward.


Thank you very much for your patience, this is the file output from my terminal.
1.txt (879.1 KB)
Is it possible that there is a problem with my software installation?

Thank you for your reply, my weight potential distribution is also no image!

Dear Keino,

I see nothing unusual in the terminal readout. The fact that the code can be run successfully on another device could indicate an installation issue. To make sure it is not the code, could you provide me with all the files by sending them to This way, I can try and run it myself and take a closer look. I will keep the discussion on this forum so it can be helpful for other users as well.

One small point, the code on lines 178-192 in your script are needed to make the header of COMSOL’s weighting potential map file compatible with the one expected by the import function?

Kind regards,

Dear FlorianBen,

Have you managed to find a solution for the ignoring of the weighting potential?

Kind regards,

I simply forced the value to be true in the source file.

It’s not a nice workaround but otherwise I had the same issue: the weighting potential was correctly loaded by garfield but not used for plotting and signal calculation.

Thank you again for your reply!
The explanation of the code in lines 178-192 you understand is correct, because the file exported from COMSOL using parametric scanning will have information about each parameter.
In addition, when I was looking for installation problems, I found that I have an example (Geant4GarfieldInterface) that runs with an error message like the one below, and I don’t know if this has anything to do with the problem I’m facing.

Will this be relevant? Do I have to solve the problem with this example first?

This looks like a different problem to me. Is your ROOT installation compatible with the compiler you are using?

Thank you very much for your patient reply! This image shows the version of the compiler used by my geant4 and root. I do not know much about this, please help me to see if it is compatible
I am doing this after reading this article. Do I have to update my compiler version (C++17) to be able to run this example? Also, I installed ROOT by downloading the installer and adding environment variables, but it seems that I can’t “Cmake” the compiler to update it this way. Do I have to change the installation method to reinstall ROOT?

Kind regards,

GCC 7.5 (on Ubuntu 18.04) does not really support c++17. You need to choose c++14 or c++11 (the same for all involved packages).

Thank you for your reply! I don’t quite understand what you mean, are you trying to say that I need to update the compiler version? Or do I need to reinstall Ubuntu or ROOT? (I’m new to VMs and don’t know much about them, so sorry)
I would be grateful if your answer!

Kind regards,

I have sent the file to your email address, did you receive it?

You need to have ROOT, Geant4, and Garfield++ built so that they all use the same C++ standard.

Dear Keino,

Did it work in the end? If not, I have pushed a possible solution to the repository. Let me know if it helped.

Kind regards,


I’m sorry for not replying in time!
The solution provided did not solve my problem, and also found another problem, that is, it is likely that the weight potential reading problem, because when I open the .txt file when the phenomenon of a black screen, I do not know if there is an error when reading (or open the text of the software problem)

Thank you very much for your patience, I’ve been thinking about this for the past two days and wondering if there was a problem with the installation.

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