]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:22:00 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/04 23/02/95 14.46.01 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE MATISO(IZ,IA,NI,IDISO,FSINGL,NUNIT) | |
13 | C | |
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 | |
16 | C | |
17 | #include "geant321/mmicap.inc" | |
18 | #include "geant321/minput.inc" | |
19 | C | |
20 | DIMENSION IDISO(20,2) | |
21 | LOGICAL FSINGL | |
22 | C | |
23 | IF(IZ.GT.0.AND.IZ.LE.100.and.MATIDS(IZ,1,1).GT.0) THEN | |
24 | ID = IZ*1000+IA | |
25 | IF = 0 | |
26 | IC = 0 | |
27 | IDIFF = 1000000 | |
28 | C | |
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) | |
35 | IC = I | |
36 | ENDIF | |
37 | IDISO(I-1,1) = MATIDS(IZ,I,1) | |
38 | IDISO(I-1,2) = MATIDS(IZ,I,2) | |
39 | 10 CONTINUE | |
40 | NI = 1 | |
41 | C the unit number on which the x-section is stored | |
42 | NUNIT = MATIDS(IZ,1,2) | |
43 | IF(.NOT. FSINGL) THEN | |
44 | IF(IF .EQ. 0) THEN | |
45 | C no matching isotope found. Look for closest one | |
46 | IF(MATIDS(IZ,2,2).NE.100) NI = MATIDS(IZ,1,1) | |
47 | ELSE | |
48 | C matching isotope found | |
49 | IDISO(1,1) = MATIDS(IZ,IF,1) | |
50 | IDISO(1,2) = 100 | |
51 | ENDIF | |
52 | ELSE | |
53 | IDISO(1,1) = MATIDS(IZ,IC,1) | |
54 | IDISO(1,2) = 100 | |
55 | ENDIF | |
56 | ELSE | |
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 '')') | |
61 | STOP | |
62 | ENDIF | |
63 | RETURN | |
64 | END |