How to add a new material in Allpix^2

I want to add a new material in Allpix^2, but I failed to add. I tried to define the material in MaterialManager.cpp, but Allpix^2 didnt find my material. Is there any way to define?

Hello @MrIcemirror ,

welcome to the community! It depends on whether this material is supposed to be an active or a passive material.


This is the correct place. Keep in mind that if this material is also available in Geant4, you can directly configure it from the geometry configuration. Check the manual for more details.


There’s a few things to do. Please refer to our FAQs for this, explicitly the following two questions are interesting here:

If you keep having problems, I would ask you to provide a few more details (code snippets, run logs and/or complation errors)

Thanks and cheers

I want to add a passive material. I checked MaterialManager.cpp and found some materials. I tried to add a new one but no use. The examples provided by Allpix^2 itself did not work as well such as b10 and ti5. I also tried to add more words in the Material Not Found Error information to check if this cpp worked and nothing changed.

Dear @MrIcemirror ,

could you please provide us with …

  • your configuration files
  • your command line output (either as screenshot or as text).

This would be well appreciated, so we could find a hint on what the issue is.

Thanks and cheers