Dear FLUKA experts,
I need to create a source distribution of electrons that follows the function f(x) = ax^5 + bx^4 + cx^3 + dx^2 + ex + f.
I have only used the interface Flair with the built-in sources so far, so I would like to know how I can define my own source of electrons.
I suggest to take a look at the source_newgen.f user routine.
See section 13.2.20.bis} of the manual at 13.2.20} source.f: user-written source | FLUKA (middle of the page) and the following lecture: https://indico.cern.ch/event/956531/contributions/4020241/attachments/2123482/3574575/17_Source_routine_2020_online.pdf
However, you need to implement the mathematical process of sampling a polynomial distribution by yourself.
Thanks for your answer, Sir.
Is the routine source_newgen.f a different file or it’s what is written in section 13.2.20bis?
the section 13.2.20bis of the manual contains the description of the source_newgen.f user routine (which is also present in the routine as well)
The lecture however is a bit outdated, a new version will be available soon.