next up previous contents
Next: 4.2 User analysis. Up: 4.1 User event generator. Previous: 4.1.7 Scan with Single   Contents


4.1.8 Other generators

You can plug in any other generator instead, IF IT FILLS THE LUND COMMON /LUJETS/. If Your generator does not do that, You must supply the code for that filling as well. Note that the default ZEUGEN contains an out-commented example how to do this if Your generator uses the other standard format on the market, ie. the HEPEVT standard as defined by the Particle Properties Group. Look at the comments in the default ZEUGEN for further details.

If You want do use some other generator, drop me (Mikael.Berggren@cern.ch) a mail, and I'll tell You if I know of someone else that already has done the job. Likewise, if You do interface a new generator, let me know, so that I can let other users know !

The first step to take to integrate an other event generator, is to make the following modifications to the private set-up of SGV:

To interface a generator, note that there are two routines to be supplied: ZEORD, to read any steerings, and doing initialisation, and ZEUGEN. These routines must NOT contain initialisations of general packages, such as ZEBRA, HBOOK or FFREAD, nor a call to FFGO since this is done by SGV. The events should be generated one at a time, by a call to a single routine that fills LUJETS. A good way to organise the code of the generator is therefore :

             PROGRAM main
                 .
                 .
                 .
             CALL HLIMIT(...)
             CALL HROPEN(...)
             CALL FFINIT(...)
                 .
              (other package initialisations)
                 .
                 .
        ->   CALL CARDS(0)  ! with argument =0, this routine should define
                            ! the steering cards.
             CALL FFGO
        ->   CALL CARDS(1)  ! with argument =1, should react on the values
                            ! of the steering cards.

        ->   CALL INIT      ! initialisation of the generator,
                            ! possibly including HBOOK-calls

             DO I = 1, MAXEVS
        ->      CALL GENERATE   ! Fills LUJETS for one event and
                                ! nothing else.
                     .
                 (event analysis, histogram filling etc.)
                     .
             ENDDO
                 .
             CALL HREND(...)
                 .
              (other package closing)
                 .
                 .
             END
The calls SGV needs to do are marked with "-$>$". So, with this layout, the interface is simply to add a call to CARDS in the two IF-ELSE blocks in the default ZEORD (one for MODE=0, one for MODE=1), add a call to INIT after the second of these (ie. the MODE=1 case, still in ZEORD), and replace the call to the generator at the indicated lines in the default ZEUGEN by a call to GENERATE.
next up previous contents
Next: 4.2 User analysis. Up: 4.1 User event generator. Previous: 4.1.7 Scan with Single   Contents
Mikael Berggren 2003-03-27