Re: skip events

From: Alberto Fasso' (fasso@SLAC.Stanford.EDU)
Date: Thu Mar 06 2008 - 18:41:26 CET

  • Next message: Francesco Cerutti: "Re: Biasing question"

    Dear Jiasen,

    yes, DTRACK(I) and RULL take care of all possible energy depositions.
    About your other questions:
    - variables tracking sum of energy depositions are available only
       globally (COMMON SUMCOU) but not for each single region. The reason is
       that scored quantities, dynamically allocated, are all stored as elements
       of one single huge array (the so-called blank COMMON), and a complex
       system of pointers is required to retrieve them. However, you can set up
       yourself your own private counters in mgdraw, as I understand you
       are indeed already doing.
    - to stop an event (but not the run). It is certainly a non-standard
       feature, which in principle would lead to incorrect results. But in your
       particular case I understand that it could be useful, since you are
       looking for a yes/no answer (threshold passed) and not for a numerical result.
       The best way to obtain what you want is the following:
       - keep in a COMMON defined by you the energy deposition score
         in the regions of interest, updating it by adding DTRACK(I) and RULL
         in mgdraw.f, as you already do
       - Use a command MAT-PROP with SDUM = USERDIRE, activating a call to
         user subroutine usrmed.f every time a particle is going to be transported
         in one of the selected materials (probably in your case, all materials)
       - write your own usrmed.f. Include your COMMON and if the threshold score has
         been reached, set the weight of the current particle = ZERZER. That
         will end the transport of the particle. All other particles still on stack
         will be terminated in the same way as soon as they enter one of the
         materials you have flagged with MAT-PROP.
       - in the mgdraw routine, at ENTRY EEDRAW (End of Event), reset your COMMON
         to ZERZER, in view of the next event.
    But remember that ALL NUMBERS PRINTED IN OUTPUT WILL BE WRONG!

    Alberto

    On Mon, 3 Mar 2008, Jiasen Ma wrote:

    > Dear Fluka-users,
    >
    > In my setup, I use source.f to read incident particle
    > informations (x,y,z,px,py,pz) from the list in a file. I only
    > need the events with energy deposition in a certain detectors
    > to be less than a specific number. The reason that I want to
    > do this is for time saving in simulation.
    >
    > I also keep track of energy deposition in those detectors by
    > adding DTRACK(I) and RULL in mgdraw.f if MREG is the region
    > number of the detector that I want.
    >
    > Is it possible to stop the shower simulation of the event and
    > skip to the next one once the energies in those detectors
    > cross the threshold? I don't want to quit the program. My
    > guess is that I need do some sort of quit or set some flags in
    > mgdraw.f.
    >
    > Is my way of counting the energy deposition sum correct? Both
    > continuous deposition and point deposition, and only these
    > two, should be count, right? Are there variables tracking sum
    > of deposition in each region as shower develops in Fluka?
    >
    > I attached my source.f and mgdraw.f.
    >
    > Thanks a lot.
    >
    > Jiasen
    >

    -- 
    Alberto Fasso`
    SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
    Phone: (1 650) 926 4762   Fax: (1 650) 926 3569
    fasso@slac.stanford.edu
    

  • Next message: Francesco Cerutti: "Re: Biasing question"

    This archive was generated by hypermail 2.1.6 : Thu Mar 06 2008 - 21:11:01 CET