Truncated cone isotope source

Hello Leonardo,

sorry for the delay in the answer to your question but I have here some possible solutions for you.

Let me start saying that, not knowing the details of simulations (it would be nice in this regard to have some .inp or .flair to have a reference), I tried to find a general solution to your problem. Any specific details then will depend on your scope.

As you state, it is not possible to define a volumetric source inside a truncated cone through the BEAMPOS card, for this reason a specific source.f routine is needed.

As a first approach a possible solution can be found following what is suggested in this trend.
The source.f routine there described requires you to define in the geometry the TRC where the primaries will be evenly distributed by the routine.

You can find some basic input to check how does it work here:
source_isotope_truncatedcone.inp (1.6 KB)
source_volumetric.f (9.9 KB) (the same source.f of the other topic simply adapted to the TRC I have created in the input file)

Another possibility, not using the recursive subroutine, is to sample geometrically the position of a primary particle in a TRC without the need to define it in the geometry you are using.

I propose you to have a look to this simple routine and to use the input file to check the result:
source_isotope_truncatedcone.inp (1.6 KB) (same input file as before, simply change the SOURCE card)
source.f (10.5 KB) (in this case the user needs to give to the routine the information of the TRC - look at the SOURCE card in the .inp - and it is used just to sample in a TRC with height along the z axis - so the information about height-x and height-y are superfluous)

N.B. in this case due to the logic used in the sampling, the primaries are not evenly distributed in the TRC

Cheers,
Giuseppe