~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to Template/LO/Source/dsample.f

  • Committer: olivier-mattelaer
  • Date: 2019-03-05 14:04:00 UTC
  • mto: (283.1.18 2.7.0)
  • mto: This revision was merged to the branch mainline in revision 284.
  • Revision ID: olivier-mattelaer-20190305140400-zsh8yn489f5yyzbf
better handling of zero matrix-element

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
            ievent=ievent+1
135
135
            call x_to_f_arg(ndim,ipole,mincfig,maxcfig,ninvar,wgt,x,p)
136
136
            if (pass_point(p)) then
 
137
               nb_pass_cuts = nb_pass_cuts + 1
137
138
               fx = dsig(p,wgt,0) !Evaluate function
138
139
               wgt = wgt*fx
139
140
               if (wgt .ne. 0d0) call graph_point(p,wgt) !Update graphs
316
317
               fx =0d0
317
318
               wgt=0d0
318
319
            endif
 
320
            
319
321
            if (nzoom .le. 0) then
320
322
               call sample_put_point(wgt,x(1),iter,ipole,itmin) !Store result
321
323
            else
705
707
      tmean = 0d0
706
708
      trmean = 0d0
707
709
      tsigma = 0d0
 
710
      nb_pass_cuts = 0
708
711
      kn = 0
709
712
      cur_it = 1
710
713
      do j=1,ng
1756
1759
         if (kn .ge. max_events .and. non_zero .le. 5) then
1757
1760
            call none_pass(max_events)
1758
1761
         endif
 
1762
         if (nb_pass_cuts.ge.1000 .and. non_zero.eq.0) then
 
1763
            call none_pass(1000)
 
1764
         endif
1759
1765
         if (non_zero .ge. events .or. (kn .gt. 200*events .and.
1760
1766
     $        non_zero .gt. 5)) then
1761
1767
 
2267
2273
c----
2268
2274
c  Begin Code
2269
2275
c----
2270
 
      write(*,*) 'No points passed cuts!'
2271
 
      write(*,*) 'Loosen cuts or increase max_events',max_events
 
2276
      if (nb_pass_cuts.eq.max_events) then
 
2277
         write(*,*) nb_pass_cuts, 
 
2278
     &    ' points passed the cut but all returned zero'
 
2279
         write(*,*) 'therefore considering this contribution as zero'
 
2280
      else
 
2281
         write(*,*) 'No points passed cuts!'
 
2282
         write(*,*) 'Loosen cuts or increase max_events',max_events
 
2283
      endif
 
2284
 
2272
2285
c      open(unit=22,file=result_file,status='old',access='append',
2273
2286
c     &           err=23)
2274
2287
c      write(22,222) 'Iteration',0,'Mean: ',0d0,
2540
2553
 
2541
2554
      write(*,*) "RESET CUMULATIVE VARIABLE"
2542
2555
      non_zero = 0
 
2556
      nb_pass_cuts = 0
2543
2557
      do j=1,maxinvar
2544
2558
         do i=1,ng -1
2545
2559
            inon_zero = 0