From: Maher Quraan <quraan@triumf.ca>
Date: Tue, 13 Jul 1999 17:08:29 -0700
To: e614software@relay.phys.ualberta.ca
Subject: data structures code
This file contains the declarations for the data structures and
some comments and examples.
--
==================================================================
Maher Quraan Mail:
office: Trailer A, TRIUMF TRIUMF
email: quraan@triumf.ca 4004 Wesbrook Mall
phone: (604)222-1047 ext. 6333 Vancouver, BC
fax: (604)222-1074 Canada V6T 2A3
http://www.phys.ualberta.ca/~maher/maher.html
==================================================================
! Define a structure that contains the tdc info (time and width)
TYPE tdc_type
REAL(r4) :: time, width
END TYPE tdc_type
! Now define an array "tdc" with a hit index. To access the tdc width
! for the first hit, for example, we have: tdc(1)%width
TYPE (tdc_type), DIMENSION(MAXHITS) :: tdc
! Define a structure that contains the hit position, the angle
! of the track at the hit position, and the hit's weight for track
! fitting.
TYPE hitpos_type
REAL(r4) :: u, v, z, angle, weight
END TYPE hitpos_type
! Now define an array "hitpos" with a hit index anologous to
! the one defined for the "tdc". For example hitpos(1)%u
! gives the "u" position for the first hit.
TYPE (hitpos_type), DIMENSION(MAXHITS) :: hitpos
! Define a structure that contains the helix parameters
TYPE helix_type
REAL(r4) :: x0, y0, phi0, rad, dip
END TYPE helix_type
! Define a structure that contains the track information:
! nDChits: the number of DC hits in the track.
! DChits : an array containing the "ihit" location for each DC hit
! in the track, this index allows us to obtain corresponding
! "tdc" and "hitpos" information for the track.
! nPChits: the number of DC hits in the track.
! PChits : an array containing the "ihit" location for each PC hit
! in the track, this index allows us to obtain corresponding
! "tdc" and "hitpos" information for the track.
! helix: the previously defined structure containing helix parameters.
TYPE track_type
INTEGER(i4) :: nhits
INTEGER(i4), DIMENSION(MAXHITS) :: hits
TYPE (helix_type) :: helix
END TYPE track_type
! Now define an array "track" with a track number index. To refer to
! the helix parameter x0 for track 1 we have: track(1)%helix%x0
! to obtain a hitpos for the first DC hit in track 1 we have:
! hitpos(track(1)%DChits(1)) etc.
TYPE (track_type), DIMENSION(MAXTRACKS) :: track
! Define a structure for multiple hits of a wire.
! nhits: number of hits on that wire.
! hits : an array containing the "hit" location corresponding to "tdc"
! and "hitpos" information for the track.
TYPE whits_type
INTEGER(i4) :: nhits
INTEGER(i4), DIMENSION(DC_MHITS) :: hits
END TYPE whits_type
! Now define an array "whits" indexed on plane and wire number.
TYPE (whits_type), DIMENSION(MAX_PLANES_D,MAX_WIRES_D) :: Whits
! Define a structure to link wire information through pointers:
! geomP : pointer to wire geometry "dcwire"
! whitsP: pointer to wire hits "whits"
TYPE winfo_type
TYPE (dc_wires_type), POINTER :: geomP
TYPE (whits_type), POINTER :: WhitsP
END TYPE winfo_type
! Now define an array "Winfo" with a hit index anologous to the
! one defined for the "tdc". To get the wire number for hit 1,
! for example, we have: Winfo(1)%geomP%iwire
TYPE (winfo_type) :: Winfo(MAXHITS)
data structures code / Maher Quraan
- Created for the The Center for Subatomic Research E614 Project Projects Page.
- Created by The CoCoBoard.