How to measure differential flux

Dear @illia.zymak , that is so kind, thank you very much for your advice, I am really thankful for this also!

As an update to this endeavour, I managed to get flair running, and also edit the input file. To summarise, I want to measure the differential flux of particles produced in a high energy neutrino interaction as a function of zenith and energy in ice.

I tried to define a set of spherical detectors to get the differential flux at different distances from the interaction vertex (centred on the vertex itself), and want to make the sphere “moveable” depending on where it sits in the medium (so it automatically known which proportion of ice, dust, bedrock etc it should contain).

It’s looking better than before, but there are still some problems! Any guidance would be greatly appreciated :slight_smile: Many thanks and best wishes to you and @Mihaela_Parvu !
ice.inp (5.8 KB)
ice.flair (5.1 KB)

Dear krhfarrag,
I will let myself to make you a brief introduction into geometry in FLUKA, which I hope will help you with your task, and make a background to the further explanation, see also

The abstraction level of a region REGION in FLUKA is similar to an analogue of the piece of homogeneous material of certain geometry in the real world, so you cannot place e.g. a glass solid at the same place where you already have an iron solid. It means, that it is impossible to create an virtual “detector” structure REGION that will overlap several other REGIONs, which represents physical objects of your model. If you want to define some surface inside the region, you have to split it into to independent regions.
Also, to avoid infinite tracking, particles must stopped somewhere. To do so, your geometry has to be placed inside of the black hole (BLCKHOLE) body.

Getting back to the fluence scoring, you have to keep in mind several points:

  • scoring surface is defined as a surface between two regions
  • you need to calculate and set area of the surface for the proper normalization
  • you have to specify if you want to score current or flow, and to make one-way or two-way scoring

See also:

Indeed, as you already started, it is very useful to work with a #define function, if you want to study dependence of the model on certain parameter. You can also use it to set detector region parameter instead of placing several entities with the different parameters. In this case you can run simulation for the several values simultaneously, see

As a small suggestion, I will attach the Flair file, to propose you how I would try to solve this task (try to play with Sph_RL variable). Definitely this is not the only solution, and probably I do not take into account some aspects of your physical model.
ice_2.flair (3.4 KB)
ice_2.inp (3.2 KB)

Kind regards,

Dear @illia.zymak thank you very much, I am really grateful for your insight and guidance in this effort.

I did try to run, compile and plot the data, but unfortunately, it appears that no neutrons are appearing when I plot in flair either

. I am wondering if it is an error on my settings, such as the detector sphere being too large perhaps?

Many thanks and best wishes :slight_smile:

Dear @krhfarrag,

By default, neutrinos are not transported in Fluka, you have to explicitly has for their transport. Have a look at the DISCARD card.
Also, beware that different neutrinos types have to be “undiscarded” separately. Your BEAM card selected tau neutrinos.

Dear @amario, thank you so much for this information :slight_smile:

To my understanding, if you add the DISCARD option, then interactions switch off, but propagation switches on? In my case, I just want the primary neutrino interaction, then propagate the secondaries it produces and count the number of neutrons at the end. Please correct me if I misunderstood something!

Many thanks and best wishes

As you can read in the note #2 of the DISCARD card: “Discarding a particle means that that type of particle will possibly be produced but not transported.”
In your specific case, you’re dealing with neutrinos, which are discarded by default. Therefore, to “revert” this action, you need a DISCARD card where you provide the name of the particle preceded by a “minus” sign.