*********************************************************** * subroutine prthitmc(prtdata,prt1ene,prt2ene,ierr) * * returns: mean 'energy' values for the 2 counter * pairs of PRT1 and the 3 pairs of PRT2 located * around the proton beam pipe. * * comment: pulse height cuts for all channels: 0.1 pC * no timing cut * * author: K.Desler * last change: 03/08/98 * *********************************************************** implicit none integer ierr,i real prt1ene,prt2ene integer energy integer ishft real prtdata(14,2) real e c pulse height cuts PRT e = 0.1 ierr = 0 prt1ene = 0 prt2ene = 0 c loop over PRT2 channels 1/2, 3/4, 7/8 do i = 1, 5 if (i.ne.3.and.i.ne.5) then if (prtdata(2*i-1,1).gt.e.and.prtdata(2*i,1).gt.e) then prt2ene = prt2ene + & (prtdata(2*i-1,1)+prtdata(2*i,1))/2. endif endif enddo c loop over PRT1 channels do i = 6, 7 if (prtdata(2*i-1,1).gt.e.and.prtdata(2*i,1).gt.e) then prt1ene = prt1ene + & (prtdata(2*i-1,1)+prtdata(2*i,1))/2. endif enddo return end