diff -uNr stdhep.ORIG/src/inc/mcgen.inc stdhep/src/inc/mcgen.inc
--- stdhep.ORIG/src/inc/mcgen.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/mcgen.inc	Thu Feb  5 15:55:47 2004
@@ -0,0 +1,68 @@
+*
+* $Id: mcgen.inc,v 1.2 1998/05/26 22:58:03 kll Exp $
+*
+* $Log: mcgen.inc,v $
+* Revision 1.2  1998/05/26 22:58:03  kll
+* Many mods by R. Kutschke to tag mixed events for CDF
+*
+* Revision 1.1.1.1  1994/10/08 02:21:32  zfiles
+* first version of qqlib in CVS
+*
+*
+*CMZ :  1.04/00 21/09/94  22.55.01  by  Paul Avery
+*CMZ :  1.03/70 01/11/90  18.24.10  by  Paul Avery
+*CMZ :  1.00/00 04/06/90  18.55.55  by  Jorge L. Rodriguez
+*-- Author :
+C  -------------------------------------------------------------------
+C     CLMCX:MCGEN.INC
+C  -------------------------------------------------------------------
+C
+#if defined(CLEO_CDGDOC)
+*  IST         Used in GGGJET, QQGJET, ANGGEN
+*  IFR         1 = ff frag. 2 = Lund frag.
+*  PUD         Fraction of qqbar pairs popped as (uu/dd) 0 < PUD < 0.5
+*  PS1         Not used anymore
+*  SIGMA       PT width of jets generated in QCD. Very simplistic.
+*  QMAS(15)    Diquark masses? Not used in QDECAY.
+*  PAR(25)     Parameters used in generation
+*  CZF(15)     For light quarks, used to gen. FF distribution (ZDIST only)
+*  MESO(36)    Converts qqbar to meson (pseudoscalar?). Used in QDECAY.
+*  CMIX(6,2)   Not used
+*  CND(3)      Not used
+*  BSPIN(5)    Used for generating baryons in KBPART. Proportion of
+*              spin 1/2 vs spin 3/2 for the following cases
+*                 (1) qqq (where q = u/d)
+*                 (2) sqq (where q = u/d)
+*                 (3) ssq (where q = u/d)
+*                 (4) cxx (where x = u/d/s)
+*                 (5) ccx (where x = u/d/s)
+*  BSYMM       Used for generating baryons in KBPART. Specifies what
+*              fraction of lambda-like (versus sigma) baryons for the
+*              following cases:
+*                 (1) sud
+*                 (2) cud
+*                 (3) csq (where q = u/d)
+*  WBAR        Min. invariant mass required to allow baryon generation
+*  FLIP        Fraction of times to generate diquark pair (as opposed to
+*              qqbar pairs) when popping from vacuum.
+*  PBFL(6)     Cumulative probs. to produce various diquarks in DIQFLV
+*              uu, ud, us, dd, ds, ss
+*  IQFLV(2,6)  Specifies which quarks are to be used in building a baryon
+*  KBRFLV(6,4)
+#endif
+
+      INTEGER LJET
+      PARAMETER ( LJET = 250 )
+
+      INTEGER IST, IFR, N, K, MESO, NC, KC, LASTN, KBRFLV
+      INTEGER IQFLV
+      REAL PUD, PS1, SIGMA, QMAS, PAR, CMIX, CND, BSPIN, BSYMM, P
+      REAL PC, CZF, FLIP, WBAR, PBFL
+
+      COMMON/DATA1/IST,IFR,PUD,PS1,SIGMA,QMAS(15),PAR(25)
+      COMMON/DATA2/CZF(15),MESO(36),CMIX(6,2)
+      COMMON/DATA3/CND(3)
+      COMMON/DATA5/BSPIN(5),BSYMM(3)
+      COMMON/JET/N,K(LJET,2),P(LJET,5),NC,KC(10),PC(10,4),
+     *  LASTN
+      COMMON/BARYON/PBFL(6),FLIP,WBAR,KBRFLV(6,4),IQFLV(2,6)
diff -uNr stdhep.ORIG/src/inc/pydat1.inc stdhep/src/inc/pydat1.inc
--- stdhep.ORIG/src/inc/pydat1.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pydat1.inc	Thu Feb  5 15:50:39 2004
@@ -0,0 +1,4 @@
+C...Parameters.
+      COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
+      INTEGER*4 MSTU, MSTJ
+      REAL   *8 PARU, PARJ
diff -uNr stdhep.ORIG/src/inc/pydat2.inc stdhep/src/inc/pydat2.inc
--- stdhep.ORIG/src/inc/pydat2.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pydat2.inc	Thu Feb  5 15:51:18 2004
@@ -0,0 +1,4 @@
+C...Particle properties + some flavour parameters.
+      COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
+      INTEGER*4 KCHG 
+      REAL   *8 PMAS, PARF, VCKM
diff -uNr stdhep.ORIG/src/inc/pydatr.inc stdhep/src/inc/pydatr.inc
--- stdhep.ORIG/src/inc/pydatr.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pydatr.inc	Thu Feb  5 15:58:56 2004
@@ -0,0 +1,4 @@
+C...Random number generator information.
+      COMMON/PYDATR/MRPY(6),RRPY(100)
+      INTEGER*4 MRPY
+      REAL*8    RRPY
diff -uNr stdhep.ORIG/src/inc/pyint1.inc stdhep/src/inc/pyint1.inc
--- stdhep.ORIG/src/inc/pyint1.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pyint1.inc	Thu Feb  5 15:53:06 2004
@@ -0,0 +1,4 @@
+C...Internal variables.
+      COMMON/PYINT1/MINT(400),VINT(400)
+      INTEGER*4 MINT
+      REAL   *8 VINT
diff -uNr stdhep.ORIG/src/inc/pyint5.inc stdhep/src/inc/pyint5.inc
--- stdhep.ORIG/src/inc/pyint5.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pyint5.inc	Thu Feb  5 15:53:34 2004
@@ -0,0 +1,4 @@
+C...Generation and cross section statistics.
+      COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
+      INTEGER*4 NGENPD, NGEN
+      REAL   *8 XSEC
diff -uNr stdhep.ORIG/src/inc/pyjets.inc stdhep/src/inc/pyjets.inc
--- stdhep.ORIG/src/inc/pyjets.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pyjets.inc	Thu Feb  5 15:49:53 2004
@@ -0,0 +1,4 @@
+C...The event record.
+      COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
+      INTEGER*4 N, NPAD, K
+      REAL   *8 P, V
diff -uNr stdhep.ORIG/src/inc/pypars.inc stdhep/src/inc/pypars.inc
--- stdhep.ORIG/src/inc/pypars.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/pypars.inc	Thu Feb  5 15:52:31 2004
@@ -0,0 +1,4 @@
+C...Parameters. 
+      COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
+      INTEGER*4 MSTP, MSTI
+      REAL   *8 PARP, PARI
diff -uNr stdhep.ORIG/src/inc/qqbrat.inc stdhep/src/inc/qqbrat.inc
--- stdhep.ORIG/src/inc/qqbrat.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqbrat.inc	Thu Feb  5 15:56:58 2004
@@ -0,0 +1,134 @@
+*
+* $Id: qqbrat.inc,v 1.1.1.1 1994/10/08 02:21:32 zfiles Exp $
+*
+* $Log: qqbrat.inc,v $
+* Revision 1.1.1.1  1994/10/08 02:21:32  zfiles
+* first version of qqlib in CVS
+*
+*
+*CMZ :  1.04/00 22/09/94  00.06.59  by  Paul Avery
+*-- Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                      QQBRAT.INC
+*
+*                Information on decay channels
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*                 Decay information per particle
+*  IPLIST(1,*)    Pntr to first entry in MLLIST/BRLIST per particle (0=stable)
+*        (2,*)    # of decay channels per particle (0 if stable)
+*        (3,*)    Pntr to first entry in CPLIST per particle (0=no CP decays)
+*        (4,*)    # of CP eigenstate channels in CPLIST
+#endif
+
+      INTEGER IPLIST
+      COMMON/QQBRA1/
+     *  IPLIST(4,-20:MCNUM)
+
+
+#if defined(CLEO_CDGDOC)
+*                 Decay information per channel
+*  NBRLST         # of decay channels defined
+*  BRLIST(*)      Branching fraction per channel (in cumulative order)
+*  AGLIST(7,*)    User defined parameters for channel. For 2 body decays they
+*                 specify the angular distribution:
+*                   dN/dcos(theta) = A1 + ... + A7*cos(theta)**6
+*  MLLIST(1-9,*)  Decay information per channel
+*         1       # daughters
+*         2       pointer to first daughter position in IDLIST
+*         3       MATRX = matrix element ID  number
+*         4       Number of helicity states defined
+*         5       Number of helicity angular distributions
+*         6       Pointer to first helicity state in HELPRB (0 if none)
+*         7       Pointer to helicity angular dist. list HELANG (0 if none)
+*         8       Pointer to corresponding entry in CPLIST (CP eig. BR list)
+*         9       Sum of daughter type ID's. Used in inclusive B decays
+*  LCPTAG(*)      TRUE if daughter decays to be carried out as tag + CP eig.
+*
+#endif
+
+      INTEGER NBRLST, MLLIST
+      LOGICAL LCPTAG
+      REAL BRLIST, AGLIST
+      COMMON/QQBRA2/
+     *  NBRLST,
+     *  BRLIST(MCHANS), AGLIST(7,MCHANS), MLLIST(9,MCHANS),
+     *  LCPTAG(MCHANS)
+
+
+#if defined(CLEO_CDGDOC)
+*                 Daughter list pointed to by all channels
+*  NDGHTR         Total number of daughters defined
+*  IDLIST(*)      List of daughters
+#endif
+
+      INTEGER NDGHTR, IDLIST
+      COMMON/QQBRA3/
+     *  NDGHTR, IDLIST(MCDTRS)
+
+
+#if defined(CLEO_CDGDOC)
+*                 Helicity ang. distributions (set by ANGULAR_HELICITY commd.)
+*  NHLANG         Length of HELANG list
+*  HELANG(*)      Helicity of this decay
+*  COFANG(7,*)    A1, A2, etc. used in dN/dcos = A1 + ... + A7*cos(theta)**6
+#endif
+
+      INTEGER NHLANG
+      REAL HELANG, COFANG
+      COMMON/QQBRA4/
+     *  NHLANG, HELANG(MHLANG), COFANG(7,MHLANG)
+
+
+#if defined(CLEO_CDGDOC)
+*                 Helicity state probability list (set by HELICITY command)
+*  NHLPRB         Length of HELPRB
+*  IHLPRB(*)      Pointer to first daughter helicity in HELLST
+*  HELPRB(*)      Probability (stored in cumulative order)
+#endif
+
+      INTEGER NHLPRB, IHLPRB
+      REAL HELPRB
+      COMMON/QQBRA5/
+     *  NHLPRB, IHLPRB(MHLPRB), HELPRB(MHLPRB)
+
+
+#if defined(CLEO_CDGDOC)
+*                 Helicity states of certain daughters
+*  NHLLST         Length of HELLST
+*  HELLST(*)      List of helicities (pointed to by IHLPRB(I))
+#endif
+
+      INTEGER NHLLST
+      REAL HELLST
+      COMMON/QQBRA6/
+     *  NHLLST, HELLST(MHLLST)
+
+
+#if defined(CLEO_CDGDOC)
+*                 List of CP eigenstatechannels
+*  NCPLST         Number of CP eigenstate channels
+*  CPLIST(*)      CP branching fraction per channel (in cumulative order)
+*  ICPLST(*)      Pointer to corresponding entry in MLLIST
+*  CPSNPH(*)      CP sin(phi) per channel
+#endif
+
+      INTEGER NCPLST, ICPLST
+      REAL CPLIST, CPSNPH
+      COMMON/QQBRA7/
+     *  NCPLST, CPLIST(MCPLST), ICPLST(MCPLST), CPSNPH(MCPLST)
+
+
+#if defined(CLEO_CDGDOC)
+*  NFDECA         # of decay files read in
+*  CFDECA(*)      List of decay files read in
+#endif
+      INTEGER NFDECA
+      COMMON/QQBRA8/
+     *  NFDECA
+
+      CHARACTER*80 CFDECA
+      COMMON/QQBRA9/
+     *  CFDECA(MFDECA)
diff -uNr stdhep.ORIG/src/inc/qqevnt.inc stdhep/src/inc/qqevnt.inc
--- stdhep.ORIG/src/inc/qqevnt.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqevnt.inc	Thu Feb  5 15:55:22 2004
@@ -0,0 +1,77 @@
+*
+* $Id: qqevnt.inc,v 1.6 1996/05/01 07:05:43 zfiles Exp $
+*
+* $Log: qqevnt.inc,v $
+* Revision 1.6  1996/05/01 07:05:43  zfiles
+* BDISPX, BDISPY (beam dispersion) and P4PRQ1, P4PRQ2 (primary quark 4 momenta)
+* are saved.
+*
+* Revision 1.5  1996/02/21 20:59:06  lkg
+* IVRSCG and IBNCMC now use spare words in qqevnt/qqinfo/roar fields -->
+* backwards compatibility with old executables.
+*
+* Revision 1.4  1996/02/16 20:03:39  zfiles
+* Added IQQFLV
+*
+* Revision 1.3  1996/01/15 22:20:27  lkg
+* Add CLEOG version number IVRSCG (qqinfo) and MC generated bunch number (qqevnt)
+* Update roar fields to accommodate the new variables.
+*
+* Revision 1.2  1995/04/25 13:58:07  zfiles
+* New variable XANGQQ and IDKMEC
+*
+* Revision 1.1  1994/10/07  23:57:35  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 03/10/94  17.34.41  by  Paul Avery
+*CMZ :          08/10/93  10.27.52  by  Paul Avery
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                      QQEVNT.INC
+*
+*           QQ parameters at the start of an event
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  IEVTQQ              QQ Event number
+*  IRUNQQ              QQ Run number
+*  IRANQQ(2)           Random seeds at start of QQ event
+*  IRANMC(2)           Random seeds at start of event in subsequent analysis
+*  IRANCC(2)           Historical. Not used
+*  IQQFLV              e+e- --> qq=  quark type (JETSET continuum)           
+*  IRS2QQ(4)           Reserved for future use
+*  IBMRAD              0 ==> No photon radiated  1 ==> Photon radiated
+*  IBNCMC              generated bunch number of event
+*
+*  ECM                 CM invariant mass after radiation
+*  P4CMQQ(4)           4 vector of CM in lab
+*  P4PHQQ(4)           4 vector of radiated photon
+*  ENERNW              CM energy after radiation
+*  BEAMNW              ENERNW/2
+*  BEAMP               Positron energy
+*  BEAMN               Electron energy
+*  XANGQQ              Beam crossing angle (in mrad)
+*  BDISPX              Beam dispersion in x direction (in mrad)
+*  BDISPY              Beam dispersion in y direction (in mrad)
+*  P4PRQ1(4)           4 vector of the primary quark in LUND
+*  P4PRQ2(4)           4 vector of the primary anti-quark in LUND
+#endif
+      INTEGER IEVTQQ, IRUNQQ
+      INTEGER IRANQQ, IRANMC, IRANCC, IQQFLV, IRS2QQ
+      INTEGER IBMRAD, IBNCMC
+      COMMON/QQEVT1/
+     *   IEVTQQ, IRUNQQ,
+     *   IRANQQ(2), IRANMC(2), IRANCC(2), IQQFLV, IBNCMC, IRS2QQ(3),
+     *   IBMRAD
+
+      REAL ECM, P4CMQQ, P4PHQQ, ENERNW, BEAMNW, BEAMP, BEAMN
+      REAL XANGQQ, BDISPX, BDISPY, P4PRQ1, P4PRQ2
+      COMMON/QQEVT2/
+     *   ECM, P4CMQQ(4), P4PHQQ(4),
+     *   ENERNW, BEAMNW, BEAMP, BEAMN, XANGQQ, BDISPX, BDISPY,
+     *   P4PRQ1(4), P4PRQ2(4)
+
+
+
diff -uNr stdhep.ORIG/src/inc/qqinfo.inc stdhep/src/inc/qqinfo.inc
--- stdhep.ORIG/src/inc/qqinfo.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqinfo.inc	Thu Feb  5 16:00:28 2004
@@ -0,0 +1,66 @@
+*
+* $Id: qqinfo.inc,v 1.5 1996/06/05 07:55:00 clib Exp $
+*
+* $Log: qqinfo.inc,v $
+* Revision 1.5  1996/06/05 07:55:00  clib
+* Added BDSIGX, BDSIGY (sigmas for beam dispersion)
+*
+* Revision 1.4  1996/05/01 07:03:58  zfiles
+* Decay.dec version number is saved as IVRSDD.
+*
+* Revision 1.3  1996/02/21 20:59:08  lkg
+* IVRSCG and IBNCMC now use spare words in qqevnt/qqinfo/roar fields -->
+* backwards compatibility with old executables.
+*
+* Revision 1.2  1996/01/15 22:20:28  lkg
+* Add CLEOG version number IVRSCG (qqinfo) and MC generated bunch number (qqevnt)
+* Update roar fields to accommodate the new variables.
+*
+* Revision 1.1  1994/10/07 23:57:36  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 05/10/94  02.20.16  by  Peter Kim
+*CMZ :          05/10/94  02.20.00  by  Peter Kim
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                      QQINFO.INC
+*
+*               QQ information
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  IVRSQQ        QQ Version number
+*  IORGQQ        Origin of QQ events
+*                   Save the Model number used.
+*
+*  IVRSCG        CLEOG version number
+*  IVRSDD        DECAY.DEC version number
+*  IRS1QQ        Reserved for future use
+#endif
+
+      INTEGER IVRSQQ, IORGQQ, IVRSCG, IVRSDD, IRS1QQ
+      COMMON /QQINF1/
+     *     IVRSQQ, IORGQQ, IVRSCG, IVRSDD, IRS1QQ
+
+
+#if defined(CLEO_CDGDOC)
+*  DATEQQ              Date the QQ job was run
+*  TIMEQQ              Time the QQ job was run
+#endif
+
+      CHARACTER DATEQQ*20, TIMEQQ*20
+      COMMON/QQINF2/
+     *   DATEQQ, TIMEQQ
+
+
+#if defined(CLEO_CDGDOC)
+*  BDSIGX              Sigma for Beam dispersion in X direction
+*  BDSIGY              Sigma for Beam dispersion in Y direction
+#endif
+
+      REAL BDSIGX, BDSIGY
+      COMMON/QQINF3/
+     *   BDSIGX, BDSIGY
+
diff -uNr stdhep.ORIG/src/inc/qqipcd.inc stdhep/src/inc/qqipcd.inc
--- stdhep.ORIG/src/inc/qqipcd.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqipcd.inc	Thu Feb  5 16:01:19 2004
@@ -0,0 +1,25 @@
+*
+* $Id: qqipcd.inc,v 1.1 1994/10/07 23:57:37 zfiles Exp $
+*
+* $Log: qqipcd.inc,v $
+* Revision 1.1  1994/10/07 23:57:37  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 03/10/94  17.34.58  by  Paul Avery
+*CMZ :          08/10/93  11.29.57  by  Paul Avery
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                         QQIPCD.INC
+*
+*         Points from full track list to CD track.
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  IPCDQQ(IT)          CD track number (0 if none)
+#endif
+
+      INTEGER IPCDQQ
+      COMMON/QQIPC1/
+     *   IPCDQQ(MCTRK)
diff -uNr stdhep.ORIG/src/inc/qqluns.inc stdhep/src/inc/qqluns.inc
--- stdhep.ORIG/src/inc/qqluns.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqluns.inc	Thu Feb  5 15:59:24 2004
@@ -0,0 +1,30 @@
+*
+* $Id: qqluns.inc,v 1.1.1.1 1994/10/08 02:21:32 zfiles Exp $
+*
+* $Log: qqluns.inc,v $
+* Revision 1.1.1.1  1994/10/08 02:21:32  zfiles
+* first version of qqlib in CVS
+*
+*
+*CMZ :  1.04/00 21/09/94  22.55.49  by  Paul Avery
+*CMZ :  1.03/70 26/07/90  20.38.43  by  Paul Avery
+*-- Author :
+*
+* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*           QQLUNS.INC
+*
+*                    QQ unit numbers
+* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  LTTIQQ        Fortran unit number for terminal input
+*  LTTOQQ        Fortran unit number for terminal output
+*  LOUTQQ        Fortran unit number for file output
+*  LTINQQ        Fortran unit number for data input
+*  LTOUQQ        Fortran unit number for data output
+*  LTMPQQ        Temporary Fortran unit number
+#endif
+C
+      INTEGER LTTIQQ, LTTOQQ, LOUTQQ, LTINQQ, LTOUQQ, LTMPQQ
+C
+      COMMON /QQLUNS/ LTTIQQ, LTTOQQ, LOUTQQ, LTINQQ, LTOUQQ, LTMPQQ
diff -uNr stdhep.ORIG/src/inc/qqmisc.inc stdhep/src/inc/qqmisc.inc
--- stdhep.ORIG/src/inc/qqmisc.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqmisc.inc	Thu Feb  5 15:59:31 2004
@@ -0,0 +1,26 @@
+*
+* $Id: qqmisc.inc,v 1.1.1.1 1994/10/08 02:21:33 zfiles Exp $
+*
+* $Log: qqmisc.inc,v $
+* Revision 1.1.1.1  1994/10/08 02:21:33  zfiles
+* first version of qqlib in CVS
+*
+*
+*CMZ :  1.04/00 05/10/94  02.27.49  by  Peter C Kim
+*CMZ :          05/10/94  02.18.26  by  Peter C Kim
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                      QQMISC.INC
+*
+*              Some variables left behind
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  NEWDEC        Name of user-defined decay file (*.dec)
+*  FTAPQQ        Name of ROAR output file (*.rp)
+#endif
+
+      CHARACTER NEWDEC*80, FTAPQQ*80
+      COMMON /QQMIS1/
+     *                 NEWDEC, FTAPQQ
diff -uNr stdhep.ORIG/src/inc/qqmxcp.inc stdhep/src/inc/qqmxcp.inc
--- stdhep.ORIG/src/inc/qqmxcp.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqmxcp.inc	Thu Feb  5 16:05:45 2004
@@ -0,0 +1,37 @@
+*
+* $Id: qqmxcp.inc,v 1.2 1998/05/26 22:58:05 kll Exp $
+*
+* $Log: qqmxcp.inc,v $
+* Revision 1.2  1998/05/26 22:58:05  kll
+* Many mods by R. Kutschke to tag mixed events for CDF
+*
+* Revision 1.1.1.1  1994/10/08 02:21:33  zfiles
+* first version of qqlib in CVS
+*
+*
+*CMZ :  1.04/00 15/10/93  09.31.21  by  Paul Avery
+*-- Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                         QQMXCP.INC
+*
+*   Contains info on mixing and CP violation within an event
+*
+*   Must include qqlib/seq/mcgen.inc before this include file in
+*   order to define LJET.
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+*  ILDECA(*)      Decay channel of particle from mixing/CP
+*  CTTAU(*)       Generated C*T in center of mass using mixing/CP info
+*  DIDMIX(*)      If 1 then the particle mixed before decaying.
+*                 Otherwise it did not mix
+#endif
+
+#include "mcgen.inc"
+      COMMON /QQMXC1/
+     *  ILDECA(LJET), CTTAU(LJET)
+      COMMON /QQMXCL/ DIDMIX(LJET)
+      INTEGER ILDECA
+      LOGICAL DIDMIX
+      REAL CTTAU
diff -uNr stdhep.ORIG/src/inc/qqpars.inc stdhep/src/inc/qqpars.inc
--- stdhep.ORIG/src/inc/qqpars.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqpars.inc	Thu Feb  5 15:41:00 2004
@@ -0,0 +1,76 @@
+*
+* $Id: qqpars.inc,v 1.6 1999/04/16 15:45:53 clib Exp $
+*
+* $Log: qqpars.inc,v $
+* Revision 1.6  1999/04/16 15:45:53  clib
+* Increase size of parameters MCDTRS, MCHANS to allow any size user-decay file with standard decay.dec.(djaffe)
+*
+* Revision 1.5  1996/12/05 23:05:05  clib
+* Running out of space in the Helicity array (MHLLST: 1000 -> 2000)
+*
+* Revision 1.4  1996/07/17 07:31:20  clib
+* Increase the size of arrays for Helicity cards (500 --> 1000)
+*
+* Revision 1.3  1994/10/27  16:59:35  zfiles
+* MCNUM of 1000 does not fit in a ROAR record.
+*
+* Revision 1.2  1994/10/25  13:59:38  zfiles
+* At Peter and Paul's request, we set MCNUM to 1000. (from 500)
+*
+* Revision 1.1  1994/10/07  23:57:38  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 03/10/94  17.34.06  by  Paul Avery
+*CMZ :  1.03/70 11/10/93  17.13.22  by  Paul Avery
+*-- Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                          QQPARS.INC
+*
+*                Parameters used in most dimensions in QQ
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+* MCTRK      Max number of QQ tracks
+* NTRKS      Ditto
+* MCVRTX     Max number of QQ vertices
+* NVTXS      Ditto
+* MCHANS     Total number of decay channels (BRLIST, MLLIST)
+* MCDTRS     Total number of daughters (IDLIST)
+* MPOLQQ     Total number of polarized decays
+* MCNUM      Max number of stable particles (ISTBLE, XMAS, IPLIST0
+* MCSTBL     Max number of stable particle codes
+* MCSTAB     Max length of stable particle list
+* MCTLQQ     Max # of lines to store from QQ control file
+* MDECQQ     Max # of lines to store from QQ decay file
+* MHLPRB     Max length of HELPRB
+* MHLLST     Max length of HELLST
+* MHLANG     Max length of HELANG
+* MCPLST     Max length of CPLIST
+* MFDECA     Max number of decay file names to store
+#endif
+
+      INTEGER MCTRK, NTRKS, MCVRTX, NVTXS
+      INTEGER MCHANS, MCDTRS, MPOLQQ
+      INTEGER MCNUM, MCSTBL, MCSTAB, MCTLQQ, MDECQQ
+      INTEGER MHLPRB, MHLLST, MHLANG, MCPLST, MFDECA
+      INTEGER MCNUM1
+      PARAMETER (MCTRK = 512)
+      PARAMETER (NTRKS = MCTRK)
+      PARAMETER (MCVRTX = 256)
+      PARAMETER (NVTXS = MCVRTX)
+      PARAMETER (MCHANS = 4000 * 10)  ! 3mar99 djaffe increase by X10
+      PARAMETER (MCDTRS = 8000 * 10)  ! 3mar99 djaffe increase by X10
+      PARAMETER (MPOLQQ = 300)
+      PARAMETER (MCNUM  = 600)
+      PARAMETER (MCSTBL = 40)
+      PARAMETER (MCSTAB = 512)
+      PARAMETER (MCTLQQ = 100)
+      PARAMETER (MDECQQ = 300)
+      PARAMETER (MHLPRB = 1000)
+      PARAMETER (MHLLST = 2000)
+      PARAMETER (MHLANG = 1000)
+      PARAMETER (MCPLST = 200)
+      PARAMETER (MFDECA = 5)
+      PARAMETER (MCNUM1 = MCNUM + 21)
diff -uNr stdhep.ORIG/src/inc/qqprop.inc stdhep/src/inc/qqprop.inc
--- stdhep.ORIG/src/inc/qqprop.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqprop.inc	Thu Feb  5 15:40:55 2004
@@ -0,0 +1,97 @@
+*
+* $Id: qqprop.inc,v 1.1 1994/10/07 23:57:39 zfiles Exp $
+*
+* $Log: qqprop.inc,v $
+* Revision 1.1  1994/10/07 23:57:39  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 03/10/94  17.34.16  by  Paul Avery
+*CMZ :  1.03/70 11/10/93  09.28.52  by  Paul Avery
+*CMZ :          08/10/93  13.00.47  by  Paul Avery
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                     QQPROP.INC
+*
+*                 Particle properties
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+C
+#endif
+#if defined(CLEO_CDGDOC)
+*  NPMNQQ       Minimum particle # defined in list
+*  NPMXQQ       Maximum particle # defined in list
+*
+*  IDPDGQ(IP)    PDG particle code
+*  IDMC(IP)     Stable particle code (not really used in QQ)
+*  LPARTY(IP)   Parity of particle
+*  CPARTY(IP)   C parity of particle
+*  IMIXPP(IP)   IMIXPP(IP) = particle it mixes into (0 if no mixing)
+*  ICPMIX(IP)   ICPMIX(IP) = particle it mixes into (0 if no CP violation)
+*  HIDEQQ(IP)   TRUE ==> hidden particle, never appears in decay history.
+*                        When produced, it is decayed immediately.
+#endif
+
+      INTEGER NPMNQQ, NPMXQQ
+      INTEGER IDPDGQ, IDMC, LPARTY, CPARTY, IMIXPP, ICPMIX
+      LOGICAL HIDEQQ
+      COMMON/QQPAR1/
+     *       NPMNQQ, NPMXQQ,
+     *       IDPDGQ(-20:MCNUM),
+     *       IDMC(-20:MCNUM),
+     *       LPARTY(-20:MCNUM), CPARTY(-20:MCNUM),
+     *       IMIXPP(-20:MCNUM), ICPMIX(-20:MCNUM),
+     *       HIDEQQ(-20:MCNUM)
+
+
+#if defined(CLEO_CDGDOC)
+*  AMASS(IP)      Particle mass
+*  CHARGE(IP)     Charge
+*  CTAU(IP)       Lifetime in meters
+*  SPIN(IP)       spin (0, 0.5, 1.0, 1.5, 2.0, ...)
+*  RWIDTH(IP)     widths
+*  RMASMN(IP)     Minimum mass (for RWIDTH > 0.)
+*  RMASMX(IP)     Maximum mass (for RWIDTH > 0.)
+*  RMIXPP(IP)     RMIXPP(IP) = dM/Gamma = mixing strength
+*  RCPMIX(IP)     RCPMIX(IP) = CP violation parameter
+#endif
+
+      REAL AMASS, CHARGE, CTAU, SPIN, RWIDTH, RMASMN, RMASMX
+      REAL RMIXPP, RCPMIX
+      COMMON/QQPAR2/
+     *       AMASS(-20:MCNUM), CHARGE(-20:MCNUM), CTAU(-20:MCNUM),
+     *       SPIN(-20:MCNUM),
+     *       RWIDTH(-20:MCNUM), RMASMN(-20:MCNUM), RMASMX(-20:MCNUM),
+     *       RMIXPP(-20:MCNUM), RCPMIX(-20:MCNUM)
+
+
+#if defined(CLEO_CDGDOC)
+*  INVMC      List of particle codes for stable particle (Inverse of IDMC)
+#endif
+      INTEGER INVMC
+      COMMON/QQPAR3/
+     *       INVMC(0:MCSTBL)
+
+
+#if defined(CLEO_CDGDOC)
+*  NPOLQQ     Number of polarized decays
+*  IPOLQQ     List of daughter particles
+#endif
+      INTEGER NPOLQQ, IPOLQQ
+      COMMON/QQPAR4/
+     *       NPOLQQ, IPOLQQ(5,MPOLQQ)
+
+
+#if defined(CLEO_CDGDOC)
+*  QNAME      qqbar names (37th is generic qqbar)
+*  PNAME      Particle names
+#endif
+      CHARACTER QNAME*10, PNAME*10
+      COMMON/QQPAR5/
+     *       QNAME(37), PNAME(-20:MCNUM)
+      CHARACTER*10 PNAMEA(MCNUM1)
+      EQUIVALENCE (PNAME(-20), PNAMEA)
+
+*
diff -uNr stdhep.ORIG/src/inc/qqtrak.inc stdhep/src/inc/qqtrak.inc
--- stdhep.ORIG/src/inc/qqtrak.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqtrak.inc	Thu Feb  5 15:55:16 2004
@@ -0,0 +1,100 @@
+*
+* $Id: qqtrak.inc,v 1.2 1995/04/25 13:58:08 zfiles Exp $
+*
+* $Log: qqtrak.inc,v $
+* Revision 1.2  1995/04/25 13:58:08  zfiles
+* New variable XANGQQ and IDKMEC
+*
+* Revision 1.1  1994/10/07  23:57:40  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 03/10/94  17.34.24  by  Paul Avery
+*CMZ :          08/10/93  10.27.51  by  Paul Avery
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                         QQTRAK.INC
+*
+*                     QQ generated tracks
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*
+#if defined(CLEO_CDGDOC)
+C   Contains the list of generated particles in an event and their decay
+C   history. The vertex information is stored in QQVRTX.INC.
+C
+C   For unstable particles there are pointers which tell where in the list
+C   the first daughter appears (IDAUTV) and how many daughters there are
+C   (NDAUTV). Conversely, for each daughter there is a pointer which
+C   tells which particle in the list is its parent (IPRNTV).
+C
+C   NTRKMC is the length of the list. If only QQ is run, then
+C   NTRKMC = NTRKQQ. If a user so chooses, particles like pions,
+C   kaons and muons can decay further and augment the particle list
+C   (when particles decay they always put their decay products at
+C   the end of the list) so that NTRKMC > NTRKQQ. Likewise,
+C   NSTBMC >= NSTBQQ and NCHGMC >= NCHGQQ.
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+*
+*  NTRKMC              # particles in track list
+*  NTRKQQ              # particles generated by QQ
+*  NSTBMC              # stable particles in track list
+*  NSTBQQ              # stable particles generated by QQ
+*  NCHGMC              # charged stable particles in track list
+*  NCHGQQ              # charged stable particles gen. by QQ
+*
+*  IPRNTV(IT)          Position of parent in track list
+*  ITYPEV(IT,2)        ITYPEV(IT,1) = QQ particle ID code
+*                      ITYPEV(IT,2) = QQ stable particle code
+*  IDECSV(IT)          Decay channel of particle (0=no decay)
+*  NDAUTV(IT)          # daughters of particle
+*  IDAUTV(IT)          Position of first daughter in track list
+*  IVPROD(IT)          Production vertex of particle
+*  IVDECA(IT)          Decay vertex of particle (0 if stable)
+*  ISTBMC(IT)          Position in stable particle list IDSTBL
+*  IDKMEC(IT)          How particle is decayed (filled in CLEOG)
+*  PSAV(IT,4)          4-momentum of particle
+*  P4QQ(4,IT)          4-momentum with swapped indices (same as PSAV)
+*  HELCQQ(IT)          Helicity of particle
+#endif
+
+      INTEGER IPRNTV, ITYPEV, IDECSV, IDAUTV
+      INTEGER ISTBMC, NDAUTV, IDKMEC
+      INTEGER IVPROD, IVDECA
+      INTEGER NTRKMC, NTRKQQ, NSTBMC, NSTBQQ, NCHGMC, NCHGQQ
+      COMMON/QQTRK1/
+     *   NTRKMC, NTRKQQ, NSTBMC, NSTBQQ, NCHGMC, NCHGQQ,
+     *   IPRNTV(MCTRK), ITYPEV(MCTRK,2),
+     *   IDECSV(MCTRK), IDAUTV(MCTRK), NDAUTV(MCTRK),
+     *   IVPROD(MCTRK), IVDECA(MCTRK), ISTBMC(MCTRK), IDKMEC(MCTRK)
+
+      REAL PSAV, P4QQ, HELCQQ
+      COMMON/QQTRK2/
+     *   PSAV(MCTRK,4), P4QQ(4,MCTRK), HELCQQ(MCTRK)
+
+
+#if defined(CLEO_CDGDOC)
+C
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+C   The stable particles in the full particle list have an entry in the
+C   stable particle list IDSTBL (of length NSTBMC). IDSTBL and ISTBMC are
+C   inverses of each other:
+C    I = IDSTBL(J) ==> pos. in full track list of stable particle J
+C    J = ISTBMC(I) ==> pos. in stable track list of particle I (0 if unstable)
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+*
+*  IDSTBL            Stable particle list (inverse of ISTBMC)
+#endif
+      INTEGER IDSTBL
+      COMMON/QQTRK3/
+     *   IDSTBL(MCSTAB)
+
+#if defined(CLEO_CDGDOC)
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+C      The following equivalence statements allow people to use their
+C   old Fortran code with minimum disruption.
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+#endif
+      INTEGER IFINAL(MCTRK), IFINSV(MCSTAB), NFINAL
+      EQUIVALENCE (IFINAL,ISTBMC), (IFINSV,IDSTBL), (NFINAL,NSTBMC)
+
diff -uNr stdhep.ORIG/src/inc/qqvrtx.inc stdhep/src/inc/qqvrtx.inc
--- stdhep.ORIG/src/inc/qqvrtx.inc	Thu Jan  1 09:00:00 1970
+++ stdhep/src/inc/qqvrtx.inc	Thu Feb  5 15:55:28 2004
@@ -0,0 +1,61 @@
+*
+* $Id: qqvrtx.inc,v 1.2 1999/04/16 15:45:05 clib Exp $
+*
+* $Log: qqvrtx.inc,v $
+* Revision 1.2  1999/04/16 15:45:05  clib
+* Correct comments about variable TVTX(djaffe)
+*
+* Revision 1.1  1994/10/07 23:57:40  zfiles
+* New include files for QQ.
+*
+*
+*CMZ :  1.02/61 04/10/94  17.22.38  by  Paul Avery
+*CMZ :  1.03/70 15/10/93  08.44.26  by  Paul Avery
+*CMZ :          08/10/93  16.00.06  by  Paul Avery
+*>> Author :
+*
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+*                         QQVRTX.INC
+*
+*                       QQ vertex list
+*  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+#if defined(CLEO_CDGDOC)
+C   Contains a list of vertices. When a particle decays, is absorbed
+C   or converts to e+e- a new vertex is created. Various pointers
+C   relate the vertex list to the full particle list in QQTRAK.INC.
+C
+C   VPROD(IT) is the vertex at which particle IT was produced while
+C   IVDECA(IT) is the vertex at which particle IT either decayed, was
+C   absorbed or converted, or 0 if nothing happened. Conversely,
+C   ITRKIN(IV) is the incoming track to vertex IV or 0 if IV = 1 (the
+C   production vertex has no incoming track). ITRKOU(IV) is the first
+C   outgoing track from vertex IV or 0 if the track is absorbed.
+C
+C    Previous description of TVTX was inconsistent with the code. 
+C   The 'decay time' of particle IT is given by TVTX(IT) - TVTX(IP) 
+C   where IP is the parent of IT. TVTX is filled in subroutines 
+C   DECADL and DECADD if you want to see for yourself. (d.jaffe 4mar99)
+C
+C  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-
+C
+*  NVRTX      # vertices
+*  XVTX       X,Y,Z of vertex in meters
+*  TVTX       TOTAL decay time in picoseconds
+*  RVTX       SQRT(X**2 + Y**2)
+*  ITRKIN     Pos. in track list of incoming trk
+*  NTRKOU     # outgoing tracks
+*  ITRKOU     Position in track list of 1st outgoing track
+*  IVKODE     (1=decay, 2=absorbed, 3=photon conv.)
+#endif
+
+      INTEGER NVRTX
+      COMMON/QQVRT1/
+     *   NVRTX
+
+      REAL XVTX, TVTX, RVTX
+      INTEGER ITRKIN, NTRKOU, ITRKOU, IVKODE
+      COMMON/QQVRT2/
+     *   XVTX(MCVRTX,3), TVTX(MCVRTX), RVTX(MCVRTX),
+     *   ITRKIN(MCVRTX), NTRKOU(MCVRTX), ITRKOU(MCVRTX),
+     *   IVKODE(MCVRTX)
+C
