Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyi3au.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyi3au.f
1 
2 C***********************************************************************
3 
4 C...PYI3AU
5 C...Calculates real and imaginary parts of the auxiliary function I3;
6 C...see R. K. Ellis, I. Hinchliffe, M. Soldate and J. J. van der Bij,
7 C...Nucl. Phys. B297 (1988) 221.
8 
9  SUBROUTINE pyi3au(EPS,RAT,Y3RE,Y3IM)
10 
11 C...Double precision and integer declarations.
12  IMPLICIT DOUBLE PRECISION(a-h, o-z)
13  IMPLICIT INTEGER(i-n)
14  INTEGER pyk,pychge,pycomp
15 C...Commonblocks.
16  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
17  SAVE /pydat1/
18 
19  be=0.5d0*(1d0+sqrt(1d0+rat*eps))
20  IF(eps.LT.1d0) ga=0.5d0*(1d0+sqrt(1d0-eps))
21 
22  IF(eps.LT.0d0) THEN
23  IF(abs(eps).LT.1d-4.AND.abs(rat*eps).LT.1d-4) THEN
24  f3re=pyspen(-0.25d0*eps/(1d0+0.25d0*(rat-1d0)*eps),0d0,1)-
25  & pyspen((1d0-0.25d0*eps)/(1d0+0.25d0*(rat-1d0)*eps),0d0,1)+
26  & pyspen(0.25d0*(rat+1d0)*eps/(1d0+0.25d0*rat*eps),0d0,1)-
27  & pyspen((rat+1d0)/rat,0d0,1)+0.5d0*(log(1d0+0.25d0*rat*eps)**2-
28  & log(0.25d0*rat*eps)**2)+log(1d0-0.25d0*eps)*
29  & log((1d0+0.25d0*(rat-1d0)*eps)/(1d0+0.25d0*rat*eps))+
30  & log(-0.25d0*eps)*log(0.25d0*rat*eps/(1d0+0.25d0*(rat-1d0)*
31  & eps))
32  ELSEIF(abs(eps).LT.1d-4.AND.abs(rat*eps).GE.1d-4) THEN
33  f3re=pyspen(-0.25d0*eps/(be-0.25d0*eps),0d0,1)-
34  & pyspen((1d0-0.25d0*eps)/(be-0.25d0*eps),0d0,1)+
35  & pyspen((be-1d0+0.25d0*eps)/be,0d0,1)-
36  & pyspen((be-1d0+0.25d0*eps)/(be-1d0),0d0,1)+
37  & 0.5d0*(log(be)**2-log(be-1d0)**2)+
38  & log(1d0-0.25d0*eps)*log((be-0.25d0*eps)/be)+
39  & log(-0.25d0*eps)*log((be-1d0)/(be-0.25d0*eps))
40  ELSEIF(abs(eps).GE.1d-4.AND.abs(rat*eps).LT.1d-4) THEN
41  f3re=pyspen((ga-1d0)/(ga+0.25d0*rat*eps),0d0,1)-
42  & pyspen(ga/(ga+0.25d0*rat*eps),0d0,1)+
43  & pyspen((1d0+0.25d0*rat*eps-ga)/(1d0+0.25d0*rat*eps),0d0,1)-
44  & pyspen((1d0+0.25d0*rat*eps-ga)/(0.25d0*rat*eps),0d0,1)+
45  & 0.5d0*(log(1d0+0.25d0*rat*eps)**2-log(0.25d0*rat*eps)**2)+
46  & log(ga)*log((ga+0.25d0*rat*eps)/(1d0+0.25d0*rat*eps))+
47  & log(ga-1d0)*log(0.25d0*rat*eps/(ga+0.25d0*rat*eps))
48  ELSE
49  f3re=pyspen((ga-1d0)/(ga+be-1d0),0d0,1)-
50  & pyspen(ga/(ga+be-1d0),0d0,1)+pyspen((be-ga)/be,0d0,1)-
51  & pyspen((be-ga)/(be-1d0),0d0,1)+0.5d0*(log(be)**2-
52  & log(be-1d0)**2)+log(ga)*log((ga+be-1d0)/be)+
53  & log(ga-1d0)*log((be-1d0)/(ga+be-1d0))
54  ENDIF
55  f3im=0d0
56  ELSEIF(eps.LT.1d0) THEN
57  IF(abs(eps).LT.1d-4.AND.abs(rat*eps).LT.1d-4) THEN
58  f3re=pyspen(-0.25d0*eps/(1d0+0.25d0*(rat-1d0)*eps),0d0,1)-
59  & pyspen((1d0-0.25d0*eps)/(1d0+0.25d0*(rat-1d0)*eps),0d0,1)+
60  & pyspen((1d0-0.25d0*eps)/(-0.25d0*(rat+1d0)*eps),0d0,1)-
61  & pyspen(1d0/(rat+1d0),0d0,1)+log((1d0-0.25d0*eps)/
62  & (0.25d0*eps))*log((1d0+0.25d0*(rat-1d0)*eps)/
63  & (0.25d0*(rat+1d0)*eps))
64  f3im=-paru(1)*log((1d0+0.25d0*(rat-1d0)*eps)/
65  & (0.25d0*(rat+1d0)*eps))
66  ELSEIF(abs(eps).LT.1d-4.AND.abs(rat*eps).GE.1d-4) THEN
67  f3re=pyspen(-0.25d0*eps/(be-0.25d0*eps),0d0,1)-
68  & pyspen((1d0-0.25d0*eps)/(be-0.25d0*eps),0d0,1)+
69  & pyspen((1d0-0.25d0*eps)/(1d0-0.25d0*eps-be),0d0,1)-
70  & pyspen(-0.25d0*eps/(1d0-0.25d0*eps-be),0d0,1)+
71  & log((1d0-0.25d0*eps)/(0.25d0*eps))*
72  & log((be-0.25d0*eps)/(be-1d0+0.25d0*eps))
73  f3im=-paru(1)*log((be-0.25d0*eps)/(be-1d0+0.25d0*eps))
74  ELSEIF(abs(eps).GE.1d-4.AND.abs(rat*eps).LT.1d-4) THEN
75  f3re=pyspen((ga-1d0)/(ga+0.25d0*rat*eps),0d0,1)-
76  & pyspen(ga/(ga+0.25d0*rat*eps),0d0,1)+
77  & pyspen(ga/(ga-1d0-0.25d0*rat*eps),0d0,1)-
78  & pyspen((ga-1d0)/(ga-1d0-0.25d0*rat*eps),0d0,1)+
79  & log(ga/(1d0-ga))*log((ga+0.25d0*rat*eps)/
80  & (1d0+0.25d0*rat*eps-ga))
81  f3im=-paru(1)*log((ga+0.25d0*rat*eps)/
82  & (1d0+0.25d0*rat*eps-ga))
83  ELSE
84  f3re=pyspen((ga-1d0)/(ga+be-1d0),0d0,1)-
85  & pyspen(ga/(ga+be-1d0),0d0,1)+pyspen(ga/(ga-be),0d0,1)-
86  & pyspen((ga-1d0)/(ga-be),0d0,1)+log(ga/(1d0-ga))*
87  & log((ga+be-1d0)/(be-ga))
88  f3im=-paru(1)*log((ga+be-1d0)/(be-ga))
89  ENDIF
90  ELSE
91  rsq=eps/(eps-1d0+(2d0*be-1d0)**2)
92  rcthe=rsq*(1d0-2d0*be/eps)
93  rsthe=sqrt(max(0d0,rsq-rcthe**2))
94  rcphi=rsq*(1d0+2d0*(be-1d0)/eps)
95  rsphi=sqrt(max(0d0,rsq-rcphi**2))
96  r=sqrt(rsq)
97  the=acos(max(-0.999999d0,min(0.999999d0,rcthe/r)))
98  phi=acos(max(-0.999999d0,min(0.999999d0,rcphi/r)))
99  f3re=pyspen(rcthe,rsthe,1)+pyspen(rcthe,-rsthe,1)-
100  & pyspen(rcphi,rsphi,1)-pyspen(rcphi,-rsphi,1)+
101  & (phi-the)*(phi+the-paru(1))
102  f3im=pyspen(rcthe,rsthe,2)+pyspen(rcthe,-rsthe,2)-
103  & pyspen(rcphi,rsphi,2)-pyspen(rcphi,-rsphi,2)
104  ENDIF
105 
106  y3re=2d0/(2d0*be-1d0)*f3re
107  y3im=2d0/(2d0*be-1d0)*f3im
108 
109  RETURN
110  END