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 |
81 |
X(I) = PIANO(I) - 5.81 |
X(I) = PIANO(I) |
82 |
|
C X(I) = PIANO(I) - 5.81 |
83 |
ELSE |
ELSE |
84 |
X(I) = PIANO(I) |
X(I) = PIANO(I) - 5.81 |
85 |
|
C X(I) = PIANO(I) |
86 |
ENDIF |
ENDIF |
87 |
Y(I) = 0. |
Y(I) = 0. |
88 |
C |
C |
101 |
ENDIF |
ENDIF |
102 |
ENDIF |
ENDIF |
103 |
C |
C |
104 |
C More importance to weigth and less cluster per plane |
C No weigth and less cluster per plane |
105 |
C |
C |
106 |
IF(FMODE(M).EQ.1) THEN |
IF(FMODE(M).EQ.1) THEN |
107 |
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 |
108 |
ICONT = ICONT + 1 |
ICONT = ICONT + 1 |
109 |
Y(I) = CLUS(M,I,1) |
Y(I) = CLUS(M,I,1) |
110 |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. |
111 |
|
c W(I) = 1. |
112 |
ENDIF |
ENDIF |
113 |
IF (W(I).GT.2000.) THEN |
c IF (W(I).GT.2000.) THEN |
114 |
W(I) = 2000. |
cx W(I) = 2000. |
115 |
c Y(I) = 0. |
cc Y(I) = 0. |
116 |
c ICONT = ICONT -1 |
cc ICONT = ICONT -1 |
117 |
ENDIF |
c ENDIF |
118 |
ENDIF |
ENDIF |
119 |
c |
c |
120 |
c One cluster per plane |
c One cluster per plane |
124 |
ICONT = ICONT + 1 |
ICONT = ICONT + 1 |
125 |
Y(I) = CLUS(M,I,1) |
Y(I) = CLUS(M,I,1) |
126 |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. |
W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. |
127 |
|
c W(I) = 1. |
128 |
ENDIF |
ENDIF |
129 |
ENDIF |
ENDIF |
130 |
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 |
154 |
GOTO 10 |
GOTO 10 |
155 |
ENDIF |
ENDIF |
156 |
C |
C |
157 |
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 |
158 |
C |
C |
159 |
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 |
160 |
& .AND.NPFIT(M).GT.4) THEN |
& .AND.SNPFIT.GT.5) THEN |
161 |
SSVAR = VAR |
SSVAR = VAR |
162 |
SSB = B |
SSB = B |
163 |
SSA = A |
SSA = A |