AIRES library reference: olcrossed.


c
c     Routine directly callable from C/C++ (it could be necessary to
c     append an underscore, "_", to its name depending on the C/C++
c     compiler used).
c
c
      subroutine olcrossed(olkey, updown, firstol, lastol)
c
c     Given the crossed observing levels key (saved at each particle
c     record in the longitudinal tracking file), the first and last
c     observing levels and the direction of motion are reconstructed.
c     The encoding formula is the following:
c
c         olkey = firstol + 512 * lastol + 512^2 * updown01
c
c     where updown01 is one if the particle goes upwards, zero
c     otherwise. The corresponding variable updown is decoded in a
c     slightly different way: It will be set to 1 if the particle
c     goes upwards, -1 otherwise.
c
c     Written by: S. J. Sciutto, La Plata 1997.
c
c
c     Arguments:
c     =========
c
c     olkey........... (input, integer) Key with information about the
c                      crossed observing levels.
c     updown.......... (output, integer) Up-down indicator: 1 if the
c                      particle was going upwards, -1 otherwise.
c     firstol......... (output, integer) First observing level crossed
c                      (0 LE firstol LE 511).
c     lastol.......... (output, integer) Last observing level crossed
c                      (0 LE lastol LE 511).
c
c
c<--->


These pages are maintained by
Sergio J. Sciutto
Back to AIRES library index
Back to AIRES home [HOME]