subroutine hec_geo c c fill geometry correspondence tables for adc channels c see hec_geo.inc for details on the various systems c c - tables relating the adc channel number system (ic) c to the database system (db) c c - tables relating the adc channel number system (ic) c to the physics system (ph) c c original July 96 c 13/02/97 M. Lefebvre correct for Sept 96 new electronics cabling c 19/03/97 M. Lefebvre include steering for different run periods c 10/05/97 M.L. D.O. include run period 5 c 19/10/97 D.O. include run period 6 c 28/03/98 D.O. include run period 7 c D.O. include run period 8 c 18/06/99 M.L. D.O. include run period 9 c 05/08/99 C.S. include run period 10 c 01/11/99 M.L. add logic for connected cells c 17/02/00 CS include run period 11 c 20/05/00 CS include run period 12 c 29/08/00 CS include run period 13 c 27/06/01 M.L. include run period 14 c 25/08/01 M.L. include run period 15 c implicit none c include'hec_par.inc' ! shared parameters include'hec_datacard.inc' include'hec_geo.inc' ! geometry common c integer ic, nc, i, j integer nnc, ic_nnc(1:i_adc_dim) c c check beam period c fill database and physics system correspondence tables c if (irunpd .eq. 1) then call hec_geo_may96 elseif (irunpd .eq. 2) then call hec_geo_jul96 elseif (irunpd .eq. 3) then call hec_geo_sep96 elseif (irunpd .eq. 4) then call hec_geo_feb97 elseif (irunpd .eq. 5) then call hec_geo_may97 elseif (irunpd .eq. 6) then call hec_geo_oct97 elseif (irunpd .eq. 7) then call hec_geo_apr98 elseif (irunpd .eq. 8) then call hec_geo_aug98 elseif (irunpd .eq. 9) then call hec_geo_jun99 elseif (irunpd .eq. 10) then call hec_geo_aug99 elseif (irunpd .eq. 11) then call hec_geo_feb00 elseif (irunpd .eq. 12) then call hec_geo_jun00 elseif (irunpd .eq. 13) then call hec_geo_aug00 elseif (irunpd .eq. 14) then call hec_geo_jul01 elseif (irunpd .eq. 15) then call hec_geo_aug01 else print *,' *** invalid beam period', irunpd stop endif c c flag the cells which are actually connected to a real calorimeter cell c look for module number c keep track locally of unconnected channels for printing only c nc = 0 nnc = 0 call vzero(ic_nnc, i_adc_dim) do ic = 1, i_adc_dim ic_connected(ic) = .false. if (ictodb(ic, 1) .gt. 0) then ic_connected(ic) = .true. nc = nc + 1 elseif (ic .le. i_adc_used) then nnc = nnc + 1 ic_nnc(nnc) = ic endif enddo print *, ' this geometry contains ',nc,' connected channels' print *, ' the UNCONNECTED channels are:' do i = 1, nnc/10 + 1 write(*, '(5x,10i5)') + (ic_nnc(j), j=1+10*(i-1), min(10+10*(i-1), nnc)) enddo c end