Filer Pythia events BEFORE execution of GSTAR
Method developed by Qinghua Xu , requires private verion of Pythia code
Pythia manual

  1. Get recent Pythia code from CVS, here version 6410
    cvs co pams/gen/pythia_6410/

  2. Edit pams/gen/pythia_6410/pyevnt.F as follows
    1) rename existing SUBROUTINE PYEVNT in to SUBROUTINE PYEVNT_ORG
    2) add your own version of SUBROUTINE PYEVNT, which calls PYEVNT_ORG in the infinite loop until the event you want is generated. Below is an example requiering 20 GeV Et electron in the approximate Endcap boundaries
    
    C*********************************************************************
    C...PYEVNT Filter, following   Qinghua example.
    C.. imitates the oryginal PYEVBT , continue to generate new events until satysfying event if found
    C.. WARN: common block have been copy/paste, do NOT assume they are correct for an new Pythia version, JB
     
          SUBROUTINE PYEVNT
     
    C...Double precision and integer declarations.
          IMPLICIT DOUBLE PRECISION(A-H, O-Z)
          IMPLICIT INTEGER(I-N)
    C...Commonblocks.
          COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
          
    C...  event filtering,  following  Qinghua example. 
          do while (1.eq.1)
             
             CALL PYEVNT_ORG ! oryginal method
             
             DO I=9,N
                IF(ABS(K(I,2)).EQ.24 ) THEN
                   px=P(i,1)
                   py=P(i,2)
                   pz=P(i,3)
                   print *,"W=", K(i,2), px,py,pz
                ENDIF
                IF(ABS(K(I,2)).NE.11) goto 555
                px=P(i,1)
                py=P(i,2)
                pz=P(i,3)
                pt=sqrt(px**2 + py**2)
                tgth=pt/abs(pz)
                print *,"e",K(i,2), px,py,pz, pt
                if ( pt<20. ) goto 555
                if ( pz<0. ) goto 555
                if ( tgth<0.18 ) goto 555
                if ( tgth>0.93 ) goto 555
             if( abs(px) > abs(py)/3 ) goto 555 
             return ! the event has been accepted
     555     continue
          enddo    
          enddo                     ! closing  'while'
          END
    

  3. Execute cons

  4. Edit eve.kumac so it calls the private version of Pythia.so instead default
    gexec .sl305_gcc323/lib/pythia_6410.so

  5. ready to go

  6. Sent "thank you card" to Qinghua Xu