Re: [fluka-discuss]: RULL variable in ENDRAW (mgdraw) to score gamma energy deposition

From: <dal_bello_at_stud.uni-heidelberg.de>
Date: Fri, 24 Feb 2017 15:07:12 +0100

Dear Anna,

thank you a lot for the reply and for the explanation and the solution
to the problem.
Now my routine gives the correct output:

              67 0.27700E-02 0.27700E-02
              68 0.34205E-02 0.34205E-02
              70 0.45000E-02 0.45000E-02
              71 0.40087E-02 0.40087E-02
              73 0.17847E-02 0.17847E-02
              74 0.26316E-02 0.26316E-02

As a summary:
1. The energy deposition along the track is scored in the main part of
mgdraw with:
       CALL GEOR2N ( MREG, NRGNAM, IERR2 )
       IF (NRGNAM(1:6).EQ.'SCINT0') THEN
        DO J = 1,MTRACK
         ERULL0 = ERULL0 + DTRACK(J)
        ENDDO
       ENDIF

2. The point-like energy deposition is scored in ENDRAW with:
       CALL GEOR2N ( MREG, NRGNAM, IERR2 )
       IF (NRGNAM(1:6).EQ.'SCINT0') THEN
        ERULL0 = ERULL0 + RULL
       ENDIF



Thank you,
Best regards,
Riccardo Dal Bello


Quoting Anna Ferrari <a.ferrari_at_hzdr.de>:

> Dear Riccardo,
>
> as you suspected, I think you are missing to collect a part of the
> information. With ENDRAW you (correctly!) collect "spot" energy
> depositions, but you miss the energy that is deposited along a track.
> To take into account this contribution you have to intercept the
> tracking in the main part of the MGDRAW subroutine: Mtrack in (TRACKR)
> gives you the number of energy deposition events along the track and
> Dtrack(j) (with 1<j<Mtrack) the energy deposition of the jth
> deposition event.
> Practically you have to add to your code something like:
> ....
> IF (NRGNAM(1:6).EQ.'SCINT0') THEN
> do j = 1,Mtrack
>
> ERULL0 = ERULL0 + dtrack(j)
> enddo
> ENDIF
> ...
> in the mgdraw main routine (I maintained the name ERULL0 for the
> variable you use to score the deposited energy)
>
> Hope it helps,
> kind regards,
> Anna
>
>
> Am Fri, 24 Feb 2017 10:15:21 +0100 schrieb dal_bello_at_stud.uni-heidelberg.de:
>> Dear FLUKA users,
>>
>> I have a question regarding the use of the entry ENDRAW in the
>> mgdraw routine.
>>
>> My personalized mgdraw routine scores, among other quantities, the
>> energy deposition in different regions of my detector (primary
>> beam: gamma between 0. and 10. MeV).
>> I tired to score the energy deposition accumulating the value of
>> RULL in ENDRAW, however, I do not get correct value (lower values).
>>
>> I worked around the problem accumulating for each event the energy
>> of gamma, e- and e+ entering and exiting the volumes (done in
>> BXDRAW), but of course it is not a clean way to solve the problem
>> because it slows the simulation and involves considerations about
>> the rest mass of e+/e-, which may lead to errors in subtractions.
>>
>> I accumulate the values of RULL simply with:
>>
>> ENTRY ENDRAW ( ICODE, MREG, RULL, XSCO, YSCO, ZSCO )
>> CALL GEOR2N ( MREG, NRGNAM, IERR2 )
>>
>> IF (NRGNAM(1:6).EQ.'SCINT0') THEN
>> ERULL0 = ERULL0 + RULL
>> ENDIF
>>
>> RETURN
>>
>> Where ERULL0 is a DOUBLE PRECISION variable initialized to 0 and
>> re-set to 0 at the end of each event (EEDRAW).
>>
>> Being the values of energy deposition with RULL smaller than the
>> actual ones, I suspect that RULL includes just some types of energy
>> deposition.
>> Is there a way to score in ENDRAW the correct energy deposition? I
>> looked in previous documentation but unsuccessfully.
>>
>>
>> Thank you,
>> Best regards,
>> Riccardo Dal Bello
>>
>> -------------------
>>
>>
>> Attached: few energy deposition events in SCINT0 from a 4.5 MeV
>> primary gamma beam
>>
>> 1. column: ID event
>> 2. column: true energy deposition (done in BXDRAW)
>> 3. column: ERULL0 value called in EEDRAW
>>
>> 4 0.39547E-02 0.33276E-03
>> 6 0.45000E-02 0.49065E-03
>> 9 0.37780E-02 0.24186E-03
>> 11 0.28722E-02 0.33501E-03
>> 24 0.39805E-02 0.96697E-04
>> 27 0.13814E-02 0.19710E-03
>> 30 0.41481E-02 0.68106E-03
>> 33 0.26909E-02 0.28380E-03
>> 47 0.34780E-02 0.29714E-03
>> 50 0.39890E-02 0.61295E-03
>> 55 0.67689E-03 0.22618E-03
>> 71 0.43555E-03 0.22666E-03
>> 73 0.39474E-02 0.67036E-03
>>
>> __________________________________________________________________________
>> You can manage unsubscription from this mailing list at
>> https://www.fluka.org/fluka.php?idc_info
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dr. Anna Ferrari
> Institute of Radiation Physics
> Helmholtz-Zentrum Dresden-Rossendorf e.V.
> Tel. +49 351 260 2872
> a.ferrari_at_hzdr.de
> http://www.hzdr.de
>
> Vorstand: Prof. Dr. Dr. h. c. Roland Sauerbrey, Prof. Dr. Dr. h. c. Peter
> Joehnk
> Vereinsregister: VR 1693 beim Amtsgericht Dresden



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?idc_info
Received on Fri Feb 24 2017 - 16:13:41 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 24 2017 - 16:13:42 CET