6 |
INCLUDE 'INTEST.TXT' |
INCLUDE 'INTEST.TXT' |
7 |
C |
C |
8 |
DOUBLE PRECISION al_p(5), |
DOUBLE PRECISION al_p(5), |
9 |
& xout(npla),yout(npla),zin(npla) |
& xout(nplav),yout(nplav),zin(nplav) |
10 |
C |
C |
11 |
REAL PIANO(22), VARFIT(2) |
REAL PIANO(NPLAV), VARFIT(2) |
12 |
REAL TX, TY, SHIFT |
REAL TX, TY, SHIFT |
13 |
REAL BAR(2,NPLA), DISTY |
REAL BAR(2,NPLAV), DISTY |
14 |
REAL DISTX, Y(NPLA), YY(NPLA) |
REAL DISTX, Y(NPLAV), YY(NPLAV) |
15 |
REAL RIG, PPLANEMAX, RMASS |
REAL RIG, PPLANEMAX, RMASS |
16 |
REAL RNSS, QTOTT, RQT, MX, MY |
REAL RNSS, QTOTT, RQT, MX, MY |
17 |
REAL CHECK, ENER, CX, CY |
REAL CHECK, ENER, CX, CY |
21 |
REAL ax,bx,eax,ebx,chi2x |
REAL ax,bx,eax,ebx,chi2x |
22 |
REAL ay,by,eay,eby,chi2y |
REAL ay,by,eay,eby,chi2y |
23 |
REAL parzen3, TMISD |
REAL parzen3, TMISD |
24 |
INTEGER Nfitx,Nfity |
INTEGER Nfitx,Nfity, MNPLA |
25 |
C |
C |
26 |
INTEGER INDEX, NTOT(2), NPIANI, GTR |
INTEGER INDEX, NTOT(2), NPIANI, GTR |
27 |
INTEGER j, m, i, IWPL(2), timpx, timpy, T, nn |
c INTEGER j, m, i, IWPL(2), timpx, timpy, T, nn |
28 |
|
INTEGER j, m, i, IWPL(2), T, nn |
29 |
INTEGER IPLANE, NNX, NNY, INFX, INFY, ISUPX, ISUPY |
INTEGER IPLANE, NNX, NNY, INFX, INFY, ISUPX, ISUPY |
30 |
INTEGER IBAR(2,NPLA), NPFIT(2), CHTRACK,IWPLU |
INTEGER IBAR(2,NPLAV), NPFIT(2), CHTRACK,IWPLU |
31 |
INTEGER Iquest(100), ICONTROL5, nin, IFAIL |
INTEGER Iquest(100), ICONTROL5, nin, IFAIL |
32 |
C |
C |
33 |
PARAMETER (X01PL=0.74) |
PARAMETER (X01PL=0.74) |
56 |
COMMON / CH / CHECK |
COMMON / CH / CHECK |
57 |
SAVE / CH / |
SAVE / CH / |
58 |
C |
C |
59 |
COMMON / CALOFIT / VARFIT, NPFIT |
COMMON / CALOFIT / VARFIT, NPFIT, IWPL,CHTRACK |
60 |
SAVE / CALOFIT / |
SAVE / CALOFIT / |
61 |
C |
C |
62 |
COMMON / pawcd / hmemor |
COMMON / pawcd / hmemor |
67 |
C |
C |
68 |
C Begin ! |
C Begin ! |
69 |
C |
C |
70 |
|
c print *,' sono qui' |
71 |
CALOL2TR = 0; |
CALOL2TR = 0; |
72 |
NCORE = 0. |
NCORE = 0. |
73 |
QCORE = 0. |
QCORE = 0. |
91 |
NLAST = 0. |
NLAST = 0. |
92 |
PLANETOT = 0. |
PLANETOT = 0. |
93 |
QMEAN = 0. |
QMEAN = 0. |
94 |
SELFTRIGGER = 0 |
C SELFTRIGGER = 0 |
|
CALL VZERO(VARCFIT,2) |
|
|
CALL VZERO(NPCFIT,2) |
|
|
CALL VZERO(TBAR,2*NPLA) |
|
|
CALL VZERO(TIBAR,2*NPLA) |
|
|
CALL VZERO(BAR,2*NPLA) |
|
|
CALL VZERO(IBAR,2*NPLA) |
|
|
CALL VZERO(IBAR,2*NPLA) |
|
|
CALL VZERO(Y,NPLA) |
|
|
CALL VZERO(YY,NPLA) |
|
|
CALL VZERO(XOUT,NPLA) |
|
|
CALL VZERO(YOUT,NPLA) |
|
95 |
C |
C |
96 |
C BEGIN WITH THE FISRT TRACK IF WE HAVE A TRACK FROM TRACKER |
C BEGIN WITH THE FIRST TRACK IF WE HAVE A TRACK FROM TRACKER |
97 |
C |
C |
98 |
T = 1 |
T = 1 |
99 |
C |
C |
100 |
10 CONTINUE |
c 10 CONTINUE |
101 |
|
CONTINUE |
102 |
C |
C |
103 |
IF (GOOD2.EQ.1) THEN |
IF (GOOD2.EQ.1) THEN |
104 |
C |
C |
105 |
CHTRACK = 0 |
CHTRACK = 0 |
106 |
C |
C |
107 |
CALL VZERO(IWPL,2) |
CALL VZERO(IWPL,2) |
108 |
CALL VZERO(BAR,2*NPLA) |
CALL VZERO(BAR,2*NPLAV) |
109 |
CALL VZERO(IBAR,2*NPLA) |
CALL VZERO(IBAR,2*NPLAV) |
110 |
CALL VZERO(TBAR,2*NPLA) |
CALL VZERO(TBAR,2*NPLAV) |
111 |
CALL VZERO(TIBAR,2*NPLA) |
CALL VZERO(TIBAR,2*NPLAV) |
112 |
|
CALL VZERO(Y,NPLAV) |
113 |
|
CALL VZERO(YY,NPLAV) |
114 |
|
CALL VZERO(XOUT,NPLAV) |
115 |
|
CALL VZERO(YOUT,NPLAV) |
116 |
do m = 1, 5 |
do m = 1, 5 |
117 |
al_p(m) = al_pp(t,m) |
al_p(m) = al_pp(t,m) |
118 |
|
c print *,' al_p(',m,') = ',al_p(m) |
119 |
enddo |
enddo |
120 |
if (al_p(5).eq.0.) THEN |
if (al_p(5).eq.0.) THEN |
121 |
PRINT *,' CALORIMETER - WARNING F77: track with R = 0, discarded' |
c PRINT *,' CALORIMETER - WARNING F77: track with R = 0, discarded' |
122 |
GOOD2 = 0 |
GOOD2 = 0 |
123 |
GOTO 969 |
GOTO 969 |
124 |
ENDIF |
ENDIF |
128 |
YOUT(I) = 0. |
YOUT(I) = 0. |
129 |
IF (MOD(M,2).EQ.0) THEN |
IF (MOD(M,2).EQ.0) THEN |
130 |
DISTX = PIANO(I) + ZALIG |
DISTX = PIANO(I) + ZALIG |
131 |
|
c print *,'T Y PLANE I= ',I,' Z = ',DISTX |
132 |
ELSE |
ELSE |
133 |
DISTX = PIANO(I) - 5.81 + ZALIG |
DISTX = PIANO(I) - 5.81 + ZALIG |
134 |
|
c print *,'T X PLANE I= ',I,' Z = ',DISTX |
135 |
ENDIF |
ENDIF |
136 |
ZIN(I) = distx / 10. |
ZIN(I) = distx / 10. |
137 |
|
c print *,' ZIN(',I,') = ',ZIN(I) |
138 |
TBAR(M,I) = 0. |
TBAR(M,I) = 0. |
139 |
TIBAR(M,I) = 0 |
TIBAR(M,I) = 0 |
140 |
enddo |
enddo |
142 |
call DOTRACK(NPLA,ZIN,XOUT,YOUT,AL_P,IFAIL) |
call DOTRACK(NPLA,ZIN,XOUT,YOUT,AL_P,IFAIL) |
143 |
if(IFAIL.ne.0)then |
if(IFAIL.ne.0)then |
144 |
GOOD2 = 0 |
GOOD2 = 0 |
145 |
print *,' CALORIMETER - WARNING F77: tracking failed ' |
c print *,' CALORIMETER - WARNING F77: tracking failed ' |
146 |
goto 969 |
goto 969 |
147 |
endif |
endif |
148 |
TX = TAN(ASIN(AL_P(3))) * COS(AL_P(4)) |
TX = REAL(DTAN(DASIN(AL_P(3))) * DCOS(AL_P(4))) |
149 |
TY = TAN(ASIN(AL_P(3))) * SIN(AL_P(4)) |
TY = REAL(DTAN(DASIN(AL_P(3))) * DSIN(AL_P(4))) |
150 |
DO I = 1, NPLA |
DO I = 1, NPLA |
151 |
NN = 0 |
NN = 0 |
152 |
IF (M.EQ.2) NN = 1 |
c IF (M.EQ.2) NN = 1 |
153 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
154 |
SHIFT = +0.5 |
IF (REVERSE.EQ.0) THEN |
155 |
|
SHIFT = -0.5 |
156 |
|
ELSE |
157 |
|
SHIFT = +0.5 |
158 |
|
ENDIF |
159 |
ELSE |
ELSE |
160 |
SHIFT = -0.5 |
IF (REVERSE.EQ.0) THEN |
161 |
|
SHIFT = +0.5 |
162 |
|
ELSE |
163 |
|
SHIFT = -0.5 |
164 |
|
ENDIF |
165 |
ENDIF |
ENDIF |
166 |
C |
C |
167 |
C CHECK IF XOUT OR YOUT ARE NaN |
C CHECK IF XOUT OR YOUT ARE NaN |
168 |
C |
C |
169 |
IF (XOUT(I).NE.XOUT(I).OR.YOUT(I).NE.YOUT(I)) THEN |
IF (XOUT(I).NE.XOUT(I).OR.YOUT(I).NE.YOUT(I)) THEN |
170 |
print *, |
c print *, |
171 |
& ' CALORIMETER - WARNING F77: tracking error (NaN values)' |
c & ' CALORIMETER - WARNING F77: tracking error (NaN values)' |
172 |
GOOD2 = 0 |
GOOD2 = 0 |
173 |
GOTO 969 |
GOTO 969 |
174 |
ENDIF |
ENDIF |
175 |
C |
C |
176 |
CX = XOUT(I)*10. + XALIG |
CX = REAL(XOUT(I))*10. + XALIG |
177 |
CY = -YOUT(I)*10. + YALIG |
CY = REAL(YOUT(I))*10. + YALIG |
178 |
C |
C |
179 |
IF (I.EQ.1) THEN |
c IF (I.EQ.1) THEN !EM GCC4.7 TIMPX/Y are not used in che code... |
180 |
TIMPX = CX |
c TIMPX = NINT(CX) |
181 |
TIMPY = CY |
c TIMPY = NINT(CY) |
182 |
ENDIF |
c ENDIF |
183 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
184 |
Y(I) = CX |
Y(I) = CX |
185 |
BAR(M,I) = Y(I) |
BAR(M,I) = Y(I) |
186 |
TBAR(M,I) = (Y(I) - XALIG)/10. |
TBAR(M,I) = (Y(I) - XALIG)/10. |
187 |
IF (I.EQ.22) MX=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
IF (I.EQ.NPLA) MX=ABS(Y(1)-Y(NPLA))/ |
188 |
|
& ABS(REAL(ZIN(1)-ZIN(NPLA))) |
189 |
ELSE |
ELSE |
190 |
YY(I) = CY |
YY(I) = CY |
191 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) |
192 |
TBAR(M,I) = (YALIG - YY(I))/10. |
TBAR(M,I) = (-YALIG + YY(I))/10. |
193 |
IF (I.EQ.22) MY=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
IF (I.EQ.NPLA) MY=ABS(Y(1)-Y(NPLA))/ |
194 |
|
& ABS(REAL(ZIN(1)-ZIN(NPLA))) |
195 |
ENDIF |
ENDIF |
196 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
197 |
tibar(M,I) = ibar(m,i) |
tibar(M,I) = ibar(m,i) |
245 |
C |
C |
246 |
C WE MUST PROCESS A SELFTRIGGER EVENT |
C WE MUST PROCESS A SELFTRIGGER EVENT |
247 |
C |
C |
248 |
IF (TRIGTY.GE.2) THEN |
IF (TRIGTY.GE.2.AND.HZN.EQ.0) THEN |
249 |
C |
C |
250 |
C CALL SELFTRIGGER SUBROUTINE |
C CALL SELFTRIGGER SUBROUTINE |
251 |
C |
C |
252 |
|
CALL VZERO(IWPL,2) |
253 |
|
CALL VZERO(VARCFIT,2) |
254 |
|
CALL VZERO(NPCFIT,2) |
255 |
|
CALL VZERO(TBAR,2*NPLAV) |
256 |
|
CALL VZERO(TIBAR,2*NPLAV) |
257 |
|
CALL VZERO(BAR,2*NPLAV) |
258 |
|
CALL VZERO(IBAR,2*NPLAV) |
259 |
|
CALL VZERO(Y,NPLAV) |
260 |
|
CALL VZERO(YY,NPLAV) |
261 |
|
CALL VZERO(XOUT,NPLAV) |
262 |
|
CALL VZERO(YOUT,NPLAV) |
263 |
|
C |
264 |
CALL SELFTRIG() |
CALL SELFTRIG() |
265 |
ELEN = PARZEN3 |
ELEN = PARZEN3 |
266 |
SELEN = ABS(ELEN) * (11.98*1E-2 + 7.6 * EXP(-5736/ABS(ELEN))) |
SELEN = ABS(ELEN) * (11.98*1E-2 + 7.6 * EXP(-5736/ABS(ELEN))) |
270 |
C |
C |
271 |
DO M = 1,2 |
DO M = 1,2 |
272 |
C |
C |
273 |
|
c print *,' ax ',ax,' ay ',ay |
274 |
|
c print *,' bx ',bx,' by ',by |
275 |
IF (NPCFIT(M).GE.2) THEN |
IF (NPCFIT(M).GE.2) THEN |
276 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
277 |
VARCFIT(1) = CHI2X |
VARCFIT(1) = CHI2X |
278 |
IMPX = 10. * ( AX + 12.1 ) |
IMPX = AX + BX * (ZALIG/10.) ! PAMELA REF |
279 |
TANX = BX |
TANX = BX |
280 |
ELSE |
ELSE |
281 |
VARCFIT(2) = CHI2Y |
VARCFIT(2) = CHI2Y |
282 |
IMPY = 10. * ( AY + 12.2 ) |
IMPY = AY + BY * (ZALIG/10.) ! PAMELA REF |
283 |
TANY = BY |
TANY = BY |
284 |
ENDIF |
ENDIF |
285 |
C |
C |
286 |
DO I = 1,NPLA |
DO I = 1,NPLA |
287 |
NN = 0 |
NN = 0 |
288 |
IF (M.EQ.2) NN = 1 |
c IF (M.EQ.2) NN = 1 |
289 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
290 |
SHIFT = +0.5 |
IF (REVERSE.EQ.0) THEN |
291 |
|
SHIFT = -0.5 |
292 |
|
ELSE |
293 |
|
SHIFT = +0.5 |
294 |
|
ENDIF |
295 |
ELSE |
ELSE |
296 |
SHIFT = -0.5 |
IF (REVERSE.EQ.0) THEN |
297 |
|
SHIFT = +0.5 |
298 |
|
ELSE |
299 |
|
SHIFT = -0.5 |
300 |
|
ENDIF |
301 |
ENDIF |
ENDIF |
302 |
C |
C |
303 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
304 |
DISTX = PIANO(I) - 5.81 |
DISTX = PIANO(I) - 5.81 |
305 |
Y(I) = DISTX * TANX + CX |
Y(I) = (DISTX * TANX) + IMPX*10. !- XALIG |
306 |
BAR(M,I) = Y(I) |
c CBAR(M,I) = Y(I) |
307 |
CBAR(M,I) = Y(I) |
BAR(M,I) = Y(I) + XALIG |
308 |
IF (I.EQ.22) MX=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
CBAR(M,I) = Y(I) / 10. |
309 |
|
IF (I.EQ.NPLA) MX=ABS(Y(1)-Y(NPLA))/ |
310 |
|
& ABS(REAL(ZIN(1)-ZIN(NPLA))) |
311 |
C |
C |
312 |
ELSE |
ELSE |
313 |
DISTY = PIANO(I) |
DISTY = PIANO(I) |
314 |
YY(I) = DISTY * TANY + CY |
YY(I) = (DISTY * TANY) + IMPY*10. !- YALIG |
315 |
BAR(M,I) = YY(I) |
c print *,' I ',i,' YY ',YY(I) |
316 |
CBAR(M,I) = YY(I) |
c CBAR(M,I) = YY(I) |
317 |
IF (I.EQ.22) MY=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
BAR(M,I) = YY(I) + YALIG |
318 |
|
CBAR(M,I) = YY(I) / 10. |
319 |
|
IF (I.EQ.NPLA) MY=ABS(Y(1)-Y(NPLA))/ |
320 |
|
& ABS(REAL(ZIN(1)-ZIN(NPLA))) |
321 |
C |
C |
322 |
ENDIF |
ENDIF |
323 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
324 |
cibar(M,I) = ibar(m,i) |
cibar(M,I) = ibar(m,i) |
325 |
|
IF (ibar(m,i).EQ.-1) THEN |
326 |
|
CHTRACK = CHTRACK + 1 |
327 |
|
ELSE |
328 |
|
IWPL(M) = IWPL(M) + 1 |
329 |
|
ENDIF |
330 |
ENDDO |
ENDDO |
331 |
ENDIF |
ENDIF |
332 |
C |
C |
333 |
ENDDO |
ENDDO |
334 |
C |
C |
335 |
ELSE |
ENDIF |
336 |
IF (GOOD2.EQ.0) THEN |
C |
337 |
|
IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN |
338 |
|
IF (GOOD2.EQ.1) THEN |
339 |
PRINT *,' CALORIMETER - WARNING F77: unknown request' |
PRINT *,' CALORIMETER - WARNING F77: unknown request' |
340 |
GOOD2 = 1 |
GOOD2 = 1 |
341 |
GOTO 50 |
GOTO 50 |
342 |
ENDIF |
ENDIF |
343 |
|
IF ( NPCFIT(1).EQ.0.OR.NPCFIT(2).EQ.0 ) THEN |
344 |
|
GOOD2 = 1 |
345 |
|
GOTO 50 |
346 |
|
ENDIF |
347 |
ENDIF |
ENDIF |
348 |
C |
C |
349 |
6996 CONTINUE |
6996 CONTINUE |
352 |
C |
C |
353 |
C IF THE TRACK IS OUTSIDE THE CALORIMETER GO OUT, IF NOT CALCULATE DX0L |
C IF THE TRACK IS OUTSIDE THE CALORIMETER GO OUT, IF NOT CALCULATE DX0L |
354 |
C |
C |
355 |
IF (CHTRACK.EQ.44) THEN |
IF (CHTRACK.EQ.44) THEN ! CHTRACK is the number of planes not touched by the track |
356 |
GOOD2 = 0 |
GOOD2 = 0 |
357 |
PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
c PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
358 |
GOTO 50 |
GOTO 50 |
359 |
ELSE |
ELSE |
360 |
IF ( IWPL(1).LE.IWPL(2) ) THEN |
IF ( IWPL(1).LE.IWPL(2) ) THEN |
367 |
& + (BAR(1,1)-(2.66*MX+BAR(1,1)))**2 + 2.66**2) / |
& + (BAR(1,1)-(2.66*MX+BAR(1,1)))**2 + 2.66**2) / |
368 |
& 3.6 |
& 3.6 |
369 |
C |
C |
|
C DX0L = X01PL * SQRT( (IWPL(1) * SQRT(1 + MX*MX))**2 + |
|
|
C & (IWPL(2) * SQRT(1 + MY*MY))**2 )/2. |
|
370 |
ENDIF |
ENDIF |
371 |
C |
C |
372 |
C |
C |
377 |
GTR = 1 |
GTR = 1 |
378 |
IF (TRKCHI2.LT.0) GTR = 2 |
IF (TRKCHI2.LT.0) GTR = 2 |
379 |
IF ( AL_PP(GTR,5).NE.0. ) THEN |
IF ( AL_PP(GTR,5).NE.0. ) THEN |
380 |
RIG = 1./(AL_PP(GTR,5)) |
RIG = REAL(1./(AL_PP(GTR,5))) |
381 |
ELSE |
ELSE |
382 |
GOOD2 = 0 |
GOOD2 = 0 |
383 |
PRINT *,' CALORIMETER - WARNING F77: track with R = 0' |
c PRINT *,' CALORIMETER - WARNING F77: track with R = 0' |
384 |
GOTO 50 |
GOTO 50 |
385 |
ENDIF |
ENDIF |
386 |
ENDIF |
ENDIF |
387 |
IF (TRIGTY.GE.2.AND.GOOD2.EQ.0) THEN |
IF (TRIGTY.GE.2.AND.HZN.EQ.0.AND.GOOD2.EQ.0) THEN |
388 |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
389 |
IF ( RIG.EQ.0. ) THEN |
IF ( RIG.EQ.0. ) THEN |
390 |
GOOD2 = 0 |
GOOD2 = 1 |
391 |
PRINT *,' CALORIMETER - WARNING F77: ST track with R = 0' |
c PRINT *,' CALORIMETER - WARNING F77: ST track with R = 0' |
392 |
GOTO 50 |
GOTO 50 |
393 |
ENDIF |
ENDIF |
394 |
ENDIF |
ENDIF |
395 |
C |
C |
396 |
|
IF (GOOD2.EQ.0.AND.(TRIGTY.LT.2.OR.HZN.EQ.1)) THEN |
397 |
|
RIG = RIGINPUT |
398 |
|
ENDIF |
399 |
|
C |
400 |
RNSS = 0. |
RNSS = 0. |
401 |
QTOTT = 0. |
QTOTT = 0. |
402 |
C |
C |
403 |
PPLANEMAX = 1.01*(LOG(ABS(RIG)/0.0081)-1.) |
PPLANEMAX = 1.01*(LOG(ABS(RIG)/0.0081)-1.) / 0.74 |
404 |
C |
C |
405 |
IPLANE = INT(ANINT(PPLANEMAX)) + 5 |
IPLANE = INT(ANINT(PPLANEMAX)) + 5 |
406 |
C |
C |
407 |
IF (IPLANE.GT.NPLA) IPLANE=NPLA |
IF (IPLANE.GT.NPLA) IPLANE=NPLA |
408 |
IF (IPLANE.LT.1) IPLANE = 1 |
IF (IPLANE.LT.1) IPLANE = 1 |
409 |
|
c print *,' calcolo...' |
410 |
C |
C |
411 |
C CALCULATE QLOW AND NLOW |
C CALCULATE QLOW AND NLOW |
412 |
C |
C |
430 |
C |
C |
431 |
DO J = 1,IPLANE |
DO J = 1,IPLANE |
432 |
NNX = IBAR(1,J) |
NNX = IBAR(1,J) |
433 |
|
RNSS = 0. ! BACO!! |
434 |
|
QTOTT = 0. ! BACO!! |
435 |
IF (NNX.NE.-1) THEN |
IF (NNX.NE.-1) THEN |
436 |
IF (NNX.LT.9) NNX = 9 |
IF (NNX.LT.9) NNX = 9 |
437 |
IF (NNX.GT.88) NNX = 88 |
IF (NNX.GT.88) NNX = 88 |
482 |
INFX = NNX - 8 |
INFX = NNX - 8 |
483 |
ISUPX = NNX + 8 |
ISUPX = NNX + 8 |
484 |
DO I = INFX,ISUPX |
DO I = INFX,ISUPX |
485 |
IF (DEXY(1,J,I).LT.EMIN) GO TO 710 |
IF (DEXY(1,J,I).GE.EMIN) THEN |
486 |
NCYL = NCYL + 1 |
NCYL = NCYL + 1 |
487 |
QCYL = QCYL + DEXY(1,J,I) |
QCYL = QCYL + DEXY(1,J,I) |
488 |
710 ENDDO |
ENDIF |
489 |
|
ENDDO |
490 |
ENDIF |
ENDIF |
491 |
NNY = IBAR(2,J) |
NNY = IBAR(2,J) |
492 |
IF (NNY.NE.-1) THEN |
IF (NNY.NE.-1) THEN |
495 |
INFY = NNY - 8 |
INFY = NNY - 8 |
496 |
ISUPY = NNY + 8 |
ISUPY = NNY + 8 |
497 |
DO I=INFY,ISUPY |
DO I=INFY,ISUPY |
498 |
IF (DEXY(2,J,I).LT.EMIN) GO TO 810 |
IF (DEXY(2,J,I).GE.EMIN) THEN |
499 |
NCYL = NCYL + 1 |
NCYL = NCYL + 1 |
500 |
QCYL = QCYL + DEXY(2,J,I) |
QCYL = QCYL + DEXY(2,J,I) |
501 |
810 ENDDO |
ENDIF |
502 |
|
ENDDO |
503 |
ENDIF |
ENDIF |
504 |
C |
C |
505 |
C QTR = DETECTED ENERGY AND NTR = NUMBER OF HIT STRIPS IN A CYLINDER oF |
C QTR = DETECTED ENERGY AND NTR = NUMBER OF HIT STRIPS IN A CYLINDER oF |
611 |
C |
C |
612 |
C CALCULATE NLAST AND QLAST |
C CALCULATE NLAST AND QLAST |
613 |
C |
C |
614 |
DO J = NPLA-4,NPLA |
MNPLA = NPLA -4 |
615 |
|
IF ( MNPLA .LT. 1 ) MNPLA = 1 |
616 |
|
DO J = MNPLA,NPLA |
617 |
NNX = IBAR(1,J) |
NNX = IBAR(1,J) |
618 |
IF (NNX.NE.-1) THEN |
IF (NNX.NE.-1) THEN |
619 |
IF (NNX.LT.9) NNX = 9 |
IF (NNX.LT.5) NNX = 5 |
620 |
IF (NNX.GT.88) NNX = 88 |
IF (NNX.GT.92) NNX = 92 |
621 |
INFX = NNX - 8 |
c IF (NNX.LT.9) NNX = 9 |
622 |
ISUPX = NNX + 8 |
c IF (NNX.GT.88) NNX = 88 |
623 |
|
INFX = NNX - 4 |
624 |
|
ISUPX = NNX + 4 |
625 |
|
c INFX = NNX - 8 |
626 |
|
c ISUPX = NNX + 8 |
627 |
DO I = INFX,ISUPX |
DO I = INFX,ISUPX |
628 |
IF (DEXY(1,J,I).GE.EMIN) THEN |
IF (DEXY(1,J,I).GE.EMIN) THEN |
629 |
NLAST = NLAST + 1 |
NLAST = NLAST + 1 |
634 |
C |
C |
635 |
NNY = IBAR(2,J) |
NNY = IBAR(2,J) |
636 |
IF (NNY.NE.-1) THEN |
IF (NNY.NE.-1) THEN |
637 |
IF (NNY.LT.9) NNY = 9 |
IF (NNY.LT.5) NNY = 5 |
638 |
IF (NNY.GT.88) NNY = 88 |
IF (NNY.GT.92) NNY = 92 |
639 |
INFY = NNY - 8 |
c IF (NNY.LT.9) NNY = 9 |
640 |
ISUPY = NNY + 8 |
c IF (NNY.GT.88) NNY = 88 |
641 |
|
INFY = NNY - 4 |
642 |
|
ISUPY = NNY + 4 |
643 |
|
c INFY = NNY - 8 |
644 |
|
c ISUPY = NNY + 8 |
645 |
DO I=INFY,ISUPY |
DO I=INFY,ISUPY |
646 |
IF (DEXY(2,J,I).GE.EMIN) THEN |
IF (DEXY(2,J,I).GE.EMIN) THEN |
647 |
NLAST = NLAST + 1 |
NLAST = NLAST + 1 |
651 |
ENDIF |
ENDIF |
652 |
ENDDO |
ENDDO |
653 |
C |
C |
|
EINF = EMIN |
|
|
ESUP = 50. |
|
654 |
C |
C |
655 |
C CALCULATE PLANETOT AND QMEAN |
C CALCULATE PLANETOT AND QMEAN |
656 |
C |
C |
661 |
NPIANI = 5 |
NPIANI = 5 |
662 |
QMEAN = 0. |
QMEAN = 0. |
663 |
INDEX = 0 |
INDEX = 0 |
664 |
CALL ELIO(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
C |
665 |
PLANETOT = RPIANO(1) + RPIANO(2) |
IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN |
666 |
|
EINF = 50. |
667 |
|
ESUP = 15000. |
668 |
|
CALL NUCLEI(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
669 |
|
PLANETOT = RPIANO(1) + RPIANO(2) |
670 |
|
ELSE |
671 |
|
EINF = EMIN |
672 |
|
ESUP = 15000. |
673 |
|
CALL ELIO(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
674 |
|
PLANETOT = RPIANO(1) + RPIANO(2) |
675 |
|
ENDIF |
676 |
C |
C |
677 |
50 CONTINUE |
50 CONTINUE |
678 |
C |
C |
679 |
|
c print *,' esco' |
680 |
RETURN |
RETURN |
681 |
END |
END |
682 |
|
|