next up previous contents
Next: 3. Structure of SGV. Up: sgv_refman Previous: 1. PATCHY structure of   Contents


2. Data flow

The group of patches SGVSTEER, SGVEVSIM, and SGVDETSIM are controlled partly by the argument STEER, and partly by the contents of the common-block ZXSTE. The event is created in SGVEVSIM, which fills the JETSET common-blocks of information on each particle. This information is then operated upon by SGVDETSIM which fills the common-block ZXEVT, which contains information on both true and measured properties of those of the particles that travel a distance long enough to possibly hit some detector. Hence, ZXEVT contains more information on less particles than the input JETSET common-blocks.
       INTEGER  EVTYPE,               ! event type
     .          NTRK,                 ! number of stable particles
     .          NHIT(0:NLAY,1:NGEOM), ! Number of hits in detector, if
                                      ! requested
     .          NSHOW(1:NGEOM),       ! Number of showers in detector, if
                                      ! requested
     .          ITRACK(TLEN,MAXTRK),  ! Integer version on TRACK
     .          NQRK,NBQRK,NCQRK,
     .          NHARD,                ! Number of quarks, b-quarks, c-quarks
                                      ! on-shell quarks in event
     .          ANC(MAXTRK),          ! Ancestor number of track
     .          ICL(MAXTRK),          ! History class of track :
                                      !    0   :   from Vertex
                                      !    1   :   from decay of strange particl
                                      !    2   :   from decay of D+-
                                      !    3   :   from decay of D0
                                      !    4   :   from decay of other charmed
                                      !            particle
                                      !    5   :   from decay of beauty particle
                                      !    6   :   from strange particle,
                                      !            comming from D+-
                                      !    7   :   from strange particle,
                                      !            comming from D0
                                      !    8   :   from strange particle,
                                      !            comming from other charmed
                                      !            particle
                                      !    9   :   from decay of D+- comming
                                      !            from a beauty decay
                                      !    10  :   from decay of D0 comming
                                      !            from a beauty decay
                                      !    11  :   from decay of other charmed
                                      !            particle comming
                                      !            from a beauty decay
                                      !    12  :   from strange particle,
                                      !            comming from D+-,
                                      !            which in turn comes from
                                      !            a beauty decay.
                                      !    13  :   from strange particle,
                                      !            comming from D0,
                                      !            which in turn comes from
                                      !            a beauty decay.
                                      !    14  :   from strange particle,
                                      !            comming from other charmed
                                      !            particle,
                                      !            which in turn comes from
                                      !            a beauty decay.
                                      !    17  :   electron from gamma
                                      !            conversion
                                      !    18  :   electron after brem.
                                      !    19  :   From long-lived particle
                                      !            decay (pi+-,K+-)
                                      !    20  :   From nuclear reinteraction
                                      !            in the detector
     .     HITLIS(0:25*MAXTRK,NGEOM), ! Bitted word for tracking
                                      ! detectors :
                                      ! the first index is grouped as
                                      !
                                      !   1 word   n1 words    n2 words
                                      ! ( track1 |  bits bar | bits fwd )
                                      ! ( track2 |  bits bar | bits fwd )
                                      !              .
                                      !              .
                                      !              .
                                      ! ( trackn |  bits bar | bits fwd )
                                      !
                                      ! The first word in each group is the
                                      ! track number.
                                      ! The size needed for the following
                                      ! two groups is calculated after
                                      ! after geometry initilaization :
                                      ! n1 = int(# barrel layers/32) + 1,
                                      ! n2 = int(# forward layers/32) + 1.
                                      ! In each of the two groups, bit i set
                                      ! means that the layer i was hit by
                                      ! the track.
                                      ! Layer-numbers as given by the
                                      ! geometry file.
                                      ! (barrel 1:st group, forward 2:nd)
                                      ! HITLIS(0,IGEOM) is the offset to
                                      ! the first forward word, ie. 1+n1
     .     HLLEN(NGEOM)               ! actual number of words used for
                                      ! first index of HITLIST
      REAL TRACK(TLEN,MAXTRK),        ! True info on track :
                                      ! 1:3  -  momentum at production point
                                      ! 4    -  |p|
                                      ! 5:7  -  production vertex
                                      ! 8    -  10000*paricle code +
                                      !         100*ancetor# + class
                                      !         (Integer, use ITRACK)
                                      ! 9    -  |p| of parent
                                      ! 10   -  Track lable (nou used by SGV)
     .      SMEARED_TRACK(PLENNT,MAXTRK,NGEOM), ! Seen track :
                                      !         (filled only if full track
                                      !          parameters are not given)
                                      ! 1    -  Original track# (in TRACK,-ve
                                      !         if the particle is a neutral)
                                      ! 2:4  -  Seen momentum at ref point
                                      ! 8    -  Seen particle code (0 if
                                      !         not detected)
                                      ! for charged particles :
                                      ! 5:7  -  reference point
                                      ! for neutral particles :
                                      ! 5    -  Seen energy
     .      HIT(LLENNT,MAXTRK,NGEOM,NLAY),  ! Detector hit pattern, if requested
                                      ! for each hit:  module#,coord 1, coord 2
     .      TKRP(PLEN,MAXTRK,NGEOM),  ! Seen track params at perigee,
                                      !  if requested:
                                      ! for charaged particles :
                                      ! 1    -  Original track#
                                      ! 2:6  -  track parameters
                                      ! 7:21 -  Weight matrix of track params
                                      ! 22   -  Total length of track
                                      ! 23:25-  Beginning of track
                                      ! 26   -  seen partcle code (0 if
                                      !         not detected)
     .      SHOW(SHWLEN,MAXTRK,NGEOM),  ! Shower params at calorimeter,
                                      !  if requested:
                                      ! for neutral particles :
                                      ! 1    -  Original track#
                                      ! 2:4  -  seen momentum
                                      ! 5    -  seen energy
                                      ! 6    -  shower start-point
                                      !         (first coord)
                                      ! 7    -  shower start-point
                                      !         (second coord)
                                      ! 8    -  shower start-point
                                      !         (third coord)
                                      ! 9    -  shower axis theta
                                      ! 10   -  shower axis phi
                                      ! 11   -  calorimeter #
                                      ! 12   -  seen partcle code (0 if
                                      !         not detected)
     .   TKR_AND_HIT(LLEN,MAXTRK,NGEOM,NLAY), ! track parmeters and hits
                                      !  at detector layers, if requested :
                                      ! 1    -  Original track#
                                      ! 2:7  -  track parameters
                                      ! 8:22 -  Weight matrix of track params
                                      ! 23   -  first coord of hit
                                      ! 24   -  second coord of hit
                                      ! 25   -  detector id #
     .   TRKLEN(MAXTRK,NGEOM),        ! length of track, normally not used
     .   TRKBEG(3,MAXTRK,NGEOM),      ! Begining  of track, normally not used
     .   XYZV(3),                     ! Average main vertex
     .   SIGV(3),                     ! Main vertex nominal error
     .   XYZS(3)                      ! True main vertex
       COMMON /ZXEVT/ TRACK,EVTYPE,NTRK,NHIT,NSHOW,NQRK,NBQRK,
     .                NCQRK,NHARD,ANC,ICL,SMEARED_TRACK,HIT,TKRP,
     .                SHOW,TKR_AND_HIT,TRKLEN,TRKBEG,XYZV,SIGV,
     .                XYZS,HITLIS,HLLEN
       EQUIVALENCE ( TRACK,ITRACK)

The information is then transferred to SGVSTEER, where it is sent to the analysing code, and, optionally, entered into a ZEBRA structure and written to an external FZ or RZ file. The structure of ZXEVT is optimized for creating it, rather than analysing it, and to be compact, since the communication with the analysing code is foreseen to be possible either directly, as remote procedure calls, or delayed by writing to disk, which then can be read back at a later stage.

In SGVANA, on the other hand, the data should be structured for easy access, even if that means some redundancy, and that the data isn't well packed. These considerations is the reason for the two different event structures in the generation/simulation part and the analysis part. As mentioned above, the over-head of this re-casting of the event is rather small (on the level of 1 %). The common-blocks of SGVANA are described in the User's Guide above.

The third part of SGV, SGVTRKER, does not operate directly on the event structure, but on one particle at a time. The necessary information is passed by arguments. SGVTRKER internally hold a structure describing the detector as read from the external files. The other parts of SGV do not operate directly on this structure, but can access the information by calling access routines. There are two classes of such routines, one that takes the user-defined layer-name as an argument, and one that takes the layer-numbering and detecttor type as arguments. The former is usually sufficient for the user-analysis. In this class, one finds:

ZTDTGE (see 4.4.49) for geometry parameters,

ZTDTPM (see 4.4.50) for parameters governing the position measurement,

ZTCSEP (see 4.4.51) for parameters governing the calorimeter energy measurement, and

ZTCMPA (see 4.4.52) for parameters governing the calorimeter measurement of minimum ionising particles.

ZTDTLL (see 4.4.53) returns the set of layers that corresponds to a given name (the name can have wild-cards).

ZAUNHT (see 4.6.22) counts the number of layers in a sub-detector that a track went through, and

ZAUDHL (see 4.6.23) returns a set of those layers.

The second class of routines include:

ZTCNAM (see 4.4.15) and ZTPNAM (see 4.4.16) for names.

ZTCRAD (see 4.4.17) , ZTCLEN (see 4.4.18) , ZTPLAZ (see 4.4.20) , and ZTPRAD (see 4.4.21) for geometry

ZTCERF (see 4.4.22) , ZTCEZ (see 4.4.23) , ZTPERX (see 4.4.24) and ZTPERY (see 4.4.25) for tracking detector resolutions

ZTCSDE (see 4.4.31) , ZTCTHR (see 4.4.35) , ZTCEFF (see 4.4.36) , ZTCRES (see 4.4.37) , and ZTCTYP (see 4.4.42) for various properties of calorimeters.

ZTCX0 (see 4.4.44) and ZTPX0 (see 4.4.45) for the material thickness.

ZTCANB (see 4.4.46) and ZTPANB (see 4.4.47) for the atomic number of the detector material.

ZTISCB (see 4.4.26) and ZTISCF (see 4.4.27) to find if a layer is a calorimeter.

ZTTINF (see 4.4.48) to get the approximate position of a track at a given layer.


next up previous contents
Next: 3. Structure of SGV. Up: sgv_refman Previous: 1. PATCHY structure of   Contents
Mikael Berggren 2003-03-27