subroutine nplotter_W_only(p,wt,wt2,switch) c--- Variable passed in to this routine: c c--- p: 4-momenta of particles in the format p(i,4) c--- with the particles numbered according to the input file c--- and components labelled by (px,py,pz,E) c c--- wt: weight of this event c c--- wt2: weight^2 of this event c c--- switch: an integer equal to 0 or 1, depending on the type of event c--- 0 --> lowest order, virtual or real radiation c--- 1 --> counterterm for real radiation implicit none include 'vegas_common.f' include 'constants.f' include 'histo.f' include 'jetlabel.f' include 'outputflags.f' double precision p(mxpart,4),wt,wt2,yrap,pt,r,yraptwo,etaraptwo, & y3,y4,y5,pt3,pt4,pt5,Re5,y34,eta34,ylep,yjet,ptlep,ptjet double precision etal(11),etau(11) data etal/0.00,0.21,0.42,0.63,0.84,1.05,1.37,1.52,1.74,1.95,2.18/ data etau/0.21,0.42,0.63,0.84,1.05,1.37,1.52,1.74,1.95,2.18,2.50/ double precision etal1(8),etau1(8) data etal1/2.00,2.25,2.50,2.75,3.00,3.25,3.50,4.00/ data etau1/2.25,2.50,2.75,3.00,3.25,3.50,4.00,4.50/ double precision etal2(11),etau2(11) data etal2/0.00,0.20,0.40,0.60,0.80,1.00,1.20,1.40,1.60,1.85,2.10/ data etau2/0.20,0.40,0.60,0.80,1.00,1.20,1.40,1.60,1.85,2.10,2.40/ integer switch,n,nplotmax,nproc,exptid character*4 tag logical first common/nplotmax/nplotmax common/nproc/nproc common/exptid/exptid data first/.true./ save first ************************************************************************ * * * INITIAL BOOKKEEPING * * * ************************************************************************ if (first) then c--- Initialize histograms, without computing any quantities; instead c--- set them to dummy values tag='book' y3=1d3 y4=1d3 c--- If there is no NLO jet, these initial y5, pt5 will not pass the cut y5=1d3 pt5=1d3 c--- If Re5 is not changed by the NLO value, it will be out of c--- the plotting range Re5=1d3 jets=1 c--- (Upper) limits for the plots ylep=6d0 yjet=3d0 ptlep=100d0 ptjet=80d0 goto 99 else c--- Add event in histograms tag='plot' endif ************************************************************************ * * * DEFINITIONS OF QUANTITIES TO PLOT * * * ************************************************************************ c--- W rapidity and pseudorapidity y34=yraptwo(3,4,p) eta34=etaraptwo(3,4,p) c--- If nproc=1, plot e^+(4). If nproc=6, plot e^-(3). if(nproc .eq. 1) then y4=yrap(4,p) pt4=pt(4,p) else y3=yrap(3,p) pt3=pt(3,p) endif c--- eventpart=4+jets c--- print*, nproc if(jets .gt. 0) then pt5=pt(5,p) y5=yrap(5,p) if(nproc .eq. 1) then Re5=R(p,4,5) else Re5=R(p,3,5) endif else pt5=-1d0 y5=1d3 Re5=1d3 endif ************************************************************************ * * * FILL HISTOGRAMS * * * ************************************************************************ c--- Call histogram routines 99 continue c--- Book and fill ntuple if that option is set, remembering to divide c--- by # of iterations now that is handled at end for regular histograms if (creatent .eqv. .true.) then call bookfill(tag,p,wt/dfloat(itmx)) endif c--- "n" will count the number of histograms n=nextnplot c--- Syntax of "bookplot" routine is: c c--- call bookplot(n,tag,titlex,var,wt,wt2,xmin,xmax,dx,llplot) c c--- n: internal number of histogram c--- tag: "book" to initialize histogram, "plot" to fill c--- titlex: title of histogram c--- var: value of quantity being plotted c--- wt: weight of this event (passed in) c--- wt2: weight of this event (passed in) c--- xmin: lowest value to bin c--- xmax: highest value to bin c--- dx: bin width c--- llplot: equal to "lin"/"log" for linear/log scale c call bookplot(n,tag,'W rapidity',y34,wt,wt2,-6d0,6d0,0.2d0,'lin') c call ebookplot(n,tag,y34,wt) c n=n+1 c call bookplot(n,tag,'W ps-rap',eta34,wt,wt2,-6d0,6d0,0.2d0,'lin') c n=n+1 if(nproc.eq.1) then if(exptid.ge.11.and.exptid.le.14) then call bookplot2(n,tag,'y(lep)',abs(y4),wt,wt2,etal,etau,11,'lin') else if(exptid.eq.15) then call bookplot2(n,tag,'y(lep)',abs(y4),wt,wt2,etal1,etau1,8,'lin') else if(exptid.eq.16) then call bookplot2(n,tag,'y(lep)',abs(y4),wt,wt2,etal,etau,11,'lin') else call bookplot(n,tag,'y(lep)',y4,wt,wt2,-ylep,ylep,0.2d0,'lin') endif n=n+1 c call bookplot(n,tag,'pt(lep)',pt4,wt,wt2,0d0,ptlep,2d0,'lin') c n=n+1 else if(nproc.eq.6) then if(exptid.ge.61.and.exptid.le.64) then call bookplot2(n,tag,'y(lep)',abs(y3),wt,wt2,etal,etau,11,'lin') else if(exptid.eq.65) then call bookplot2(n,tag,'y(lep)',abs(y3),wt,wt2,etal1,etau1,8,'lin') else if(exptid.eq.66) then call bookplot2(n,tag,'y(lep)',abs(y3),wt,wt2,etal,etau,11,'lin') else call bookplot(n,tag,'y(lep)',y3,wt,wt2,-ylep,ylep,0.2d0,'lin') endif n=n+1 c call bookplot(n,tag,'pt(lep)',pt3,wt,wt2,0d0,ptlep,2d0,'lin') c n=n+1 endif c call bookplot(n,tag,'y5',y5,wt,wt2,-yjet,yjet,0.2d0,'lin') c n=n+1 c call bookplot(n,tag,'pt5',pt5,wt,wt2,0d0,ptjet,2d0,'lin') c n=n+1 ************************************************************************ * * * FINAL BOOKKEEPING * * * ************************************************************************ c--- We have over-counted the number of histograms by 1 at this point n=n-1 c--- Ensure the built-in maximum number of histograms is not exceeded call checkmaxhisto(n) c--- Set the maximum number of plots, on the first call if (first) then first=.false. nplotmax=n endif return end