      REAL FUNCTION CDE(XDUMMY)
C
C     Filename:  CDE.FOR
C
C     Calculation of energy-loss in detector C (CDE) in MeV
C     by ADC channel number (CPHA) and amplifier channel
C     (CCHN=0 -> low channel/high amplification,
C      CCHN=1 -> high channel/low amplification)
C
C     H. Sierks, University of Kiel, 08 Nov 1994
C
      REAL
     +ID      ,
     +IND     ,DEPTH   ,COINC   ,ASEG    ,BSEG    ,APHA    ,
     +ACHN    ,BPHA    ,BCHN    ,CPHA    ,CCHN    ,DPHA    ,
     +DCHN    ,EPHA    ,ECHN     
      COMMON/PAWIDN/IDNEVT,VIDN1,VIDN2,VIDN3,VIDN(10),
     +ID      ,
     +IND     ,DEPTH   ,COINC   ,ASEG    ,BSEG    ,APHA    ,
     +ACHN    ,BPHA    ,BCHN    ,CPHA    ,CCHN    ,DPHA    ,
     +DCHN    ,EPHA    ,ECHN     
*
      if (cchn.eq.0.) then
        cde=16.07*cpha/1023.
      else
        cde=166.7*cpha/1023.
      endif

      END
