5 * Revision 1.1.1.1 1995/10/24 10:22:00 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/04 23/02/95 14.46.01 by S.Giani
12 SUBROUTINE MATISO(IZ,IA,NI,IDISO,FSINGL,NUNIT)
14 C Search array MATIDS for the isotopes which have to be taken
15 C into account for the element described by IZ and IA
17 #include "geant321/mmicap.inc"
18 #include "geant321/minput.inc"
23 IF(IZ.GT.0.AND.IZ.LE.100.and.MATIDS(IZ,1,1).GT.0) THEN
29 C check first if selected isotope available
30 DO 10 I=2,MATIDS(IZ,1,1)+1
31 IF( MATIDS(IZ,I,1).EQ.ID .AND.
32 + (MATIDS(IZ,I,2).EQ.100 .OR. FSINGL)) IF = I
33 IF( IABS(MATIDS(IZ,I,1)-ID).LT.IDIFF) THEN
34 IDIFF = IABS(MATIDS(IZ,I,1)-ID)
37 IDISO(I-1,1) = MATIDS(IZ,I,1)
38 IDISO(I-1,2) = MATIDS(IZ,I,2)
41 C the unit number on which the x-section is stored
42 NUNIT = MATIDS(IZ,1,2)
45 C no matching isotope found. Look for closest one
46 IF(MATIDS(IZ,2,2).NE.100) NI = MATIDS(IZ,1,1)
48 C matching isotope found
49 IDISO(1,1) = MATIDS(IZ,IF,1)
53 IDISO(1,1) = MATIDS(IZ,IC,1)
57 WRITE(IOUT,'('' MATISO: Error in neutron x-section '',
58 + ''file detected - Z = '',I4)') IZ
59 WRITE(6,'('' MICAP : Error in x-section file '',
60 + '' detected -> STOP '')')