subroutine nplotter_Z_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 double precision yrap,pt,yraptwo,pttwo,r c--- Z->e+e-(31) or b bbar(33): both measured, rapidities and momenta of 3 and 4 can c--- be calculated, also the invariant mass m34 double precision y3,y4,y5,y34,pt3,pt4,pt5,pt34,m34,r35 double precision ylep, yjet, ptlep, ptjet,costheta, & p3(4),p4(4),p34(4) double precision mzl(6),mzu(6) data mzl/12,17,22,28,36,46/ data mzu/17,22,28,36,46,66/ double precision mlol(9),mlou(9) data mlol/15,20,25,30,35,40,45,50,55/ data mlou/20,25,30,35,40,45,50,55,60/ double precision mpkl(13),mpku(13) data mpkl/60,64,68,72,76,81,86,91, 96,101,106,110,115/ data mpku/64,68,72,76,81,86,91,96,101,106,110,115,120/ double precision mhil(8),mhiu(8) data mhil/120,126,133,141,150,160,171,185/ data mhiu/126,133,141,150,160,171,185,200/ double precision mxhil(11),mxhiu(11) data mxhil/200,220,243,273,320,380,440,510,600,1000,1500/ data mxhiu/220,243,273,320,380,440,510,600,1000,1500,2000/ double precision a8ml(12),a8mh(12) data a8ml/116,130,150,175,200,230,260,300,380,500, 700,1000/ data a8mh/130,150,175,200,230,260,300,380,500,700,1000,1500/ double precision yzl(24),yzu(24) data yzl/0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1, $ 1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.1,2.2,2.3/ data yzu/0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2, $ 1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.1,2.2,2.3,2.4/ double precision zrapl(18),zrapu(18) data zrapl/2.000,2.125,2.250,2.375,2.500,2.625,2.750,2.875, $ 3.000,3.125,3.250,3.375,3.500,3.625,3.750,3.875, $ 4.000,4.250/ data zrapu/2.125,2.250,2.375,2.500,2.625,2.750,2.875,3.000, $ 3.125,3.250,3.375,3.500,3.625,3.750,3.875,4.000, $ 4.250,4.500/ 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 y5=1d3 y34=1d3 pt3=0d0 pt4=0d0 pt5=1d3 pt34=0d0 m34=0d0 r35=1d3 jets=1 c--- (Upper) limits for the plots ylep=6d0 yjet=3.2d0 ptlep=80d0 ptjet=100d0 goto 99 else c--- Add event in histograms tag='plot' endif ************************************************************************ * * * DEFINITIONS OF QUANTITIES TO PLOT * * * ************************************************************************ y3=yrap(3,p) y4=yrap(4,p) y34=yraptwo(3,4,p) pt3=pt(3,p) pt4=pt(4,p) pt34=pttwo(3,4,p) m34=dsqrt((p(3,4)+p(4,4))**2-(p(3,1)+p(4,1))**2 . -(p(3,2)+p(4,2))**2-(p(3,3)+p(4,3))**2) if(jets .gt. 0) then pt5=pt(5,p) y5=yrap(5,p) r35=R(p,3,5) else pt5=-1d0 y5=1d3 r35=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,'y3',y3,wt,wt2,-ylep,ylep,0.2d0,'lin') c n=n+1 c call bookplot(n,tag,'y4',y4,wt,wt2,-ylep,ylep,0.2d0,'lin') c n=n+1 c call bookplot(n,tag,'y34',y34,wt,wt2,-ylep,ylep,0.2d0,'lin') c n=n+1 c call bookplot(n,tag,'pt3',pt3,wt,wt2,0d0,ptlep,2d0,'lin') c n=n+1 c call bookplot(n,tag,'pt4',pt4,wt,wt2,0d0,ptlep,2d0,'lin') c n=n+1 c call bookplot(n,tag,'pt34',pt34,wt,wt2,0d0,50d0,2d0,'lin') c n=n+1 c call bookplot(n, tag,'m34',m34,wt,wt2,70d0,110d0,0.5d0,'lin') c n=n+1 c call bookplot(n,tag,'DeltaR35',r35,wt,wt2,0d0,5d0,0.1d0,'lin') c n=n+1 c call bookplot(n,tag,'y5',y5,wt,wt2,-yjet,yjet,0.5d0,'lin') c n=n+1 c call bookplot(n,tag,'pt5',pt5,wt,wt2,0d0,ptjet,2d0,'lin') c n=n+1 if(exptid.eq.311) then call bookplot2(n,tag,'mll',m34,wt,wt2,mlol,mlou,9,'lin') n=n+1 c call bookplot2(n,tag,'yll',abs(y34),wt,wt2,yzl,yzu,24,'lin') call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.1d0,'lin') n=n+1 else if(exptid.eq.312) then call bookplot2(n,tag,'mll',m34,wt,wt2,mpkl,mpku,13,'lin') n=n+1 c call bookplot2(n,tag,'yll',abs(y34),wt,wt2,yzl,yzu,24,'lin') call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.1d0,'lin') n=n+1 else if(exptid.eq.313) then call bookplot2(n,tag,'mll',m34,wt,wt2,mhil,mhiu,8,'lin') n=n+1 c call bookplot2(n,tag,'yll',abs(y34),wt,wt2,yzl,yzu,24,'lin') call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.1d0,'lin') n=n+1 else if(exptid.eq.314) then call bookplot2(n,tag,'mll',m34,wt,wt2,mxhil,mxhiu,11,'lin') n=n+1 c call bookplot2(n,tag,'yll',abs(y34),wt,wt2,yzl,yzu,24,'lin') call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.2d0,'lin') n=n+1 elseif (exptid.eq.315) then call bookplot2(n,tag,'yll',abs(y34),wt,wt2,zrapl,zrapu,18,'lin') n=n+1 elseif (exptid.eq.316.or.exptid.eq.318) then call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.4d0,'lin') n=n+1 elseif (exptid.eq.317) then call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.2d0,'lin') n=n+1 elseif (exptid.eq.319) then call bookplot(n,tag,'mll',m34,wt,wt2,26d0,66d0,5d0,'lin') n=n+1 call bookplot2(n,tag,'mll',m34,wt,wt2,mzl,mzu,6,'lin') n=n+1 elseif (exptid.eq.3110) then call bookplot2(n,tag,'mll',m34,wt,wt2,a8ml,a8mh,12,'lin') n=n+1 call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.2d0,'lin') n=n+1 call bookplot(n,tag,'yll',abs(y34),wt,wt2,0d0,2.4d0,0.4d0,'lin') n=n+1 endif ************************************************************************ * * * 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