~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to HELAS/jiodmx.F

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine jiodmx(fi,fo,gc,vmass,vwidth , jio)
 
2
c
 
3
c This subroutine computes an off-shell vector dipole moment
 
4
c (non-renormalizable) current from an external
 
5
c fermion pair.  The vector boson propagator is given in Feynman gauge
 
6
c for a massless vector and in unitary gauge for a massive vector.
 
7
c
 
8
c input:
 
9
c       complex fi(6)          : flow-in  fermion                   |fi>
 
10
c       complex fo(6)          : flow-out fermion                   <fo|
 
11
c       complex gc(2,2)        : coupling constants                 gvf
 
12
c                              : first index is L,R as normal
 
13
c                              : second index is EDM,-MDM
 
14
c       real    vmass          : mass  of output vector v
 
15
c       real    vwidth         : width of output vector v
 
16
c
 
17
c output:
 
18
c       complex jio(6)         : vector current          j^mu(<fo|v|fi>)
 
19
c
 
20
      implicit none
 
21
      double complex fi(6), fo(6), jio(6), c0, c1, c2, c3, d
 
22
      double complex gc(2,2), gL, gR
 
23
      double precision  q(0:3), vmass, vwidth, q2, vm2, dd
 
24
 
 
25
      double complex f1122, f12, f21, f12p21, f12m21
 
26
      double complex f3344, f34, f43, f34p43, f34m43
 
27
      double complex dumL1, dumL2, dumL3, dumL4
 
28
      double complex dumR1, dumR2, dumR3, dumR4
 
29
      double precision rZero, rOne
 
30
      parameter( rZero = 0.0d0, rOne = 1.0d0 )
 
31
      double complex cImag, cZero
 
32
      parameter( cImag = ( 0.0d0, 1.0d0 ), cZero = ( 0.0d0, 0.0d0 ) )
 
33
 
 
34
#ifdef HELAS_CHECK
 
35
      integer stdo
 
36
      parameter( stdo = 6 )
 
37
#endif
 
38
c
 
39
#ifdef HELAS_CHECK
 
40
      if ( abs(fi(1))+abs(fi(2))+abs(fi(3))+abs(fi(4)).eq.rZero ) then
 
41
         write(stdo,*) ' helas-warn  : fi in jiodmx is zero spinor'
 
42
      endif
 
43
      if ( abs(fi(5))+abs(fi(6)).eq.rZero ) then
 
44
         write(stdo,*)
 
45
     &        ' helas-error : fi in jiodmx has zero momentum'
 
46
      endif
 
47
      if ( abs(fo(1))+abs(fo(2))+abs(fo(3))+abs(fo(4)).eq.rZero ) then
 
48
         write(stdo,*) ' helas-warn  : fo in jiodmx is zero spinor'
 
49
      endif
 
50
      if ( abs(fo(5))+abs(fo(6)).eq.rZero ) then
 
51
         write(stdo,*)
 
52
     &        ' helas-error : fo in jiodmx has zero momentum'
 
53
      endif
 
54
      if ( gc(1,1).eq.cZero .and. gc(2,1).eq.cZero .and.
 
55
     &     gc(1,2).eq.cZero .and. gc(2,2).eq.cZero      ) then
 
56
         write(stdo,*)
 
57
     &        ' helas-error : gc in jiodmx is zero coupling'
 
58
      endif
 
59
      if ( vmass.lt.rZero ) then
 
60
         write(stdo,*) ' helas-error : vmass in jiodmx is negative'
 
61
         write(stdo,*) '             : vmass = ',vmass
 
62
      endif
 
63
      if ( vwidth.lt.rZero ) then
 
64
         write(stdo,*) ' helas-error : vwidth in jiodmx is negative'
 
65
         write(stdo,*) '             : vwidth = ',vwidth
 
66
      endif
 
67
#endif
 
68
 
 
69
      gL = -gc(1,1) + cImag*gc(1,2)
 
70
      gR =  gc(2,1) + cImag*gc(2,2)
 
71
 
 
72
      jio(5) = fo(5) - fi(5)
 
73
      jio(6) = fo(6) - fi(6)
 
74
 
 
75
      q(0) = dble( jio(5))
 
76
      q(1) = dble( jio(6))
 
77
      q(2) = dimag(jio(6))
 
78
      q(3) = dimag(jio(5))
 
79
      q2 = q(0)**2-(q(1)**2+q(2)**2+q(3)**2)
 
80
      vm2 = vmass**2
 
81
 
 
82
#ifdef HELAS_CHECK
 
83
      if ( abs(jio(5))+abs(jio(6)).eq.rZero ) then
 
