Module det_geom_mod

module det_geom_mod

        ! Variables
    integer (kind=4), public :: MAX_FOILS_D
    integer (kind=4), public :: MAX_PLANES_D
    integer (kind=4), public :: MAX_WIRES_D
    integer (kind=4), public :: MAX_FOILS_P
    integer (kind=4), public :: MAX_PLANES_P
    integer (kind=4), public :: MAX_WIRES_P
    integer (kind=4), private :: MAX_FOILS_T
    integer (kind=4), public :: MAX_PLANES_T
    integer (kind=4), public :: MAX_WIRES_T
    integer (kind=4), public :: MAXM_SCINTS
    integer (kind=4), public :: MAXT_SCINTS
    integer (kind=4), private :: MAXO_SCINTS
    integer (kind=4), public :: MAX_WIRES_SC
    integer, public, PARAMETER :: first_adc_plane = 5
    integer, public, PARAMETER :: last_adc_plane = 8
    integer, public, PARAMETER :: first_adc_wire = 57
    integer, public, PARAMETER :: last_adc_wire = 104
    integer, public, PARAMETER :: MAX_SCINTS = MAXM_SCINTS + MAXT_SCINTS + MAXO_SCINTS
    integer, private :: IVER
    integer (kind=4), public :: ndfoils
    integer (kind=4), public :: ndplanes
    integer (kind=4), private :: ndwires_physical
    integer (kind=4), public, dimension (MAX_PLANES_D) :: ndwires
    real (kind=4), public, dimension (MAX_FOILS_D) :: zdfoil
    real (kind=4), public, dimension (MAX_PLANES_D) :: zdplane
    real (kind=4), public, dimension (MAX_PLANES_D) :: dshift
    real (kind=4), public, dimension (MAX_PLANES_D) :: d_rot
    real (kind=4), public :: rd_myl
    real (kind=4), public :: td_myl
    real (kind=4), public :: dw_rad
    real (kind=4), public :: dw_len
    real (kind=4), public :: dw_space
    real (kind=4), public :: td_plane
    integer (kind=4), public :: npfoils
    integer (kind=4), public :: npplanes
    integer (kind=4), private :: npwires_physical
    integer (kind=4), public, dimension (MAX_PLANES_P) :: npwires
    real (kind=4), public, dimension (MAX_FOILS_P) :: zpfoil
    real (kind=4), public, dimension (MAX_PLANES_P) :: zpplane
    real (kind=4), public, dimension (MAX_PLANES_P) :: pshift
    real (kind=4), public, dimension (MAX_PLANES_P) :: p_rot
    real (kind=4), public :: rp_myl
    real (kind=4), public :: tp_myl
    real (kind=4), public :: pw_rad
    real (kind=4), public :: pw_len
    real (kind=4), public :: pw_space
    real (kind=4), public :: tp_plane
    real (kind=4), public :: targ_rad
    real (kind=4), public :: targ_thick
    real (kind=4), public :: targ_thickT
    real (kind=4), public :: cond_thick
    real (kind=4), public, dimension (2) :: targ_z
    integer (kind=4), public :: itarg_med
    integer (kind=4), public :: icond_med
    real (kind=4), public :: tfoil_r1
    real (kind=4), public :: tfoil_r2
    real (kind=4), public :: tfoil_thick
    real (kind=4), public :: cfoil_r1
    real (kind=4), public :: cfoil_r2
    real (kind=4), public :: cfoil_thick
    integer (kind=4), public :: ntfoils
    integer (kind=4), public :: ntplanes
    integer (kind=4), private :: ntwires_physical
    integer (kind=4), public, dimension (MAX_PLANES_T) :: ntwires
    real (kind=4), public, dimension (MAX_FOILS_T) :: ztfoil
    real (kind=4), public, dimension (MAX_PLANES_T) :: ztplane
    real (kind=4), public, dimension (MAX_PLANES_T) :: tshift
    real (kind=4), public, dimension (MAX_PLANES_T) :: t_rot
    real (kind=4), public :: rt_myl
    real (kind=4), public :: tt_myl
    real (kind=4), public :: tw_rad
    real (kind=4), public :: tw_len
    real (kind=4), public :: tw_space
    real (kind=4), public :: tt_plane
    integer (kind=4), public :: nmuscints
    integer (kind=4), public :: nt0scints
    integer (kind=4), public :: notherscints
    real (kind=4), public, dimension (MAXM_SCINTS) :: zmuscint
    real (kind=4), public, dimension (MAXM_SCINTS) :: rmuscint
    real (kind=4), public, dimension (MAXM_SCINTS) :: tmuscint
    real (kind=4), public, dimension (MAXT_SCINTS) :: zt0scint
    real (kind=4), public, dimension (2,MAXT_SCINTS) :: rt0scint
    real (kind=4), public, dimension (MAXT_SCINTS) :: tt0scint
    integer (kind=4), public, dimension (MAXM_SCINTS) :: imuplane
    integer (kind=4), public, dimension (MAXT_SCINTS) :: it0plane
    integer (kind=4), public, dimension (MAXO_SCINTS) :: iotherplane
    integer, public, dimension (MAXM_SCINTS) :: nmuwires
    integer, public, dimension (MAXT_SCINTS) :: nt0wires
    integer, public, dimension (MAXO_SCINTS) :: notherwires
    integer (kind=4), private :: irot_cell
    integer (kind=4), private :: irot_wire
    integer (kind=4), private, dimension (MAX_PLANES_P) :: irot_ppln
    integer (kind=4), private, dimension (MAX_PLANES_D) :: irot_dpln
    real (kind=4), public :: tc_gap
    real (kind=4), public :: tc_wdst
    real (kind=4), public :: tc_wdth
    real (kind=4), public :: tc_dist
    real (kind=4), public :: tc_wall
    real (kind=4), public :: tc_wndw
    real (kind=4), public :: tc_rim
    real (kind=4), public :: tc_positn

        ! Subroutines and functions
    private function read_dc_geom (input_unit)
    private function read_pc_geom (input_unit)
    private function read_tc_geom (input_unit)
    private function read_sc_geom (input_unit)
    private function read_sci2_geom (input_unit)
    private function read_sci3_geom (input_unit)
    private function read_tg_geom (input_unit)
    private function read_tg2_geom (input_unit)
    private function read_tg3_geom (input_unit, lout)
    private function read_det_geom (input_unit, lout)
    public subroutine OpenGeom (istat)

