Simulation of sum Peak with multiple radionuclides

Dear FLUKA Experts,

I am a beginner with FLUKA and I am trying to simulate sum peaks (coincidence) in the gamma-ray spectrum generated by multiple radionuclides detected by an HPGe detector.

To do this, I used the following configuration:

  • DETECT card with the COINCIDENCE option

  • USRBIN card to visualize energy deposition

  • A customized source routine (attached here as source_modified_sumpeak.f) using NPFLKA=2 to generate two photons per primary event.

However, during compilation, I get errors when NPFLKA=2 is set in the (source_modified_sumpeak.f).

But when I remove the line setting NPFLKA=2, the code runs without errors, yet I don’t see the sum peak in the plotted spectrum, even with the COINCIDENCE option active in the DETECT card.

I would really appreciate your help to understand :
• What is the correct way to define multiple photons in the same event using (source_modified_sumpeak.f)?

• Is it necessary to do anything else in the input cards to correctly simulate coincidence peaks ?

Thank you in advance for your guidance !

source_modified_sumpeak.f (21.5 KB)
Kind regards,

Dear Fatima,

You don’t need to manipulate the NPFLKA variable in the source_newgen.f routines, but you need to call the set_primary() subroutine multiple times to push each particle to the stack. See the following small example:

npflka_example.flair (2.5 KB)
source_npflka_example.f (4.5 KB)

By the way, the (Anti)Coincidence option of the DETECT card is for two separate detector regions. In a single region, if multiple particles deposit energy, you will get the sum of energy deposition by default.

Cheers,
David