      REAL FUNCTION ADE(XDUMMY)
C
C     Filename:  ADE.FOR
C
C     Calculation of energy-loss in detector A (ADE) in MeV
C     by ADC channel number (APHA) and amplifier channel
C     (ACHN=0 -> low channel/high amplification,
C      ACHN=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 (achn.eq.0.) then
        ade=3.0*apha/1023.
      else
        ade=30.0*apha/1023.
      endif

      END
