Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

c...pyfill all the data.
      subroutine uppyfill(idwtup,generate,xwgtup,pt,eta,st,y,pseta)
      implicit double precision(a-h, o-z)
	implicit integer(i-n)

	common/ptpass/ptmin,ptmax,crossmax,etamin,etamax,
     &	smin,smax,ymin,ymax,psetamin,psetamax
	common/histcol/inx
	common/counter/ibcstate,nev
      common/extraz/zfactor,zmin,zmax
      logical generate

c      write (91,'(d20.10)') pseta
	
		 if(idwtup.eq.1.and.generate) then
			    call pyfill(1,pt,1.0d0)
	            call pyfill(2,eta,1.0d0)
	            call pyfill(3,st,1.0d0)
	            call pyfill(4,y,1.0d0)
			    call pyfill(5,pseta,1.0d0)
				call pyfill(6,zfactor,1.0d0)
c...added output files. record differential distribution of rapidity
c...with certain pt-cut.
                  if(pt .gt. 5.0d+0) then
				    call pyfill(11,eta,1.0d0)
					call pyfill(41,st,1.0d0)
	            end if
				if(pt .gt. 2.0d+1) then
				    call pyfill(12,eta,1.0d0)
					call pyfill(42,st,1.0d0)
	            end if
				if(pt .gt. 3.5d+1) then
				    call pyfill(13,eta,1.0d0)
					call pyfill(43,st,1.0d0)
				end if
				if(pt .gt. 5.0d+1) then
				    call pyfill(14,eta,1.0d0)
					call pyfill(44,st,1.0d0)
				end if
				if(pt .gt. 1.0d+2) then
				    call pyfill(15,eta,1.0d0)
					call pyfill(45,st,1.0d0)
	            end if
c...added output files. record differential distribution of pt
c...and shat with certain rapidity-cut.
                  if(dabs(eta) .le. 5.0d-1) then
				    call pyfill(21,pt,1.0d0)
	                call pyfill(31,st,1.0d0)
	            end if
	            if(dabs(eta) .le. 1.0d+0) then
				    call pyfill(22,pt,1.0d0)
	                call pyfill(32,st,1.0d0)
	            end if
	            if(dabs(eta) .le. 1.5d+0) then
				    call pyfill(23,pt,1.0d0)
	                call pyfill(33,st,1.0d0)
	            end if
				if(dabs(eta) .le. 2.0d+0) then
				    call pyfill(24,pt,1.0d0)
	                call pyfill(34,st,1.0d0)
	            end if
				if(dabs(eta) .le. 2.5d+0) then
				    call pyfill(25,pt,1.0d0)
	                call pyfill(35,st,1.0d0)
	            end if
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
				if(dabs(eta).ge.5.0d-1 .and. dabs(eta).le.1.0d+0) then
				    call pyfill(52,pt,1.0d0)
	            end if
				if(dabs(eta).ge.1.0d+0 .and. dabs(eta).le.1.5d+0) then
				    call pyfill(53,pt,1.0d0)
	            end if
				if(dabs(eta).ge.1.5d+0 .and. dabs(eta).le.2.0d+0) then
				    call pyfill(54,pt,1.0d0)
	            end if
				if(dabs(eta).ge.2.0d+0 .and. dabs(eta).le.2.5d+0) then
				    call pyfill(55,pt,1.0d0)
	            end if
	      else
				call pyfill(1,pt,xwgtup/nev*inx/(ptmax-ptmin))
	            call pyfill(2,eta,xwgtup/nev*inx/(etamax-etamin))
	            call pyfill(3,st,xwgtup/nev*inx/(smax-smin))
	            call pyfill(4,y,xwgtup/nev*inx/(ymax-ymin))
			    call pyfill(5,pseta,xwgtup/nev*inx/(psetamax-psetamin))
				call pyfill(6,zfactor,xwgtup/nev*inx/(zmax-zmin))
c...added output files. record differential distribution of rapidity
c...with certain pt-cut.
                  if(pt .ge. 5.0d+0) then
      			    call pyfill(11,eta,xwgtup/nev*inx/(etamax-etamin))
					call pyfill(41,st,xwgtup/nev*inx/(smax-smin))
	            end if
				if(pt .ge. 2.0d+1) then
          		    call pyfill(12,eta,xwgtup/nev*inx/(etamax-etamin))
					call pyfill(42,st,xwgtup/nev*inx/(smax-smin))
	            end if
				if(pt .ge. 3.5d+1) then
      			    call pyfill(13,eta,xwgtup/nev*inx/(etamax-etamin))
				    call pyfill(43,st,xwgtup/nev*inx/(smax-smin))
				end if
				if(pt .ge. 5.0d+1) then
      			    call pyfill(14,eta,xwgtup/nev*inx/(etamax-etamin))
				    call pyfill(44,st,xwgtup/nev*inx/(smax-smin))
				end if
				if(pt .ge. 1.0d+2) then
      			    call pyfill(15,eta,xwgtup/nev*inx/(etamax-etamin))
	                call pyfill(45,st,xwgtup/nev*inx/(smax-smin))
	            end if
c...added output files. record differential distribution of pt
c...and shat with certain rapidity-cut.
                  if(dabs(eta) .le. 5.0d-1) then
				    call pyfill(21,pt,xwgtup/nev*inx/(ptmax-ptmin))
	                call pyfill(31,st,xwgtup/nev*inx/(smax-smin))
	            end if
	            if(dabs(eta) .le. 1.0d+0) then
				    call pyfill(22,pt,xwgtup/nev*inx/(ptmax-ptmin))
	                call pyfill(32,st,xwgtup/nev*inx/(smax-smin))
	            end if
	            if(dabs(eta) .le. 1.5d+0) then
				    call pyfill(23,pt,xwgtup/nev*inx/(ptmax-ptmin))
	                call pyfill(33,st,xwgtup/nev*inx/(smax-smin))
	            end if
				if(dabs(eta) .le. 2.0d+0) then
				    call pyfill(24,pt,xwgtup/nev*inx/(ptmax-ptmin))
	                call pyfill(34,st,xwgtup/nev*inx/(smax-smin))
	            end if
				if(dabs(eta) .le. 2.5d+0) then
				    call pyfill(25,pt,xwgtup/nev*inx/(ptmax-ptmin))
	                call pyfill(35,st,xwgtup/nev*inx/(smax-smin))
	            end if
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
				if(dabs(eta).ge.5.0d-1 .and. dabs(eta).le.1.0d+0) then
				    call pyfill(52,pt,xwgtup/nev*inx/(ptmax-ptmin))
	            end if
				if(dabs(eta).ge.1.0d+0 .and. dabs(eta).le.1.5d+0) then
				    call pyfill(53,pt,xwgtup/nev*inx/(ptmax-ptmin))
	            end if
				if(dabs(eta).ge.1.5d+0 .and. dabs(eta).le.2.0d+0) then
				    call pyfill(54,pt,xwgtup/nev*inx/(ptmax-ptmin))
	            end if
				if(dabs(eta).ge.2.0d+0 .and. dabs(eta).le.2.5d+0) then
				    call pyfill(55,pt,xwgtup/nev*inx/(ptmax-ptmin))
	            end if
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
	      end if

      end