1 |
cafagna |
3.1 |
* |
2 |
cafagna |
3.2 |
* $Id: gfluct.F,v 3.1.1.1 2002/07/11 16:02:14 cafagna Exp $ |
3 |
|
|
* |
4 |
|
|
* $Log: gfluct.F,v $ |
5 |
|
|
* Revision 3.1.1.1 2002/07/11 16:02:14 cafagna |
6 |
|
|
* First GPAMELA release on CVS |
7 |
cafagna |
3.1 |
* |
8 |
|
|
* |
9 |
|
|
#if !defined(GPAMELA_NOGFLUCT) |
10 |
|
|
*CMZ : 3.00/00 22/12/2000 19.00.22 by Marialuigia Ambriola |
11 |
|
|
*CMZ : 2.01/00 06/03/2000 13.07.03 by Francesco Cafagna |
12 |
|
|
*CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna |
13 |
|
|
*CMZ : 1.02/00 18/03/97 18.25.28 by Francesco Cafagna |
14 |
|
|
*CMZ : 3.21/02 29/03/94 15.41.21 by S.Giani |
15 |
|
|
*-- Author : |
16 |
|
|
SUBROUTINE GFLUCT(DEMEAN,DE) |
17 |
|
|
C. |
18 |
|
|
C. ****************************************************************** |
19 |
|
|
C. * * |
20 |
|
|
C. * Subroutine to decide which method is used to simulate * |
21 |
|
|
C. * the straggling around the mean energy loss. * |
22 |
|
|
C. * * |
23 |
|
|
C. * * |
24 |
|
|
C. * DNMIN: <---------->1<-------->30<--------->50<---------> * |
25 |
|
|
C. * * |
26 |
|
|
C. * LOSS=2 : * |
27 |
|
|
C. * STRA=0 <----------GLANDZ-------------------><--GLANDO--> * |
28 |
|
|
C. * LOSS=1,3: * |
29 |
|
|
C. * STRA=0 <---------------------GLANDZ--------------------> * |
30 |
|
|
C. * * |
31 |
|
|
C. * STRA=1 <-----------PAI---------------------><--GLANDZ--> * |
32 |
|
|
#if defined(GPAMELA_ASHO) |
33 |
|
|
C. * STRA=2 <---PAI----><---ASHO---><----PAI----><--GLANDZ--> * |
34 |
|
|
C. * * |
35 |
|
|
#endif |
36 |
|
|
C. * SSTR=1: Silicon straggling, gaussian straggling * |
37 |
|
|
C. * * |
38 |
|
|
C. * DNMIN : an estimation of the number of collisions * |
39 |
|
|
C. * with energy close to the ionization energy * |
40 |
|
|
C. * (see PHYS333) * |
41 |
|
|
C. * * |
42 |
|
|
C. * Input : DEMEAN (mean energy loss) * |
43 |
|
|
C. * Output : DE (energy loss in the current step) * |
44 |
|
|
C. * * |
45 |
|
|
C. * ==>Called by : GTELEC,GTMUON,GTHADR * |
46 |
|
|
C. * * |
47 |
|
|
C. ****************************************************************** |
48 |
|
|
C. |
49 |
|
|
#include "gcbank.inc" |
50 |
|
|
#include "gcjloc.inc" |
51 |
|
|
#include "gconsp.inc" |
52 |
|
|
#include "gcmate.inc" |
53 |
|
|
#include "gccuts.inc" |
54 |
|
|
#include "gckine.inc" |
55 |
|
|
#include "gcmulo.inc" |
56 |
|
|
#include "gcphys.inc" |
57 |
|
|
#include "gctrak.inc" |
58 |
|
|
* |
59 |
|
|
* |
60 |
|
|
* *** VARIABLE FOR SILICON STRAGGLING |
61 |
|
|
#include "gpkey.inc" |
62 |
|
|
#include "gppmat.inc" |
63 |
|
|
INTEGER NMAT,NWNMAT |
64 |
|
|
CHARACTER*20 CHNMAT, |
65 |
|
|
REAL ANMAT,ZNMAT,DNMAT,RNMAT,ABNMAT,UBNMAT(NWMMAT),GRNDM0,GPGAUS |
66 |
|
|
* |
67 |
|
|
PARAMETER (EULER=0.577215,GAM1=EULER-1) |
68 |
|
|
PARAMETER (P1=.60715,P2=.67794,P3=.52382E-1,P4=.94753, |
69 |
|
|
+ P5=.74442,P6=1.1934) |
70 |
|
|
PARAMETER (DGEV=0.153536 E-3, DNLIM=50) |
71 |
|
|
#if defined(GPAMELA_ASHO) |
72 |
|
|
PARAMETER (ASHMIN=1,ASHMAX=30) |
73 |
|
|
#endif |
74 |
|
|
DIMENSION RNDM(2) |
75 |
|
|
FLAND(X) = P1+P6*X+(P2+P3*X)*EXP(P4*X+P5) |
76 |
|
|
* |
77 |
|
|
IF(STEP.LE.0) THEN |
78 |
|
|
DE=DEMEAN |
79 |
|
|
ELSE |
80 |
|
|
DEDX = DEMEAN/STEP |
81 |
|
|
POTI=Q(JPROB+9) |
82 |
|
|
IF(ISTRA.EQ.0.AND.ILOSS.NE.2) THEN |
83 |
|
|
CALL GLANDZ(Z,STEP,VECT(7),GETOT,DEDX,DE,POTI,Q(JPROB+10)) |
84 |
|
|
ELSE |
85 |
|
|
* |
86 |
|
|
* *** mean ionization potential (GeV) |
87 |
|
|
* POTI=16E-9*Z**0.9 |
88 |
|
|
* |
89 |
|
|
GAMMA = GETOT/AMASS |
90 |
|
|
BETA = VECT(7)/GETOT |
91 |
|
|
BET2 = BETA**2 |
92 |
|
|
* |
93 |
|
|
* *** low energy transfer |
94 |
|
|
XI = DGEV*CHARGE**2*STEP*DENS*Z/(A*BET2) |
95 |
|
|
* |
96 |
|
|
* *** regime |
97 |
|
|
* *** ISTRA = 1 --> PAI + URBAN |
98 |
|
|
#if defined(GPAMELA_ASHO) |
99 |
|
|
* *** ISTRA = 2 --> PAI + URBAN + ASHO |
100 |
|
|
#endif |
101 |
|
|
DNMIN = MIN(XI,DEMEAN)/POTI |
102 |
|
|
* |
103 |
|
|
IF (ISTRA.EQ.0) THEN |
104 |
|
|
IF(DNMIN.GE.DNLIM) THEN |
105 |
|
|
* |
106 |
|
|
* Energy straggling using Gaussian, Landau & Vavilov theories. |
107 |
|
|
* |
108 |
|
|
* STEP = current step-length (cm) |
109 |
|
|
* |
110 |
|
|
* DELAND = DE/DX - <DE/DX> (GeV) |
111 |
|
|
* |
112 |
|
|
* Author : G.N. Patrick |
113 |
|
|
* |
114 |
|
|
IF(STEP.LT.1.E-7)THEN |
115 |
|
|
DELAND=0. |
116 |
|
|
ELSE |
117 |
|
|
* |
118 |
|
|
* Maximum energy transfer to atomic electron (GeV). |
119 |
|
|
ETA = BETA*GAMMA |
120 |
|
|
RATIO = EMASS/AMASS |
121 |
|
|
* |
122 |
|
|
* Calculate Kappa significance ratio. |
123 |
|
|
* EMAX=(2*EMASS*ETA**2)/(1+2*RATIO*GAMMA+RATIO**2) |
124 |
|
|
* CAPPA = XI/EMAX |
125 |
|
|
CAPPA = XI*(1+2*RATIO*GAMMA+RATIO**2)/(2*EMASS* |
126 |
|
|
+ ETA**2) |
127 |
|
|
IF (CAPPA.GE.10.) THEN |
128 |
|
|
* |
129 |
|
|
* +-----------------------------------+ |
130 |
|
|
* I Sample from Gaussian distribution I |
131 |
|
|
* +-----------------------------------+ |
132 |
|
|
SIGMA = XI*SQRT((1.-0.5*BET2)/CAPPA) |
133 |
|
|
CALL GRNDM(RNDM,2) |
134 |
|
|
F1 = -2.*LOG(RNDM(1)) |
135 |
|
|
DELAND = SIGMA*SQRT(F1)*COS(TWOPI*RNDM(2)) |
136 |
|
|
ELSE |
137 |
|
|
XMEAN = -BET2-LOG(CAPPA)+GAM1 |
138 |
|
|
IF (CAPPA.LT.0.01) THEN |
139 |
|
|
XLAMX = FLAND(XMEAN) |
140 |
|
|
* +---------------------------------------------------------------+ |
141 |
|
|
* I Sample lambda variable from Kolbig/Schorr Landau distribution I |
142 |
|
|
* +---------------------------------------------------------------+ |
143 |
|
|
* 10 CALL GRNDM(RNDM,1) |
144 |
|
|
* IF( RNDM(1) .GT. 0.980 ) GO TO 10 |
145 |
|
|
* XLAMB = GLANDR(RNDM(1)) |
146 |
|
|
* +---------------------------------------------------------------+ |
147 |
|
|
* I Sample lambda variable from James/Hancock Landau distribution I |
148 |
|
|
* +---------------------------------------------------------------+ |
149 |
|
|
10 CALL GLANDG(XLAMB) |
150 |
|
|
IF(XLAMB.GT.XLAMX) GO TO 10 |
151 |
|
|
ELSE |
152 |
|
|
* +---------------------------------------------------------+ |
153 |
|
|
* I Sample lambda variable (Landau not Vavilov) from I |
154 |
|
|
* I Rotondi&Montagna&Kolbig Vavilov distribution I |
155 |
|
|
* +---------------------------------------------------------+ |
156 |
|
|
CALL GRNDM(RNDM,1) |
157 |
|
|
XLAMB = GVAVIV(CAPPA,BET2,RNDM(1)) |
158 |
|
|
ENDIF |
159 |
|
|
* |
160 |
|
|
* Calculate DE/DX - <DE/DX> |
161 |
|
|
DELAND = XI*(XLAMB-XMEAN) |
162 |
|
|
ENDIF |
163 |
|
|
ENDIF |
164 |
|
|
DE = DEMEAN + DELAND |
165 |
|
|
ELSE |
166 |
|
|
CALL GLANDZ(Z,STEP,VECT(7),GETOT,DEDX,DE,POTI, |
167 |
|
|
+ Q(JPROB+ 10)) |
168 |
|
|
ENDIF |
169 |
|
|
ELSE IF (ISTRA.LE.2) THEN |
170 |
|
|
IF(DNMIN.GE.DNLIM) THEN |
171 |
|
|
CALL GLANDZ(Z,STEP,VECT(7),GETOT,DEDX,DE,POTI, |
172 |
|
|
+ Q(JPROB+ 10)) |
173 |
|
|
ELSE |
174 |
|
|
NMEC = NMEC+1 |
175 |
|
|
LMEC(NMEC)=109 |
176 |
|
|
#if defined(GPAMELA_ASHO) |
177 |
|
|
IF (DNMIN.GE.ASHMIN.AND.DNMIN.LT.ASHMAX .AND.ISTRA.EQ |
178 |
|
|
+ .2) THEN |
179 |
|
|
CALL GASHO(VECT(7),AMASS,STEP,DE) |
180 |
|
|
ELSE |
181 |
|
|
DE = GSTREN(GAMMA,DCUTE,STEP) |
182 |
|
|
ENDIF |
183 |
|
|
#endif |
184 |
|
|
#if !defined(GPAMELA_ASHO) |
185 |
|
|
DE = GSTREN(GAMMA,DCUTE,STEP) |
186 |
|
|
#endif |
187 |
|
|
* |
188 |
|
|
* *** Add brem losses to ionisation |
189 |
|
|
IF(ITRTYP.EQ.2) THEN |
190 |
|
|
JBASE = LQ(JMA-1)+2*NEK1+IEKBIN |
191 |
|
|
DE = DE +(1.-GEKRAT)*Q(JBASE)+GEKRAT*Q(JBASE+1) |
192 |
|
|
ELSEIF(ITRTYP.EQ.5) THEN |
193 |
|
|
JBASE = LQ(JMA-2)+NEK1+IEKBIN |
194 |
|
|
DE = DE +(1.-GEKRAT)*Q(JBASE)+GEKRAT*Q(JBASE+1) |
195 |
|
|
ENDIF |
196 |
|
|
ENDIF |
197 |
|
|
ENDIF |
198 |
|
|
ENDIF |
199 |
|
|
* |
200 |
|
|
* *** Add straggling specifically for Silicon By P.Papini and F.S.Cafagna |
201 |
|
|
* |
202 |
|
|
* change in de/dx with gaussian convolution |
203 |
|
|
* see Hall paper: NIM 220 (1984) 356. |
204 |
|
|
* |
205 |
|
|
IF(ISSTR.EQ.1) THEN |
206 |
|
|
* |
207 |
|
|
* *** First of all get a look to the DELTA2 and SIGMA2 parameter |
208 |
|
|
|
209 |
|
|
CALL GFMATE(NMAT,CHNMAT,ANMAT,ZNMAT,DNMAT,RNMAT,ABNMAT, |
210 |
|
|
+ UBNMAT,NWNMAT) |
211 |
|
|
* |
212 |
|
|
* *** Save user infos |
213 |
|
|
DELTA2 = UBNMAT(1) |
214 |
|
|
SIGMA2 = DELTA2*STEP |
215 |
|
|
GRNDM0 = GPGAUS(0.) |
216 |
|
|
* Gaussian energy spread... |
217 |
|
|
* Delta is in GeV^2/cm |
218 |
|
|
DE = DE + GRNDM0 * SQRT(SIGMA2) |
219 |
|
|
ENDIF |
220 |
|
|
ENDIF |
221 |
|
|
* |
222 |
|
|
END |