--- DarthVader/CalorimeterLevel2/src/direction.for 2007/01/22 09:17:01 1.2 +++ DarthVader/CalorimeterLevel2/src/direction.for 2007/01/23 11:52:26 1.4 @@ -19,10 +19,13 @@ INCLUDE 'INTEST.TXT' - REAL FLIMIT + REAL FLIMIT, FLIMIT2 INTEGER NVAR,NPAR PARAMETER (NVAR=1,NPAR=2) - PARAMETER (FLIMIT=10000) +c PARAMETER (FLIMIT=10000) +c PARAMETER (FLIMIT2=2000) + PARAMETER (FLIMIT=500) + PARAMETER (FLIMIT2=500) REAL X(NPLA),Y(NPLA),W(NPLA) REAL DEVIA(2),TG(2) REAL BAR(2,NPLA) @@ -95,19 +98,20 @@ ENDIF ENDIF C -C More importance to weigth and less cluster per plane +C No weigth and less cluster per plane C IF(FMODE(M).EQ.1) THEN IF (NCL(M,I).GE.1.AND.NCL(M,I).LE.2) THEN ICONT = ICONT + 1 Y(I) = CLUS(M,I,1) - W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. - ENDIF - IF (W(I).GT.2000.) THEN - W(I) = 2000. -c Y(I) = 0. -c ICONT = ICONT -1 +c W(I) = ((CLUS(M,I,1+NCHA/2)**0.29))**2. + W(I) = 1. ENDIF +c IF (W(I).GT.2000.) THEN +cx W(I) = 2000. +cc Y(I) = 0. +cc ICONT = ICONT -1 +c ENDIF ENDIF c c One cluster per plane @@ -116,7 +120,8 @@ IF (NCL(M,I).EQ.1) THEN ICONT = ICONT + 1 Y(I) = CLUS(M,I,1) - W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. +c W(I) = ((CLUS(M,I,1+NCHA/2)**0.79))**2. + W(I) = 1. ENDIF ENDIF c if (Y(I).eq.0.or.W(I).eq.2000.) NPFIT(M) = NPFIT(M) - 1 @@ -146,10 +151,10 @@ GOTO 10 ENDIF C -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 C - IF ((ABS(VAR).GT.FLIMIT.OR.VAR.EQ.0.).AND.FMODE(M).EQ.1 - & .AND.NPFIT(M).GT.4) THEN + IF ((ABS(VAR).GT.FLIMIT2.OR.VAR.EQ.0.).AND.FMODE(M).EQ.1 + & .AND.SNPFIT.GT.5) THEN SSVAR = VAR SSB = B SSA = A