]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:21:23 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/02 29/03/94 15.41.21 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE GDRELA | |
13 | C. | |
14 | C. ****************************************************************** | |
15 | C. * * | |
16 | C. * Initialise ionisation energy loss by filling proton DE/DX * | |
17 | C. * tables for each material. * | |
18 | C. * * | |
19 | C. * For chemical mixtures,compounds & molecules the approximation * | |
20 | C. * is made that * | |
21 | C. * * | |
22 | C. * DE/DX = W(1)*DE/DX(1)+W(2)*DE/DX(2)...+W(N)*DE/DX(N) * | |
23 | C. * with, * | |
24 | C. * DE/DX(i) appropriate to the i'th constituent. * | |
25 | C. * * | |
26 | C. * For mixtures W(i) = fractional wght of each element. * | |
27 | C. * For molecules W(i) = No. atoms*atomic wght/molecular wght. * | |
28 | C. * * | |
29 | C. * ==>Called by : GPHYSI * | |
30 | C. * Authors R.Brun, G.Patrick ********* * | |
31 | C. * * | |
32 | C. ****************************************************************** | |
33 | C. | |
34 | #include "geant321/gcbank.inc" | |
35 | #include "geant321/gcmulo.inc" | |
36 | #include "geant321/gcjloc.inc" | |
37 | #include "geant321/gctrak.inc" | |
38 | #include "geant321/gconsp.inc" | |
39 | #include "geant321/gcmate.inc" | |
40 | C. | |
41 | C. ------------------------------------------------------------------ | |
42 | C. | |
43 | C Number of constituents(ie. element,mixture or compound). | |
44 | C | |
45 | NLMAT = Q(JMA+11) | |
46 | NLMAT = IABS(NLMAT) | |
47 | IF (NLMAT.EQ.0) GO TO 999 | |
48 | IF(Z.LT.1.) GO TO 999 | |
49 | C | |
50 | JEL1=LQ(JMA-1) | |
51 | JEL2=LQ(JMA-2) | |
52 | JEL3=LQ(JMA-3) | |
53 | C | |
54 | ICHAN=IEKBIN | |
55 | T = ELOW(ICHAN) | |
56 | T1 = 10.**(EKBIN(1)+(ICHAN-0.5)/GEKA) | |
57 | C | |
58 | C==========> A,Ionisation losses for particles other than electrons | |
59 | C Simple element. | |
60 | C | |
61 | IF (NLMAT.EQ.1) THEN | |
62 | CALL GDRELP(A,Z,DENS,T,DEDX) | |
63 | IF(DEDX.LT.0.)DEDX=0. | |
64 | * | |
65 | * *** auxiliary integration point for Range tables | |
66 | IF(ICHAN.NE.NEK1) THEN | |
67 | CALL GDRELP(A,Z,DENS,T1,DEDX1) | |
68 | IF(DEDX1.LT.0.)DEDX1=0. | |
69 | ENDIF | |
70 | ELSE | |
71 | C | |
72 | C Mixture/compound : Loop over chemical constituents. | |
73 | C | |
74 | DEDX = 0. | |
75 | DEDX1 = 0. | |
76 | DO 10 L=1,NLMAT | |
77 | AA = Q(JMIXT+L) | |
78 | ZZ = Q(JMIXT+NLMAT+L) | |
79 | WGHT = Q(JMIXT+2*NLMAT+L) | |
80 | CALL GDRELP(AA,ZZ,DENS*WGHT,T,DEDXC) | |
81 | IF(DEDXC.LT.0.)DEDXC=0. | |
82 | DEDX = DEDX + WGHT*DEDXC | |
83 | * | |
84 | * *** auxiliary integration point for Range tables | |
85 | IF(ICHAN.NE.NEK1) THEN | |
86 | CALL GDRELP(AA,ZZ,DENS*WGHT,T1,DEDXC1) | |
87 | IF(DEDXC1.LT.0.)DEDXC1=0. | |
88 | DEDX1 = DEDX1 + WGHT*DEDXC1 | |
89 | ENDIF | |
90 | 10 CONTINUE | |
91 | ENDIF | |
92 | C | |
93 | Q(JEL3+ICHAN)=Q(JEL3+ICHAN)+DEDX*DENS | |
94 | IF(ICHAN.NE.NEK1) THEN | |
95 | WS(NEKBIN*3+ICHAN) = WS(NEKBIN*3+ICHAN)+DEDX1*DENS | |
96 | ENDIF | |
97 | C | |
98 | C===========> B, Ionisation losses for muons | |
99 | C | |
100 | C Simple element | |
101 | IF(NLMAT.EQ.1) THEN | |
102 | CALL GDRELM(A,Z,DENS,T,DEDX) | |
103 | IF(DEDX.LT.0.)DEDX=0. | |
104 | * | |
105 | * *** auxiliary integration point for Range tables | |
106 | IF(ICHAN.NE.NEK1) THEN | |
107 | CALL GDRELM(A,Z,DENS,T1,DEDX1) | |
108 | IF(DEDX1.LT.0.)DEDX1=0. | |
109 | ENDIF | |
110 | ELSE | |
111 | C | |
112 | C Mixture/compound | |
113 | C | |
114 | DEDX = 0. | |
115 | DEDX1 = 0. | |
116 | DO 20 L=1,NLMAT | |
117 | AA=Q(JMIXT+L) | |
118 | ZZ=Q(JMIXT+NLMAT+L) | |
119 | WGHT=Q(JMIXT+2*NLMAT+L) | |
120 | CALL GDRELM(AA,ZZ,DENS*WGHT,T,DEDXC) | |
121 | IF(DEDXC.LT.0.)DEDXC=0. | |
122 | DEDX=DEDX+WGHT*DEDXC | |
123 | * | |
124 | * *** auxiliary integration point for Range tables | |
125 | IF(ICHAN.NE.NEK1) THEN | |
126 | CALL GDRELM(AA,ZZ,DENS*WGHT,T1,DEDXC1) | |
127 | IF(DEDXC1.LT.0.)DEDXC1=0. | |
128 | DEDX1 = DEDX1 + WGHT*DEDXC1 | |
129 | ENDIF | |
130 | 20 CONTINUE | |
131 | ENDIF | |
132 | C | |
133 | Q(JEL2+ICHAN)=Q(JEL2+ICHAN)+DEDX*DENS | |
134 | IF(ICHAN.NE.NEK1) THEN | |
135 | WS(NEKBIN*2+ICHAN) = WS(NEKBIN*2+ICHAN)+DEDX1*DENS | |
136 | ENDIF | |
137 | C | |
138 | C===========> C, Ionisation losses for electrons/positrons | |
139 | C | |
140 | CALL GDRELE(T,-1.,JMA,DEDX) | |
141 | Q(JEL1+ICHAN)=Q(JEL1+ICHAN)+DEDX | |
142 | CALL GDRELE(T,+1.,JMA,DEDX) | |
143 | Q(JEL1+ICHAN+NEK1)=Q(JEL1+ICHAN+NEK1)+DEDX | |
144 | * | |
145 | * *** auxiliary integration point for Range tables | |
146 | IF(ICHAN.NE.NEK1) THEN | |
147 | CALL GDRELE(T1,-1.,JMA,DEDX1) | |
148 | WS(ICHAN)=WS(ICHAN)+DEDX1 | |
149 | CALL GDRELE(T1,+1.,JMA,DEDX1) | |
150 | WS(NEKBIN+ICHAN)=WS(NEKBIN+ICHAN)+DEDX1 | |
151 | ENDIF | |
152 | C | |
153 | 999 END |