JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
hto_acmplx_rat Module Reference

Data Types

interface  operator(.cq.)
 

Functions/Subroutines

real *8 function, dimension(2) cq (x, y)
 

Function/Subroutine Documentation

◆ cq()

real*8 function, dimension(2) hto_acmplx_rat::cq ( real*8, dimension(2), intent(in)  x,
real*8, dimension(2), intent(in)  y 
)

Definition at line 298 of file CALLING_cpHTO.f.

298  IMPLICIT NONE
299  real*8, dimension(2) :: cq,z1,z2
300  real*8, INTENT(IN), dimension(2) :: x,y
301  real*8 theta
302  IF(x(2).eq.0.d0.and.y(2).eq.0.d0) THEN
303  cq(1)= x(1)/y(1)
304  cq(2)= 0.d0
305  RETURN
306  ENDIF
307  IF(abs(x(2)).eq.1.d0.and.abs(y(2)).eq.1.d0) THEN
308  cq(1)= x(1)/y(1)
309  cq(2)= 0.d0
310  ELSE
311  IF(abs(x(2)).eq.1.d0) then
312  z1(1)= x(1)
313  z1(2)= 0.d0
314  z2(1)= y(1)
315  z2(2)= y(2)
316  ELSEIF(abs(y(2)).eq.1.d0) then
317  z1(1)= x(1)
318  z1(2)= x(2)
319  z2(1)= y(1)
320  z2(2)= 0.d0
321  ELSE
322  z1= x
323  z2= y
324  ENDIF
325  IF(abs(z2(1)) > abs(z2(2))) THEN
326  theta= z2(2)/z2(1)
327  cq(1)= (z1(1)+theta*z1(2))/(theta*z2(2)+z2(1))
328  cq(2)= (z1(2)-theta*z1(1))/(theta*z2(2)+z2(1))
329  ELSE
330  theta= z2(1)/z2(2)
331  cq(1)= (theta*z1(1)+z1(2))/(theta*z2(1)+z2(2))
332  cq(2)= (theta*z1(2)-z1(1))/(theta*z2(1)+z2(2))
333  ENDIF
334  ENDIF
hto_acmplx_rat::cq
real *8 function, dimension(2) cq(x, y)
Definition: CALLING_cpHTO.f:298