5 |
C |
C |
6 |
INCLUDE 'INTEST.TXT' |
INCLUDE 'INTEST.TXT' |
7 |
C |
C |
8 |
REAL PIANO(22), VARFIT(2) |
REAL PIANO(NPLAV), VARFIT(2) |
9 |
REAL SHIFT |
REAL SHIFT |
10 |
REAL TG(2), BAR(2,NPLA) |
REAL TG(2), BAR(2,NPLAV) |
11 |
REAL DISTX, DISTY, Y(NPLA), YY(NPLA) |
REAL DISTX, DISTY, Y(NPLAV), YY(NPLAV) |
12 |
REAL RIG, RMASS |
REAL RIG, RMASS |
13 |
REAL CHECK, ENER, CX, CY |
REAL CHECK, ENER, CX, CY |
14 |
REAL EINF, ESUP,ENPLANEX,ENPLANEY,TENPLAX,TENPLAY |
REAL EINF, ESUP,ENPLANEX,ENPLANEY,TENPLAX,TENPLAY |
16 |
c |
c |
17 |
INTEGER gtr |
INTEGER gtr |
18 |
INTEGER j, m, nn, i |
INTEGER j, m, nn, i |
19 |
INTEGER IBAR(2,NPLA), NPFIT(2) |
INTEGER IBAR(2,NPLAV), NPFIT(2) |
20 |
INTEGER Iquest(100), IWPL(2),CHTRACK |
INTEGER Iquest(100), IWPL(2),CHTRACK |
21 |
c |
c |
22 |
COMMON / TAGLIOEN / EINF, ESUP, ENER(2) |
COMMON / TAGLIOEN / EINF, ESUP, ENER(2) |
53 |
C |
C |
54 |
C Z position of Y planes, Y1 = 0., Y2 = -8.09, Y3 = -18.18, ... |
C Z position of Y planes, Y1 = 0., Y2 = -8.09, Y3 = -18.18, ... |
55 |
C |
C |
56 |
|
c print *,'NPLA IS ',NPLA |
57 |
PIANO(1) = 0. |
PIANO(1) = 0. |
58 |
DO I = 2, 22 |
DO I = 2, NPLA |
59 |
IF ( MOD(I,2).EQ.0 ) THEN |
IF ( MOD(I,2).EQ.0 ) THEN |
60 |
PIANO(I) = PIANO(I-1) - 8.09 |
PIANO(I) = PIANO(I-1) - 8.09 |
61 |
ELSE |
ELSE |
64 |
ENDDO |
ENDDO |
65 |
C |
C |
66 |
CALL VZERO(DEXY,2*LENSEV) |
CALL VZERO(DEXY,2*LENSEV) |
67 |
CALL VZERO(BAR,2*NPLA) |
CALL VZERO(BAR,2*NPLAV) |
68 |
CALL VZERO(IBAR,2*NPLA) |
CALL VZERO(IBAR,2*NPLAV) |
69 |
CALL VZERO(CBAR,2*NPLA) |
CALL VZERO(CBAR,2*NPLAV) |
70 |
CALL VZERO(CIBAR,2*NPLA) |
CALL VZERO(CIBAR,2*NPLAV) |
71 |
CALL VZERO(QQ,4) |
CALL VZERO(QQ,4) |
72 |
CALL VZERO(Y,NPLA) |
CALL VZERO(Y,NPLAV) |
73 |
CALL VZERO(YY,NPLA) |
CALL VZERO(YY,NPLAV) |
74 |
VARFIT(1) = 0. |
VARFIT(1) = 0. |
75 |
VARFIT(2) = 0. |
VARFIT(2) = 0. |
76 |
NPFIT(1) = 0. |
NPFIT(1) = 0 |
77 |
NPFIT(2) = 0. |
NPFIT(2) = 0 |
78 |
VARCFIT(1) = 0. |
VARCFIT(1) = 0. |
79 |
VARCFIT(2) = 0. |
VARCFIT(2) = 0. |
80 |
NPCFIT(1) = 0. |
NPCFIT(1) = 0 |
81 |
NPCFIT(2) = 0. |
NPCFIT(2) = 0 |
82 |
ELEN = 0. |
ELEN = 0. |
83 |
SELEN = 0. |
SELEN = 0. |
84 |
NSTRIP = 0. |
NSTRIP = 0. |
101 |
C |
C |
102 |
C CALCULATE QTOT, NSTRIP, QQ, NX22, QX22, QMAX AND PLANEMAX |
C CALCULATE QTOT, NSTRIP, QQ, NX22, QX22, QMAX AND PLANEMAX |
103 |
C |
C |
104 |
DO I = 1,22 |
DO I = 1,NPLA |
105 |
ENPLANEY = 0. |
ENPLANEY = 0. |
106 |
ENPLANEX = 0. |
ENPLANEX = 0. |
107 |
DO J = 1,96 |
DO J = 1,96 |
108 |
|
c if ( ESTRIP(1,I,J).gt.0) |
109 |
|
c & print *,' I ',I,' J ',J,' ES1 ',ESTRIP(1,I,J) |
110 |
|
c if ( ESTRIP(2,I,J).gt.0) |
111 |
|
c & print *,' I ',I,' J ',J,' ES2 ',ESTRIP(2,I,J) |
112 |
IF ( MOD(I,2).NE.0 ) THEN |
IF ( MOD(I,2).NE.0 ) THEN |
113 |
IF ( ESTRIP(2,I,J).GT.EMIN ) THEN |
IF ( ESTRIP(2,I,J).GT.EMIN ) THEN |
114 |
DEXY(2,I,J) = ESTRIP(2,I,J) |
DEXY(2,I,J) = ESTRIP(2,I,J) |
152 |
ENPLANEX = ENPLANEX + DEXY(1,I,J) |
ENPLANEX = ENPLANEX + DEXY(1,I,J) |
153 |
NSTRIP = NSTRIP + 1. |
NSTRIP = NSTRIP + 1. |
154 |
QTOT = QTOT + DEXY(1,I,J) |
QTOT = QTOT + DEXY(1,I,J) |
155 |
IF (I.EQ.22) THEN |
IF (I.EQ.NPLA) THEN |
156 |
NX22 = NX22 + 1. |
NX22 = NX22 + 1. |
157 |
QX22 = QX22 + DEXY(1,I,J) |
QX22 = QX22 + DEXY(1,I,J) |
158 |
ENDIF |
ENDIF |
177 |
C FIT THE TRACK INSIDE THE CALORIMETER |
C FIT THE TRACK INSIDE THE CALORIMETER |
178 |
C |
C |
179 |
if (GOOD2.EQ.1.OR.TRIGTY.GE.2) then |
if (GOOD2.EQ.1.OR.TRIGTY.GE.2) then |
180 |
|
c print *,' CALL CLUSTER ' |
181 |
CALL CLUSTER |
CALL CLUSTER |
182 |
|
c print *,' CALL DIRECTION ' |
183 |
CALL DIRECTION(TG) |
CALL DIRECTION(TG) |
184 |
NPCFIT(1) = NPFIT(1) |
NPCFIT(1) = NPFIT(1) |
185 |
NPCFIT(2) = NPFIT(2) |
NPCFIT(2) = NPFIT(2) |
197 |
ENDIF |
ENDIF |
198 |
C |
C |
199 |
DO I = 1,NPLA |
DO I = 1,NPLA |
200 |
NN = 1 |
C NN = 1 |
201 |
C NN = 0 |
NN = 0 |
202 |
C IF (M.EQ.2) NN = 1 |
C IF (M.EQ.2) NN = 1 |
203 |
IF (MOD(I,2).EQ.NN) THEN |
IF (MOD(I,2).EQ.NN) THEN |
204 |
SHIFT = +0.5 |
IF (REVERSE.EQ.0) THEN |
205 |
|
SHIFT = -0.5 |
206 |
|
ELSE |
207 |
|
SHIFT = +0.5 |
208 |
|
ENDIF |
209 |
ELSE |
ELSE |
210 |
SHIFT = -0.5 |
IF (REVERSE.EQ.0) THEN |
211 |
|
SHIFT = +0.5 |
212 |
|
ELSE |
213 |
|
SHIFT = -0.5 |
214 |
|
ENDIF |
215 |
ENDIF |
ENDIF |
216 |
C |
C |
217 |
IF (M.EQ.1) THEN |
IF (M.EQ.1) THEN |
218 |
DISTX = PIANO(I) - 5.81 |
DISTX = PIANO(I) - 5.81 |
219 |
|
c print *,'C X PLANE I= ',I,' Z = ',DISTX+ZALIG |
220 |
Y(I) = DISTX * TG(1) + CX |
Y(I) = DISTX * TG(1) + CX |
221 |
BAR(M,I) = Y(I) |
BAR(M,I) = Y(I) |
222 |
CBAR(M,I) = (Y(I) - XALIG)/10. |
CBAR(M,I) = (Y(I) - XALIG)/10. |
223 |
C |
C |
224 |
ELSE |
ELSE |
225 |
DISTY = PIANO(I) |
DISTY = PIANO(I) |
226 |
|
c print *,'C Y PLANE I= ',I,' Z = ',DISTY+ZALIG |
227 |
YY(I) = DISTY * TG(2) + CY |
YY(I) = DISTY * TG(2) + CY |
228 |
BAR(M,I) = YY(I) |
BAR(M,I) = YY(I) |
229 |
CBAR(M,I) = (-YALIG + YY(I))/10. |
CBAR(M,I) = (-YALIG + YY(I))/10. |
246 |
C |
C |
247 |
C CALCULATE ELEN AND SELEN |
C CALCULATE ELEN AND SELEN |
248 |
C |
C |
249 |
ELEN = 40.82 * QTOT * 1.06 * 1E-4 |
c ELEN = 40.82 * QTOT * 1.06 * 1E-4 |
250 |
|
C ELEN = 260. * QTOT |
251 |
|
ELEN = QTOT / 260. |
252 |
IF (ELEN.GT.0.) THEN |
IF (ELEN.GT.0.) THEN |
253 |
SELEN = ELEN * (0.01183 + 0.121 / SQRT(ELEN)) |
SELEN = ELEN * (0.01183 + 0.121 / SQRT(ELEN)) |
254 |
ELSE |
ELSE |
257 |
C |
C |
258 |
9696 CONTINUE |
9696 CONTINUE |
259 |
C |
C |
260 |
45 continue |
c 45 continue |
261 |
|
|
262 |
50 continue |
c 50 continue |
263 |
|
|
264 |
return |
return |
265 |
END |
END |