next up previous contents index
Next: Add 4-momenta of particles Up: Vector quantities Previous: Vector quantities   Contents   Index


General Remarks

Except where noted below (e.g., mass), the attributes of ``tracks'' read from the input tape cannot be changed by the user. To modify attributes of an ``input'' track, a copy of the track must be made.

The following example illustrates some features of the routines described in this section.


      ISUM = KVNEW (DUMMY)
      DO 10 ITK1 = ... , ...
      DO 10 ITK2 = ... , ...
        CALL QVADD2 (ISUM, ITK1, ITK2)
C       ... analysis of the sum of ITK1 and ITK2, for example:
        CALL HF2 (4711, QP(ISUM), QM(ISUM),1.)
   10 CONTINUE

The function KVNEW (DUMMY) creates a new track (ISUM) in the system area which is needed as working space for most of the subroutines described here (see 9.2.8). New ``tracks'' can be created whenever necessary , however users have to be warned that if they do it inside loops , they may quickly exceed the size of the BOS array. A warning is issued if an ``input'' track is used as working space ( i.e.if an ``input'' track is given as the output track of a routine).

Subroutine QVADD2 (ISUM, ITK1, ITK2) adds the 4-momenta of tracks ITK1 and ITK2 and stores the resulting composite particle as track ISUM (see 9.2.2). All track-track and track-vertex relations, flags, etc. are set in QVADD2. For example, all flags for the lock algorithm are set (see 10.2.3). Thus, with CALL QLOCK (ISUM), you lock ITK1 and ITK2 as well as ISUM. The mother-daughter relation (see 7.5.1) from ISUM to ITK1 and ITK2 is stored, but NOT the reverse daughter-mother relation; see KVSAVE in 9.2.9).

In subroutine calls, the result is stored in the track denoted by the first subroutine argument: for example, CALL QVCOPY (ITO, IFROM) copies track IFROM to track ITO.

Do not mix up tracks from different classes. ITK1 and ITK2 in QVADD2 must belong the same class (KRECO or KMONTE or a Lorentz frame derived from one of them; see 7.4.1). If you really want to mix up tracks from different classes, they must first be ``saved'' in the same class (see KVSAVC in 9.2.12).


next up previous contents index
Next: Add 4-momenta of particles Up: Vector quantities Previous: Vector quantities   Contents   Index
Joel Closier
2000-02-07