Update effic and stepla even when refraction indices are the same.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jun 2002 12:53:06 +0000 (12:53 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jun 2002 12:53:06 +0000 (12:53 +0000)
GEANT321/gtrak/gtckov.F

index 5c754607ab7fcf6209cd00891b13101999c80156..3518a1b6f60162a7270ee827ab2b114214177684 100644 (file)
@@ -104,7 +104,6 @@ C.    ------------------------------------------------------------------
 *            NMEC = 1
 *            LMEC(1)= 30
 *            GO TO 110
-
             GEKRAT=0.
             IEKBIN=1
          ELSE
@@ -131,7 +130,7 @@ C.    ------------------------------------------------------------------
 *
       IPROC  = 103
       STEP   = STEMAX
-*
+*     
 *  **   Step limitation due to in flight absorbtion ?
 *
       IF (ILABS.GT.0) THEN
@@ -329,6 +328,7 @@ C
                GEKRT1=1.-GEKRT2
                ABSCO2=Q(JABSC2+IEKBI2)*GEKRT1+Q(JABSC2+IEKBI2+1)*GEKRT2
                EFFIC2=Q(JEFFI2+IEKBI2)*GEKRT1+Q(JEFFI2+IEKBI2+1)*GEKRT2
+
                IF(JINDX2.GT.0) THEN
                  RIN2=Q(JINDX2+IEKBI2)*GEKRT1+Q(JINDX2+IEKBI2+1)*GEKRT2
                ELSE
@@ -342,6 +342,8 @@ C
                   VECT(1)=VOUT(1)
                   VECT(2)=VOUT(2)
                   VECT(3)=VOUT(3)
+                  STEPLA = ABSCO2
+                  EFFIC  = EFFIC2
                   IPROC=0
                ELSE
                   IPROC = 102
@@ -382,11 +384,13 @@ C
 *
       IF (IPROC.EQ.101) THEN
          ISTOP=2
+
          CALL GRNDM(RNDM,1)
          IF(RNDM.LT.EFFIC) THEN
 *
 * ***  Destep =/= 0 means that the photon has been detected
 *
+
             DESTEP=VECT(7)
          ELSE
             DESTEP=0.