* * $Id$ * * $Log$ * Revision 1.1 2000/06/19 20:00:33 eugenio * Initial revision * * Revision 1.1.1.1 1994/10/08 02:21:35 zfiles * first version of qqlib in CVS * * #include "sys/CLEO_machine.h" #include "pilot.h" *CMZ : 1.03/20 12/08/91 11.33.01 by R.A.FULTON *CMZ : 1.03/15 25/04/91 18.09.48 by R.A.FULTON *-- Author : R.A.FULTON SUBROUTINE GGGEN1 C******************************************************************* #include "qqlib/gggseq/ggconst.inc" #include "qqlib/gggseq/ggmodl.inc" #include "qqlib/gggseq/ggprms.inc" #include "qqlib/gggseq/ggcombo.inc" #include "qqlib/gggseq/sintag.inc" #include "qqlib/gggseq/wgtsum.inc" #include "qqlib/gggseq/fragmt.inc" #include "qqlib/gggseq/ggcos.inc" #include "geant/gcdes/ludat1.inc" #include "qqlib/seq/ludat2.inc" #include "geant/gcdes/ludat3.inc" #include "qqlib/gggseq/genarg.inc" INTEGER ICALL, I, KINT REAL QTOTS, EMM, SINV, PHI1, XX, DUM REAL ECHR, ENEU, RENER, SPROB, SCORR REAL CMSSQ, QPROD, RWHT, RMAX, RWGT, RHWL, ZZZ REAL GCM4V(4), Q14V(4), Q24V(4) DOUBLE PRECISION W1,CMP,CMBET,CMBSQ,CMCOS,CMCSQ, +A2,B2,C2,CMAXSQ,D,DPAIR,DRAN,DROOT2,WGTMAX,WGT DOUBLE PRECISION WGT1,WGT2,WGT3,WGT4,WGT5,WGT6,WGT7,WGTT, +H1,H2,H1H1,H1H2,H2H2, +EFAC,QRKS,PQ1,PQ2,P1Q1,P1Q2,P2Q1,P2Q2,Q1Q2,PTPT, +QQ1,QQ2,P1E0,P2E0,Q2E0 DOUBLE PRECISION A3, B3, C3, TERM1, TERM2, RATIO, DRAN2 REAL COSDIF C..EXTERNAL:: INTEGER LUCOMP REAL RANP, GGDK EXTERNAL LUCOMP, RANP, GGDK DATA DROOT2/1.4142136D00/ DATA ICALL/0/ C********************************************************** 1 ICALL = ICALL + 1 C QTOTS=0.0 DO 6 KINT=1,3 GCM4V(KINT) = G14V(KINT) + G24V(KINT) QTOTS = QTOTS + GCM4V(KINT)**2 6 CONTINUE GCM4V(4) = G14V(4)+G24V(4) EMM = GCM4V(4)**2 - QTOTS IF(EMM.LT.0.00000001)EMM=0.00000001 EMM = SQRT(EMM) DPAIR = PAIR2G QRKS = DPAIR**2 16 W1 = .5*SQRT(W2G) CMP = W1**2 - DPAIR**2 IF (CMP .LE. 0.) THEN CMP = 0. ITERS = ITERS + 1 WSUM = WSUM - WGTVAL WSUMSQ = WSUMSQ - WGTVAL**2 GOTO 1 ELSE CMP = DSQRT(CMP) ENDIF CMBET = CMP/W1 CMBSQ = CMBET**2 PQ1=G14V(1)**2+G14V(2)**2+G14V(3)**2 PQ2=G24V(1)**2+G24V(2)**2+G24V(3)**2 Q1Q2=G14V(4)*G24V(4)-G14V(1)*G24V(1)-G14V(2)*G24V(2) +-G14V(3)*G24V(3) QQ1=G14V(4)**2-PQ1-(XME*G14V(4)/EPB1)**2/(1.-G14V(4)/EPB1) QQ2=G24V(4)**2-PQ2-(XME*G24V(4)/EPB2)**2/(1.-G24V(4)/EPB2) IF(QQ1.GT.0.0)QQ1=-(XME*G14V(4)/EPB1)**2/(1.-G14V(4)/EPB1) IF(QQ2.GT.0.0)QQ2=-(XME*G24V(4)/EPB2)**2/(1.-G24V(4)/EPB2) C this is to boost gammas to gamma-gamma cms and get invariants GCM4V(1)=G14V(1) + G24V(1) GCM4V(2)=G14V(2) + G24V(2) GCM4V(3)=G14V(3) + G24V(3) GCM4V(4)=G14V(4) + G24V(4) C QPROD = GCM4V(1)*G14V(1) + GCM4V(2)*G14V(2) + GCM4V(3)*G14V(3) ZZZ=(GCM4V(4)*G14V(4)-QPROD)/EMM Q14V(4) = ZZZ ZZZ = (ZZZ + G14V(4))/(GCM4V(4) + EMM) DO 43 KINT=1,3 Q14V(KINT)=G14V(KINT)-ZZZ*GCM4V(KINT) 43 CONTINUE QPROD=GCM4V(1)*G24V(1) + GCM4V(2)*G24V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