1
double precision function testamp(p)
2
c*****************************************************************************
3
c Approximates matrix element by propagators
4
c*****************************************************************************
10
include 'nexternal.inc'
12
parameter (zero = 0d0)
16
double precision p(0:3,nexternal)
21
double precision xp(0:3,-nexternal:nexternal)
22
double precision mpole(-nexternal:0),shat,tsgn
25
double precision pmass(-nexternal:0,lmaxconfigs)
26
double precision pwidth(-nexternal:0,lmaxconfigs)
27
integer pow(-nexternal:0,lmaxconfigs)
32
integer iforest(2,-max_branch:-1,lmaxconfigs)
33
common/to_forest/ iforest
34
integer mapconfig(0:lmaxconfigs), this_config
35
common/to_mconfigs/mapconfig, this_config
44
data first_time /.true./
61
c shat = dot(p(0,1),p(0,2))/(1800)**2
62
shat = dot(p(0,1),p(0,2))/(10)**2
66
do i=-1,-(nexternal-3),-1 !Find all the propagotors
67
if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
69
xp(j,i) = xp(j,iforest(1,i,iconfig))
70
$ +tsgn*xp(j,iforest(2,i,iconfig))
72
if (pwidth(i,iconfig) .ne. 0d0 .and. .false.) then
73
testamp=testamp/((dot(xp(0,i),xp(0,i))
74
$ -pmass(i,iconfig)**2)**2
75
$ -(pmass(i,iconfig)*pwidth(i,iconfig))**2)
77
testamp = testamp/((dot(xp(0,i),xp(0,i)) -
78
$ pmass(i,iconfig)**2)
81
testamp=testamp*shat**(pow(i,iconfig))
82
c write(*,*) i,iconfig,pow(i,iconfig),pmass(i,iconfig)
84
c testamp = 1d0/dot(xp(0,-1),xp(0,-1))
89
logical function cut_bw(p)
90
c*****************************************************************************
91
c Approximates matrix element by propagators
92
c*****************************************************************************
98
include 'nexternal.inc'
100
parameter (zero = 0d0)
105
double precision p(0:3,nexternal)
109
double precision xp(0:3,-nexternal:nexternal)
110
double precision mpole(-nexternal:0),shat,tsgn
113
double precision pmass(-nexternal:0,lmaxconfigs)
114
double precision pwidth(-nexternal:0,lmaxconfigs)
115
integer pow(-nexternal:0,lmaxconfigs)
116
logical first_time, onshell
117
double precision xmass
120
integer ida(2),idenpart
124
include 'maxamps.inc'
125
integer iforest(2,-max_branch:-1,lmaxconfigs)
126
common/to_forest/ iforest
127
integer sprop(-max_branch:-1,lmaxconfigs)
128
integer tprid(-max_branch:-1,lmaxconfigs)
129
common/to_sprop/sprop,tprid
130
integer mapconfig(0:lmaxconfigs), this_config
131
common/to_mconfigs/mapconfig, this_config
133
integer lbw(0:nexternal) !Use of B.W.
136
logical OnBW(-nexternal:0) !Set if event is on B.W.
137
common/to_BWEvents/ OnBW
141
integer idup(nexternal,maxproc)
142
integer mothup(2,nexternal,maxproc)
143
integer icolup(2,nexternal,maxflow)
144
include 'leshouche.inc'
146
logical gForceBW(-max_branch:-1,lmaxconfigs) ! Forced BW
147
include 'decayBW.inc'
153
save pmass,pwidth,pow
154
data first_time /.true./
158
cut_bw = .false. !Default is we passed the cut
159
iconfig = this_config
164
do i=-1,-(nexternal-3),-1
165
if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
166
if (pwidth(i,iconfig) .gt. 0 .and. tsgn .eq. 1d0) then
168
if (lbw(nbw) .eq. 1) then
169
write(*,*) 'Requiring BW ',i,nbw
170
elseif(lbw(nbw) .eq. 2) then
171
write(*,*) 'Excluding BW ',i,nbw
173
write(*,*) 'No cut BW ',i,nbw
188
do i=-1,-(nexternal-3),-1 !Loop over propagators
190
if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
192
xp(j,i) = xp(j,iforest(1,i,iconfig))
193
$ +tsgn*xp(j,iforest(2,i,iconfig))
195
if (tsgn .gt. 0d0 .and. pwidth(i,iconfig) .gt. 0d0 ) then !This is B.W.
197
c write(*,*) 'Checking BW',nbw
198
xmass = sqrt(dot(xp(0,i),xp(0,i)))
199
c write(*,*) 'xmass',xmass,pmass(i,iconfig)
200
onshell = (abs(xmass - pmass(i,iconfig)) .lt.
201
$ bwcutoff*pwidth(i,iconfig))
204
c Here we set if the BW is "on-shell" for LesHouches
207
c Only allow onshell if no "decay" to identical particle
211
ida(j)=iforest(j,i,iconfig)
212
if((ida(j).lt.0.and.sprop(i,iconfig).eq.sprop(ida(j),iconfig))
213
$ .or.(ida(j).gt.0.and.sprop(i,iconfig).eq.IDUP(ida(j),1)))
216
c Always remove if daughter final-state
217
if(idenpart.gt.0) then
219
c Else remove if daughter forced to be onshell
220
elseif(idenpart.lt.0.and.gForceBW(idenpart, iconfig)) then
222
c Else remove daughter if forced to be onshell
223
elseif(idenpart.lt.0.and.gForceBW(i, iconfig)) then
224
OnBW(idenpart)=.false.
225
c Else remove either this resonance or daughter, which is closer to mass shell
226
elseif(idenpart.lt.0.and.abs(xmass-pmass(i,iconfig)).gt.
227
$ abs(sqrt(dot(xp(0,idenpart),xp(0,idenpart)))-
228
$ pmass(i,iconfig))) then
230
c Else remove OnBW for daughter
231
else if(idenpart.lt.0) then
232
OnBW(idenpart)=.false.
235
if (onshell .and. (lbw(nbw).eq. 2) ) cut_bw=.true.
236
if (.not. onshell .and. (lbw(nbw).eq. 1)) cut_bw=.true.
237
c write(*,*) nbw,xmass,onshell,lbw(nbw),cut_bw
245
c*****************************************************************************
246
c Attempts to determine peaks for this configuration
247
c*****************************************************************************
253
include 'nexternal.inc'
254
double precision zero
255
parameter (zero = 0d0)
262
double precision xm(-nexternal:nexternal)
263
double precision xe(-nexternal:nexternal)
264
double precision tsgn, xo, a
265
double precision x1,x2,xk(nexternal)
266
double precision dr,mtot,etot,stot,xqfact
267
integer i, iconfig, l1, l2, j, nt, nbw
269
double precision pmass(-nexternal:0,lmaxconfigs)
270
double precision pwidth(-nexternal:0,lmaxconfigs)
271
integer pow(-nexternal:0,lmaxconfigs)
276
integer iforest(2,-max_branch:-1,lmaxconfigs)
277
common/to_forest/ iforest
279
integer mapconfig(0:lmaxconfigs), this_config
280
common/to_mconfigs/mapconfig, this_config
282
real*8 emass(nexternal)
287
double precision etmin(nincoming+1:nexternal),etamax(nincoming+1:nexternal)
288
double precision emin(nincoming+1:nexternal)
289
double precision r2min(nincoming+1:nexternal,nincoming+1:nexternal)
290
double precision s_min(nexternal,nexternal)
291
common/to_cuts/ etmin, emin, etamax, r2min, s_min
293
double precision xqcutij(nexternal,nexternal),xqcuti(nexternal)
294
common/to_xqcuts/xqcutij,xqcuti
296
double precision spole(maxinvar),swidth(maxinvar),bwjac
297
common/to_brietwigner/spole ,swidth ,bwjac
299
integer lbw(0:nexternal) !Use of B.W.
312
stot = 4d0*ebeam(1)*ebeam(2)
315
iconfig = this_config
317
etot = 0d0 !Total energy needed
319
if(ickkw.eq.2.or.ktscheme.eq.2) xqfact=0.3d0
320
do i=nincoming+1,nexternal !assumes 2 incoming
323
xe(i)=max(emass(i),max(etmin(i),0d0))
324
xe(i)=max(xe(i),max(emin(i),0d0))
325
c-JA 1/2009: Set grid also based on xqcut
326
xe(i)=max(xe(i),xqfact*xqcuti(i))
333
do i=-1,-(nexternal-3),-1 !Find all the propagotors
334
if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
335
if (tsgn .eq. 1d0) then !s channel
336
xm(i) = xm(iforest(1,i,iconfig))+xm(iforest(2,i,iconfig))
337
xe(i) = xe(iforest(1,i,iconfig))+xe(iforest(2,i,iconfig))
340
if (iforest(1,i,iconfig) .gt. 0
341
& .and. iforest(2,i,iconfig) .gt. 0) then
342
c-JA 1/2009: Set deltaR cuts here together with s_min cuts
343
l1 = iforest(1,i,iconfig)
344
l2 = iforest(2,i,iconfig)
345
xm(i)=max(xm(i),sqrt(max(s_min(l1,l2),0d0)))
346
dr = max(r2min(l1,l2)*dabs(r2min(l1,l2)),0d0)*0.8d0
348
& sqrt(max(etmin(l2),0d0)*max(etmin(l1),0d0)*dr))
349
c-JA 1/2009: Set grid also based on xqcut
350
xm(i)=max(xm(i),sqrt(max(xqcutij(l1,l2),0d0)))
351
xe(i)=max(xe(i),xm(i))
353
c write(*,*) 'iconfig,i',iconfig,i
354
c write(*,*) pwidth(i,iconfig),pmass(i,iconfig)
355
if (pwidth(i,iconfig) .gt. 0) nbw=nbw+1
356
if (pwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
359
if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat
360
j = 3*(nexternal-2)-4+1 !set i to ndim+1
362
c tjs 11/2008 if require BW then force even if worried about energy
364
if(pmass(i,iconfig).ge.xe(i) .or. lbw(nbw).eq.1) then
365
write(*,*) 'Setting PDF BW',j,nbw,pmass(i,iconfig)
366
spole(j)=pmass(i,iconfig)*pmass(i,iconfig)/stot
367
swidth(j) = pwidth(i,iconfig)*pmass(i,iconfig)/stot
368
xm(i) = pmass(i,iconfig)
374
write(*,*) 'Setting BW',i,nbw,pmass(i,iconfig)
375
spole(-i)=pmass(i,iconfig)*pmass(i,iconfig)/stot
376
swidth(-i) = pwidth(i,iconfig)*pmass(i,iconfig)/stot
377
xm(i) = pmass(i,iconfig)
378
c RF & TJS, should start from final state particle masses, not only at resonance.
379
c Therefore remove the next line.
380
c xe(i) = max(xe(i),xm(i))
383
c-JA 1/2009: Comment out this whole section, since it only sets (wrong) xm(i)
384
c if (xm(i) - pmass(i,iconfig) .le. 0d0) then !Can hit pole
385
cc write(*,*) 'Setting new min',i,xm(i),pmass(i,iconfig)
386
c l1 = iforest(1,i,iconfig) !need dr cut
387
c l2 = iforest(2,i,iconfig)
388
c if (l2 .lt. l1) then
396
c & dr = max(r2min(l2,l1)*dabs(r2min(l2,l1)),0d0) !dr only for external
397
cc write(*,*) 'using r2min',l2,l1,sqrt(dr)
398
c dr = dr*.8d0 !0.8 to hit peak hard
399
c xo = 0.5d0*pmass(i,iconfig)**2 !0.5 to hit peak hard
402
c & xo = max(xo,max(etmin(l2),0d0)*max(etmin(l1),0d0)*dr)
403
cc write(*,*) 'Got dr',i,l1,l2,dr
405
cctjs 11/2008 if explicitly missing pole, don't want to include mass in xm
407
c if (pwidth(i,iconfig) .le. 0) then
408
cc write(*,*) "Including mass",i,pmass(i,iconfig)
409
c xo = xo+pmass(i,iconfig)**2
411
cc write(*,*) "Skipping mass", i,pmass(i,iconfig),sqrt(xo)
413
cc write(*,*) 'Setting xm',i,xm(i),sqrt(xo)
414
c xm(i) = sqrt(xo) !Reset xm to realistic minimum
416
cc xo = sqrt(pmass(i,iconfig)**2+ pmass(i,iconfig)**2)
418
cc xo = pmass(i,iconfig)+max(etmin,0d0)
420
c write(*,*) 'Using xm',i,xm(i)
424
a=pmass(i,iconfig)**2/stot
425
c call setgrid(-i,xo,a,pow(i,iconfig))
426
c write(*,*) 'Enter minimum for ',-i, xo
430
if (pwidth(i,iconfig) .eq. 0) call setgrid(-i,xo,a,1)
431
if (pwidth(i,iconfig) .gt. 0) then
432
write(*,*) 'Using flat grid for BW',i,nbw,
436
c xe(i) = max(xm(i),xe(i))
438
mtot=mtot+max(xm(i),xm(i))
439
c write(*,*) 'New mtot',i,mtot,xm(i)
442
c Check closest to p1
445
l2 = iforest(2,i,iconfig) !need dr cut
448
c-JA 1/2009: Set grid also based on xqcut
449
if (l2 .gt. 0) x1 = max(etmin(l2),max(xqfact*xqcuti(l2),0d0))
450
x1 = max(x1, xm(l2)/1d0)
451
if (nt .gt. 1) x1 = max(x1,xk(nt-1))
453
c write(*,*) 'Using 1',l2,x1
456
c Check closest to p2
459
l2 = iforest(2,j,iconfig)
461
c-JA 1/2009: Set grid also based on xqcut
462
if (l2 .gt. 0) x2 = max(etmin(l2),max(xqfact*xqcuti(l2),0d0))
463
c if (l2 .gt. 0) x2 = max(etmin(l2),0d0)
464
x2 = max(x2, xm(l2)/1d0)
465
c if (nt .gt. 1) x2 = max(x2,xk(nt-1))
467
c write(*,*) 'Using 2',l2,x2
472
a=-pmass(i,iconfig)**2/stot
473
c call setgrid(-i,xo,a,pow(i,iconfig))
475
c write(*,*) 'Enter minimum for ',-i, xo
478
if (i .ne. -1 .or. .true.) call setgrid(-i,xo,a,1)
481
if (abs(lpp(1)) .eq. 1 .or. abs(lpp(2)) .eq. 1) then
482
write(*,*) 'etot',etot,nexternal
484
i = 3*(nexternal-2) - 4 + 1
485
c-----------------------
486
c tjs 4/29/2008 use analytic transform for s-hat
487
c-----------------------
488
if (swidth(i) .eq. 0d0) then
490
spole(i)= -2.0d0 ! 1/s pole
491
write(*,*) "Transforming s_hat 1/s ",i,xo
493
write(*,*) "Transforming s_hat BW ",spole(i),swidth(i)
495
c-----------------------
496
if (swidth(i) .eq. 0d0) then
497
call setgrid(i,xo,0d0,1)
502
c write(*,*) 'Enter minimum for ',-i, xo
504
c if (xo .gt. 0) call setgrid(-i,xo,a,1)
507
c write(*,*) 'Enter minimum for ',-i, xo
509
c if (xo .gt. 0) call setgrid(-i,xo,a,1)
515
c subroutine find_matches(iconfig,isym)
516
cc*****************************************************************************
517
cc Finds all of the matches to see what gains may be possible
518
cc*****************************************************************************
523
c include 'genps.inc'
524
c double precision zero
525
c parameter (zero = 0d0)
529
c integer iconfig,isym(0:10)
533
c integer i,j, nc, imatch
534
c double precision tprop(3,nexternal),xprop(3,nexternal)
538
c integer iforest(2,-max_branch:-1,lmaxconfigs)
539
c common/to_forest/ iforest
541
c integer mapconfig(0:lmaxconfigs), this_config
542
c common/to_mconfigs/mapconfig, this_config
544
cc include 'coupl.inc'
545
cc include 'configs.inc'
554
cc First get peaks for configuration interested in
560
c call get_peaks(iconfig,tprop)
562
c do i=1,mapconfig(0)
563
c call get_peaks(i,xprop)
564
cc call sort_prop(xprop)
565
c call match_peak(tprop,xprop,imatch)
566
c if (imatch .eq. 1) then
567
c write(*,*) 'Found Match',iconfig,i
573
c write(*,'(20i4)') (isym(i),i=0,isym(0))
576
c subroutine find_all_matches()
577
cc*****************************************************************************
578
cc Finds all of the matches to see what gains may be possible
579
cc*****************************************************************************
584
c include 'genps.inc'
585
c double precision zero
586
c parameter (zero = 0d0)
590
c double precision tprop(3,nexternal),xprop(3,nexternal)
595
c integer i,j, nc, imatch
596
c logical gm(lmaxconfigs)
600
c integer iforest(2,-max_branch:-1,lmaxconfigs)
601
c common/to_forest/ iforest
603
c integer mapconfig(0:lmaxconfigs), this_config
604
c common/to_mconfigs/mapconfig, this_config
606
cc include 'coupl.inc'
607
cc include 'configs.inc'
616
c do i=1,mapconfig(0)
619
c do j=1,mapconfig(0)
620
c if (.not. gm(j)) then
622
cc write(*,*) 'Need config ',j
623
c call get_peaks(j,tprop)
624
cc call sort_prop(tprop)
625
c write(*,'(i4,4e12.4)') j,(tprop(1,i), i=1,4)
626
c do i=j+1,mapconfig(0)
627
c call get_peaks(i,xprop)
628
cc call sort_prop(xprop)
629
c call match_peak(tprop,xprop,imatch)
630
c if (imatch .eq. 1) then
631
c write(*,*) 'Found Match',j,i
637
c write(*,*) 'Found matches',mapconfig(0),nc
641
c subroutine sort_prop(xprop)
642
cc*****************************************************************************
643
cc Sort props in order from min to max based on 1st component only
644
cc*****************************************************************************
649
c include 'genps.inc'
650
c double precision zero
651
c parameter (zero = 0d0)
655
c double precision xprop(3,nexternal)
660
c double precision temp(3,nexternal),xmin
661
c logical used(nexternal)
677
c if (.not. used(i) .and. xprop(1,i) .lt. xmin) then
683
c temp(i,j)=xprop(i,imin)
689
c xprop(j,i)=temp(j,i)
695
c subroutine match_peak(tprop,xprop,imatch)
696
cc*****************************************************************************
697
cc Determines if two sets of peaks are equivalent
698
cc*****************************************************************************
703
c include 'genps.inc'
704
c double precision zero
705
c parameter (zero = 0d0)
709
c double precision xprop(3,nexternal),tprop(3,nexternal)
724
c imatch = 1 !By default assume match
727
c if (tprop(j,i) .ne. xprop(j,i)) imatch=0
732
c subroutine get_peaks(iconfig,xt)
733
cc*****************************************************************************
734
cc Attempts to determine peaks for this configuration
735
cc*****************************************************************************
740
c include 'genps.inc'
741
c double precision zero
742
c parameter (zero = 0d0)
746
c double precision xt(3,nexternal)
752
c double precision xm(-nexternal:nexternal)
753
c double precision tsgn, xo, a
754
c double precision x1,x2
755
c double precision dr,mtot, stot
756
c integer i, l1, l2, j
758
c double precision pmass(-nexternal:0,lmaxconfigs)
759
c double precision pwidth(-nexternal:0,lmaxconfigs)
760
c integer pow(-nexternal:0,lmaxconfigs)
762
c integer imatch(0:lmaxconfigs)
767
c integer iforest(2,-max_branch:-1,lmaxconfigs)
768
c common/to_forest/ iforest
770
c integer mapconfig(0:lmaxconfigs), this_config
771
c common/to_mconfigs/mapconfig, this_config
773
c real*8 emass(nexternal)
774
c common/to_mass/emass
778
c double precision etmin(nincoming+1:nexternal),etamax(nincoming+1:nexternal)
779
c double precision emin(nincoming+1:nexternal)
780
c double precision r2min(nincoming+1:nexternal,nincoming+1:nexternal)
781
c double precision s_min(nexternal,nexternal)
782
c common/to_cuts/ etmin, emin, etamax, r2min, s_min
784
c double precision spole(maxinvar),swidth(maxinvar),bwjac
785
c common/to_brietwigner/spole ,swidth ,bwjac
787
c include 'coupl.inc'
788
cc include 'props.inc'
797
c stot = 4d0*ebeam(1)*ebeam(2)
798
cc iconfig = this_config
805
c do i=-1,-(nexternal-3),-1 !Find all the propagotors
806
c if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
807
c if (tsgn .eq. 1d0) then !s channel
808
c xm(i) = xm(iforest(1,i,iconfig))+xm(iforest(2,i,iconfig))
809
c mtot = mtot - xm(i)
810
c if (pwidth(i,iconfig) .gt. 0) then !B.W.
811
c write(*,*) 'Setting BW',i,pmass(i,iconfig)
812
c spole(-i)=pmass(i,iconfig)*pmass(i,iconfig)/stot
813
c swidth(-i) = pwidth(i,iconfig)*pmass(i,iconfig)/stot
814
c xm(i) = pmass(i,iconfig)
815
c xt(1,-i) = spole(-i)
816
c xt(2,-i) = swidth(-i)
819
c if (xm(i) - pmass(i,iconfig) .le. 0d0) then !Can hit pole
820
cc write(*,*) 'Setting new min',i,xm(i),pmass(i,iconfig)
821
c l1 = iforest(1,i,iconfig) !need dr cut
822
c l2 = iforest(2,i,iconfig)
823
c if (l2 .lt. l1) then
831
c & dr = max(r2min(l2,l1)*dabs(r2min(l2,l1)),0d0) !dr only for external
832
c dr = dr*.8d0 !0.8 to hit peak hard
833
c xo = 0.5d0*pmass(i,iconfig)**2 !0.5 to hit peak hard
836
c & xo = max(xo,max(etmin(l2),0d0)*max(etmin(l1),0d0)*dr)
837
cc write(*,*) 'Got dr',i,l1,l2,dr
838
c xo = xo+pmass(i,iconfig)**2
839
cc write(*,*) 'Setting xm',i,xm(i),sqrt(xo)
840
c xm(i) = sqrt(xo) !Reset xm to realistic minimum
842
cc xo = sqrt(pmass(i,iconfig)**2+ pmass(i,iconfig)**2)
844
cc xo = pmass(i,iconfig)+max(etmin,0d0)
846
cc write(*,*) 'Using xm',i,xm(i)
849
c a=pmass(i,iconfig)**2/stot
850
cc call setgrid(-i,xo,a,pow(i,iconfig))
851
cc call setgrid(-i,xo,a,1)
857
cc write(*,*) 'New mtot',i,mtot,xm(i)
860
cc Check closest to p1
862
c l2 = iforest(2,i,iconfig) !need dr cut
865
c if (l2 .gt. 0) x1 = max(etmin(l2),0d0)
866
c x1 = max(x1, xm(l2)/2d0)
867
cc write(*,*) 'Using 1',l2,x1
870
cc Check closest to p2
873
c l2 = iforest(2,j,iconfig)
876
c if (l2 .gt. 0) x2 = max(etmin(l2),0d0)
877
c x2 = max(x2, xm(l2)/2d0)
879
cc write(*,*) 'Using 2',l2,x2
884
c a=-pmass(i,iconfig)**2/stot
885
cc call setgrid(-i,xo,a,pow(i,iconfig))
886
cc call setgrid(-i,xo,a,1)
892
cc---------------------
893
cc tjs routine for x-hat
894
cc------------------------
895
c if (abs(lpp(1)) .eq. 1 .or. abs(lpp(2)) .eq. 1) then
896
c write(*,*) "setting s_hat",mtot,sqrt(stot)
898
c i = 3*(nexternal-2) - 4 + 1
899
cc call setgrid(i,xo,0d0,1)
904
c subroutine writeamp(p)
908
c include 'genps.inc'
912
c double precision p(0:3,nexternal)
916
c double precision xp(0:3,-nexternal:nexternal)
917
c integer i,j,iconfig
921
c integer iforest(2,-max_branch:-1,lmaxconfigs)
922
c common/to_forest/ iforest
924
c integer mapconfig(0:lmaxconfigs), this_config
925
c common/to_mconfigs/mapconfig, this_config
930
c double precision dot
934
c iconfig = this_config
940
c shat = dot(p(0,1),p(0,2))
943
c do i=-1,-(nexternal-3),-1 !Find all the propagotors
944
c if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
946
c xp(j,i) = xp(j,iforest(1,i,iconfig))
947
c $ +tsgn*xp(j,iforest(2,i,iconfig))
949
cc testamp=testamp*shat/(dot(xp(0,i),xp(0,i)))**2
950
cc testamp=testamp**2
953
c $ write(*,'(A,4e15.5)') 'V',(dot(xp(0,-i),xp(0,-i)),i=1,nexternal-3)
954
cc testamp=abs(testamp)
958
c subroutine histamp(p,dwgt)
962
c include 'genps.inc'
966
c double precision p(0:3,nexternal),dwgt
970
c double precision xp(0:3,-nexternal:nexternal)
971
c integer i,j,iconfig
976
c integer iforest(2,-max_branch:-1,lmaxconfigs)
977
c common/to_forest/ iforest
979
c integer mapconfig(0:lmaxconfigs), this_config
980
c common/to_mconfigs/mapconfig, this_config
985
c double precision dot
990
c iconfig = this_config
996
c shat = dot(p(0,1),p(0,2))
999
c do i=-1,-(nexternal-3),-1 !Find all the propagotors
1000
c if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
1002
c xp(j,i) = xp(j,iforest(1,i,iconfig))
1003
c $ +tsgn*xp(j,iforest(2,i,iconfig))
1006
c do i=1,nexternal-3
1007
cc write(*,*) sqrt(abs(dot(xp(0,-i),xp(0,-i)))),wgt
1008
c call hfill(10+i,real(sqrt(abs(dot(xp(0,-i),xp(0,-i))))),0.,wgt)
1013
c subroutine check_limits(p,xlimit, iconfig)
1014
cc*************************************************************************
1015
cc Checks limits on all of the functions being integrated
1016
cc*************************************************************************
1021
c include 'genps.inc'
1025
c double precision p(0:3,nexternal), xlimit(2,nexternal)
1030
c double precision xp(0:3,-nexternal:nexternal), tsgn
1031
c double precision sm
1033
c integer i,j, k1,k2
1037
c integer iforest(2,-max_branch:-1,lmaxconfigs)
1038
c common/to_forest/ iforest
1039
c integer mapconfig(0:lmaxconfigs), this_config
1040
c common/to_mconfigs/mapconfig, this_config
1044
c double precision dot
1052
cc Transform from rambo(1:4) format to helas (0:3)
1060
cc Now build propagators
1063
c do i=-1,-(nexternal-3),-1
1064
c if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
1065
c k1=iforest(1,i,iconfig)
1066
c k2=iforest(2,i,iconfig)
1068
c xp(j,i)=xp(j,k1)+tsgn*xp(j,k2)
1070
c sm = tsgn*dot(xp(0,i),xp(0,i))
1071
c if (sm .lt. xlimit(1,-i)) then
1073
cc write(*,*) 'New limit',-i,sm
1075
c if (sm .gt. xlimit(2,-i)) then
1077
cc write(*,*) 'New limit',-i,sm