subroutine hec_geo_sep96 c c september 96 c north american front module: 16 pads equipped over 3 depths c north american back module : 16 pads equipped over 2 depths c european front module : 16 pads equipped over 3 depths c european back module : 16 pads equipped over 2 depths c 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 March 97 c implicit none c include'hec_par.inc' !shared parameters include'hec_geo.inc' !geometry correspondence tables c c local variables c integer ic integer i_mod integer i_seg integer i_pad integer i_eta integer i_phi integer i_z c c reset geometry c call vzero(ictodb, 3*i_adc_dim) call vzero(ictoph, 3*i_adc_dim) call vzero(dbtoic, i_mod_max*i_seg_max*i_pad_max) call vzero(phtoic, i_eta_max*i_phi_max*i_z_max) c i_adc_used = 160 i_tim_used = 1 c i_mod_used = 2 i_seg_used = 5 i_pad_used = 16 c i_eta_used = 12 i_phi_used = 4 i_z_used = 5 c c fill database system correspondence table c *** should really read database file... c do i_mod = 1, i_mod_used do i_seg = 1, i_seg_used do i_pad = 1, i_pad_used ic = i_pad + (i_seg - 1)*i_pad_used + + (i_mod - 1)*i_pad_used*i_seg_used c c correct for the new electronics cabling on tower i_eta=7, i_phi=1 c see hec_geo.inc for info on new electronics cabling c if (ic .eq. 121) then ic=107 elseif (ic .eq. 149) then ic=135 else ictodb(ic, 1) = i_mod ictodb(ic, 2) = i_seg ictodb(ic, 3) = i_pad endif dbtoic(i_mod, i_seg, i_pad) = ic enddo enddo enddo c c fill table c do i_mod = 1, i_mod_used do i_seg = 1, i_seg_used do i_pad = 1, i_pad_used ic = dbtoic(i_mod, i_seg, i_pad) c i_eta = (i_pad - 1)/2 + i_seg i_phi = 2*(i_mod_used - i_mod + 1) - mod(i_pad, 2) c c correct for the new electronics cabling c see hec_geo.inc for info on new electronics cabling c if (i_eta .eq. 7 .and. i_phi .eq. 1) then if (i_seg .eq. 1) then i_z = 1 elseif (i_seg .le. 3) then i_z = 2 else i_z = 3 endif else i_z = i_seg endif c ictoph(ic, 1) = i_eta ictoph(ic, 2) = i_phi ictoph(ic, 3) = i_z phtoic(i_eta, i_phi, i_z) = ic enddo enddo enddo c print *, ' *** September 96 geometry correspondence tables filled' c end