diff -u --recursive --new-file geant3.orig/comad/gcomad.F geant3_vmc.r227/comad/gcomad.F --- geant3.orig/comad/gcomad.F 2009-04-28 14:36:12.000000000 +0200 +++ geant3_vmc.r227/comad/gcomad.F 2009-04-23 17:12:16.000000000 +0200 @@ -253,6 +253,8 @@ IADD=GCADDI(IQUEST) ELSE IF(CHCOMM.EQ.'ERTRIO') THEN IADD=GCADDD(ERDTRP) + ELSE IF(CHCOMM.EQ.'ERTRIO1') THEN + IADD=GCADDD(IERTR) ELSE IF(CHCOMM.EQ.'EROPTS') THEN IADD=GCADDF(ERPLI) ELSE IF(CHCOMM.EQ.'EROPTC') THEN diff -u --recursive --new-file geant3.orig/erdecks/ertrak.F geant3_vmc.r227/erdecks/ertrak.F --- geant3.orig/erdecks/ertrak.F 2009-04-28 14:36:15.000000000 +0200 +++ geant3_vmc.r227/erdecks/ertrak.F 2009-04-23 17:05:04.000000000 +0200 @@ -73,6 +73,8 @@ * * *** Decode character option * + IERTR=0 +* CHOPTI = CHOPT CALL UOPTC (CHOPT, 'BELMOPVX', IOPT) * @@ -162,9 +164,25 @@ CALL VZERO (DUM,15) CALL TRSCSD (ERPIN(1), DUM(1), ERPIN(1), DUM(1), HI(1), + CHARGE, IERR, SPU, ERPLI(1,1), ERPLI(1,2)) + IF(IERR.NE.0) THEN +* +* *** Tracking error - floating point exception +* + IERTR=1 + WRITE (LOUT, 780) + GOTO 99 + ENDIF IF (LEONLY) GOTO 35 CALL TRSDSC (ERPIN(1), ERRIN(1), DUM(1), ERRIN(1), HI(1), + CHARGE, IERR, SPU, ERPLI(1,1), ERPLI(1,2)) + IF(IERR.NE.0) THEN +* +* *** Tracking error - floating point exception +* + IERTR=1 + WRITE (LOUT, 780) + GOTO 99 + ENDIF DO 29 I = 1, 5 DO 28 J = 1, 5 ASDSC(I,J) = A(I,J) diff -u --recursive --new-file geant3.orig/erpremc/trscsd.F geant3_vmc.r227/erpremc/trscsd.F --- geant3.orig/erpremc/trscsd.F 2009-04-28 14:37:21.000000000 +0200 +++ geant3_vmc.r227/erpremc/trscsd.F 2009-04-23 17:07:29.000000000 +0200 @@ -145,6 +145,7 @@ DO 25 I=1,5 DO 20 K=I,5 J=J+1 + IF(ABS(S(J)).GT.1E30) GOTO 901 RD(J)=S(J) 20 CONTINUE 25 CONTINUE diff -u --recursive --new-file geant3.orig/erpremc/trsdsc.F geant3_vmc.r227/erpremc/trsdsc.F --- geant3.orig/erpremc/trsdsc.F 2009-04-28 14:37:21.000000000 +0200 +++ geant3_vmc.r227/erpremc/trsdsc.F 2009-04-23 17:10:06.000000000 +0200 @@ -73,6 +73,7 @@ 5 CONTINUE C PC(1)=PD(1) + IF(ABS(TN(3)).GT.1) GOTO 99 PC(2)=ASIN(TN(3)) IF (ABS (TN(1)) .LT. 1.E-30) TN(1) = 1.E-30 PC(3) = ATAN2 (TN(2),TN(1)) @@ -135,6 +136,7 @@ DO 25 I=1,5 DO 20 K=I,5 J=J+1 + IF(ABS(S(J)).GT.1E30) GOTO 99 RC(J)=S(J) 20 CONTINUE 25 CONTINUE @@ -142,6 +144,9 @@ RETURN C C *** ERROR EXITS -C +C + 99 IERR=1 + RETURN +* END * diff -u --recursive --new-file geant3.orig/geant321/ertrio.inc geant3_vmc.r227/geant321/ertrio.inc --- geant3.orig/geant321/ertrio.inc 2009-04-28 14:37:21.000000000 +0200 +++ geant3_vmc.r227/geant321/ertrio.inc 2009-04-24 13:51:09.000000000 +0200 @@ -32,6 +32,8 @@ + ERTRSP(5,5,MXPRED), ERXIN( 3), ERXOUT( 3,MXPRED), + ERPIN(3), ERPOUT(3,MXPRED), NEPRED,INLIST,ILPRED, + IEPRED(MXPRED) + COMMON /ERTRIO1/ IERTR, IERTR1, IERTR2 + INTEGER IERTR, IERTR1, IERTR2 #include "geant321/eropts.inc" diff -u --recursive --new-file geant3.orig/TGeant3/TGeant3.cxx geant3_vmc.r227/TGeant3/TGeant3.cxx --- geant3.orig/TGeant3/TGeant3.cxx 2009-04-28 14:36:23.000000000 +0200 +++ geant3_vmc.r227/TGeant3/TGeant3.cxx 2009-04-23 17:03:45.000000000 +0200 @@ -1262,6 +1262,7 @@ // Commons for GEANE gcomad(PASSCHARD("ERTRIO"),(int*&) fErtrio PASSCHARL("ERTRIO")); + gcomad(PASSCHARD("ERTRIO1"),(int*&) fErtrio1 PASSCHARL("ERTRIO1")); gcomad(PASSCHARD("EROPTS"),(int*&) fEropts PASSCHARL("EROPTS")); gcomad(PASSCHARD("EROPTC"),(int*&) fEroptc PASSCHARL("EROPTC")); gcomad(PASSCHARD("ERWORK"),(int*&) fErwork PASSCHARL("ERWORK")); diff -u --recursive --new-file geant3.orig/TGeant3/TGeant3.h geant3_vmc.r227/TGeant3/TGeant3.h --- geant3.orig/TGeant3/TGeant3.h 2009-04-28 14:36:23.000000000 +0200 +++ geant3_vmc.r227/TGeant3/TGeant3.h 2009-04-23 17:24:25.000000000 +0200 @@ -494,7 +494,11 @@ Int_t ilpred; Int_t iepred; } Ertrio_t; - +typedef struct { + Int_t iertr; + Int_t iertr1; + Int_t iertr2; +} Ertrio1_t; //-----------EROTPS // CHARACTER*8 CHOPTI // LOGICAL LEEXAC, LELENG, LEONLY, LEPLAN, LEPOIN, LEVOLU @@ -774,6 +778,7 @@ // Access to GEANE commons virtual Ertrio_t* Ertrio() const {return fErtrio;} + virtual Ertrio1_t* Ertrio1() const {return fErtrio1;} virtual Eropts_t* Eropts() const {return fEropts;} virtual Eroptc_t* Eroptc() const {return fEroptc;} virtual Erwork_t* Erwork() const {return fErwork;} @@ -1054,6 +1059,7 @@ Float_t weight, Int_t is); Ertrio_t *fErtrio; //! ERTRIO common structure + Ertrio1_t *fErtrio1; //! ERTRIO1 common structure Eropts_t *fEropts; //! EROPTS common structure Eroptc_t *fEroptc; //! EROPTC common structure Erwork_t *fErwork; //! ERWORK common structure