C   14/05/79 C9091801   MEMBER NAME  MUWIRE   (JADEMUS2)    FORTRAN
C   13/12/78 C9032201   MEMBER NAME  MUTINW   (JADEMUS)     FORTRAN
      SUBROUTINE MUWIRE(ICHAM,X,Y,Z)
C
      IMPLICIT INTEGER*2 (H)
C
C-----------------------------------------------------------------------
C
C PROVIDES X,Y,Z COORDINATES OF ONE END OF THE WIRE OF CHAMBER ICHAM.
C
C INPUT VARIABLES...
C
C ICHAM       CHAMBER NUMBER.
C
C OUTPUT VARIABLES...
C
C X,Y,Z       THE COORDINATES OF ONE END OF THE WIRE.
C
C-----------------------------------------------------------------------
C
C COMMONS
C
#include "cmucalib.for"
C
C-----------------------------------------------------------------------
C
C FRAME NUMBER.
      IFRAME=HFR(ICHAM)
C
C ORIENTATION PARAMETER.
      IOR=HNORM(IFRAME)
C
C CALCULATE THE NORMAL COORDINATE.
      ICNORM=HDIST(IFRAME)+HD1(ICHAM)
C
C CALCULATE THE LOGITUDINAL COORDINATE.
      ICLONG=HCLLO(IFRAME)
C
C CALCULATE THE WIRE COORDINATE.
      ICWIRE=HCTW(ICHAM)
C
C X,Y,Z COORDINATES
      GO TO (11,12,13),IOR
 11   CONTINUE
      X=ICNORM
      Y=ICWIRE
      Z=ICLONG
      GO TO 20
 12   CONTINUE
      X=ICWIRE
      Y=ICNORM
      Z=ICLONG
      GO TO 20
 13   CONTINUE
      X=ICWIRE
      Y=ICLONG
      Z=ICNORM
 20   CONTINUE
C
C MAKE OVERALL TRANSLATION.
      X=X+HOVALL(HUNIT(IFRAME))
C
C-----------------------------------------------------------------------
C
 99   CONTINUE
      RETURN
      END
