90 |
PLANETOT = 0. |
PLANETOT = 0. |
91 |
QMEAN = 0. |
QMEAN = 0. |
92 |
SELFTRIGGER = 0 |
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 |
159 |
ENDIF |
ENDIF |
160 |
C |
C |
161 |
CX = XOUT(I)*10. + XALIG |
CX = XOUT(I)*10. + XALIG |
162 |
CY = -YOUT(I)*10. + YALIG |
CY = YOUT(I)*10. + YALIG |
163 |
C |
C |
164 |
IF (I.EQ.1) THEN |
IF (I.EQ.1) THEN |
165 |
TIMPX = CX |
TIMPX = CX |
173 |
ELSE |
ELSE |
174 |
YY(I) = CY |
YY(I) = CY |
175 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) |
176 |
TBAR(M,I) = (YALIG - YY(I))/10. |
TBAR(M,I) = (-YALIG + YY(I))/10. |
177 |
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)) |
178 |
ENDIF |
ENDIF |
179 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
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(VARCFIT,2) |
236 |
|
CALL VZERO(NPCFIT,2) |
237 |
|
CALL VZERO(TBAR,2*NPLA) |
238 |
|
CALL VZERO(TIBAR,2*NPLA) |
239 |
|
CALL VZERO(BAR,2*NPLA) |
240 |
|
CALL VZERO(IBAR,2*NPLA) |
241 |
|
CALL VZERO(Y,NPLA) |
242 |
|
CALL VZERO(YY,NPLA) |
243 |
|
CALL VZERO(XOUT,NPLA) |
244 |
|
CALL VZERO(YOUT,NPLA) |
245 |
|
C |
246 |
CALL SELFTRIG() |
CALL SELFTRIG() |
247 |
ELEN = PARZEN3 |
ELEN = PARZEN3 |
248 |
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))) |
265 |
C |
C |
266 |
DO I = 1,NPLA |
DO I = 1,NPLA |
267 |
NN = 0 |
NN = 0 |
268 |
IF (M.EQ.2) NN = 1 |
C????? IF (M.EQ.2) NN = 1 |
269 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
270 |
SHIFT = +0.5 |
SHIFT = +0.5 |
271 |
ELSE |
ELSE |
294 |
C |
C |
295 |
ENDDO |
ENDDO |
296 |
C |
C |
|
ELSE |
|
|
IF (GOOD2.EQ.0) THEN |
|
|
PRINT *,' CALORIMETER - WARNING F77: unknown request' |
|
|
GOOD2 = 1 |
|
|
GOTO 50 |
|
|
ENDIF |
|
297 |
ENDIF |
ENDIF |
298 |
|
C IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN |
299 |
|
C IF (GOOD2.EQ.0) THEN |
300 |
|
C PRINT *,' CALORIMETER - WARNING F77: unknown request' |
301 |
|
C GOOD2 = 1 |
302 |
|
C GOTO 50 |
303 |
|
C ENDIF |
304 |
|
C ENDIF |
305 |
C |
C |
306 |
6996 CONTINUE |
6996 CONTINUE |
307 |
C |
C |
309 |
C |
C |
310 |
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 |
311 |
C |
C |
312 |
IF (CHTRACK.EQ.44) THEN |
IF (CHTRACK.EQ.44) THEN ! CHTRACK is the number of planes not touched by the track |
313 |
GOOD2 = 0 |
GOOD2 = 0 |
314 |
c PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
c PRINT *,' CALORIMETER - WARNING F77: track outside calorimeter' |
315 |
GOTO 50 |
GOTO 50 |
324 |
& + (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) / |
325 |
& 3.6 |
& 3.6 |
326 |
C |
C |
|
C DX0L = X01PL * SQRT( (IWPL(1) * SQRT(1 + MX*MX))**2 + |
|
|
C & (IWPL(2) * SQRT(1 + MY*MY))**2 )/2. |
|
327 |
ENDIF |
ENDIF |
328 |
C |
C |
329 |
C |
C |
341 |
GOTO 50 |
GOTO 50 |
342 |
ENDIF |
ENDIF |
343 |
ENDIF |
ENDIF |
344 |
IF (TRIGTY.GE.2.AND.GOOD2.EQ.0) THEN |
IF (TRIGTY.GE.2.AND.HZN.EQ.0.AND.GOOD2.EQ.0) THEN |
345 |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
RIG = ELEN ! SELFTRIGGER RIGIDITY |
346 |
IF ( RIG.EQ.0. ) THEN |
IF ( RIG.EQ.0. ) THEN |
347 |
GOOD2 = 0 |
GOOD2 = 0 |
350 |
ENDIF |
ENDIF |
351 |
ENDIF |
ENDIF |
352 |
C |
C |
353 |
|
IF (GOOD2.EQ.0.AND.(TRIGTY.LT.2.OR.HZN.EQ.1)) THEN |
354 |
|
RIG = RIGINPUT |
355 |
|
ENDIF |
356 |
|
C |
357 |
RNSS = 0. |
RNSS = 0. |
358 |
QTOTT = 0. |
QTOTT = 0. |
359 |
C |
C |