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

From: <me_at_marychin.org>
Date: Sun, 26 Feb 2017 14:24:53 +0800

Ciao Anna!!

Thanks for clarifying. Now it seems that the problem is about
history-by-history summing of energy deposition, nothing about
event-by-event correlation between energy deposition, particle energy
and position. Just switching to a verbose mode: I named comscw's RULL
rather than mgdraw's DTRACK for the obvious reason that comscw would be
more efficient than calling mgdraw with USERDUMP WHAT(3)=0. Just to
avoid USERDUMP WHAT(3)=0 for production runs of an electron problem. Of
all particles, electrons! Either way, within-history event-by-event
correlation will be lost. If need be, mgdraw can always be called with
USERDUMP WHAT(3)!=0 alongside comscw.

:) mary

On 2017-02-26 02:45, Anna Ferrari wrote:
> Dear Mary!!
>
> ...obviously nobody wants to put FLUKA back to prehistoric state
> :-))))
>
> You said: what we can compute in this way is the total energy
> deposition within a region in the geometry. This is EXACTLY -as I
> understood - what Riccardo needs for his (event-by-event! I come back
> on this point) analysis. This region is physically the scintillator
> module that he has to study: therefore he does not resort to coding
> regions according to scoring needs, I would say he does the opposite.
> Since he does not use binning, apportioning (so important... I agree
> completely with you!) does not play any role in this problem.
>
> Moreover: it is out of discussion that built-in generalized scoring
> options are a *fantastic* aspect of FLUKA! Unfortunatly we cannot use
> a USRBIN in an event-by-event analysis (if somebody developed
> different solutions, I'm happy to learn...), while often in an
> experiment it is *mandatory* to study correlations and then we need to
> reconstruct an event tree. Riccardo showed only few lines of his code,
> but I'm sure he has his ROOT tree (or whatever... the prehistoric PAW
> ntuples did always an excellent job...).
>
> Last: efficiency goes down... I know :(
>
> Ciao!
>
> Anna
>
> Am Sat, 25 Feb 2017 15:53:46 +0800 schrieb me_at_marychin.org:
>
>> Dear Riccardo and Anna,
>>
>> Indeed this can give you the *total* energy deposition within
>> regions you specify, large enough wrt step size. That is, if you
>> don't care how energy deposition is distributed and you are not
>> worried about stepsize artefacts. As pointed out earlier:
>> apportioning and QA! You may resort to coding regions according to
>> scoring needs (as you have shown) of course.
>>
>> Such instructions put FLUKA back to prehistoric state, undoing the
>> good job of code development back in 1990 -- a feat users shouldn't
>> take for granted. Other codes dealt with apportioning a decade
>> later.
>>
>> Quoting FLUKA manual:
>>
>> 17.18 Scoring. The stress put on built-in generalised scoring
>> options is another aspect of FLUKA "philosophy" which differentiates
>> it from many other programs where users are supposed to write their
>> own ad-hoc scoring routines for each problem. This characteristics,
>> which was already typical of the old Ranft codes, has allowed to
>> develop in the modern FLUKA some rather sophisticated scoring
>> algorithms that would have been too complex for a generic user to
>> program. For instance the "track-length apportioning" technique,
>> introduced in 1990 by Fasso' and Ferrari, used in dose and fluence
>> binning, which computes the exact length of segment travelled by the
>> particle in each bin of a geometry independent grid. This technique
>> ensures fast convergence even when the scoring mesh is much smaller
>> than the charged particle step.
>>
>> Not only accuracy but also efficiency. Running an electron problem
>> with USERDUMP WHAT(3)=0, calling at every single step whether it
>> contributes to the score or not... undo all the optimisation code
>> developers took pains to implement. Do a tic-toc and see -- please
>> do share your tic-toc results with the community.
>>
>> BTW ERULLO doesn't look like any 3D array for event-by-event
>> scoring. I'm lost! The lines of codes you circulated offer no clue
>> why built-in scoring cannot be used.
>>
>> :) mary
>>
>> On 2017-02-25 00:25, Anna Ferrari wrote:
>
>>> ...you were missing all the continous energy losses of e+/e- due
>>> to
>>>
>>> the ionization. And as you can see, your control routine works
>>> very
>>>
>>> well, as it must do! Good!
>>>
>>> I want to add just a thing, for the future: take care if you want
>>> to
>>>
>>> use this method with other kind of primaries. If you have highly
>>>
>>> ionizing primaries -like protons- you must consider quenching
>>> effects
>>>
>>> in the scintillator. In this case, in order to correctly compute
>>> the
>>>
>>> light yield, the value you have to consider for the energy
>>> deposited
>>>
>>> in the scintillator- both in MGDRAW and in the ENDRAW entry - is
>>> the
>>>
>>> "quenched" one, obtained according with the Birks Law.
>>>
>>> You can consider this effect:
>>>
>>> (a) by switching on the quenching with the card USERDUMP with
>>>
>>> sdum=UDQUENCH (see the manual for details about the Birks
>>>
>>> coefficients, and look at Note 3 pag. 239)
>>>
>>> (b) by using, instead of DTRACK(j) and RULL , the quenched
>>> values:
>>>
>>> - DTQUEN(j,jbk) in the main MGDRAW
>>>
>>> jbk identifies the set of Birks parameters you input via
>>> USERDUMP.
>>>
>>> jbk=1 if you use only one set, with two parameters given via
>>> what(1)
>>>
>>> and what(2) (it is generalyy the case)
>>>
>>> - RULLL in the ENDRAW entry (please check this)
>>>
>>> Kind regards,
>>>
>>> Anna
>>>
>>> Am Fri, 24 Feb 2017 15:07:12 +0100 schrieb
>>>
>>> dal_bello_at_stud.uni-heidelberg.de:
>
>> 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?id¬c_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?id¬c_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?id=acc_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?id=acc_info
Received on Sun Feb 26 2017 - 08:48:02 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 26 2017 - 08:48:08 CET