1
C###############################################################################
3
C Copyright (c) 2010 The ALOHA Development team and Contributors
5
C This file is a part of the MadGraph 5 project, an application which
6
C automatically generates Feynman diagrams and matrix elements for arbitrary
7
C high-energy processes in the Standard Model and beyond.
9
C It is subject to the ALOHA license which should accompany this
12
C###############################################################################
13
subroutine ixxxxx(p, fmass, nhel, nsf ,fi)
15
c This subroutine computes a fermion wavefunction with the flowing-IN
19
c real p(0:3) : four-momentum of fermion
20
c real fmass : mass of fermion
21
c integer nhel = -1 or 1 : helicity of fermion
22
c integer nsf = -1 or 1 : +1 for particle, -1 for anti-particle
25
c complex fi(6) : fermion wavefunction |fi>
28
double complex fi(6),chi(2)
29
double precision p(0:3),sf(2),sfomeg(2),omega(2),fmass,
30
& pp,pp3,sqp0p3,sqm(0:1)
31
integer nhel,nsf,ip,im,nh
33
double precision rZero, rHalf, rTwo
34
parameter( rZero = 0.0d0, rHalf = 0.5d0, rTwo = 2.0d0 )
38
c double precision epsi
39
c parameter( epsi = 2.0d-5 )
41
c parameter( stdo = 6 )
45
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
46
c if ( abs(p(0))+pp.eq.rZero ) then
48
c & ' helas-error : p(0:3) in ixxxxx is zero momentum'
50
c if ( p(0).le.rZero ) then
52
c & ' helas-error : p(0:3) in ixxxxx has non-positive energy'
56
c p2 = (p(0)-pp)*(p(0)+pp)
57
c if ( abs(p2-fmass**2).gt.p(0)**2*epsi ) then
59
c & ' helas-error : p(0:3) in ixxxxx has inappropriate mass'
61
c & ' : p**2 = ',p2,' : fmass**2 = ',fmass**2
63
c if (abs(nhel).ne.1) then
64
c write(stdo,*) ' helas-error : nhel in ixxxxx is not -1,1'
65
c write(stdo,*) ' : nhel = ',nhel
67
c if (abs(nsf).ne.1) then
68
c write(stdo,*) ' helas-error : nsf in ixxxxx is not -1,1'
69
c write(stdo,*) ' : nsf = ',nsf
73
fi(1) = dcmplx(p(0),p(3))*nsf*-1
74
fi(2) = dcmplx(p(1),p(2))*nsf*-1
78
if ( fmass.ne.rZero ) then
80
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
82
if ( pp.eq.rZero ) then
84
sqm(0) = dsqrt(abs(fmass)) ! possibility of negative fermion masses
85
sqm(1) = sign(sqm(0),fmass) ! possibility of negative fermion masses
90
fi(4) = im*nsf * sqm(ip)
91
fi(5) = ip*nsf * sqm(im)
96
sf(1) = dble(1+nsf+(1-nsf)*nh)*rHalf
97
sf(2) = dble(1+nsf-(1-nsf)*nh)*rHalf
98
omega(1) = dsqrt(p(0)+pp)
99
omega(2) = fmass/omega(1)
102
sfomeg(1) = sf(1)*omega(ip)
103
sfomeg(2) = sf(2)*omega(im)
104
pp3 = max(pp+p(3),rZero)
105
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
106
if ( pp3.eq.rZero ) then
107
chi(2) = dcmplx(-nh )
109
chi(2) = dcmplx( nh*p(1) , p(2) )/dsqrt(rTwo*pp*pp3)
112
fi(3) = sfomeg(1)*chi(im)
113
fi(4) = sfomeg(1)*chi(ip)
114
fi(5) = sfomeg(2)*chi(im)
115
fi(6) = sfomeg(2)*chi(ip)
121
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
124
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsf
126
chi(1) = dcmplx( sqp0p3 )
127
if ( sqp0p3.eq.rZero ) then
128
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
130
chi(2) = dcmplx( nh*p(1), p(2) )/sqp0p3
133
fi(3) = dcmplx( rZero )
134
fi(4) = dcmplx( rZero )
140
fi(5) = dcmplx( rZero )
141
fi(6) = dcmplx( rZero )
149
subroutine ixxxso(p, fmass, nhel, nsf ,fi)
150
c Identical to ixxxxx, except that fi returns only the spinor (without the momentum)
152
double complex fi(4),chi(2)
153
double precision p(0:3),sf(2),sfomeg(2),omega(2),fmass,
154
& pp,pp3,sqp0p3,sqm(0:1)
155
integer nhel,nsf,ip,im,nh
157
double precision rZero, rHalf, rTwo
158
parameter( rZero = 0.0d0, rHalf = 0.5d0, rTwo = 2.0d0 )
161
c double precision p2
162
c double precision epsi
163
c parameter( epsi = 2.0d-5 )
165
c parameter( stdo = 6 )
169
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
170
c if ( abs(p(0))+pp.eq.rZero ) then
172
c & ' helas-error : p(0:3) in ixxxxx is zero momentum'
174
c if ( p(0).le.rZero ) then
176
c & ' helas-error : p(0:3) in ixxxxx has non-positive energy'
178
c & ' : p(0) = ',p(0)
180
c p2 = (p(0)-pp)*(p(0)+pp)
181
c if ( abs(p2-fmass**2).gt.p(0)**2*epsi ) then
183
c & ' helas-error : p(0:3) in ixxxxx has inappropriate mass'
185
c & ' : p**2 = ',p2,' : fmass**2 = ',fmass**2
187
c if (abs(nhel).ne.1) then
188
c write(stdo,*) ' helas-error : nhel in ixxxxx is not -1,1'
189
c write(stdo,*) ' : nhel = ',nhel
191
c if (abs(nsf).ne.1) then
192
c write(stdo,*) ' helas-error : nsf in ixxxxx is not -1,1'
193
c write(stdo,*) ' : nsf = ',nsf
197
c$$$ fi(1) = dcmplx(p(0),p(3))*nsf*-1
198
c$$$ fi(2) = dcmplx(p(1),p(2))*nsf*-1
202
if ( fmass.ne.rZero ) then
204
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
206
if ( pp.eq.rZero ) then
208
sqm(0) = dsqrt(abs(fmass)) ! possibility of negative fermion masses
209
sqm(1) = sign(sqm(0),fmass) ! possibility of negative fermion masses
214
fi(2) = im*nsf * sqm(ip)
215
fi(3) = ip*nsf * sqm(im)
220
sf(1) = dble(1+nsf+(1-nsf)*nh)*rHalf
221
sf(2) = dble(1+nsf-(1-nsf)*nh)*rHalf
222
omega(1) = dsqrt(p(0)+pp)
223
omega(2) = fmass/omega(1)
226
sfomeg(1) = sf(1)*omega(ip)
227
sfomeg(2) = sf(2)*omega(im)
228
pp3 = max(pp+p(3),rZero)
229
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
230
if ( pp3.eq.rZero ) then
231
chi(2) = dcmplx(-nh )
233
chi(2) = dcmplx( nh*p(1) , p(2) )/dsqrt(rTwo*pp*pp3)
236
fi(1) = sfomeg(1)*chi(im)
237
fi(2) = sfomeg(1)*chi(ip)
238
fi(3) = sfomeg(2)*chi(im)
239
fi(4) = sfomeg(2)*chi(ip)
245
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
248
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsf
250
chi(1) = dcmplx( sqp0p3 )
251
if ( sqp0p3.eq.rZero ) then
252
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
254
chi(2) = dcmplx( nh*p(1), p(2) )/sqp0p3
257
fi(1) = dcmplx( rZero )
258
fi(2) = dcmplx( rZero )
264
fi(3) = dcmplx( rZero )
265
fi(4) = dcmplx( rZero )
273
subroutine oxxxxx(p,fmass,nhel,nsf , fo)
275
c This subroutine computes a fermion wavefunction with the flowing-OUT
279
c real p(0:3) : four-momentum of fermion
280
c real fmass : mass of fermion
281
c integer nhel = -1 or 1 : helicity of fermion
282
c integer nsf = -1 or 1 : +1 for particle, -1 for anti-particle
285
c complex fo(6) : fermion wavefunction <fo|
288
double complex fo(6),chi(2)
289
double precision p(0:3),sf(2),sfomeg(2),omega(2),fmass,
290
& pp,pp3,sqp0p3,sqm(0:1)
291
integer nhel,nsf,nh,ip,im
293
double precision rZero, rHalf, rTwo
294
parameter( rZero = 0.0d0, rHalf = 0.5d0, rTwo = 2.0d0 )
297
c double precision p2
298
c double precision epsi
299
c parameter( epsi = 2.0d-5 )
301
c parameter( stdo = 6 )
305
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
306
c if ( abs(p(0))+pp.eq.rZero ) then
308
c & ' helas-error : p(0:3) in oxxxxx is zero momentum'
310
c if ( p(0).le.rZero ) then
312
c & ' helas-error : p(0:3) in oxxxxx has non-positive energy'
314
c & ' : p(0) = ',p(0)
316
c p2 = (p(0)-pp)*(p(0)+pp)
317
c if ( abs(p2-fmass**2).gt.p(0)**2*epsi ) then
319
c & ' helas-error : p(0:3) in oxxxxx has inappropriate mass'
321
c & ' : p**2 = ',p2,' : fmass**2 = ',fmass**2
323
c if ( abs(nhel).ne.1 ) then
324
c write(stdo,*) ' helas-error : nhel in oxxxxx is not -1,1'
325
c write(stdo,*) ' : nhel = ',nhel
327
c if ( abs(nsf).ne.1 ) then
328
c write(stdo,*) ' helas-error : nsf in oxxxxx is not -1,1'
329
c write(stdo,*) ' : nsf = ',nsf
333
fo(1) = dcmplx(p(0),p(3))*nsf
334
fo(2) = dcmplx(p(1),p(2))*nsf
338
if ( fmass.ne.rZero ) then
340
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
342
if ( pp.eq.rZero ) then
344
sqm(0) = dsqrt(abs(fmass)) ! possibility of negative fermion masses
345
sqm(1) = sign(sqm(0),fmass) ! possibility of negative fermion masses
350
fo(4) = ip*nsf * sqm(im)
351
fo(5) = im*nsf * sqm(-ip)
352
fo(6) = ip * sqm(-ip)
356
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
357
sf(1) = dble(1+nsf+(1-nsf)*nh)*rHalf
358
sf(2) = dble(1+nsf-(1-nsf)*nh)*rHalf
359
omega(1) = dsqrt(p(0)+pp)
360
omega(2) = fmass/omega(1)
363
sfomeg(1) = sf(1)*omega(ip)
364
sfomeg(2) = sf(2)*omega(im)
365
pp3 = max(pp+p(3),rZero)
366
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
367
if ( pp3.eq.rZero ) then
368
chi(2) = dcmplx(-nh )
370
chi(2) = dcmplx( nh*p(1) , -p(2) )/dsqrt(rTwo*pp*pp3)
373
fo(3) = sfomeg(2)*chi(im)
374
fo(4) = sfomeg(2)*chi(ip)
375
fo(5) = sfomeg(1)*chi(im)
376
fo(6) = sfomeg(1)*chi(ip)
382
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
385
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsf
387
chi(1) = dcmplx( sqp0p3 )
388
if ( sqp0p3.eq.rZero ) then
389
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
391
chi(2) = dcmplx( nh*p(1), -p(2) )/sqp0p3
396
fo(5) = dcmplx( rZero )
397
fo(6) = dcmplx( rZero )
399
fo(3) = dcmplx( rZero )
400
fo(4) = dcmplx( rZero )
410
subroutine oxxxso(p,fmass,nhel,nsf , fo)
411
c Identical to oxxxxx, except that fo returns only the spinor (without the momentum)
413
double complex fo(4),chi(2)
414
double precision p(0:3),sf(2),sfomeg(2),omega(2),fmass,
415
& pp,pp3,sqp0p3,sqm(0:1)
416
integer nhel,nsf,nh,ip,im
418
double precision rZero, rHalf, rTwo
419
parameter( rZero = 0.0d0, rHalf = 0.5d0, rTwo = 2.0d0 )
422
c double precision p2
423
c double precision epsi
424
c parameter( epsi = 2.0d-5 )
426
c parameter( stdo = 6 )
430
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
431
c if ( abs(p(0))+pp.eq.rZero ) then
433
c & ' helas-error : p(0:3) in oxxxxx is zero momentum'
435
c if ( p(0).le.rZero ) then
437
c & ' helas-error : p(0:3) in oxxxxx has non-positive energy'
439
c & ' : p(0) = ',p(0)
441
c p2 = (p(0)-pp)*(p(0)+pp)
442
c if ( abs(p2-fmass**2).gt.p(0)**2*epsi ) then
444
c & ' helas-error : p(0:3) in oxxxxx has inappropriate mass'
446
c & ' : p**2 = ',p2,' : fmass**2 = ',fmass**2
448
c if ( abs(nhel).ne.1 ) then
449
c write(stdo,*) ' helas-error : nhel in oxxxxx is not -1,1'
450
c write(stdo,*) ' : nhel = ',nhel
452
c if ( abs(nsf).ne.1 ) then
453
c write(stdo,*) ' helas-error : nsf in oxxxxx is not -1,1'
454
c write(stdo,*) ' : nsf = ',nsf
458
c$$$ fo(1) = dcmplx(p(0),p(3))*nsf
459
c$$$ fo(2) = dcmplx(p(1),p(2))*nsf
463
if ( fmass.ne.rZero ) then
465
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
467
if ( pp.eq.rZero ) then
469
sqm(0) = dsqrt(abs(fmass)) ! possibility of negative fermion masses
470
sqm(1) = sign(sqm(0),fmass) ! possibility of negative fermion masses
475
fo(2) = ip*nsf * sqm(im)
476
fo(3) = im*nsf * sqm(-ip)
477
fo(4) = ip * sqm(-ip)
481
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
482
sf(1) = dble(1+nsf+(1-nsf)*nh)*rHalf
483
sf(2) = dble(1+nsf-(1-nsf)*nh)*rHalf
484
omega(1) = dsqrt(p(0)+pp)
485
omega(2) = fmass/omega(1)
488
sfomeg(1) = sf(1)*omega(ip)
489
sfomeg(2) = sf(2)*omega(im)
490
pp3 = max(pp+p(3),rZero)
491
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
492
if ( pp3.eq.rZero ) then
493
chi(2) = dcmplx(-nh )
495
chi(2) = dcmplx( nh*p(1) , -p(2) )/dsqrt(rTwo*pp*pp3)
498
fo(1) = sfomeg(2)*chi(im)
499
fo(2) = sfomeg(2)*chi(ip)
500
fo(3) = sfomeg(1)*chi(im)
501
fo(4) = sfomeg(1)*chi(ip)
507
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
510
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsf
512
chi(1) = dcmplx( sqp0p3 )
513
if ( sqp0p3.eq.rZero ) then
514
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
516
chi(2) = dcmplx( nh*p(1), -p(2) )/sqp0p3
521
fo(3) = dcmplx( rZero )
522
fo(4) = dcmplx( rZero )
524
fo(1) = dcmplx( rZero )
525
fo(2) = dcmplx( rZero )
535
subroutine pxxxxx(p,tmass,nhel,nst , tc)
539
c This subroutine computes a PSEUDOR wavefunction.
542
c real p(0:3) : four-momentum of tensor boson
543
c real tmass : mass of tensor boson
544
c integer nhel : helicity of tensor boson
545
c = -2,-1,0,1,2 : (0 is forbidden if tmass=0.0)
546
c integer nst = -1 or 1 : +1 for final, -1 for initial
549
c complex tc(18) : PSEUDOR wavefunction epsilon^mu^nu(t)
552
double precision p(0:3), tmass
554
double complex tc(18)
556
double complex ft(6,4), ep(4), em(4), e0(4)
557
double precision pt, pt2, pp, pzpt, emp, sqh, sqs
560
double precision rZero, rHalf, rOne, rTwo
561
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
562
parameter( rOne = 1.0d0, rTwo = 2.0d0 )
566
tc(1) = dcmplx(p(0),p(3))*nst
567
tc(2) = dcmplx(p(1),p(2))*nst
572
subroutine sxxxxx(p,nss , sc)
574
c This subroutine computes a complex SCALAR wavefunction.
577
c real p(0:3) : four-momentum of scalar boson
578
c integer nss = -1 or 1 : +1 for final, -1 for initial
581
c complex sc(3) : scalar wavefunction s
585
double precision p(0:3)
588
double precision rOne
589
parameter( rOne = 1.0d0 )
592
c double precision p2
593
c double precision epsi
594
c parameter( epsi = 2.0d-5 )
595
c double precision rZero
596
c parameter( rZero = 0.0d0 )
598
c parameter( stdo = 6 )
602
c if ( abs(p(0))+abs(p(1))+abs(p(2))+abs(p(3)).eq.rZero ) then
604
c & ' helas-error : p(0:3) in sxxxxx is zero momentum'
606
c if ( p(0).le.rZero ) then
608
c & ' helas-error : p(0:3) in sxxxxx has non-positive energy'
610
c & ' : p(0) = ',p(0)
612
c p2 = p(0)**2-(p(1)**2+p(2)**2+p(3)**2)
613
c if ( p2.lt.-p(0)**2*epsi ) then
614
c write(stdo,*) ' helas-error : p(0:3) in sxxxxx is spacelike'
615
c write(stdo,*) ' : p**2 = ',p2
617
c if ( abs(nss).ne.1 ) then
618
c write(stdo,*) ' helas-error : nss in sxxxxx is not -1,1'
619
c write(stdo,*) ' : nss = ',nss
623
sc(3) = dcmplx( rOne )
624
sc(1) = dcmplx(p(0),p(3))*nss
625
sc(2) = dcmplx(p(1),p(2))*nss
630
subroutine txxxxx(p,tmass,nhel,nst , tc)
632
c This subroutine computes a TENSOR wavefunction.
635
c real p(0:3) : four-momentum of tensor boson
636
c real tmass : mass of tensor boson
637
c integer nhel : helicity of tensor boson
638
c = -2,-1,0,1,2 : (0 is forbidden if tmass=0.0)
639
c integer nst = -1 or 1 : +1 for final, -1 for initial
642
c complex tc(18) : tensor wavefunction epsilon^mu^nu(t)
645
double precision p(0:3), tmass
647
double complex tc(18)
649
double complex ft(6,4), ep(4), em(4), e0(4)
650
double precision pt, pt2, pp, pzpt, emp, sqh, sqs
653
double precision rZero, rHalf, rOne, rTwo
654
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
655
parameter( rOne = 1.0d0, rTwo = 2.0d0 )
658
parameter( stdo = 6 )
661
sqs = sqrt(rHalf/3.d0)
663
pt2 = p(1)**2 + p(2)**2
664
pp = min(p(0),sqrt(pt2+p(3)**2))
665
pt = min(pp,sqrt(pt2))
667
ft(5,1) = dcmplx(p(0),p(3))*nst
668
ft(6,1) = dcmplx(p(1),p(2))*nst
670
if ( nhel.ge.0 ) then
672
if ( pp.eq.rZero ) then
673
ep(1) = dcmplx( rZero )
674
ep(2) = dcmplx( -sqh )
675
ep(3) = dcmplx( rZero , nst*sqh )
676
ep(4) = dcmplx( rZero )
678
ep(1) = dcmplx( rZero )
679
ep(4) = dcmplx( pt/pp*sqh )
680
if ( pt.ne.rZero ) then
681
pzpt = p(3)/(pp*pt)*sqh
682
ep(2) = dcmplx( -p(1)*pzpt , -nst*p(2)/pt*sqh )
683
ep(3) = dcmplx( -p(2)*pzpt , nst*p(1)/pt*sqh )
685
ep(2) = dcmplx( -sqh )
686
ep(3) = dcmplx( rZero , nst*sign(sqh,p(3)) )
691
if ( nhel.le.0 ) then
693
if ( pp.eq.rZero ) then
694
em(1) = dcmplx( rZero )
695
em(2) = dcmplx( sqh )
696
em(3) = dcmplx( rZero , nst*sqh )
697
em(4) = dcmplx( rZero )
699
em(1) = dcmplx( rZero )
700
em(4) = dcmplx( -pt/pp*sqh )
701
if ( pt.ne.rZero ) then
702
pzpt = -p(3)/(pp*pt)*sqh
703
em(2) = dcmplx( -p(1)*pzpt , -nst*p(2)/pt*sqh )
704
em(3) = dcmplx( -p(2)*pzpt , nst*p(1)/pt*sqh )
706
em(2) = dcmplx( sqh )
707
em(3) = dcmplx( rZero , nst*sign(sqh,p(3)) )
712
if ( abs(nhel).le.1 ) then
714
if ( pp.eq.rZero ) then
715
e0(1) = dcmplx( rZero )
716
e0(2) = dcmplx( rZero )
717
e0(3) = dcmplx( rZero )
718
e0(4) = dcmplx( rOne )
720
emp = p(0)/(tmass*pp)
721
e0(1) = dcmplx( pp/tmass )
722
e0(4) = dcmplx( p(3)*emp )
723
if ( pt.ne.rZero ) then
724
e0(2) = dcmplx( p(1)*emp )
725
e0(3) = dcmplx( p(2)*emp )
727
e0(2) = dcmplx( rZero )
728
e0(3) = dcmplx( rZero )
733
if ( nhel.eq.2 ) then
736
ft(i,j) = ep(i)*ep(j)
739
else if ( nhel.eq.-2 ) then
742
ft(i,j) = em(i)*em(j)
745
else if (tmass.eq.0) then
751
else if (tmass.ne.0) then
752
if ( nhel.eq.1 ) then
755
ft(i,j) = sqh*( ep(i)*e0(j) + e0(i)*ep(j) )
758
else if ( nhel.eq.0 ) then
761
ft(i,j) = sqs*( ep(i)*em(j) + em(i)*ep(j)
762
& + rTwo*e0(i)*e0(j) )
765
else if ( nhel.eq.-1 ) then
768
ft(i,j) = sqh*( em(i)*e0(j) + e0(i)*em(j) )
772
write(stdo,*) 'invalid helicity in TXXXXX'
800
subroutine vxxxxx(p,vmass,nhel,nsv , vc)
802
c This subroutine computes a VECTOR wavefunction.
805
c real p(0:3) : four-momentum of vector boson
806
c real vmass : mass of vector boson
807
c integer nhel = -1, 0, 1: helicity of vector boson
808
c (0 is forbidden if vmass=0.0)
809
c integer nsv = -1 or 1 : +1 for final, -1 for initial
812
c complex vc(6) : vector wavefunction epsilon^mu(v)
816
double precision p(0:3),vmass,hel,hel0,pt,pt2,pp,pzpt,emp,sqh
817
integer nhel,nsv,nsvahl
819
double precision rZero, rHalf, rOne, rTwo
820
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
821
parameter( rOne = 1.0d0, rTwo = 2.0d0 )
824
c double precision p2
825
c double precision epsi
826
c parameter( epsi = 2.0d-5 )
828
c parameter( stdo = 6 )
832
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
833
c if ( abs(p(0))+pp.eq.rZero ) then
835
c & ' helas-error : p(0:3) in vxxxxx is zero momentum'
837
c if ( p(0).le.rZero ) then
839
c & ' helas-error : p(0:3) in vxxxxx has non-positive energy'
841
c & ' : p(0) = ',p(0)
843
c p2 = (p(0)+pp)*(p(0)-pp)
844
c if ( abs(p2-vmass**2).gt.p(0)**2*2.e-5 ) then
846
c & ' helas-error : p(0:3) in vxxxxx has inappropriate mass'
848
c & ' : p**2 = ',p2,' : vmass**2 = ',vmass**2
850
c if ( vmass.ne.rZero ) then
851
c if ( abs(nhel).gt.1 ) then
852
c write(stdo,*) ' helas-error : nhel in vxxxxx is not -1,0,1'
853
c write(stdo,*) ' : nhel = ',nhel
856
c if ( abs(nhel).ne.1 ) then
857
c write(stdo,*) ' helas-error : nhel in vxxxxx is not -1,1'
858
c write(stdo,*) ' : nhel = ',nhel
861
c if ( abs(nsv).ne.1 ) then
862
c write(stdo,*) ' helas-error : nsv in vmxxxx is not -1,1'
863
c write(stdo,*) ' : nsv = ',nsv
869
nsvahl = nsv*dabs(hel)
870
pt2 = p(1)**2+p(2)**2
871
pp = min(p(0),dsqrt(pt2+p(3)**2))
872
pt = min(pp,dsqrt(pt2))
874
vc(1) = dcmplx(p(0),p(3))*nsv
875
vc(2) = dcmplx(p(1),p(2))*nsv
878
c nhel=4 option for scalar polarization
879
c if( nhel.eq.4 ) then
880
c if( vmass.eq.rZero ) then
895
if ( vmass.ne.rZero ) then
897
hel0 = rOne-dabs(hel)
899
if ( pp.eq.rZero ) then
901
vc(3) = dcmplx( rZero )
902
vc(4) = dcmplx(-hel*sqh )
903
vc(5) = dcmplx( rZero , nsvahl*sqh )
904
vc(6) = dcmplx( hel0 )
908
emp = p(0)/(vmass*pp)
909
vc(3) = dcmplx( hel0*pp/vmass )
910
vc(6) = dcmplx( hel0*p(3)*emp+hel*pt/pp*sqh )
911
if ( pt.ne.rZero ) then
912
pzpt = p(3)/(pp*pt)*sqh*hel
913
vc(4) = dcmplx( hel0*p(1)*emp-p(1)*pzpt ,
914
& -nsvahl*p(2)/pt*sqh )
915
vc(5) = dcmplx( hel0*p(2)*emp-p(2)*pzpt ,
916
& nsvahl*p(1)/pt*sqh )
918
vc(4) = dcmplx( -hel*sqh )
919
vc(5) = dcmplx( rZero , nsvahl*sign(sqh,p(3)) )
927
pt = sqrt(p(1)**2+p(2)**2)
928
vc(3) = dcmplx( rZero )
929
vc(6) = dcmplx( hel*pt/pp*sqh )
930
if ( pt.ne.rZero ) then
931
pzpt = p(3)/(pp*pt)*sqh*hel
932
vc(4) = dcmplx( -p(1)*pzpt , -nsv*p(2)/pt*sqh )
933
vc(5) = dcmplx( -p(2)*pzpt , nsv*p(1)/pt*sqh )
935
vc(4) = dcmplx( -hel*sqh )
936
vc(5) = dcmplx( rZero , nsv*sign(sqh,p(3)) )
944
subroutine boostx(p,q , pboost)
946
c This subroutine performs the Lorentz boost of a four-momentum. The
947
c momentum p is assumed to be given in the rest frame of q. pboost is
948
c the momentum p boosted to the frame in which q is given. q must be a
952
c real p(0:3) : four-momentum p in the q rest frame
953
c real q(0:3) : four-momentum q in the boosted frame
956
c real pboost(0:3) : four-momentum p in the boosted frame
959
double precision p(0:3),q(0:3),pboost(0:3),pq,qq,m,lf
961
double precision rZero
962
parameter( rZero = 0.0d0 )
966
c parameter( stdo = 6 )
967
c double precision pp
970
qq = q(1)**2+q(2)**2+q(3)**2
973
c if (abs(p(0))+abs(p(1))+abs(p(2))+abs(p(3)).eq.rZero) then
975
c & ' helas-error : p(0:3) in boostx is zero momentum'
977
c if (abs(q(0))+qq.eq.rZero) then
979
c & ' helas-error : q(0:3) in boostx is zero momentum'
981
c if (p(0).le.rZero) then
983
c & ' helas-warn : p(0:3) in boostx has not positive energy'
985
c & ' : p(0) = ',p(0)
987
c if (q(0).le.rZero) then
989
c & ' helas-error : q(0:3) in boostx has not positive energy'
991
c & ' : q(0) = ',q(0)
993
c pp=p(0)**2-p(1)**2-p(2)**2-p(3)**2
994
c if (pp.lt.rZero) then
996
c & ' helas-warn : p(0:3) in boostx is spacelike'
1000
c if (q(0)**2-qq.le.rZero) then
1002
c & ' helas-error : q(0:3) in boostx is not timelike'
1004
c & ' : q**2 = ',q(0)**2-qq
1006
c if (qq.eq.rZero) then
1008
c & ' helas-warn : q(0:3) in boostx has zero spacial components'
1012
if ( qq.ne.rZero ) then
1013
pq = p(1)*q(1)+p(2)*q(2)+p(3)*q(3)
1014
m = sqrt(max(q(0)**2-qq,1d-99))
1015
lf = ((q(0)-m)*pq/qq+p(0))/m
1016
pboost(0) = (p(0)*q(0)+pq)/m
1017
pboost(1) = p(1)+q(1)*lf
1018
pboost(2) = p(2)+q(2)*lf
1019
pboost(3) = p(3)+q(3)*lf
1030
subroutine momntx(energy,mass,costh,phi , p)
1032
c This subroutine sets up a four-momentum from the four inputs.
1035
c real energy : energy
1037
c real costh : cos(theta)
1038
c real phi : azimuthal angle
1041
c real p(0:3) : four-momentum
1044
double precision p(0:3),energy,mass,costh,phi,pp,sinth
1046
double precision rZero, rOne
1047
parameter( rZero = 0.0d0, rOne = 1.0d0 )
1050
c double precision rPi, rTwo
1051
c parameter( rPi = 3.14159265358979323846d0, rTwo = 2.d0 )
1053
c parameter( stdo = 6 )
1057
c if (energy.lt.mass) then
1059
c & ' helas-error : energy in momntx is less than mass'
1061
c & ' : energy = ',energy,' : mass = ',mass
1063
c if (mass.lt.rZero) then
1064
c write(stdo,*) ' helas-error : mass in momntx is negative'
1065
c write(stdo,*) ' : mass = ',mass
1067
c if (abs(costh).gt.rOne) then
1068
c write(stdo,*) ' helas-error : costh in momntx is improper'
1069
c write(stdo,*) ' : costh = ',costh
1071
c if (phi.lt.rZero .or. phi.gt.rTwo*rPi) then
1073
c & ' helas-warn : phi in momntx does not lie on 0.0 thru 2.0*pi'
1081
if ( energy.eq.mass ) then
1089
pp = sqrt((energy-mass)*(energy+mass))
1090
sinth = sqrt((rOne-costh)*(rOne+costh))
1092
if ( phi.eq.rZero ) then
1096
p(1) = pp*sinth*cos(phi)
1097
p(2) = pp*sinth*sin(phi)
1104
subroutine rotxxx(p,q , prot)
1106
c This subroutine performs the spacial rotation of a four-momentum.
1107
c the momentum p is assumed to be given in the frame where the spacial
1108
c component of q points the positive z-axis. prot is the momentum p
1109
c rotated to the frame where q is given.
1112
c real p(0:3) : four-momentum p in q(1)=q(2)=0 frame
1113
c real q(0:3) : four-momentum q in the rotated frame
1116
c real prot(0:3) : four-momentum p in the rotated frame
1119
double precision p(0:3),q(0:3),prot(0:3),qt2,qt,psgn,qq,p1
1121
double precision rZero, rOne
1122
parameter( rZero = 0.0d0, rOne = 1.0d0 )
1126
c parameter( stdo = 6 )
1131
qt2 = q(1)**2 + q(2)**2
1134
c if (abs(p(0))+abs(p(1))+abs(p(2))+abs(p(3)).eq.rZero) then
1136
c & ' helas-error : p(0:3) in rotxxx is zero momentum'
1138
c if (abs(q(0))+abs(q(3))+qt2.eq.rZero) then
1140
c & ' helas-error : q(0:3) in rotxxx is zero momentum'
1142
c if (qt2+abs(q(3)).eq.rZero) then
1144
c & ' helas-warn : q(0:3) in rotxxx has zero spacial momentum'
1148
if ( qt2.eq.rZero ) then
1149
if ( q(3).eq.rZero ) then
1154
psgn = dsign(rOne,q(3))
1160
qq = sqrt(qt2+q(3)**2)
1163
prot(1) = q(1)*q(3)/qq/qt*p1 -q(2)/qt*p(2) +q(1)/qq*p(3)
1164
prot(2) = q(2)*q(3)/qq/qt*p1 +q(1)/qt*p(2) +q(2)/qq*p(3)
1165
prot(3) = -qt/qq*p1 +q(3)/qq*p(3)
1171
subroutine mom2cx(esum,mass1,mass2,costh1,phi1 , p1,p2)
1173
c This subroutine sets up two four-momenta in the two particle rest
1177
c real esum : energy sum of particle 1 and 2
1178
c real mass1 : mass of particle 1
1179
c real mass2 : mass of particle 2
1180
c real costh1 : cos(theta) of particle 1
1181
c real phi1 : azimuthal angle of particle 1
1184
c real p1(0:3) : four-momentum of particle 1
1185
c real p2(0:3) : four-momentum of particle 2
1188
double precision p1(0:3),p2(0:3),
1189
& esum,mass1,mass2,costh1,phi1,md2,ed,pp,sinth1
1191
double precision rZero, rHalf, rOne, rTwo
1192
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
1193
parameter( rOne = 1.0d0, rTwo = 2.0d0 )
1196
c double precision rPi
1197
c parameter( rPi = 3.14159265358979323846d0 )
1199
c parameter( stdo = 6 )
1203
c if (esum.lt.mass1+mass2) then
1205
c & ' helas-error : esum in mom2cx is less than mass1+mass2'
1207
c & ' : esum = ',esum,
1208
c & ' : mass1+mass2 = ',mass1,mass2
1210
c if (mass1.lt.rZero) then
1211
c write(stdo,*) ' helas-error : mass1 in mom2cx is negative'
1212
c write(stdo,*) ' : mass1 = ',mass1
1214
c if (mass2.lt.rZero) then
1215
c write(stdo,*) ' helas-error : mass2 in mom2cx is negative'
1216
c write(stdo,*) ' : mass2 = ',mass2
1218
c if (abs(costh1).gt.1.) then
1219
c write(stdo,*) ' helas-error : costh1 in mom2cx is improper'
1220
c write(stdo,*) ' : costh1 = ',costh1
1222
c if (phi1.lt.rZero .or. phi1.gt.rTwo*rPi) then
1224
c & ' helas-warn : phi1 in mom2cx does not lie on 0.0 thru 2.0*pi'
1226
c & ' : phi1 = ',phi1
1230
md2 = (mass1-mass2)*(mass1+mass2)
1232
if ( mass1*mass2.eq.rZero ) then
1233
pp = (esum-abs(ed))*rHalf
1235
pp = sqrt(max((md2/esum)**2-rTwo*(mass1**2+mass2**2)+esum**2,1d-99))*rHalf
1237
sinth1 = sqrt((rOne-costh1)*(rOne+costh1))
1239
p1(0) = max((esum+ed)*rHalf,rZero)
1240
p1(1) = pp*sinth1*cos(phi1)
1241
p1(2) = pp*sinth1*sin(phi1)
1244
p2(0) = max((esum-ed)*rHalf,rZero)
1251
subroutine irxxxx(p,rmass,nhel,nsr , ri)
1253
c This subroutine computes a Rarita-Schwinger wavefunction of spin-3/2
1254
c fermion with the flowing-IN fermion number.
1257
c real p(0:3) : four-momentum of RS fermion
1258
c real rmass : mass of RS fermion
1259
c integer nhel = -3,-1,1,3 : helicity of RS fermion
1260
c (1- and 1 is forbidden if rmass = 0)
1261
c integer nsr = -1 or 1 : +1 for particle, -1 for anti-particle
1264
c complex ri(18) : RS fermion wavefunction |ri>v
1266
c- by K.Mawatari - 2008/02/26
1269
double precision p(0:3),rmass
1271
double complex ri(18)
1273
double complex rc(6,4),ep(4),em(4),e0(4),fip(4),fim(4),chi(2)
1274
double precision pp,pt2,pt,pzpt,emp, sf(2),sfomeg(2),omega(2),pp3,
1276
integer i,j,nsv,ip,im,nh
1278
double precision rZero, rHalf, rOne, rTwo, rThree, sqh,sq2,sq3
1279
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
1280
parameter( rOne = 1.0d0, rTwo = 2.0d0, rThree = 3.0d0 )
1283
c double precision p2
1284
c double precision epsi
1285
c parameter( epsi = 2.0d-5 )
1287
c parameter( stdo = 6 )
1291
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
1292
c if ( abs(p(0))+pp.eq.rZero ) then
1294
c & ' helas-error : p(0:3) in irxxxx is zero momentum'
1296
c if ( p(0).le.rZero ) then
1298
c & ' helas-error : p(0:3) in irxxxx has non-positive energy'
1300
c & ' : p(0) = ',p(0)
1302
c p2 = (p(0)-pp)*(p(0)+pp)
1303
c if ( abs(p2-rmass**2).gt.p(0)**2*epsi ) then
1305
c & ' helas-error : p(0:3) in irxxxx has inappropriate mass'
1307
c & ' : p**2 = ',p2,' : rmass**2 = ',rmass**2
1309
c if (abs(nhel).gt.3 .or. abs(nhel).eq.2 .or. abs(nhel).eq.0 ) then
1310
c write(stdo,*) ' helas-error : nhel in irxxxx is not -3,-1,1,3'
1311
c write(stdo,*) ' : nhel = ',nhel
1313
c if (abs(nsr).ne.1) then
1314
c write(stdo,*) ' helas-error : nsr in irxxxx is not -1,1'
1315
c write(stdo,*) ' : nsr = ',nsr
1323
pt2 = p(1)**2 + p(2)**2
1324
pp = min(p(0),sqrt(pt2+p(3)**2))
1325
pt = min(pp,sqrt(pt2))
1327
rc(5,1) = -1*dcmplx(p(0),p(3))*nsr
1328
rc(6,1) = -1*dcmplx(p(1),p(2))*nsr
1330
nsv = -nsr ! nsv=+1 for final, -1 for initial
1332
if ( nhel.ge.1 ) then
1334
if ( pp.eq.rZero ) then
1335
ep(1) = dcmplx( rZero )
1336
ep(2) = dcmplx( -sqh )
1337
ep(3) = dcmplx( rZero , nsv*sqh )
1338
ep(4) = dcmplx( rZero )
1340
ep(1) = dcmplx( rZero )
1341
ep(4) = dcmplx( pt/pp*sqh )
1342
if ( pt.ne.rZero ) then
1343
pzpt = p(3)/(pp*pt)*sqh
1344
ep(2) = dcmplx( -p(1)*pzpt , -nsv*p(2)/pt*sqh )
1345
ep(3) = dcmplx( -p(2)*pzpt , nsv*p(1)/pt*sqh )
1347
ep(2) = dcmplx( -sqh )
1348
ep(3) = dcmplx( rZero , nsv*sign(sqh,p(3)) )
1353
if ( nhel.le.-1 ) then
1355
if ( pp.eq.rZero ) then
1356
em(1) = dcmplx( rZero )
1357
em(2) = dcmplx( sqh )
1358
em(3) = dcmplx( rZero , nsv*sqh )
1359
em(4) = dcmplx( rZero )
1361
em(1) = dcmplx( rZero )
1362
em(4) = dcmplx( -pt/pp*sqh )
1363
if ( pt.ne.rZero ) then
1364
pzpt = -p(3)/(pp*pt)*sqh
1365
em(2) = dcmplx( -p(1)*pzpt , -nsv*p(2)/pt*sqh )
1366
em(3) = dcmplx( -p(2)*pzpt , nsv*p(1)/pt*sqh )
1368
em(2) = dcmplx( sqh )
1369
em(3) = dcmplx( rZero , nsv*sign(sqh,p(3)) )
1374
if ( abs(nhel).le.1 ) then
1376
if ( pp.eq.rZero ) then
1377
e0(1) = dcmplx( rZero )
1378
e0(2) = dcmplx( rZero )
1379
e0(3) = dcmplx( rZero )
1380
e0(4) = dcmplx( rOne )
1382
emp = p(0)/(rmass*pp)
1383
e0(1) = dcmplx( pp/rmass )
1384
e0(4) = dcmplx( p(3)*emp )
1385
if ( pt.ne.rZero ) then
1386
e0(2) = dcmplx( p(1)*emp )
1387
e0(3) = dcmplx( p(2)*emp )
1389
e0(2) = dcmplx( rZero )
1390
e0(3) = dcmplx( rZero )
1395
if ( nhel.ge.-1 ) then
1398
if ( rmass.ne.rZero ) then
1399
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1400
if ( pp.eq.rZero ) then
1405
fip(2) = im*nsr * sqm
1406
fip(3) = ip*nsr * sqm
1409
sf(1) = dble(1+nsr+(1-nsr)*nh)*rHalf
1410
sf(2) = dble(1+nsr-(1-nsr)*nh)*rHalf
1411
omega(1) = dsqrt(p(0)+pp)
1412
omega(2) = rmass/omega(1)
1415
sfomeg(1) = sf(1)*omega(ip)
1416
sfomeg(2) = sf(2)*omega(im)
1417
pp3 = max(pp+p(3),rZero)
1418
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
1419
if ( pp3.eq.rZero ) then
1420
chi(2) = dcmplx(-nh )
1422
chi(2) = dcmplx( nh*p(1) , p(2) )/dsqrt(rTwo*pp*pp3)
1424
fip(1) = sfomeg(1)*chi(im)
1425
fip(2) = sfomeg(1)*chi(ip)
1426
fip(3) = sfomeg(2)*chi(im)
1427
fip(4) = sfomeg(2)*chi(ip)
1430
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsr
1431
chi(1) = dcmplx( sqp0p3 )
1432
if ( sqp0p3.eq.rZero ) then
1433
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
1435
chi(2) = dcmplx( nh*p(1), p(2) )/sqp0p3
1438
fip(1) = dcmplx( rZero )
1439
fip(2) = dcmplx( rZero )
1445
fip(3) = dcmplx( rZero )
1446
fip(4) = dcmplx( rZero )
1451
if ( nhel.le.1 ) then
1454
if ( rmass.ne.rZero ) then
1455
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1456
if ( pp.eq.rZero ) then
1461
fim(2) = im*nsr * sqm
1462
fim(3) = ip*nsr * sqm
1465
sf(1) = dble(1+nsr+(1-nsr)*nh)*rHalf
1466
sf(2) = dble(1+nsr-(1-nsr)*nh)*rHalf
1467
omega(1) = dsqrt(p(0)+pp)
1468
omega(2) = rmass/omega(1)
1471
sfomeg(1) = sf(1)*omega(ip)
1472
sfomeg(2) = sf(2)*omega(im)
1473
pp3 = max(pp+p(3),rZero)
1474
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
1475
if ( pp3.eq.rZero ) then
1476
chi(2) = dcmplx(-nh )
1478
chi(2) = dcmplx( nh*p(1) , p(2) )/dsqrt(rTwo*pp*pp3)
1480
fim(1) = sfomeg(1)*chi(im)
1481
fim(2) = sfomeg(1)*chi(ip)
1482
fim(3) = sfomeg(2)*chi(im)
1483
fim(4) = sfomeg(2)*chi(ip)
1486
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsr
1487
chi(1) = dcmplx( sqp0p3 )
1488
if ( sqp0p3.eq.rZero ) then
1489
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
1491
chi(2) = dcmplx( nh*p(1), p(2) )/sqp0p3
1494
fim(1) = dcmplx( rZero )
1495
fim(2) = dcmplx( rZero )
1501
fim(3) = dcmplx( rZero )
1502
fim(4) = dcmplx( rZero )
1507
c spin-3/2 fermion wavefunction
1508
if ( nhel.eq.3 ) then
1511
rc(i,j) = ep(i)*fip(j)
1514
else if ( nhel.eq.1 ) then
1517
if ( pt.eq.rZero .and. p(3).ge.0d0 ) then
1518
rc(i,j) = sq2/sq3*e0(i)*fip(j) +rOne/sq3*ep(i)*fim(j)
1519
elseif ( pt.eq.rZero .and. p(3).lt.0d0 ) then
1520
rc(i,j) = sq2/sq3*e0(i)*fip(j) -rOne/sq3*ep(i)*fim(j)
1522
rc(i,j) = sq2/sq3*e0(i)*fip(j)
1523
& +rOne/sq3*ep(i)*fim(j) *dcmplx(P(1),nsr*P(2))/pt
1527
else if ( nhel.eq.-1 ) then
1530
if ( pt.eq.rZero .and.p(3).ge.0d0 ) then
1531
rc(i,j) = rOne/sq3*em(i)*fip(j) +sq2/sq3*e0(i)*fim(j)
1532
elseif ( pt.eq.rZero .and.p(3).lt.0d0 ) then
1533
rc(i,j) = rOne/sq3*em(i)*fip(j) -sq2/sq3*e0(i)*fim(j)
1535
rc(i,j) = rOne/sq3*em(i)*fip(j)
1536
& + sq2/sq3*e0(i)*fim(j) *dcmplx(P(1),nsr*P(2))/pt
1543
if ( pt.eq.rZero .and. p(3).ge.0d0 ) then
1544
rc(i,j) = em(i)*fim(j)
1545
elseif ( pt.eq.rZero .and. p(3).lt.0d0 ) then
1546
rc(i,j) = -em(i)*fim(j)
1548
rc(i,j) = em(i)*fim(j) *dcmplx(P(1),nsr*P(2))/pt
1575
subroutine orxxxx(p,rmass,nhel,nsr , ro)
1577
c This subroutine computes a Rarita-Schwinger wavefunction of spin-3/2
1578
c fermion with the flowing-IN fermion number.
1581
c real p(0:3) : four-momentum of RS fermion
1582
c real rmass : mass of RS fermion
1583
c integer nhel = -3,-1,1,3 : helicity of RS fermion
1584
c (1- and 1 is forbidden if rmass = 0)
1585
c integer nsr = -1 or 1 : +1 for particle, -1 for anti-particle
1588
c complex ro(18) : RS fermion wavefunction |ro>v
1590
c- by Y.Takaesu - 2011/01/11
1593
double precision p(0:3),rmass
1595
double complex ro(18),fipp(4),fimm(4)
1597
double complex rc(6,4),ep(4),em(4),e0(4),fop(4),fom(4),chi(2)
1598
double precision pp,pt2,pt,pzpt,emp, sf(2),sfomeg(2),omega(2),pp3,
1600
integer i,j,nsv,ip,im,nh
1602
double precision rZero, rHalf, rOne, rTwo, rThree, sqh,sq2,sq3
1603
parameter( rZero = 0.0d0, rHalf = 0.5d0 )
1604
parameter( rOne = 1.0d0, rTwo = 2.0d0, rThree = 3.0d0 )
1607
c double precision p2
1608
c double precision epsi
1609
c parameter( epsi = 2.0d-5 )
1611
c parameter( stdo = 6 )
1615
c pp = sqrt(p(1)**2+p(2)**2+p(3)**2)
1616
c if ( abs(p(0))+pp.eq.rZero ) then
1618
c & ' helas-error : p(0:3) in orxxxx is zero momentum'
1620
c if ( p(0).le.rZero ) then
1622
c & ' helas-error : p(0:3) in orxxxx has non-positive energy'
1624
c & ' : p(0) = ',p(0)
1626
c p2 = (p(0)-pp)*(p(0)+pp)
1627
c if ( abs(p2-rmass**2).gt.p(0)**2*epsi ) then
1629
c & ' helas-error : p(0:3) in orxxxx has inappropriate mass'
1631
c & ' : p**2 = ',p2,' : rmass**2 = ',rmass**2
1633
c if (abs(nhel).gt.3 .or. abs(nhel).eq.2 .or. abs(nhel).eq.0 ) then
1634
c write(stdo,*) ' helas-error : nhel in orxxxx is not -3,-1,1,3'
1635
c write(stdo,*) ' : nhel = ',nhel
1637
c if (abs(nsr).ne.1) then
1638
c write(stdo,*) ' helas-error : nsr in orxxxx is not -1,1'
1639
c write(stdo,*) ' : nsr = ',nsr
1647
pt2 = p(1)**2 + p(2)**2
1648
pp = min(p(0),sqrt(pt2+p(3)**2))
1649
pt = min(pp,sqrt(pt2))
1651
rc(5,1) = dcmplx(p(0),p(3))*nsr
1652
rc(6,1) = dcmplx(p(1),p(2))*nsr
1654
nsv = nsr ! nsv=+1 for final, -1 for initial
1656
if ( nhel.ge.1 ) then
1658
if ( pp.eq.rZero ) then
1659
ep(1) = dcmplx( rZero )
1660
ep(2) = dcmplx( -sqh )
1661
ep(3) = dcmplx( rZero , nsv*sqh )
1662
ep(4) = dcmplx( rZero )
1664
ep(1) = dcmplx( rZero )
1665
ep(4) = dcmplx( pt/pp*sqh )
1666
if ( pt.ne.rZero ) then
1667
pzpt = p(3)/(pp*pt)*sqh
1668
ep(2) = dcmplx( -p(1)*pzpt , -nsv*p(2)/pt*sqh )
1669
ep(3) = dcmplx( -p(2)*pzpt , nsv*p(1)/pt*sqh )
1671
ep(2) = dcmplx( -sqh )
1672
ep(3) = dcmplx( rZero , nsv*sign(sqh,p(3)) )
1677
if ( nhel.le.-1 ) then
1679
if ( pp.eq.rZero ) then
1680
em(1) = dcmplx( rZero )
1681
em(2) = dcmplx( sqh )
1682
em(3) = dcmplx( rZero , nsv*sqh )
1683
em(4) = dcmplx( rZero )
1685
em(1) = dcmplx( rZero )
1686
em(4) = dcmplx( -pt/pp*sqh )
1687
if ( pt.ne.rZero ) then
1688
pzpt = -p(3)/(pp*pt)*sqh
1689
em(2) = dcmplx( -p(1)*pzpt , -nsv*p(2)/pt*sqh )
1690
em(3) = dcmplx( -p(2)*pzpt , nsv*p(1)/pt*sqh )
1692
em(2) = dcmplx( sqh )
1693
em(3) = dcmplx( rZero , nsv*sign(sqh,p(3)) )
1698
if ( abs(nhel).le.1 ) then
1700
if ( pp.eq.rZero ) then
1701
e0(1) = dcmplx( rZero )
1702
e0(2) = dcmplx( rZero )
1703
e0(3) = dcmplx( rZero )
1704
e0(4) = dcmplx( rOne )
1706
emp = p(0)/(rmass*pp)
1707
e0(1) = dcmplx( pp/rmass )
1708
e0(4) = dcmplx( p(3)*emp )
1709
if ( pt.ne.rZero ) then
1710
e0(2) = dcmplx( p(1)*emp )
1711
e0(3) = dcmplx( p(2)*emp )
1713
e0(2) = dcmplx( rZero )
1714
e0(3) = dcmplx( rZero )
1719
if ( nhel.ge.-1 ) then
1723
if ( rmass.ne.rZero ) then
1725
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1727
if ( pp.eq.rZero ) then
1729
sqm(0) = dsqrt(abs(rmass)) ! possibility of negative fermion masses
1730
sqm(1) = sign(sqm(0),rmass) ! possibility of negative fermion masses
1734
fop(1) = im * sqm(im)
1735
fop(2) = ip*nsr * sqm(im)
1736
fop(3) = im*nsr * sqm(-ip)
1737
fop(4) = ip * sqm(-ip)
1741
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1742
sf(1) = dble(1+nsr+(1-nsr)*nh)*rHalf
1743
sf(2) = dble(1+nsr-(1-nsr)*nh)*rHalf
1744
omega(1) = dsqrt(p(0)+pp)
1745
omega(2) = rmass/omega(1)
1748
sfomeg(1) = sf(1)*omega(ip)
1749
sfomeg(2) = sf(2)*omega(im)
1750
pp3 = max(pp+p(3),rZero)
1751
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
1752
if ( pp3.eq.rZero ) then
1753
chi(2) = dcmplx(-nh )
1755
chi(2) = dcmplx( nh*p(1) , -p(2) )/dsqrt(rTwo*pp*pp3)
1758
fop(1) = sfomeg(2)*chi(im)
1759
fop(2) = sfomeg(2)*chi(ip)
1760
fop(3) = sfomeg(1)*chi(im)
1761
fop(4) = sfomeg(1)*chi(ip)
1767
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
1770
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsr
1772
chi(1) = dcmplx( sqp0p3 )
1773
if ( sqp0p3.eq.rZero ) then
1774
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
1776
chi(2) = dcmplx( nh*p(1), -p(2) )/sqp0p3
1781
fop(3) = dcmplx( rZero )
1782
fop(4) = dcmplx( rZero )
1784
fop(1) = dcmplx( rZero )
1785
fop(2) = dcmplx( rZero )
1792
if ( nhel.le.1 ) then
1796
if ( rmass.ne.rZero ) then
1798
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1800
if ( pp.eq.rZero ) then
1802
sqm(0) = dsqrt(abs(rmass)) ! possibility of negative fermion masses
1803
sqm(1) = sign(sqm(0),rmass) ! possibility of negative fermion masses
1807
fom(1) = im * sqm(im)
1808
fom(2) = ip*nsr * sqm(im)
1809
fom(3) = im*nsr * sqm(-ip)
1810
fom(4) = ip * sqm(-ip)
1814
pp = min(p(0),dsqrt(p(1)**2+p(2)**2+p(3)**2))
1815
sf(1) = dble(1+nsr+(1-nsr)*nh)*rHalf
1816
sf(2) = dble(1+nsr-(1-nsr)*nh)*rHalf
1817
omega(1) = dsqrt(p(0)+pp)
1818
omega(2) = rmass/omega(1)
1821
sfomeg(1) = sf(1)*omega(ip)
1822
sfomeg(2) = sf(2)*omega(im)
1823
pp3 = max(pp+p(3),rZero)
1824
chi(1) = dcmplx( dsqrt(pp3*rHalf/pp) )
1825
if ( pp3.eq.rZero ) then
1826
chi(2) = dcmplx(-nh )
1828
chi(2) = dcmplx( nh*p(1) , -p(2) )/dsqrt(rTwo*pp*pp3)
1831
fom(1) = sfomeg(2)*chi(im)
1832
fom(2) = sfomeg(2)*chi(ip)
1833
fom(3) = sfomeg(1)*chi(im)
1834
fom(4) = sfomeg(1)*chi(ip)
1840
if(p(1).eq.0d0.and.p(2).eq.0d0.and.p(3).lt.0d0) then
1843
sqp0p3 = dsqrt(max(p(0)+p(3),rZero))*nsr
1845
chi(1) = dcmplx( sqp0p3 )
1846
if ( sqp0p3.eq.rZero ) then
1847
chi(2) = dcmplx(-nhel )*dsqrt(rTwo*p(0))
1849
chi(2) = dcmplx( nh*p(1), -p(2) )/sqp0p3
1854
fom(3) = dcmplx( rZero )
1855
fom(4) = dcmplx( rZero )
1857
fom(1) = dcmplx( rZero )
1858
fom(2) = dcmplx( rZero )
1865
c spin-3/2 fermion wavefunction
1866
if ( nhel.eq.3 ) then
1869
rc(i,j) = ep(i)*fop(j)
1872
else if ( nhel.eq.1 ) then
1875
if ( pt.eq.rZero .and. p(3).ge.0d0 ) then
1876
rc(i,j) = sq2/sq3*e0(i)*fop(j)
1877
& +rOne/sq3*ep(i)*fom(j)
1878
elseif ( pt.eq.rZero .and. p(3).lt.0d0 ) then
1879
rc(i,j) = sq2/sq3*e0(i)*fop(j)
1880
& -rOne/sq3*ep(i)*fom(j)
1882
rc(i,j) = sq2/sq3*e0(i)*fop(j)
1883
& +rOne/sq3*ep(i)*fom(j)
1884
& *dcmplx(P(1),-nsr*P(2))/pt
1888
else if ( nhel.eq.-1 ) then
1891
if ( pt.eq.rZero .and.p(3).ge.0d0 ) then
1892
rc(i,j) = rOne/sq3*em(i)*fop(j)
1893
& +sq2/sq3*e0(i)*fom(j)
1894
elseif ( pt.eq.rZero .and.p(3).lt.0d0 ) then
1895
rc(i,j) = rOne/sq3*em(i)*fop(j)
1896
& -sq2/sq3*e0(i)*fom(j)
1898
rc(i,j) = rOne/sq3*em(i)*fop(j)
1899
& + sq2/sq3*e0(i)*fom(j)
1900
& *dcmplx(P(1),-nsr*P(2))/pt
1907
if ( pt.eq.rZero .and. p(3).ge.0d0 ) then
1908
rc(i,j) = em(i)*fom(j)
1909
elseif ( pt.eq.rZero .and. p(3).lt.0d0 ) then
1910
rc(i,j) = -em(i)*fom(j)
1912
rc(i,j) = em(i)*fom(j)*dcmplx(P(1),-nsr*P(2))/pt