--- DarthVader/CalorimeterLevel2/src/calol2tr.for 2006/11/14 14:08:50 1.7 +++ DarthVader/CalorimeterLevel2/src/calol2tr.for 2007/01/22 09:17:01 1.8 @@ -55,7 +55,7 @@ COMMON / CH / CHECK SAVE / CH / C - COMMON / CALOFIT / VARFIT, NPFIT + COMMON / CALOFIT / VARFIT, NPFIT, IWPL,CHTRACK SAVE / CALOFIT / C COMMON / pawcd / hmemor @@ -89,7 +89,7 @@ NLAST = 0. PLANETOT = 0. QMEAN = 0. - SELFTRIGGER = 0 +C SELFTRIGGER = 0 C C BEGIN WITH THE FISRT TRACK IF WE HAVE A TRACK FROM TRACKER C @@ -232,6 +232,7 @@ C C CALL SELFTRIGGER SUBROUTINE C + CALL VZERO(IWPL,2) CALL VZERO(VARCFIT,2) CALL VZERO(NPCFIT,2) CALL VZERO(TBAR,2*NPLA) @@ -289,19 +290,29 @@ ENDIF CALL LASTRISCIA(BAR(M,I),IBAR(M,I)) cibar(M,I) = ibar(m,i) + IF (ibar(m,i).EQ.-1) THEN + CHTRACK = CHTRACK + 1 + ELSE + IWPL(M) = IWPL(M) + 1 + ENDIF ENDDO ENDIF C ENDDO C ENDIF -C IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN -C IF (GOOD2.EQ.0) THEN -C PRINT *,' CALORIMETER - WARNING F77: unknown request' -C GOOD2 = 1 -C GOTO 50 -C ENDIF -C ENDIF +C + IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN + IF (GOOD2.EQ.1) THEN + PRINT *,' CALORIMETER - WARNING F77: unknown request' + GOOD2 = 1 + GOTO 50 + ENDIF + IF ( NPCFIT(1).EQ.0.OR.NPCFIT(2).EQ.0 ) THEN + GOOD2 = 1 + GOTO 50 + ENDIF + ENDIF C 6996 CONTINUE C @@ -344,7 +355,7 @@ IF (TRIGTY.GE.2.AND.HZN.EQ.0.AND.GOOD2.EQ.0) THEN RIG = ELEN ! SELFTRIGGER RIGIDITY IF ( RIG.EQ.0. ) THEN - GOOD2 = 0 + GOOD2 = 1 PRINT *,' CALORIMETER - WARNING F77: ST track with R = 0' GOTO 50 ENDIF @@ -602,7 +613,12 @@ ENDDO C EINF = EMIN - ESUP = 50. + ESUP = 150. +C + IF (TRIGTY.GE.2.AND.HZN.NE.0) THEN + EINF = 50. + ESUP = 1500. + ENDIF C C CALCULATE PLANETOT AND QMEAN C