How to manually enter channel number in DETECT card

Dear FLUKA experts,

As mentioned in the manual that the channel number can be set manually also (other than the default 1024) as |WHAT (1)|, but I am unable to understand where to put that values. Can you please clarify that ?

Thanks,
Riya

Dear @riya,

I’m not familiar with the DETECT card, nevertheless I know it is possible to access any card directly by click on the small pencil icon in the bottom right frame of the flair window. Maybe the picture below is more clear, I have highlighted the icon with a red circle. Once you click on it a windows pops up allowing you to access each WHAT and the SDUM. This is valid for any card, not just DETECT.

Hello @amario,

As the manual indicated that WHAT (1) should be less than zero for a detector and |WHAT (1)| is the channel number. I want to put channel number as 8190, so I inserted -8190 in WHAT (1) (please see the attached image). But this is not working and the whole card got disturbed by this (please see the second image).

Thanks and regards,
Riya

Dear @riya,

indeed the Flair interface is wrong: it will be corrected in a next release.
You can set manually WHAT(1) to a negative value (as you did): FLUKA will interpret correctly the number of channels required.

Before running a simulation, just check with a text editor that the card is correctly saved in the input file.

Cheers, Luigi

1 Like

Dear @luillo,

I changed WHAT(1) and ignored the error that was shown by Flair. I checked the .inp file. It seems fine (the channel number is visible there). I gave a run and while processing I am getting this error. (see the attached image). Is there anything that I have to add in usreou.f related to channel number ?

I am also attaching the .inp and .flair files that I have created for your convenience.

detect.flair (2.5 KB) detect.inp (2.4 KB) usreou.f (2.4 KB)

*Another observation: Please note that the test input is same as communicated earlier in this fluka support which was working fine, only difference is the channel number. [ Gaussian broadening is not working]. That time, if I leave trigger blank, there was no error showing in flair. But now in this version, if I leave trigger empty, then red colored warning is appearing.

Thanks and regards,
Riya

Dear riya,

the issue in this case is with the post processing tool detsuw. It is limited to a maximum of 4096 channels per detector.

You can manually increase the limit by editing the file:

/usr/local/fluka/src/tools/detsuw.f

You need to increase the value of the NBNMX parameter on line 20.

After editing, you need to recompile the tools. First change to the directory:

/usr/local/fluka/scr

The use the following command:

sudo make

Afterwards the processing of the results should work without any issue.

There is no need to change anything in usreou.f routine. It only changes the energy value before the channel is selected.

Cheers,
David

1 Like

Dear @horvathd,

I was trying to edit detsuw but it is appearing to be a read only file. Can you please tell me how to edit that ?

Regards,
Riya

Dear Riya,

you need to edit the file as administrator / root.

One way to do is type su in the terminal, then it will ask your password, when it is done you can start the text edit with the command gedit.

Cheers,
David

1 Like

Dear @horvathd ,

Thank you so much. It is now working. I have set NBNMX as 8192. I want to clarify some of the doubts regarding this DETECT card.

  1. Since now you have provided us modified usreou.f where only one blackbody region has to be added as a dummy score, is it mandatory to keep same channel number for both the detector region and the dummy detector region ? Or can we set desired channel number for detector and keep the default 1024 for the dummy blackbody ?

  2. The WHAT (6) of the detect card contains both + and - of each region. What does this two sign refer ? Are they there for co incidence and anti co incidence trigger ?

  3. The a,b,c values for a detector have been obtained experimentally from the plot. When I am applying these values in fluka gaussian broadening, does my spread/broadening depend on the channel number I am putting in DETECT card ? In other words, do I have to use same channel number that my detector is having in fluka simulation also so that the experimental broadened distribution and the simulated broadened distribution can be compared ?

  4. In the previous input, you can see that the source is a Co - 60 source. The maximum photon energy is 1.332 MeV. In the detect card I set Emax as 1.4 MeV. When I am analysing the output, I can see counts have been registered even beyond 1.350 MeV. Ideally it should stop after 1.332 MeV. Is this happening due to small number of histories ?

  5. Is there any way to minimize Compton part of the spectrum through simulation by activating some card in fluka ?

Thanks and regards,
Riya

Dear Riya,

It is important to remember, the Gaussian broadening is applied to the value of the deposited energy before the relevant channel number is determined.

  1. The number of channels is the dummy region is irrelevant, you can leave it as the default.

  2. You are correct, the + and - signs are related to the (anti)coincidence options. Regions with the + sign will treated as the detector regions, while regions with the - sign, will be the trigger regions. If multiple regions has the same sign, the energy deposition in them will be added together.

  3. If the a,b,c parameters are determined correctly, I mean, they are giving the broadening in eV based on the expected energy, and not channel number, then these parameters are independent from the number of channels used in the experiment.

  4. You are seeing the hits from low probability tail of the Gaussian broadening. With more histories you should be able to get values there as a continuous function.

  5. You could increase the production and transport thresholds to cut the spectrum. But, since it is the real effect of the shielding before the detector, I don’t see any option how to lower the count numbers there.

Cheers,
David

1 Like

2 posts were split to a new topic: Normalization of results / Source routine with radioactive isotopes