19 |
|
|
20 |
INCLUDE 'INTEST.TXT' |
INCLUDE 'INTEST.TXT' |
21 |
|
|
22 |
REAL FLIMIT |
REAL FLIMIT, FLIMIT2 |
23 |
INTEGER NVAR,NPAR |
INTEGER NVAR,NPAR |
24 |
PARAMETER (NVAR=1,NPAR=2) |
PARAMETER (NVAR=1,NPAR=2) |
25 |
PARAMETER (FLIMIT=10000) |
c PARAMETER (FLIMIT=10000) |
26 |
REAL X(NPLA),Y(NPLA),W(NPLA) |
c PARAMETER (FLIMIT2=2000) |
27 |
|
c PARAMETER (FLIMIT=500) |
28 |
|
PARAMETER (FLIMIT=2000) |
29 |
|
PARAMETER (FLIMIT2=500) |
30 |
|
REAL X(NPLAV),Y(NPLAV),W(NPLAV) |
31 |
REAL DEVIA(2),TG(2) |
REAL DEVIA(2),TG(2) |
32 |
REAL BAR(2,NPLA) |
REAL BAR(2,NPLAV) |
33 |
REAL A, B, VAR |
REAL A, B, VAR |
34 |
REAL SA, SB, SVAR |
REAL SA, SB, SVAR |
35 |
REAL SSA, SSB, SSVAR |
REAL SSA, SSB, SSVAR |
36 |
REAL PIANO(22) |
REAL PIANO(NPLAV) |
37 |
REAL VARFIT(2) |
REAL VARFIT(2) |
38 |
|
|
39 |
INTEGER ICONT, M, I, SNPFIT,SSNPFIT |
INTEGER ICONT, M, I, SNPFIT,SSNPFIT |
40 |
INTEGER NPFIT(2), CHTRACK,IWPL(2) |
INTEGER NPFIT(2), CHTRACK,IWPL(2) |
41 |
|
|
42 |
INTEGER IBAR(2,NPLA) |
INTEGER IBAR(2,NPLAV) |
43 |
COMMON/ANGOLO/BAR,IBAR |
COMMON/ANGOLO/BAR,IBAR |
44 |
SAVE /ANGOLO/ |
SAVE /ANGOLO/ |
45 |
|
|
72 |
FMODE(M) = 0 |
FMODE(M) = 0 |
73 |
10 CONTINUE |
10 CONTINUE |
74 |
ICONT = 0 |
ICONT = 0 |
75 |
CALL VZERO(X,NPLA) |
CALL VZERO(X,NPLAV) |
76 |
CALL VZERO(Y,NPLA) |
CALL VZERO(Y,NPLAV) |
77 |
CALL VZERO(W,NPLA) |
CALL VZERO(W,NPLAV) |
78 |
DO I = 1,NPLA |
DO I = 1,NPLA |
79 |
C |
C |
80 |
IF (MOD(M,2).EQ.0) THEN |
IF (MOD(M,2).EQ.0) THEN |
99 |
ENDIF |
ENDIF |
100 |
ENDIF |
ENDIF |
101 |
C |
C |
102 |
C More importance to weigth and less cluster per plane |
C No weigth and less cluster per plane |
103 |
C |
C |
104 |
IF(FMODE(M).EQ.1) THEN |
IF(FMODE(M).EQ.1) THEN |
105 |
IF (NCL(M,I).GE.1.AND.NCL(M,I).LE.2) THEN |
IF (NCL(M,I).GE.1.AND.NCL(M,I).LE.2) THEN |
106 |
ICONT = ICONT + 1 |
ICONT = ICONT + 1 |
107 |
Y(I) = CLUS(M,I,1) |
Y(I) = CLUS(M,I,1) |
108 |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. |
109 |
|
c W(I) = 1. |
110 |
ENDIF |
ENDIF |
111 |
IF (W(I).GT.2000.) THEN |
c IF (W(I).GT.2000.) THEN |
112 |
W(I) = 2000. |
cx W(I) = 2000. |
113 |
c Y(I) = 0. |
cc Y(I) = 0. |
114 |
c ICONT = ICONT -1 |
cc ICONT = ICONT -1 |
115 |
ENDIF |
c ENDIF |
116 |
ENDIF |
ENDIF |
117 |
c |
c |
118 |
c One cluster per plane |
c One cluster per plane |
122 |
ICONT = ICONT + 1 |
ICONT = ICONT + 1 |
123 |
Y(I) = CLUS(M,I,1) |
Y(I) = CLUS(M,I,1) |
124 |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. |
125 |
|
c W(I) = 1. |
126 |
ENDIF |
ENDIF |
127 |
ENDIF |
ENDIF |
128 |
c if (Y(I).eq.0.or.W(I).eq.2000.) NPFIT(M) = NPFIT(M) - 1 |
c if (Y(I).eq.0.or.W(I).eq.2000.) NPFIT(M) = NPFIT(M) - 1 |
152 |
GOTO 10 |
GOTO 10 |
153 |
ENDIF |
ENDIF |
154 |
C |
C |
155 |
C TRY AGAIN IF STILL BAD AND WE HAVE AT LEAST 5 POINT TO MAKE THE FIT |
C TRY AGAIN IF STILL BAD AND WE HAVE AT LEAST 10 POINT TO MAKE THE FIT |
156 |
C |
C |
157 |
IF ((ABS(VAR).GT.FLIMIT.OR.VAR.EQ.0.).AND.FMODE(M).EQ.1 |
IF ((ABS(VAR).GT.FLIMIT2.OR.VAR.EQ.0.).AND.FMODE(M).EQ.1 |
158 |
& .AND.NPFIT(M).GT.4) THEN |
& .AND.SNPFIT.GT.5) THEN |
159 |
SSVAR = VAR |
SSVAR = VAR |
160 |
SSB = B |
SSB = B |
161 |
SSA = A |
SSA = A |