end module det_geom_mod

Description of Variables

MAX_FOILS_D

integer (kind=4), public :: MAX_FOILS_D

MAX_PLANES_D

integer (kind=4), public :: MAX_PLANES_D

MAX_WIRES_D

integer (kind=4), public :: MAX_WIRES_D

MAX_FOILS_P

integer (kind=4), public :: MAX_FOILS_P

MAX_PLANES_P

integer (kind=4), public :: MAX_PLANES_P

MAX_WIRES_P

integer (kind=4), public :: MAX_WIRES_P

MAX_FOILS_T

integer (kind=4), private :: MAX_FOILS_T

MAX_PLANES_T

integer (kind=4), public :: MAX_PLANES_T

MAX_WIRES_T

integer (kind=4), public :: MAX_WIRES_T

MAXM_SCINTS

integer (kind=4), public :: MAXM_SCINTS

MAXT_SCINTS

integer (kind=4), public :: MAXT_SCINTS

MAXO_SCINTS

integer (kind=4), private :: MAXO_SCINTS

MAX_WIRES_SC

integer (kind=4), public :: MAX_WIRES_SC

first_adc_plane

integer, public, PARAMETER :: first_adc_plane = 5

last_adc_plane

integer, public, PARAMETER :: last_adc_plane = 8

first_adc_wire

integer, public, PARAMETER :: first_adc_wire = 57

last_adc_wire

integer, public, PARAMETER :: last_adc_wire = 104

MAX_SCINTS

integer, public, PARAMETER :: MAX_SCINTS = MAXM_SCINTS + MAXT_SCINTS + MAXO_SCINTS

IVER

integer, private :: IVER

ndfoils

integer (kind=4), public :: ndfoils

ndplanes

integer (kind=4), public :: ndplanes

ndwires_physical

integer (kind=4), private :: ndwires_physical

ndwires

integer (kind=4), public, dimension (MAX_PLANES_D) :: ndwires

zdfoil

real (kind=4), public, dimension (MAX_FOILS_D) :: zdfoil

zdplane

real (kind=4), public, dimension (MAX_PLANES_D) :: zdplane

dshift

real (kind=4), public, dimension (MAX_PLANES_D) :: dshift

d_rot

real (kind=4), public, dimension (MAX_PLANES_D) :: d_rot

rd_myl

real (kind=4), public :: rd_myl

td_myl

real (kind=4), public :: td_myl

dw_rad

real (kind=4), public :: dw_rad

dw_len

real (kind=4), public :: dw_len

dw_space

real (kind=4), public :: dw_space

td_plane

real (kind=4), public :: td_plane

npfoils

integer (kind=4), public :: npfoils

npplanes

integer (kind=4), public :: npplanes

npwires_physical

integer (kind=4), private :: npwires_physical

npwires

integer (kind=4), public, dimension (MAX_PLANES_P) :: npwires

zpfoil

real (kind=4), public, dimension (MAX_FOILS_P) :: zpfoil

zpplane

real (kind=4), public, dimension (MAX_PLANES_P) :: zpplane

pshift

real (kind=4), public, dimension (MAX_PLANES_P) :: pshift

p_rot

real (kind=4), public, dimension (MAX_PLANES_P) :: p_rot

rp_myl

real (kind=4), public :: rp_myl

tp_myl

real (kind=4), public :: tp_myl

pw_rad

real (kind=4), public :: pw_rad

pw_len

real (kind=4), public :: pw_len

pw_space

real (kind=4), public :: pw_space

tp_plane

real (kind=4), public :: tp_plane

targ_rad

real (kind=4), public :: targ_rad

targ_thick

real (kind=4), public :: targ_thick

targ_thickT

real (kind=4), public :: targ_thickT

