Re: Problem to set DIVBM in source.f file

From: Alberto Fasso' (fasso@SLAC.Stanford.EDU)
Date: Thu Sep 08 2005 - 23:32:18 CEST

  • Next message: Anna Ferrari: "some general questions about lattice routine"

    Recently there have been several questions, both on the list and in private
    emails, about how to define a beam divergence in a user source.
    The documentation so far was not clear on this and on similar points
    (in addition to divergence, how to set a transversal profile or an
    isotropic source for anything but a beam directed in the positive Z direction).

    The new manual, which will be printed soon as a CERN Report, has been updated
    on this matter, but since it will not be immediately available, I would
    like to report here the main points.

    1) So far, a transversal profile and a divergence (including a 2pi divergence,
       i.e. an isotropic source) have been available by a simple command (BEAM) only
       for a beam directed on the positive direction of the z axis.
       By the way, even electron polarization (with command POLARIZA) could be
       requested only for such a beam.

    2) It has always been possible for the user to define a transversal profile,
       a divergence or a polarization by means of a source routine. But it is
       the user's responsibility to code a sampling scheme for this purpose.
       The values of variables such as DIVBM, XSPOT, YSPOT, UBMPOL, VBMPOL, WBMPOL,
       defined by commands BEAM and POLARIZA, are available in subroutine SOURCE
       but only as numbers to be used in the sampling scheme. The sampling scheme
       IS NOT INHERITED by SOURCE: the user must program it. Of course until
       now it was a difficult task for a beam of arbitrary direction.

    3) In the latest FLUKA version there is a new facility, which allows to
       define a "beam reference frame" different from the normal coordinate system
       used in the problem geometry. Thanks to this facility, accessible through a
       new command BEAMAXES, the user can define profile/divergence/polarization
       in the frame of the beam, which is relatively easy, and the program will do
       the transformation to the normal reference frame.
       BEAMAXES exists only in the fluka2005.6 version (it cannot be used on the
       previous version) and has not been fully tested. We think that it should
       work, but as you know this is a beta version, and you, the users, are our
       guinea pigs... We would appreciate any feedback from you.

    I report here below the main instructions from the new manual.

    ============================================================================

    BEAMAXES

    Defines the axes used for a beam reference frame
    different from the geometry frame

    See also BEAM, BEAMPOS, POLARIZAti, SOURCE

    WHAT(1) = cosine of the angle between the x-axis of the beam reference frame
      and the x-axis of the geometry frame
    Default : no default

    WHAT(2) = cosine of the angle between the x-axis of the beam reference frame
      and the y-axis of the geometry frame
    Default : no default

    WHAT(3) = cosine of the angle between the x-axis of the beam reference frame
      and the z-axis of the geometry frame
    Default : no default

    WHAT(4) = cosine of the angle between the z-axis of the beam reference frame
      and the x-axis of the geometry frame
    Default : no default

    WHAT(5) = cosine of the angle between the z-axis of the beam reference frame
      and the y-axis of the geometry frame
    Default : no default

    WHAT(6) = cosine of the angle between the z-axis of the beam reference frame
      and the z-axis of the geometry frame
    Default : no default

    SDUM : not used

    Default (option BEAMAXES not given): the beam frame coincides with the geometry
            frame

      Notes

    Option BEAM describes a simple pencil beam, or also a beam simply distributed in
       space (angular divergence and transversal profile), provided the beam axis
       coincides with the z-axis of the input geometry. Also a possible beam
       polarisation described by option POLARIZAti refers to a beam with its axis
       coinciding with the geometry z-axis.
       The purpose of option BEAMAXES is to allow the user to define angular
       divergence, transversal profile and polarisation for a beam of arbitrary
       direction, either constant as defined by option BEAMPOS, or not necessarily
       known in advance as provided by a user SOURCE routine. For this purpose, the
       user can define divergence, profile and polarisation in a beam reference frame.
       Option BEAMAXES establishes the correspondence between beam and geometry
       reference frame.

    The origin of the beam reference frame coincides always with that of the
       geometry frame.

    The user needs to input only the direction cosines of the x- and of the z-axis of
       the beam frame. The direction of the y-axis is determined by the program
                             _ _
       as the vector product z ^ x

    If the the x- and z-axes defined with BEAMAXES are not exactly perpendicular (in
       double precision!) the program forces perpendicularity by adjusting the
       cosines of the x-axis

    The direction cosines of the x- and z-axes do not need to be exactly normalized
       to 1. The code takes care of properly normalizing all cosines

    ================================================================================

    >From the description of subroutine SOURCE:

                           Important!

    The values of beam characteristics defined by commands BEAM
    and POLARIZAti are available in COMMON BEAMCM: the angular
    divergence (variable DIVBM), beam width (XSPOT and YSPOT),
    and the polarisation vector (UBMPOL, VBMPOL, WBMPOL) can help
    to set up a scheme to sample the corresponding quantities from user-defined
    distributions. But sampling from the distributions pre-defined by BEAM and
    POLARIZAti is not simply inherited by subroutine SOURCE:
    it is the responsibility of the user to write such a scheme!
    For this task, it may be useful to define a "beam reference frame" by
    means of option BEAMAXES

    ================================================================================

    -- 
    Alberto Fassň
    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: Anna Ferrari: "some general questions about lattice routine"

    This archive was generated by hypermail 2.1.6 : Fri Sep 09 2005 - 08:51:21 CEST