subroutine hec_geo_may97 c c may 97 c european front module: 24 pads equipped over 2 depths 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 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 = 48 i_tim_used = 32 c i_mod_used = 1 i_seg_used = 2 i_pad_used = 24 c i_eta_used = 14 i_phi_used = 2 i_z_used = 2 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 ictodb(ic, 1) = i_mod ictodb(ic, 2) = i_seg ictodb(ic, 3) = i_pad 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) i_z = i_seg 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 *, ' *** May 97 geometry correspondence tables filled' c end