[Fwd: BOUNCE fluka-discuss@mi.infn.it: Approval required:]

From: Giuseppe Battistoni (Giuseppe.Battistoni@mi.infn.it)
Date: Mon Feb 11 2008 - 11:33:40 CET

  • Next message: Alfredo Ferrari: "Re: Region number from point position."

    Date: Mon, 11 Feb 2008 11:22:26 +0100 (CET)
    From: Alfredo Ferrari <alfredo.ferrari@cern.ch>
    Reply-To: Alfredo Ferrari <Alfredo.Ferrari@cern.ch>
    To: Biagio Di Micco <dimicco@fis.uniroma3.it>
    cc: fluka-discuss@fluka.org
    Subject: Re: Region number from point position.
    In-Reply-To: <20080208221113.M73292@amaldi.fis.uniroma3.it>
    Message-ID: <Pine.LNX.4.64.0802111102260.26145@pceet030.cern.ch>
    References: <200701161217.l0GCH5RH032206@troisi.fisica.unimi.it>
     <20070117113617.D61268@amaldi.fis.uniroma3.it> <20080208221113.M73292@amaldi.fis.uniroma3.it>
    MIME-Version: 1.0
    Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
    X-OriginalArrivalTime: 11 Feb 2008 10:24:16.0884 (UTC) FILETIME=[41716B40:01C86C98]


    in principle one can call the following subroutine:

        CALL GEOREG ( X, Y, Z, NREG, IDISC )

    where X, Y, Z are the coordinates of the point where you want to know the
    region (returned in NREG) and the lattice (returned in MLATTC in common
    LTCLCM). IDISC is a flag which if different from zero signals you are
    already out or going out of the geometry.

    Actually the situation is slightly more complex:

    a) GEOREG is very CPU ineffective like all "point" like geometry calls: it
        is ok to use it provided this is not done too often (geometry tracking
        based on a sequence of GEOREG calls instead of real tracking calls
        could be thousands of times slower in complex geometries). GEOREG
        loops on all regions/lattices until it finds where the point lies.
        On the contrary real step like calls can exploit many effective
        optimizations which makes them able to check at maximum 2/3 regions
        even in complex geometries
    b) GEOREG should be called with care when X,Y,Z lies on the boundary
        between two regions. This is a very common situation at run time, since
        all steps meeting a boundary end up exactly in that situation.
        The region returned by GEOREG in that case can be (pseudo-randomly)
        any of the two regions separated by that boundary, and there is no
        guarantee that the one returned is coherent with the one returned by
        the last tracking step. More specifically, the last step direction
        cosines are used to decide which region/lattice is returned (the one
        returned is the one the direction is pointing "into" if X,Y,Z lies
        on a boundary, even though the "current" direction referred to a
        step in a completely different position). In case one wants to input
        his own choice of cosines for this purpose (and for this purpose only),
        the call to GEOREG must be preceded by a call to:
               CALL GEOCRS ( TXX, TYY, TZZ )
        where TXX, TYY, TZZ are the direction cosines (properly normalized to
        1 in double precision)
    c) It is safer to save MLATTC/NEWLAT (common LTCLCM) before the call to
        GEOREG and restore them after, if GEOREG is called from unexpected
        situations (ie in the middle of an event). Furthermore in those cases
        the tracking optimization will be destroyed for the next step resulting
        in some CPU penalty

    It would be better to know more about where/why you need this info, in
    order to help better in devising the correct solution.


    On Fri, 8 Feb 2008, Biagio Di Micco wrote:

    > Dear all,
    > I need a function that takes the coordinates of a point in input
    > and returns the region number where the point is (and the lattice number, if
    > it is a lattice replica).
    > Is there any function in the FLUKA library that I can use?
    > Thanks in advance
    > Biagio

    |  Alfredo Ferrari                ||  Tel.: +            |
    |  CERN-AB                        ||  Fax.: +            |
    |  1211 Geneva 23                 ||  e-mail: Alfredo.Ferrari@cern.ch  |
    |  Switzerland                    ||                                   |

  • Next message: Alfredo Ferrari: "Re: Region number from point position."

    This archive was generated by hypermail 2.1.6 : Mon Feb 11 2008 - 11:41:31 CET