84
         write(stdo,*)
 
85
     &        ' helas-error : jio in jiodmx has zero momentum'
 
86
      endif
 
87
      if ( vwidth.eq.rZero .and. q2.eq.vm2 ) then
 
88
         write(stdo,*)
 
89
     &        ' helas-error : jio in jiodmxq is on vmass pole'
 
90
         write(stdo,*)
 
91
     &        '             : q     = ',q(0),q(1),q(2),q(3)
 
92
         write(stdo,*)
 
93
     &        '             : abs(q)= ',sqrt(abs(q2))
 
94
         jio(1) = cZero
 
95
         jio(2) = cZero
 
96
         jio(3) = cZero
 
97
         jio(4) = cZero
 
98
         return
 
99
      endif
 
100
#endif
 
101
 
 
102
      f1122  = fo(1)*fi(1) - fo(2)*fi(2)
 
103
      f12    = fo(1)*fi(2)
 
104
      f21    = fo(2)*fi(1)
 
105
      f12p21 = f12 + f21
 
106
      f12m21 = f12 - f21
 
107
      if ( gc(2,1).ne.cZero .or. gc(2,2).ne.cZero ) then
 
108
         f3344  = fo(3)*fi(3) - fo(4)*fi(4)
 
109
         f34    = fo(3)*fi(4)
 
110
         f43    = fo(4)*fi(3)
 
111
         f34p43 = f34 + f43
 
112
         f34m43 = f34 - f43
 
113
      end if
 
114
 
 
115
c note overall (-), since k in vertex is -q above
 
116
      dumL1 = -q(2)*f12m21 - cImag*( q(1)*f12p21 + q(3)*f1122 )
 
117
      dumL2 =  q(2)*f1122  - cImag*( q(0)*f12p21 - q(3)*f12m21 )
 
118
      dumL3 = -q(0)*f12m21 - q(1)*f1122 - q(3)*f12p21
 
119
      dumL4 = -q(2)*f12p21 - cImag*( q(0)*f1122  + q(1)*f12m21 )
 
120
      if ( gc(2,1).ne.cZero .or. gc(2,2).ne.cZero ) then
 
121
         dumR1 =  q(2)*f34m43 + cImag*( q(1)*f34p43 + q(3)*f3344 )
 
122
         dumR2 =  q(2)*f3344  + cImag*( q(0)*f34p43 + q(3)*f34m43 )
 
123
         dumR3 =  q(0)*f34m43 - q(1)*f3344 - q(3)*f34p43
 
124
         dumR4 = -q(2)*f34p43 + cImag*( q(0)*f3344  - q(1)*f34m43 )
 
125
      end if
 
126
 
 
127
      if ( vmass.ne.rZero ) then
 
128
 
 
129
         d = rOne/dcmplx( q2-vm2, vmass*vwidth )
 
130
 
 
131
         c0 = gL*dumL1
 
132
         c1 = gL*dumL2
 
133
         c2 = gL*dumL3
 
134
         c3 = gL*dumL4
 
135
 
 
136
         if ( gc(2,1).ne.cZero .or.
 
137
     &        gc(2,2).ne.cZero      ) then
 
138
            c0 = c0 + gR*dumR1
 
139
            c1 = c1 + gR*dumR2
 
140
            c2 = c2 + gR*dumR3
 
141
            c3 = c3 + gR*dumR4
 
142
         end if
 
143
 
 
144
         jio(1) = c0*d
 
145
         jio(2) = c1*d
 
146
         jio(3) = c2*d
 
147
         jio(4) = c3*d
 
148
 
 
149
      else
 
150
 
 
151
         dd = rOne/q2
 
152
 
 
153
         jio(1) = gL*dumL1
 
154
         jio(2) = gL*dumL2
 
155
         jio(3) = gL*dumL3
 
156
         jio(4) = gL*dumL4
 
157
 
 
158
         if ( gc(2,1).ne.cZero .or.
 
159
     &        gc(2,2).ne.cZero      ) then
 
160
            jio(1) = jio(1) + gR*dumR1
 
161
            jio(2) = jio(2) + gR*dumR2
 
162
            jio(3) = jio(3) + gR*dumR3
 
163
            jio(4) = jio(4) + gR*dumR4
 
164
         end if
 
165
 
 
166
         jio(1) = jio(1)*dd
 
167
         jio(2) = jio(2)*dd
 
168
         jio(3) = jio(3)*dd
 
169
         jio(4) = jio(4)*dd
 
170
 
 
171
      end if
 
172
c
 
173
      return
 
174
      end