Energy and angle of each particle escaping from the surface

Dear Fluka experts,

As the title says,I want to know energy and angle of each particle escaping from the surface. I read the manual,and it seems that I need USRBDX and fluscw.f
Unfortunately,I still don’t know how to output ‘IJ X Y Z TX TY TZ E W’ etc. How should I edit fluscw.f?

Li

Dear Li,

fluscw.f is called every time when the fluence scored.

In your case mgdraw.f’s BXDRAW entry would be more appropriate. It is only called, when a particle crosses from one region to another. You can find some more information here: https://flukafiles.web.cern.ch/flukafiles/manual/13.2.13.html

(Note: you can use the variables from the TRACKR common in BXDRAW as well.)

Cheers,
David

1 Like

Dear David,

Thank you for your reply, now I know that I should choose USERDUMP and mgdraw.f ’s BXDRAW.I tried to write a mgdraw.f,and then I created a simple example. But when I bulid executable file,I got a hint
'mgdraw.f:84:10:

IF(MRGANM.EQ.“TARGRT”.AND.NRGNAM.EQ.“TARGET1”) THEN
1
Error: Operands of comparison operator ‘.eq.’ at (1) are INTEGER(4)/CHARACTER(1)’

I will upload my files,can you take a look if you have time?

Limgdraw.f (5.0 KB) raw.inp (1.2 KB)

Dear Li,

it is only a typo: MRGANM should be replaced with MRGNAM on line 84. Also TARGET is misspelled on the same line.

Cheers,
David

Dear David,

I’m sorry for my carelessness,I corrected and got what I wanted. But I still have some problems:
1.I try to adopt an opposite logics, GEON2R.There are some problems with the conversion,I will upload new files.
2.Jtrack represents the particle type,Where can I find these ID?

Limgdraw.f (5.2 KB)

Dear Li,

  1. To make GEON2R work, you need to pad the region names with spaces up to eight characters (For example: "TARGET ")

  2. You can find the FLUKA particle numbers here: https://flukafiles.web.cern.ch/flukafiles/manual/5.1.html

Cheers,
David

Dear David,

I have solved all the problems with your help. Thank you again

Li