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 |
26 |
INTEGER INDEX, NTOT(2), NPIANI, GTR |
INTEGER INDEX, NTOT(2), NPIANI, GTR |
27 |
INTEGER j, m, i, IWPL(2), timpx, timpy, T, nn |
INTEGER j, m, i, IWPL(2), timpx, timpy, T, nn |
28 |
INTEGER IPLANE, NNX, NNY, INFX, INFY, ISUPX, ISUPY |
INTEGER IPLANE, NNX, NNY, INFX, INFY, ISUPX, ISUPY |
29 |
INTEGER IBAR(2,NPLA), NPFIT(2), CHTRACK,IWPLU |
INTEGER IBAR(2,NPLAV), NPFIT(2), CHTRACK,IWPLU |
30 |
INTEGER Iquest(100), ICONTROL5, nin, IFAIL |
INTEGER Iquest(100), ICONTROL5, nin, IFAIL |
31 |
C |
C |
32 |
PARAMETER (X01PL=0.74) |
PARAMETER (X01PL=0.74) |
66 |
C |
C |
67 |
C Begin ! |
C Begin ! |
68 |
C |
C |
69 |
|
c print *,' sono qui' |
70 |
CALOL2TR = 0; |
CALOL2TR = 0; |
71 |
NCORE = 0. |
NCORE = 0. |
72 |
QCORE = 0. |
QCORE = 0. |
92 |
QMEAN = 0. |
QMEAN = 0. |
93 |
C SELFTRIGGER = 0 |
C SELFTRIGGER = 0 |
94 |
C |
C |
95 |
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 |
96 |
C |
C |
97 |
T = 1 |
T = 1 |
98 |
C |
C |
103 |
CHTRACK = 0 |
CHTRACK = 0 |
104 |
C |
C |
105 |
CALL VZERO(IWPL,2) |
CALL VZERO(IWPL,2) |
106 |
CALL VZERO(BAR,2*NPLA) |
CALL VZERO(BAR,2*NPLAV) |
107 |
CALL VZERO(IBAR,2*NPLA) |
CALL VZERO(IBAR,2*NPLAV) |
108 |
CALL VZERO(TBAR,2*NPLA) |
CALL VZERO(TBAR,2*NPLAV) |
109 |
CALL VZERO(TIBAR,2*NPLA) |
CALL VZERO(TIBAR,2*NPLAV) |
110 |
CALL VZERO(Y,NPLA) |
CALL VZERO(Y,NPLAV) |
111 |
CALL VZERO(YY,NPLA) |
CALL VZERO(YY,NPLAV) |
112 |
CALL VZERO(XOUT,NPLA) |
CALL VZERO(XOUT,NPLAV) |
113 |
CALL VZERO(YOUT,NPLA) |
CALL VZERO(YOUT,NPLAV) |
114 |
do m = 1, 5 |
do m = 1, 5 |
115 |
al_p(m) = al_pp(t,m) |
al_p(m) = al_pp(t,m) |
116 |
|
c print *,' al_p(',m,') = ',al_p(m) |
117 |
enddo |
enddo |
118 |
if (al_p(5).eq.0.) THEN |
if (al_p(5).eq.0.) THEN |
119 |
PRINT *,' CALORIMETER - WARNING F77: track with R = 0, discarded' |
PRINT *,' CALORIMETER - WARNING F77: track with R = 0, discarded' |
126 |
YOUT(I) = 0. |
YOUT(I) = 0. |
127 |
IF (MOD(M,2).EQ.0) THEN |
IF (MOD(M,2).EQ.0) THEN |
128 |
DISTX = PIANO(I) + ZALIG |
DISTX = PIANO(I) + ZALIG |
129 |
|
c print *,'T Y PLANE I= ',I,' Z = ',DISTX |
130 |
ELSE |
ELSE |
131 |
DISTX = PIANO(I) - 5.81 + ZALIG |
DISTX = PIANO(I) - 5.81 + ZALIG |
132 |
|
c print *,'T X PLANE I= ',I,' Z = ',DISTX |
133 |
ENDIF |
ENDIF |
134 |
ZIN(I) = distx / 10. |
ZIN(I) = distx / 10. |
135 |
|
c print *,' ZIN(',I,') = ',ZIN(I) |
136 |
TBAR(M,I) = 0. |
TBAR(M,I) = 0. |
137 |
TIBAR(M,I) = 0 |
TIBAR(M,I) = 0 |
138 |
enddo |
enddo |
147 |
TY = TAN(ASIN(AL_P(3))) * SIN(AL_P(4)) |
TY = TAN(ASIN(AL_P(3))) * SIN(AL_P(4)) |
148 |
DO I = 1, NPLA |
DO I = 1, NPLA |
149 |
NN = 0 |
NN = 0 |
150 |
C????? IF (M.EQ.2) NN = 1 |
c IF (M.EQ.2) NN = 1 |
151 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
152 |
SHIFT = +0.5 |
IF (REVERSE.EQ.0) THEN |
153 |
|
SHIFT = -0.5 |
154 |
|
ELSE |
155 |
|
SHIFT = +0.5 |
156 |
|
ENDIF |
157 |
ELSE |
ELSE |
158 |
SHIFT = -0.5 |
IF (REVERSE.EQ.0) THEN |
159 |
|
SHIFT = +0.5 |
160 |
|
ELSE |
161 |
|
SHIFT = -0.5 |
162 |
|
ENDIF |
163 |
ENDIF |
ENDIF |
164 |
C |
C |
165 |
C CHECK IF XOUT OR YOUT ARE NaN |
C CHECK IF XOUT OR YOUT ARE NaN |
182 |
Y(I) = CX |
Y(I) = CX |
183 |
BAR(M,I) = Y(I) |
BAR(M,I) = Y(I) |
184 |
TBAR(M,I) = (Y(I) - XALIG)/10. |
TBAR(M,I) = (Y(I) - XALIG)/10. |
185 |
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))/ |
186 |
|
& ABS(ZIN(1)-ZIN(NPLA)) |
187 |
ELSE |
ELSE |
188 |
YY(I) = CY |
YY(I) = CY |
189 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) |
190 |
TBAR(M,I) = (-YALIG + YY(I))/10. |
TBAR(M,I) = (-YALIG + YY(I))/10. |
191 |
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))/ |
192 |
|
& ABS(ZIN(1)-ZIN(NPLA)) |
193 |
ENDIF |
ENDIF |
194 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
195 |
tibar(M,I) = ibar(m,i) |
tibar(M,I) = ibar(m,i) |
250 |
CALL VZERO(IWPL,2) |
CALL VZERO(IWPL,2) |
251 |
CALL VZERO(VARCFIT,2) |
CALL VZERO(VARCFIT,2) |
252 |
CALL VZERO(NPCFIT,2) |
CALL VZERO(NPCFIT,2) |
253 |
CALL VZERO(TBAR,2*NPLA) |
CALL VZERO(TBAR,2*NPLAV) |
254 |
CALL VZERO(TIBAR,2*NPLA) |
CALL VZERO(TIBAR,2*NPLAV) |
255 |
CALL VZERO(BAR,2*NPLA) |
CALL VZERO(BAR,2*NPLAV) |
256 |
CALL VZERO(IBAR,2*NPLA) |
CALL VZERO(IBAR,2*NPLAV) |
257 |
CALL VZERO(Y,NPLA) |
CALL VZERO(Y,NPLAV) |
258 |
CALL VZERO(YY,NPLA) |
CALL VZERO(YY,NPLAV) |
259 |
CALL VZERO(XOUT,NPLA) |
CALL VZERO(XOUT,NPLAV) |
260 |
CALL VZERO(YOUT,NPLA) |
CALL VZERO(YOUT,NPLAV) |
261 |
C |
C |
262 |
CALL SELFTRIG() |
CALL SELFTRIG() |
263 |
ELEN = PARZEN3 |
ELEN = PARZEN3 |
273 |
IF (NPCFIT(M).GE.2) THEN |
IF (NPCFIT(M).GE.2) THEN |
274 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
275 |
VARCFIT(1) = CHI2X |
VARCFIT(1) = CHI2X |
276 |
IMPX = AX ! PAMELA REF |
IMPX = AX + BX * (ZALIG/10.) ! PAMELA REF |
277 |
TANX = BX |
TANX = BX |
278 |
ELSE |
ELSE |
279 |
VARCFIT(2) = CHI2Y |
VARCFIT(2) = CHI2Y |
280 |
IMPY = AY ! PAMELA REF |
IMPY = AY + BY * (ZALIG/10.) ! PAMELA REF |
281 |
TANY = BY |
TANY = BY |
282 |
ENDIF |
ENDIF |
283 |
C |
C |
284 |
DO I = 1,NPLA |
DO I = 1,NPLA |
285 |
NN = 0 |
NN = 0 |
286 |
C????? IF (M.EQ.2) NN = 1 |
c IF (M.EQ.2) NN = 1 |
287 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
288 |
SHIFT = +0.5 |
IF (REVERSE.EQ.0) THEN |
289 |
|
SHIFT = -0.5 |
290 |
|
ELSE |
291 |
|
SHIFT = +0.5 |
292 |
|
ENDIF |
293 |
ELSE |
ELSE |
294 |
SHIFT = -0.5 |
IF (REVERSE.EQ.0) THEN |
295 |
|
SHIFT = +0.5 |
296 |
|
ELSE |
297 |
|
SHIFT = -0.5 |
298 |
|
ENDIF |
299 |
ENDIF |
ENDIF |
300 |
C |
C |
301 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
302 |
DISTX = PIANO(I) - 5.81 |
DISTX = PIANO(I) - 5.81 |
303 |
Y(I) = (DISTX * TANX) + AX - XALIG |
Y(I) = (DISTX * TANX) + IMPX*10. !- XALIG |
304 |
c CBAR(M,I) = Y(I) |
c CBAR(M,I) = Y(I) |
305 |
BAR(M,I) = Y(I) |
BAR(M,I) = Y(I) + XALIG |
306 |
CBAR(M,I) = (Y(I) + XALIG)/10. |
CBAR(M,I) = Y(I) / 10. |
307 |
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))/ |
308 |
|
& ABS(ZIN(1)-ZIN(NPLA)) |
309 |
C |
C |
310 |
ELSE |
ELSE |
311 |
DISTY = PIANO(I) |
DISTY = PIANO(I) |
312 |
YY(I) = (DISTY * TANY) + AY - YALIG |
YY(I) = (DISTY * TANY) + IMPY*10. !- YALIG |
313 |
|
c print *,' I ',i,' YY ',YY(I) |
314 |
c CBAR(M,I) = YY(I) |
c CBAR(M,I) = YY(I) |
315 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) + YALIG |
316 |
CBAR(M,I) = (YY(I) + YALIG)/10. |
CBAR(M,I) = YY(I) / 10. |
317 |
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))/ |
318 |
|
& ABS(ZIN(1)-ZIN(NPLA)) |
319 |
C |
C |
320 |
ENDIF |
ENDIF |
321 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
398 |
RNSS = 0. |
RNSS = 0. |
399 |
QTOTT = 0. |
QTOTT = 0. |
400 |
C |
C |
401 |
PPLANEMAX = 1.01*(LOG(ABS(RIG)/0.0081)-1.) |
PPLANEMAX = 1.01*(LOG(ABS(RIG)/0.0081)-1.) / 0.74 |
402 |
C |
C |
403 |
IPLANE = INT(ANINT(PPLANEMAX)) + 5 |
IPLANE = INT(ANINT(PPLANEMAX)) + 5 |
404 |
C |
C |
405 |
IF (IPLANE.GT.NPLA) IPLANE=NPLA |
IF (IPLANE.GT.NPLA) IPLANE=NPLA |
406 |
IF (IPLANE.LT.1) IPLANE = 1 |
IF (IPLANE.LT.1) IPLANE = 1 |
407 |
|
c print *,' calcolo...' |
408 |
C |
C |
409 |
C CALCULATE QLOW AND NLOW |
C CALCULATE QLOW AND NLOW |
410 |
C |
C |
428 |
C |
C |
429 |
DO J = 1,IPLANE |
DO J = 1,IPLANE |
430 |
NNX = IBAR(1,J) |
NNX = IBAR(1,J) |
431 |
|
RNSS = 0. ! BACO!! |
432 |
|
QTOTT = 0. ! BACO!! |
433 |
IF (NNX.NE.-1) THEN |
IF (NNX.NE.-1) THEN |
434 |
IF (NNX.LT.9) NNX = 9 |
IF (NNX.LT.9) NNX = 9 |
435 |
IF (NNX.GT.88) NNX = 88 |
IF (NNX.GT.88) NNX = 88 |
670 |
C |
C |
671 |
50 CONTINUE |
50 CONTINUE |
672 |
C |
C |
673 |
|
c print *,' esco' |
674 |
RETURN |
RETURN |
675 |
END |
END |
676 |
|
|