1 |
C |
C |
2 |
|
C |
3 |
|
C NOTE: THIS ROUTINE DOES NOT SEEMS TO WORK CORRECTLY, HAS TO BE CHECKED CAREFULLY |
4 |
|
C |
5 |
|
C |
6 |
C--------------------------------------------------------------------- |
C--------------------------------------------------------------------- |
7 |
SUBROUTINE SELFTRIG |
SUBROUTINE SELFTRIG |
8 |
C--------------------------------------------------------------------- |
C--------------------------------------------------------------------- |
59 |
CALL VZERO(parz,2*22) |
CALL VZERO(parz,2*22) |
60 |
DO i = 1,22 |
DO i = 1,22 |
61 |
DO j = 1,96 |
DO j = 1,96 |
62 |
parz(1,i) = parz(1,i) + ESTRIP(1,i,j) ! sum up the energy in each x-plane |
parz(1,i) = parz(1,i) + DEXY(1,i,j) ! sum up the energy in each x-plane |
63 |
parz(2,i) = parz(2,i) + ESTRIP(2,i,j) ! sum up the energy in each y-plane |
parz(2,i) = parz(2,i) + DEXY(2,i,j) ! sum up the energy in each y-plane |
64 |
enet = enet + ESTRIP(1,i,j) + ESTRIP(2,i,j) ! sum up the total energy |
enet = enet + DEXY(1,i,j) + DEXY(2,i,j) ! sum up the total energy |
65 |
ENDDO |
ENDDO |
66 |
IF (parz(1,i).GE.parze) THEN ! find plane with max energy |
IF (parz(1,i).GE.parze) THEN ! find plane with max energy |
67 |
parze = parz(1,i) ! the energy |
parze = parz(1,i) ! the energy |
88 |
DO i = 1,22 |
DO i = 1,22 |
89 |
DO j = 1,94 |
DO j = 1,94 |
90 |
|
|
91 |
IF ((ESTRIP(1,i,j)+ |
IF ((DEXY(1,i,j)+ |
92 |
& ESTRIP(1,i,j+1)+ |
& DEXY(1,i,j+1)+ |
93 |
& ESTRIP(1,i,j+2)).GT.xemax3(i)) THEN |
& DEXY(1,i,j+2)).GT.xemax3(i)) THEN |
94 |
xemax3(i)=ESTRIP(1,i,j)+ |
xemax3(i)=DEXY(1,i,j)+ |
95 |
& ESTRIP(1,i,j+1)+ |
& DEXY(1,i,j+1)+ |
96 |
& ESTRIP(1,i,j+2) |
& DEXY(1,i,j+2) |
97 |
xncnt(i)=j+1 |
xncnt(i)=j+1 |
98 |
ENDIF |
ENDIF |
99 |
IF ((ESTRIP(2,i,j)+ |
IF ((DEXY(2,i,j)+ |
100 |
& ESTRIP(2,i,j+1)+ |
& DEXY(2,i,j+1)+ |
101 |
& ESTRIP(2,i,j+2)).GT.yemax3(i)) THEN |
& DEXY(2,i,j+2)).GT.yemax3(i)) THEN |
102 |
yemax3(i)=ESTRIP(2,i,j)+ |
yemax3(i)=DEXY(2,i,j)+ |
103 |
& ESTRIP(2,i,j+1)+ |
& DEXY(2,i,j+1)+ |
104 |
& ESTRIP(2,i,j+2) |
& DEXY(2,i,j+2) |
105 |
yncnt(i)=j+1 |
yncnt(i)=j+1 |
106 |
ENDIF |
ENDIF |
107 |
|
|
350 |
C |
C |
351 |
c Sum up energies |
c Sum up energies |
352 |
C |
C |
353 |
esumw = esumw + xypos*ESTRIP(view,nplane,npos) |
esumw = esumw + xypos*DEXY(view,nplane,npos) |
354 |
esum = esum + ESTRIP(view,nplane,npos) |
esum = esum + DEXY(view,nplane,npos) |
355 |
ENDDO |
ENDDO |
356 |
C |
C |
357 |
7100 CONTINUE |
7100 CONTINUE |
391 |
nrec=0 |
nrec=0 |
392 |
DO i=nsmax-width,nsmax+width |
DO i=nsmax-width,nsmax+width |
393 |
C |
C |
394 |
IF(i.GT.0.AND.i.LT.97.AND.ESTRIP(view,nplane,i).GT.0.0) THEN |
IF(i.GT.0.AND.i.LT.97.AND.DEXY(view,nplane,i).GT.0.0) THEN |
395 |
C |
C |
396 |
nrec=nrec+1 |
nrec=nrec+1 |
397 |
C |
C |
398 |
CALL STRIP2POS(view,nplane,i,xypos,zpos) |
CALL STRIP2POS(view,nplane,i,xypos,zpos) |
399 |
C |
C |
400 |
s1=s2 |
s1=s2 |
401 |
s2=s2+ESTRIP(view,nplane,i) |
s2=s2+DEXY(view,nplane,i) |
402 |
mx=(mx*s1+xypos*ESTRIP(view,nplane,i))/s2 |
mx=(mx*s1+xypos*DEXY(view,nplane,i))/s2 |
403 |
mx2=(mx2*s1+(xypos**2)*ESTRIP(view,nplane,i))/s2 |
mx2=(mx2*s1+(xypos**2)*DEXY(view,nplane,i))/s2 |
404 |
C |
C |
405 |
ENDIF |
ENDIF |
406 |
C |
C |