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) |
INTEGER Iquest(100), IWPL(2),CHTRACK |
21 |
c |
c |
22 |
COMMON / TAGLIOEN / EINF, ESUP, ENER(2) |
COMMON / TAGLIOEN / EINF, ESUP, ENER(2) |
23 |
SAVE / TAGLIOEN / |
SAVE / TAGLIOEN / |
37 |
COMMON / CH / CHECK |
COMMON / CH / CHECK |
38 |
SAVE / CH / |
SAVE / CH / |
39 |
C |
C |
40 |
COMMON / CALOFIT / VARFIT, NPFIT |
COMMON / CALOFIT / VARFIT, NPFIT, IWPL,CHTRACK |
41 |
SAVE / CALOFIT / |
SAVE / CALOFIT / |
42 |
C |
C |
43 |
COMMON / pawcd / hmemor |
COMMON / pawcd / hmemor |
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. |
87 |
QX22 = 0. |
QX22 = 0. |
88 |
QMAX = 0. |
QMAX = 0. |
89 |
GTR = 0 |
GTR = 0 |
90 |
|
CHTRACK = 0 |
91 |
C |
C |
92 |
DISTX = 0. |
DISTX = 0. |
93 |
DISTY = 0. |
DISTY = 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 |
|
ENPLANEY = ENPLANEY + ESTRIP(2,I,J) |
|
114 |
DEXY(2,I,J) = ESTRIP(2,I,J) |
DEXY(2,I,J) = ESTRIP(2,I,J) |
115 |
|
ENPLANEY = ENPLANEY + DEXY(2,I,J) |
116 |
NSTRIP = NSTRIP + 1. |
NSTRIP = NSTRIP + 1. |
117 |
QTOT = QTOT + ESTRIP(2,I,J) |
QTOT = QTOT + DEXY(2,I,J) |
118 |
IF (I.LT.11) QQ(1) = QQ(1) + ESTRIP(2,I,J) |
IF (I.LT.11) QQ(1) = QQ(1) + DEXY(2,I,J) |
119 |
ENDIF |
ENDIF |
120 |
IF ( ESTRIP(1,I,J).GT.EMIN ) THEN |
IF ( ESTRIP(1,I,J).GT.EMIN ) THEN |
121 |
ENPLANEX = ENPLANEX + ESTRIP(1,I,J) |
C IF ( ESTRIP(1,I+1,J).GT.EMIN ) THEN |
122 |
|
C |
123 |
|
c print *,' i ',i,' i + 1 ',I+1 |
124 |
|
C DEXY(1,I,J) = ESTRIP(1,I+1,J) |
125 |
DEXY(1,I,J) = ESTRIP(1,I,J) |
DEXY(1,I,J) = ESTRIP(1,I,J) |
126 |
|
C |
127 |
|
ENPLANEX = ENPLANEX + DEXY(1,I,J) |
128 |
NSTRIP = NSTRIP + 1. |
NSTRIP = NSTRIP + 1. |
129 |
QTOT = QTOT + ESTRIP(1,I,J) |
QTOT = QTOT + DEXY(1,I,J) |
130 |
if (i.lt.11) QQ(2) = QQ(2) + ESTRIP(1,I,J) |
if (i.lt.11) QQ(2) = QQ(2) + DEXY(1,I,J) |
131 |
|
c IF (I.EQ.21) THEN |
132 |
|
c NX22 = NX22 + 1. |
133 |
|
c QX22 = QX22 + DEXY(1,I,J) |
134 |
|
c ENDIF |
135 |
ENDIF |
ENDIF |
136 |
ENDIF |
ENDIF |
137 |
IF ( MOD(I,2).EQ.0 ) THEN |
IF ( MOD(I,2).EQ.0 ) THEN |
138 |
IF (ESTRIP(2,I,J).GT.EMIN) THEN |
IF (ESTRIP(2,I,J).GT.EMIN) THEN |
|
ENPLANEY = ENPLANEY + ESTRIP(2,I,J) |
|
139 |
DEXY(2,I,J) = ESTRIP(2,I,J) |
DEXY(2,I,J) = ESTRIP(2,I,J) |
140 |
|
ENPLANEY = ENPLANEY + DEXY(2,I,J) |
141 |
NSTRIP = NSTRIP + 1. |
NSTRIP = NSTRIP + 1. |
142 |
QTOT = QTOT + ESTRIP(2,I,J) |
QTOT = QTOT + DEXY(2,I,J) |
143 |
if (i.lt.11) QQ(3) = QQ(3) + ESTRIP(2,I,J) |
if (i.lt.11) QQ(3) = QQ(3) + DEXY(2,I,J) |
144 |
ENDIF |
ENDIF |
145 |
IF (ESTRIP(1,I,J).GT.EMIN) THEN |
IF (ESTRIP(1,I,J).GT.EMIN) THEN |
146 |
ENPLANEX = ENPLANEX + ESTRIP(1,I,J) |
C IF (ESTRIP(1,I-1,J).GT.EMIN) THEN |
147 |
|
C |
148 |
|
c print *,' i ',i,' i - 1 ',I-1 |
149 |
|
C DEXY(1,I,J) = ESTRIP(1,I-1,J) |
150 |
DEXY(1,I,J) = ESTRIP(1,I,J) |
DEXY(1,I,J) = ESTRIP(1,I,J) |
151 |
|
C |
152 |
|
ENPLANEX = ENPLANEX + DEXY(1,I,J) |
153 |
NSTRIP = NSTRIP + 1. |
NSTRIP = NSTRIP + 1. |
154 |
QTOT = QTOT + ESTRIP(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 + ESTRIP(1,I,J) |
QX22 = QX22 + DEXY(1,I,J) |
158 |
ENDIF |
ENDIF |
159 |
IF (I.LT.11) QQ(4) = QQ(4) + ESTRIP(1,I,J) |
IF (I.LT.11) QQ(4) = QQ(4) + DEXY(1,I,J) |
160 |
ENDIF |
ENDIF |
161 |
ENDIF |
ENDIF |
162 |
C |
C |
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 = 0 |
NN = 1 |
201 |
IF (M.EQ.2) NN = 1 |
C NN = 0 |
202 |
|
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 |
229 |
ENDIF |
ENDIF |
230 |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) |
231 |
CIBAR(M,I) = IBAR(M,I) |
CIBAR(M,I) = IBAR(M,I) |
232 |
|
IF (ibar(m,i).EQ.-1) THEN |
233 |
|
CHTRACK = CHTRACK + 1 |
234 |
|
ELSE |
235 |
|
IWPL(M) = IWPL(M) + 1 |
236 |
|
ENDIF |
237 |
ENDDO |
ENDDO |
238 |
ENDIF |
ENDIF |
239 |
C |
C |