~maddevelopers/mg5amcnlo/new_clustering

« back to all changes in this revision

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

  • Committer: Rikkert Frederix
  • Date: 2021-09-09 15:51:40 UTC
  • mfrom: (78.75.502 3.2.1)
  • Revision ID: frederix@physik.uzh.ch-20210909155140-rg6umfq68h6h47cf
merge with 3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
      double precision xsecScale_acc(maxscales,maxscales,maxdynscales)
12
12
     $     ,xsecPDFr_acc(0:maxPDFs,maxPDFsets)
13
13
      common /scale_pdf_print/xsecScale_acc,xsecPDFr_acc
14
 
      integer iappl
15
 
      common /for_applgrid/ iappl
16
 
      include "appl_common.inc"
 
14
      logical pineappl
 
15
      common /for_pineappl/ pineappl
 
16
      include "pineappl_common.inc"
17
17
      nwgt=1
18
18
      if (.not.allocated(weights_info)) allocate(weights_info(1))
19
19
      weights_info(nwgt)="central value               "
109
109
c start with central member of the first set
110
110
         call InitPDFm(1,0)
111
111
      endif
112
 
      if(iappl.ne.0)then
 
112
      if(pineappl)then
113
113
c Initialize grid parameters to negative values.
114
114
         appl_Q2min   = -1d0
115
115
         appl_Q2max   = -1d0
148
148
 
149
149
      subroutine topout
150
150
      use extra_weights
 
151
      use mint_module
151
152
      implicit none
152
153
      include "nexternal.inc"
153
154
      include 'run.inc'
154
155
      integer ii,jj,n,kk,nn
155
 
      logical usexinteg,mint
156
 
      common/cusexinteg/usexinteg,mint
157
 
      integer itmax,ncall
158
 
      common/citmax/itmax,ncall
159
156
      logical useitmax
160
157
      common/cuseitmax/useitmax
161
158
      real*8 xnorm
162
159
      double precision xsecScale_acc(maxscales,maxscales,maxdynscales)
163
160
     $     ,xsecPDFr_acc(0:maxPDFs,maxPDFsets)
164
161
      common /scale_pdf_print/xsecScale_acc,xsecPDFr_acc
165
 
      integer iappl
166
 
      common /for_applgrid/ iappl
167
 
      include "appl_common.inc"
 
162
      logical pineappl
 
163
      common /for_pineappl/ pineappl
 
164
      include "pineappl_common.inc"
168
165
c
169
 
      if(usexinteg.and..not.mint) then
170
 
         xnorm=1.d0/float(itmax)
171
 
      elseif(mint) then
172
 
         xnorm=1.d0/float(ncall)
173
 
      else
174
 
         xnorm=1d0
175
 
      endif
 
166
      xnorm=1.d0/float(ncalls0)
176
167
      if(useitmax)xnorm=xnorm/float(itmax)
177
 
c Normalization factor for the APPLgrid grids
178
 
      if(iappl.ne.0) appl_norm_histo = 1d0 / dble(ncall*itmax)
 
168
c Normalization factor for the PineAPPL grids
 
169
      if(pineappl) appl_norm_histo = 1d0 / (dble(ncalls0)*dble(itmax))
179
170
      call analysis_end(xnorm)
180
171
c Write the accumulated results to a file
181
172
      open (unit=34,file='scale_pdf_dependence.dat',status='unknown')
251
242
      double precision xsecScale_acc(maxscales,maxscales,maxdynscales)
252
243
     $     ,xsecPDFr_acc(0:maxPDFs,maxPDFsets)
253
244
      common /scale_pdf_print/xsecScale_acc,xsecPDFr_acc
254
 
      integer iappl
255
 
      common /for_applgrid/ iappl
256
 
      include "appl_common.inc"
257
 
c Born, n-body or (n+1)-body contribution:
 
245
      integer amp_pos_plot
 
246
      common /campposplot/ amp_pos_plot
 
247
      logical pineappl
 
248
      common /for_pineappl/ pineappl
 
249
      include "pineappl_common.inc"
 
250
c Born, n-body or (n+1)-body contribution. For more information
 
251
C  about itype, see the comments about plot_id inside
 
252
C  the fill_plot subroutine of fks_singular.f
258
253
      if(itype.eq.11) then
259
254
         ibody=1 ! (n+1)-body
260
 
      elseif(itype.eq.12)then
 
255
      elseif(itype.ge.12 .and. itype.le.14)then
261
256
         ibody=2 ! n-body
262
257
      elseif(itype.eq.20)then
263
258
         ibody=3 ! Born
284
279
         enddo
285
280
         p(4,i)=pmass(i)
286
281
      enddo
287
 
      if(iappl.ne.0)then
288
 
         appl_itype     = ibody
 
282
      if(pineappl)then
 
283
         appl_itype = ibody
 
284
         if(ibody.eq.2)then
 
285
c      special treatment for collinear
 
286
c      and soft collinear counterterms
 
287
c      (see comments inside the fill_plots subroutine)
 
288
           if(itype.eq.13)then
 
289
            !collinear counterterm
 
290
             appl_itype = 4
 
291
           elseif(itype.eq.14)then
 
292
            !solf-collinear counterterm
 
293
             appl_itype = 5
 
294
           endif
 
295
         endif
 
296
         appl_amp_pos   = amp_pos_plot
289
297
         appl_www_histo = www(1)
290
298
      endif
291
299
      call analysis_fill(p,istatus,ipdg,www,ibody)
 
300
      if(pineappl)then
 
301
        ! this call is necessary since PineAPPL
 
302
        ! already combine the different contributions
 
303
        ! with the same kinematics, while histograms
 
304
        ! are filled contribution by contribution.
 
305
        call APPL_delete_itype
 
306
      endif
292
307
c Fill the accumulated results
293
308
      i_wgt=1
294
309
      if (do_rwgt_scale) then