cond_thick

real (kind=4), public :: cond_thick

targ_z

real (kind=4), public, dimension (2) :: targ_z

itarg_med

integer (kind=4), public :: itarg_med

icond_med

integer (kind=4), public :: icond_med

tfoil_r1

real (kind=4), public :: tfoil_r1

tfoil_r2

real (kind=4), public :: tfoil_r2

tfoil_thick

real (kind=4), public :: tfoil_thick

cfoil_r1

real (kind=4), public :: cfoil_r1

cfoil_r2

real (kind=4), public :: cfoil_r2

cfoil_thick

real (kind=4), public :: cfoil_thick

ntfoils

integer (kind=4), public :: ntfoils

ntplanes

integer (kind=4), public :: ntplanes

ntwires_physical

integer (kind=4), private :: ntwires_physical

ntwires

integer (kind=4), public, dimension (MAX_PLANES_T) :: ntwires

ztfoil

real (kind=4), public, dimension (MAX_FOILS_T) :: ztfoil

ztplane

real (kind=4), public, dimension (MAX_PLANES_T) :: ztplane

tshift

real (kind=4), public, dimension (MAX_PLANES_T) :: tshift

t_rot

real (kind=4), public, dimension (MAX_PLANES_T) :: t_rot

rt_myl

real (kind=4), public :: rt_myl

tt_myl

real (kind=4), public :: tt_myl

tw_rad

real (kind=4), public :: tw_rad

tw_len

real (kind=4), public :: tw_len

tw_space

real (kind=4), public :: tw_space

tt_plane

real (kind=4), public :: tt_plane

nmuscints

integer (kind=4), public :: nmuscints

nt0scints

integer (kind=4), public :: nt0scints

notherscints

integer (kind=4), public :: notherscints

zmuscint

real (kind=4), public, dimension (MAXM_SCINTS) :: zmuscint

rmuscint

real (kind=4), public, dimension (MAXM_SCINTS) :: rmuscint

tmuscint

real (kind=4), public, dimension (MAXM_SCINTS) :: tmuscint

zt0scint

real (kind=4), public, dimension (MAXT_SCINTS) :: zt0scint

rt0scint

real (kind=4), public, dimension (2,MAXT_SCINTS) :: rt0scint

tt0scint

real (kind=4), public, dimension (MAXT_SCINTS) :: tt0scint

imuplane

integer (kind=4), public, dimension (MAXM_SCINTS) :: imuplane

it0plane

integer (kind=4), public, dimension (MAXT_SCINTS) :: it0plane

iotherplane

integer (kind=4), public, dimension (MAXO_SCINTS) :: iotherplane

nmuwires

integer, public, dimension (MAXM_SCINTS) :: nmuwires

nt0wires

integer, public, dimension (MAXT_SCINTS) :: nt0wires

notherwires

integer, public, dimension (MAXO_SCINTS) :: notherwires

irot_cell

integer (kind=4), private :: irot_cell

irot_wire

integer (kind=4), private :: irot_wire

irot_ppln

integer (kind=4), private, dimension (MAX_PLANES_P) :: irot_ppln

irot_dpln

integer (kind=4), private, dimension (MAX_PLANES_D) :: irot_dpln

tc_gap

real (kind=4), public :: tc_gap

tc_wdst

real (kind=4), public :: tc_wdst

tc_wdth

real (kind=4), public :: tc_wdth

tc_dist

real (kind=4), public :: tc_dist

tc_wall

real (kind=4), public :: tc_wall

tc_wndw

real (kind=4), public :: tc_wndw

tc_rim

real (kind=4), public :: tc_rim

tc_positn

real (kind=4), public :: tc_positn

Description of Subroutines and Functions

read_dc_geom

private function read_dc_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_dc_geom
end function read_dc_geom

read_pc_geom

private function read_pc_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_pc_geom
end function read_pc_geom

read_tc_geom

private function read_tc_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_tc_geom
end function read_tc_geom

read_sc_geom

private function read_sc_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_sc_geom
end function read_sc_geom

read_sci2_geom

private function read_sci2_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_sci2_geom
end function read_sci2_geom

read_sci3_geom

private function read_sci3_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_sci3_geom
end function read_sci3_geom

read_tg_geom

private function read_tg_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_tg_geom
end function read_tg_geom

read_tg2_geom

private function read_tg2_geom (input_unit)
    integer (kind=4) :: input_unit
    integer (kind=4) :: read_tg2_geom
end function read_tg2_geom

read_tg3_geom

private function read_tg3_geom (input_unit, lout)
    integer (kind=4) :: input_unit
    integer (kind=4) :: lout
    integer (kind=4) :: read_tg3_geom
end function read_tg3_geom

read_det_geom

private function read_det_geom (input_unit, lout)
    integer (kind=4) :: input_unit
    integer (kind=4) :: lout
    integer (kind=4) :: read_det_geom
end function read_det_geom

OpenGeom

public subroutine OpenGeom (istat)
    integer (kind=4) :: ISTAT
    ! Calls: CDFGET, RITE, Rite
end subroutine OpenGeom