[fluka-discuss]: AW: Difference in source.f generated file and end to end simulation

From: Huang, Lifi <lifi.huang_at_dkfz-heidelberg.de>
Date: Mon, 18 Nov 2019 16:21:12 +0000

Dear Ricardo,


thanks for the fast reply! Does the condition of (ORGNAM.EQ.'target')​ in the bxdraw subroutine not limit the leave_wat file to only particles that have also left the target (or do I need an additional NRGNAM argument)? I was under the impression that if I have e.g. 10^7 primaries, I generate 0.2*10^7 secondaries that leave the target and write only those into the leave_wat file.


Regarding the second step, that was my mistake, I sent you a slightly different mgdraw where I was trying to solve my issue by checking the last interaction regions. The file I am reading in is actually of the form:" EventID PartID ToA E[GeV] xcoord ycoord zcoord cosx cosy cosz"


I have made a new example of my problem and attached it to this email. *_step1 is tracking the secondaries leaving the phantom as well as those entering the detector and *_step2 is using the leave_wat file from step1 as a source (particle# in the inp file = lines in leave_wat file minus 1).


For e.g. 10^6 primaries, the leave_wat file is ~32.1mb, the enter_det is ~1.3mb and using leave_wat as the source results in a file with 18.9mb, even though it should also be ~1.3mb.


Cheers,​​


Lifi Huang
MSc Student
E041
Biomedical Physics in Radiation Oncology

German Cancer Research Center (DKFZ)
Foundation under Public Law
Im Neuenheimer Feld 280
69120 Heidelberg
Germany
________________________________
Von: Ricardo Manuel Dos Santos Augusto <r.s.augusto_at_cern.ch>
Gesendet: Samstag, 16. November 2019 19:29
An: Huang, Lifi; fluka-discuss_at_fluka.org
Betreff: RE:Difference in source.f generated file and end to end simulation

Dear Lifi,

The number of events you get in the detector in the 'end to end simulation' and in the 'transport only' case differ because in the first case a great portion of your primaries end in the target itself. In your particular setup, an average of 0.2 particles leave the target for each primary (counting the lines of leaving_wat file). This means that there is a normalization you need to perform to account for the difference in primaries as 1 primary in the 'transport only' will correspond to 5 "real primaries".

Regarding your second step, there is a mismatch between the quantities in the leave_wat file and the READ instruction in the source.f, so that it is reading regions and interaction codes instead of position and direction. This leads to an erroneous distribution of the primaries in the second step, resembling a beam in the x axis instead of the desired phase space exiting the target. You can visualize the aforementioned effect in the attached figure 'twoapproaches.png', scoring ambient dose equivalent rates in both cases (no normalization).

Best regards,
Ricardo

    
//Ricardo dos Santos Augusto
TRIUMF-EH&S TRL Rr-7
4004 Wesbrook Mall,
Vancouver, BC V6T 2A3, Canada//
________________________________
De : owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] de la part de Huang, Lifi [lifi.huang_at_dkfz-heidelberg.de]
Envoyé : vendredi 15 novembre 2019 15:35
À : fluka-discuss_at_fluka.org
Objet : [fluka-discuss]: Difference in source.f generated file and end to end simulation


Dear FLUKA experts,


I am currently simulating a proton beam impinging on water, generating secondaries that arrive in a detector. This is essentially a two step process, in 1) generating secondaries and 2) transporting the secondaries to the detector. I simulated the production of secondaries once and would like to use it as a source.f file, in order to flexibly change detector geometry without having to resimulate the production every time.


My problem at the moment is, however, that simulating steps 1) and 2) together (end to end simulation) gives a very different result from the two separate steps (with the source.f routine) approach. Interestingly enough, if the source file consists only of photons, both methods are mostly compatible. If the source file consists also of other secondaries, they are not (simulation time far longer, generated file much larger). Am I perhaps missing something in my source.f file that takes different particles into consideration?


​I have attached my files for generating the collision tape file (to be called by the source.f routine) and end to end simulation (*_source_and_endtoend files) as well as the files to read the collision tape and simulate only the particle transport (*

Lifi Huang
MSc Student
E041
Biomedical Physics in Radiation Oncology

German Cancer Research Center (DKFZ)
Foundation under Public Law
Im Neuenheimer Feld 280
69120 Heidelberg
Germany



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

Received on Mon Nov 18 2019 - 18:56:52 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 18 2019 - 18:57:01 CET