55 |
COMMON / CH / CHECK |
COMMON / CH / CHECK |
56 |
SAVE / CH / |
SAVE / CH / |
57 |
C |
C |
58 |
COMMON / CALOFIT / VARFIT, NPFIT |
COMMON / CALOFIT / VARFIT, NPFIT, IWPL,CHTRACK |
59 |
SAVE / CALOFIT / |
SAVE / CALOFIT / |
60 |
C |
C |
61 |
COMMON / pawcd / hmemor |
COMMON / pawcd / hmemor |
89 |
NLAST = 0. |
NLAST = 0. |
90 |
PLANETOT = 0. |
PLANETOT = 0. |
91 |
QMEAN = 0. |
QMEAN = 0. |
92 |
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) |
|
93 |
C |
C |
94 |
C BEGIN WITH THE FISRT TRACK IF WE HAVE A TRACK FROM TRACKER |
C BEGIN WITH THE FISRT TRACK IF WE HAVE A TRACK FROM TRACKER |
95 |
C |
C |
106 |
CALL VZERO(IBAR,2*NPLA) |
CALL VZERO(IBAR,2*NPLA) |
107 |
CALL VZERO(TBAR,2*NPLA) |
CALL VZERO(TBAR,2*NPLA) |
108 |
CALL VZERO(TIBAR,2*NPLA) |
CALL VZERO(TIBAR,2*NPLA) |
109 |
|
CALL VZERO(Y,NPLA) |
110 |
|
CALL VZERO(YY,NPLA) |
111 |
|
CALL VZERO(XOUT,NPLA) |
112 |
|
CALL VZERO(YOUT,NPLA) |
113 |
do m = 1, 5 |
do m = 1, 5 |
114 |
al_p(m) = al_pp(t,m) |
al_p(m) = al_pp(t,m) |
115 |
enddo |
enddo |
142 |
TY = TAN(ASIN(AL_P(3))) * SIN(AL_P(4)) |
TY = TAN(ASIN(AL_P(3))) * SIN(AL_P(4)) |
143 |
DO I = 1, NPLA |
DO I = 1, NPLA |
144 |
NN = 0 |
NN = 0 |
145 |
IF (M.EQ.2) NN = 1 |
C????? IF (M.EQ.2) NN = 1 |
146 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
147 |
SHIFT = +0.5 |
SHIFT = +0.5 |
148 |
ELSE |
ELSE |
228 |
C |
C |
229 |
C WE MUST PROCESS A SELFTRIGGER EVENT |
C WE MUST PROCESS A SELFTRIGGER EVENT |
230 |
C |
C |
231 |
IF (TRIGTY.GE.2) THEN |
IF (TRIGTY.GE.2.AND.HZN.EQ.0) THEN |
232 |
C |
C |
233 |
C CALL SELFTRIGGER SUBROUTINE |
C CALL SELFTRIGGER SUBROUTINE |
234 |
C |
C |
235 |
|
CALL VZERO(IWPL,2) |
236 |
|
CALL VZERO(VARCFIT,2) |
237 |
|
CALL VZERO(NPCFIT,2) |
238 |
|
CALL VZERO(TBAR,2*NPLA) |
239 |
|
CALL VZERO(TIBAR,2*NPLA) |
240 |
|
CALL VZERO(BAR,2*NPLA) |
241 |
|
CALL VZERO(IBAR,2*NPLA) |
242 |
|
CALL VZERO(Y,NPLA) |
243 |
|
CALL VZERO(YY,NPLA) |
244 |
|
CALL VZERO(XOUT,NPLA) |
245 |
|
CALL VZERO(YOUT,NPLA) |
246 |
|
C |
247 |
CALL SELFTRIG() |
CALL SELFTRIG() |
248 |
ELEN = PARZEN3 |
ELEN = PARZEN3 |
249 |
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))) |
260 |
TANX = BX |
TANX = BX |
261 |
ELSE |
ELSE |
262 |
VARCFIT(2) = CHI2Y |
VARCFIT(2) = CHI2Y |
263 |
IMPY = 10. * ( AY + 12.2 ) |
IMPY = 10. * ( AY + 12.1 ) |
264 |
TANY = BY |
TANY = BY |
265 |
ENDIF |
ENDIF |
266 |
C |
C |
267 |
DO I = 1,NPLA |
DO I = 1,NPLA |
268 |
NN = 0 |
NN = 0 |
269 |
IF (M.EQ.2) NN = 1 |
C????? IF (M.EQ.2) NN = 1 |
270 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
271 |
SHIFT = +0.5 |
SHIFT = +0.5 |
272 |
ELSE |
ELSE |
275 |
C |
C |
276 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
277 |
DISTX = PIANO(I) - 5.81 |
DISTX = PIANO(I) - 5.81 |
278 |
Y(I) = DISTX * TANX + CX |
Y(I) = DISTX * TANX + IMPX |
279 |
|
c CBAR(M,I) = Y(I) |
280 |
BAR(M,I) = Y(I) |
BAR(M,I) = Y(I) |
281 |
CBAR(M,I) = Y(I) |
CBAR(M,I) = (Y(I)-XALIG)/10. |
282 |
IF (I.EQ.22) MX=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
IF (I.EQ.22) MX=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
283 |
C |
C |
284 |
ELSE |
ELSE |
285 |
DISTY = PIANO(I) |
DISTY = PIANO(I) |
286 |
YY(I) = DISTY * TANY + CY |
YY(I) = DISTY * TANY + IMPY |
287 |
|
c CBAR(M,I) = YY(I) |
288 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) |
289 |
CBAR(M,I) = YY(I) |
CBAR(M,I) = (YY(I)-YALIG)/10. |
290 |
IF (I.EQ.22) MY=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
IF (I.EQ.22) MY=ABS(Y(1)-Y(22))/ABS(ZIN(1)-ZIN(22)) |
291 |
C |
C |
292 |
ENDIF |
ENDIF |
293 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
294 |
cibar(M,I) = ibar(m,i) |
cibar(M,I) = ibar(m,i) |
295 |
|
IF (ibar(m,i).EQ.-1) THEN |
296 |
|
CHTRACK = CHTRACK + 1 |
297 |
|
ELSE |
298 |
|
IWPL(M) = IWPL(M) + 1 |
299 |
|
ENDIF |
300 |
ENDDO |
ENDDO |
301 |
ENDIF |
ENDIF |
302 |
C |
C |
303 |
ENDDO |
ENDDO |
304 |
C |
C |
305 |
ELSE |
ENDIF |
306 |
IF (GOOD2.EQ.0) THEN |
C |
307 |
|
IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN |
308 |
|
IF (GOOD2.EQ.1) THEN |
309 |
PRINT *,' CALORIMETER - WARNING F77: unknown request' |
PRINT *,' CALORIMETER - WARNING F77: unknown request' |
310 |
GOOD2 = 1 |
GOOD2 = 1 |
311 |
GOTO 50 |
GOTO 50 |
312 |
ENDIF |
ENDIF |
313 |
|
IF ( NPCFIT(1).EQ.0.OR.NPCFIT(2).EQ.0 ) THEN |
314 |
|
GOOD2 = 1 |
315 |
|
GOTO 50 |
316 |
|
ENDIF |
317 |
ENDIF |
ENDIF |
318 |
C |
C |
319 |
6996 CONTINUE |
6996 CONTINUE |
322 |
C |
C |
323 |
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 |
324 |
C |
C |
325 |
IF (CHTRACK.EQ.44) THEN |
IF (CHTRACK.EQ.44) THEN ! CHTRACK is the number of planes not touched by the track |
326 |
GOOD2 = 0 |
GOOD2 = 0 |
327 |
c PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
c PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
328 |
GOTO 50 |
GOTO 50 |
337 |
& + (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) / |
338 |
& 3.6 |
& 3.6 |
339 |
C |
C |
|
C DX0L = X01PL * SQRT( (IWPL(1) * SQRT(1 + MX*MX))**2 + |
|
|
C & (IWPL(2) * SQRT(1 + MY*MY))**2 )/2. |
|
340 |
ENDIF |
ENDIF |
341 |
C |
C |
342 |
C |
C |
354 |
GOTO 50 |
GOTO 50 |
355 |
ENDIF |
ENDIF |
356 |
ENDIF |
ENDIF |
357 |
IF (TRIGTY.GE.2.AND.GOOD2.EQ.0) THEN |
IF (TRIGTY.GE.2.AND.HZN.EQ.0.AND.GOOD2.EQ.0) THEN |
358 |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
359 |
IF ( RIG.EQ.0. ) THEN |
IF ( RIG.EQ.0. ) THEN |
360 |
GOOD2 = 0 |
GOOD2 = 1 |
361 |
PRINT *,' CALORIMETER - WARNING F77: ST track with R = 0' |
PRINT *,' CALORIMETER - WARNING F77: ST track with R = 0' |
362 |
GOTO 50 |
GOTO 50 |
363 |
ENDIF |
ENDIF |
364 |
ENDIF |
ENDIF |
365 |
C |
C |
366 |
|
IF (GOOD2.EQ.0.AND.(TRIGTY.LT.2.OR.HZN.EQ.1)) THEN |
367 |
|
RIG = RIGINPUT |
368 |
|
ENDIF |
369 |
|
C |
370 |
RNSS = 0. |
RNSS = 0. |
371 |
QTOTT = 0. |
QTOTT = 0. |
372 |
C |
C |
614 |
ENDIF |
ENDIF |
615 |
ENDDO |
ENDDO |
616 |
C |
C |
|
EINF = EMIN |
|
|
ESUP = 50. |
|
617 |
C |
C |
618 |
C CALCULATE PLANETOT AND QMEAN |
C CALCULATE PLANETOT AND QMEAN |
619 |
C |
C |
624 |
NPIANI = 5 |
NPIANI = 5 |
625 |
QMEAN = 0. |
QMEAN = 0. |
626 |
INDEX = 0 |
INDEX = 0 |
627 |
CALL ELIO(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
C |
628 |
PLANETOT = RPIANO(1) + RPIANO(2) |
IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN |
629 |
|
EINF = 50. |
630 |
|
ESUP = 15000. |
631 |
|
CALL NUCLEI(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
632 |
|
PLANETOT = RPIANO(1) + RPIANO(2) |
633 |
|
ELSE |
634 |
|
EINF = EMIN |
635 |
|
ESUP = 15000. |
636 |
|
CALL ELIO(RPIANO,NPIANI,QMEAN,NTOT,INDEX) |
637 |
|
PLANETOT = RPIANO(1) + RPIANO(2) |
638 |
|
ENDIF |
639 |
C |
C |
640 |
50 CONTINUE |
50 CONTINUE |
641 |
C |
C |