~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to HELAS/iovxxx.F

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine iovxxx(fi,fo,vc,gc , vertex)
 
2
c
 
3
c This subroutine computes an amplitude of the fermion-fermion-vector
 
4
c coupling.
 
5
c
 
6
c input:
 
7
c       complex fi(6)          : flow-in  fermion                   |fi>
 
8
c       complex fo(6)          : flow-out fermion                   <fo|
 
9
c       complex vc(6)          : input    vector                      v
 
10
c       complex gc(2)          : coupling constants                  gvf
 
11
c
 
12
c output:
 
13
c       complex vertex         : amplitude                     <fo|v|fi>
 
14
c     
 
15
      implicit none
 
16
      double complex fi(6),fo(6),gc(2),vc(6),vertex
 
17
 
 
18
      double precision rZero, rOne
 
19
      parameter( rZero = 0.0d0 )
 
20
      double complex cImag, cZero
 
21
      parameter( cImag = ( 0.0d0, 1.0d0 ), cZero = ( 0.0d0, 0.0d0 ) )
 
22
 
 
23
#ifdef HELAS_CHECK
 
24
      double precision p0,p1,p2,p3,q0,q1,q2,q3,r0,r1,r2,r3,pm
 
25
      double precision epsi
 
26
      parameter( epsi = 4.0d-5 )
 
27
      integer stdo
 
28
      parameter( stdo = 6 )
 
29
#endif
 
30
c
 
31
#ifdef HELAS_CHECK
 
32
      p0 = -dble( fi(5))
 
33
      p1 = -dble( fi(6))
 
34
      p2 = -dimag(fi(6))
 
35
      p3 = -dimag(fi(5))
 
36
      q0 = dble( fo(5))
 
37
      q1 = dble( fo(6))
 
38
      q2 = dimag(fo(6))
 
39
      q3 = dimag(fo(5))
 
40
      r0 = dble( vc(5))
 
41
      r1 = dble( vc(6))
 
42
      r2 = dimag(vc(6))
 
43
      r3 = dimag(vc(5))
 
44
      if ( abs(fi(1))+abs(fi(2))+abs(fi(3))+abs(fi(4)).eq.rZero ) then
 
45
         write(stdo,*) ' helas-warn  : fi in iovxxx is zero spinor'
 
46
      endif
 
47
      if ( abs(fi(5))+abs(fi(6)).eq.rZero ) then
 
48
         write(stdo,*)
 
49
     &        ' helas-error : fi in iovxxx has zero momentum'
 
50
      endif
 
51
      if ( abs(fo(1))+abs(fo(2))+abs(fo(3))+abs(fo(4)).eq.rZero ) then
 
52
         write(stdo,*) ' helas-warn  : fo in iovxxx is zero spinor'
 
53
      endif
 
54
      if ( abs(fo(5))+abs(fo(6)).eq.rZero ) then
 
55
         write(stdo,*)
 
56
     &        ' helas-error : fo in iovxxx has zero momentum'
 
57
      endif
 
58
      if ( abs(vc(1))+abs(vc(2))+abs(vc(3))+abs(vc(4)).eq.rZero ) then
 
59
         write(stdo,*) ' helas-warn  : vc in iovxxx is zero vector'
 
60
      endif
 
61
      if ( abs(vc(5))+abs(vc(6)).eq.rZero ) then
 
62
         write(stdo,*)
 
63
     &        ' helas-error : vc in iovxxx has zero momentum'
 
64
      endif
 
65
      pm = max( abs(p0),abs(q0),abs(r0),abs(p1),abs(q1),abs(r1),
 
66
     &          abs(p2),abs(q2),abs(r2),abs(p3),abs(q3),abs(r3) )
 
67
      if ( abs(-fi(5)+fo(5)+vc(5))+abs(-fi(6)+fo(6)+vc(6))
 
68
     &                                              .ge.pm*epsi ) then
 
69
         write(stdo,*)
 
70
     &        ' helas-error : fi,fo,vc in iovxxx'
 
71
         write(stdo,*)
 
72
     &        '                        have not balanced momenta'
 
73
      endif
 
74
      if ( gc(1).eq.cZero .and. gc(2).eq.cZero ) then
 
75
         write(stdo,*) ' helas-error : gc in iovxxx is zero coupling'
 
76
      endif
 
77
#endif
 
78
 
 
79
      vertex =  gc(1)*( (fo(3)*fi(1)+fo(4)*fi(2))*vc(1)
 
80
     &                 +(fo(3)*fi(2)+fo(4)*fi(1))*vc(2)
 
81
     &                 -(fo(3)*fi(2)-fo(4)*fi(1))*vc(3)*cImag
 
82
     &                 +(fo(3)*fi(1)-fo(4)*fi(2))*vc(4)        )
 
83
 
 
84
      if ( gc(2).ne.cZero ) then
 
85
         vertex = vertex
 
86
     &          + gc(2)*( (fo(1)*fi(3)+fo(2)*fi(4))*vc(1)
 
87
     &                   -(fo(1)*fi(4)+fo(2)*fi(3))*vc(2)
 
88
     &                   +(fo(1)*fi(4)-fo(2)*fi(3))*vc(3)*cImag
 
89
     &                   -(fo(1)*fi(3)-fo(2)*fi(4))*vc(4)        )
 
90
      end if
 
91
c
 
92
      return
 
93
      end