~maddevelopers/mg5amcnlo/2.6.3_rwgt

« back to all changes in this revision

Viewing changes to Template/NLO/SubProcesses/cluster.f

  • Committer: olivier-mattelaer
  • Date: 2017-05-26 07:48:55 UTC
  • mfrom: (271.1.33 2.5.5)
  • Revision ID: olivier-mattelaer-20170526074855-r463wfxlom110fiu
passĀ theĀ 2.5.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
                     if(prwidth(k,ignum).gt.ZERO) then
214
214
                     if(btest(mlevel,4))
215
215
     $                       write(*,*)'Adding resonance ',ignum,icmp(l)
216
 
                        resmap(icmp(l),ignum)=.true.
 
216
                        resmap(icmp(l),ignum,nFKSprocess)=.true.
217
217
                     endif
218
218
                  enddo
219
219
c     proceed w/ next table, since there is no possibility,
278
278
      integer tprid(-max_branch:-1,n_max_cg)
279
279
      integer mapconfig(0:n_max_cg)
280
280
      common/c_configs_inc/iforest,sprop,tprid,mapconfig
281
 
      integer maxflow
282
 
      parameter (maxflow=999)
283
281
      integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc),
284
282
     &     icolup(2,nexternal,maxflow),niprocs
285
283
      common /c_leshouche_inc/idup,mothup,icolup,niprocs
341
339
      double precision prwidth(-max_branch:-1,n_max_cg)
342
340
      integer prow(-max_branch:-1,n_max_cg)
343
341
      common/c_props_inc/prmass,prwidth,prow
344
 
      integer maxflow
345
 
      parameter (maxflow=999)
346
342
      integer idup(nexternal,maxproc),mothup(2,nexternal,maxproc),
347
343
     &     icolup(2,nexternal,maxflow),niprocs
348
344
      common /c_leshouche_inc/idup,mothup,icolup,niprocs
458
454
c     check if we have constraint from onshell resonances
459
455
            foundbw=.true.
460
456
            do j=1,nbw
461
 
               if(resmap(ibwlist(1,j),id_cl(nFKSprocess,idij,i)))then
 
457
               if(resmap(ibwlist(1,j),id_cl(nFKSprocess,idij,i)
 
458
     $              ,nFKSprocess))then
462
459
                  cycle
463
460
               endif
464
461
               foundbw=.false.
520
517
      include 'message.inc'
521
518
      include 'real_from_born_configs.inc'
522
519
      include 'run.inc'
 
520
      include 'fks_info.inc'
523
521
c Argument
524
522
      double precision p(0:3,nexternal)
525
523
c Local
526
524
      integer i,j,k,n,idi,idj,idij,icgs(0:n_max_cg),nleft,iwin,jwin
527
 
     $     ,iwinp,imap(nexternal,2)
 
525
     $     ,iwinp,imap(nexternal,2),i_fks,j_fks
528
526
      double precision pcmsp(0:3),p1(0:3),pi(0:3),nr(0:3),nn2,ct,st
529
527
     $     ,minpt2ij,pt2ij(n_max_cl),zij(n_max_cl)
530
528
      double precision pz(0:3)
531
529
      data (pz(i),i=0,3)/1d0,0d0,0d0,1d0/
 
530
      integer igraphscounter
 
531
      data igraphscounter/149/
532
532
c Common
533
533
      INTEGER NFKSPROCESS
534
534
      COMMON/C_NFKSPROCESS/NFKSPROCESS
540
540
      double precision dj, pydj, djb, pyjb, dot, SumDot, zclus
541
541
      external findmt,dj, pydj, djb, pyjb, dot, SumDot, zclus, combid
542
542
 
 
543
      i_fks=fks_i_d(nFKSprocess)
 
544
      j_fks=fks_j_d(nFKSprocess)
 
545
      
543
546
      if (btest(mlevel,1))
544
547
     $   write (*,*)'New event'
545
548
 
626
629
                     endif
627
630
                  endif
628
631
c     Check if smallest pt2 ("winner")
629
 
                  if (pt2ij(idij).lt.minpt2ij) then
 
632
                  if (pt2ij(idij).lt.minpt2ij .or.
 
633
     &                 (pt2ij(idij).eq.minpt2ij .and.
 
634
     &                 (i.eq.i_fks .or. i.eq.j_fks) .and.
 
635
     &                 (j.eq.i_fks .or. j.eq.j_fks))  ) then
630
636
                     iwin=j
631
637
                     jwin=i
632
638
                     minpt2ij=pt2ij(idij)
799
805
                  exit
800
806
               endif
801
807
            enddo
 
808
            if (igraphs(0).ge.2) then ! "randomize" the graph taken
 
809
               igraphscounter=igraphscounter+1
 
810
               igraphs(0)=1
 
811
               igraphs(1)=igraphs(mod(igraphscounter,igraphs(0))+1)
 
812
            endif
802
813
            zcl(n+1)=1
803
814
            cluster=.true.
804
815
            clustered=.true.
866
877
                     write(*,*)'     cf. djb: ',djb(pcl(0,idi))
867
878
                  endif
868
879
               endif
869
 
               if (pt2ij(idij).lt.minpt2ij) then
 
880
               if (pt2ij(idij).lt.minpt2ij .or.
 
881
     &                 (pt2ij(idij).eq.minpt2ij .and.
 
882
     &                 (i.eq.i_fks .or. i.eq.j_fks) .and.
 
883
     &              (j.eq.i_fks .or. j.eq.j_fks))  ) then
870
884
                  iwin=j
871
885
                  jwin=i
872
886
                  minpt2ij=pt2ij(idij)