Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyldcm.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyldcm.f
1 
2 C*********************************************************************
3 
4 C...PYLDCM
5 C...Auxiliary to PYSIGH, for technicolor corrections to QCD 2 -> 2
6 C...processes.
7 
8  SUBROUTINE pyldcm(A,N,NP,INDX,D)
9  IMPLICIT NONE
10  INTEGER n,np,indx(n)
11  REAL*8 d,tiny
12  COMPLEX*16 a(np,np)
13  parameter(tiny=1.0d-20)
14  INTEGER i,imax,j,k
15  REAL*8 aamax,vv(6),dum
16  COMPLEX*16 sum,dumc
17 
18  d=1d0
19  DO 110 i=1,n
20  aamax=0d0
21  DO 100 j=1,n
22  IF (abs(a(i,j)).GT.aamax) aamax=abs(a(i,j))
23  100 CONTINUE
24  IF (aamax.EQ.0d0) CALL pyerrm(28,'(PYLDCM:) singular matrix')
25  vv(i)=1d0/aamax
26  110 CONTINUE
27  DO 180 j=1,n
28  DO 130 i=1,j-1
29  sum=a(i,j)
30  DO 120 k=1,i-1
31  sum=sum-a(i,k)*a(k,j)
32  120 CONTINUE
33  a(i,j)=sum
34  130 CONTINUE
35  aamax=0d0
36  DO 150 i=j,n
37  sum=a(i,j)
38  DO 140 k=1,j-1
39  sum=sum-a(i,k)*a(k,j)
40  140 CONTINUE
41  a(i,j)=sum
42  dum=vv(i)*abs(sum)
43  IF (dum.GE.aamax) THEN
44  imax=i
45  aamax=dum
46  ENDIF
47  150 CONTINUE
48  IF (j.NE.imax)THEN
49  DO 160 k=1,n
50  dumc=a(imax,k)
51  a(imax,k)=a(j,k)
52  a(j,k)=dumc
53  160 CONTINUE
54  d=-d
55  vv(imax)=vv(j)
56  ENDIF
57  indx(j)=imax
58  IF(abs(a(j,j)).EQ.0d0) a(j,j)=dcmplx(tiny,0d0)
59  IF(j.NE.n)THEN
60  DO 170 i=j+1,n
61  a(i,j)=a(i,j)/a(j,j)
62  170 CONTINUE
63  ENDIF
64  180 CONTINUE
65 
66  RETURN
67  END