Dear Fluka experts,
During my attempt to model CdTe detector, I’ve faced the problem regarding to precise modelling of detector response. Due to imperfection of charge gathering and finite detector resolution, the output signal of true detector suffer from energy broadening. In MCNP there is a built-in function that provides convolution of computed spectra with Gaussian function which in turn produces realistic spectra in the output (so called GEB card). Does Fluka has same option (or card, or post-processing program) that provides Gaussian energy broadening for initial spectra? If not, could you please suggest any program for convolution of the output spectra with Gaussian function?
Thank you in advance.
fluka doesn’t offer any such possibility built in. One obvious way will be to convolute the recorded spectrum with the Gaussian function which can be even as a function of the energy like in MCNP.
Another option would be to implement it with user routines
I presume you are using the DETECT card.
The DETECT card accumulates the energy deposition inside the variables ACCUMP and ACCUMN found in the “detloc.inc” include file.
What you can do is in the end of each primary event, and before the variables are used for the scoring to smooth with a Gaussian filter the accumulated energy deposited, by altering the energy. There is trick since the recording of the scoring will be done in a future primary event before starting to accumulate a future energy deposition. So we need to keep track if we applied the smoothing and not do it twice for the same event.
One option we though is to sacrifice one region-entry in the arrays and instead of having 20 regions in the DETECT you can score, you use up to 19 and the last one is used to keep track that you have applied the smoothing, by setting some nonphysical negative value as energy deposited.
You can do all that inside the usreout.f user routine that is called at the end of each primary event.
Attached you can find a simple example of that. I have applied a naive 1MeV smoothing, but you can do the smoothing more intelligent as a function of the scored energy e.g.
FWHM = A + B*SQRT(E + C*E**2)
where A,B,C are your detector response fitted parameters and E is the energy scored.usreou.f (2.5 KB)
There was a small bug in flair concerning the editing of the DETECT card, which is fixed in the version I just pushed on the web site.
Thank you for the reply. I’ll try to do it as you advised. May i ask you one more question: is it correct if I make Gaussian broadening after calculation for final spectra but not for every event?
Smoothing after the calculation will give you almost the same, since you will have to assume as energy of the bin the center -> a fixed value.
While applying the filter during the run on each event will be more correct.