Home » PANDA » PandaRoot » Tracking » still trouble with Geane
Re: still trouble with Geane [message #8297 is a reply to message #8265] |
Fri, 24 April 2009 14:22 |
Lia Lavezzi
Messages: 291 Registered: May 2007 Location: Torino
|
first-grade participant |
From: *pv.infn.it
|
|
Hi Christian,
we made some changes in geane (listed below). Can you please run your tests with these changes and tell us if they are successful?
Here is the list of the changes you should do in geant3.
For erpremc/trscsd.F and trsdsc.F we just made your ones; in addition to these we also made modifications in: TGeant3/TGeant3.cxx and .h, erdecks/ertrak.F, comad/gcomad.F and geant321/ertrio.F.
The rationale is the following:
to assure a minimal impact and to not perturb the non PANDA current users of GEANE, we added to the GEANE common ERTRIO a labelled common ERTRIO1 containing three error flags. We use only IERTR for the moment.
Therefore, the unaware user will not detect the change, apart from a standard error message from ERTRAK when the FP exception happens.
The common modification required some interventions on the TGeant3 package.
In our interface we manage the ertrio1 common and skip the hit when IERTR=1, as you suggested.
For trscsd.F:
--- erpremc.orig/trscsd.F 2009-04-23 16:55:02.000000000 +0200
+++ erpremc/trscsd.F 2009-04-23 17:07:29.000000000 +0200
@@ -145,6 +145,7 @@ C
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
and for trsdsc.F:
--- erpremc.orig/trsdsc.F 2009-04-23 16:55:02.000000000 +0200
+++ erpremc/trsdsc.F 2009-04-23 17:10:06.000000000 +0200
@@ -73,6 +73,7 @@ C
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 @@ C
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 @@ C
RETURN
C
C *** ERROR EXITS
-C
+C
+ 99 IERR=1
+ RETURN
+*
END
*
For erdecks/ertrak.F:
--- erdecks.orig/ertrak.F 2009-04-23 16:55:31.000000000 +0200
+++ 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)
For comad/gcomad.F:
--- comad.orig/gcomad.F 2009-04-23 17:10:55.000000000 +0200
+++ comad/gcomad.F 2009-04-23 17:12:16.000000000 +0200
@@ -253,6 +253,8 @@ C
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
For TGeant3/TGeant3.cxx:
--- TGeant3.orig/TGeant3.cxx 2009-04-23 16:55:13.000000000 +0200
+++ TGeant3/TGeant3.cxx 2009-04-23 17:03:45.000000000 +0200
@@ -1262,6 +1262,7 @@ void TGeant3::LoadAddress()
// 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"));
For TGeant3/TGeant3.h:
--- TGeant3.orig/TGeant3.h 2009-04-23 16:55:13.000000000 +0200
+++ TGeant3/TGeant3.h 2009-04-23 17:24:25.000000000 +0200
@@ -494,7 +494,11 @@ typedef struct {
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 @@ public:
// 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 @@ public:
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
For geant321/ertrio.F:
--- geant321.orig/ertrio.inc 2009-04-23 17:15:52.000000000 +0200
+++ geant321/ertrio.inc 2009-04-23 17:22:41.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"
Then in the pandaroot/geane interface:
in FairGeanePro.cxx:
--- FairGeanePro.orig.cxx 2009-04-24 14:00:30.000000000 +0200
+++ FairGeanePro.cxx 2009-04-24 14:02:51.000000000 +0200
@@ -38,6 +38,7 @@ FairGeanePro::FairGeanePro() : TNamed("G
fdbPDG= TDatabasePDG::Instance();
fErrorMat= new TArrayD(15);
afErtrio=gMC3->fErtrio;
+ afErtrio1=gMC3->fErtrio1;
Pos=TVector3(0, 0 , 0);
PosErr = TVector3(0,0,0);
Mom=TVector3(0,0,0);
@@ -262,7 +263,9 @@ Bool_t FairGeanePro::Propagate(Float_t *
;
gMC3->Eufill(1, ein,xlf);
gMC3->Ertrak(x1,p1,x2,p2,GeantCode, "L");
- if(x2[0]<-1.E29) return kFALSE;
+
+ if(afErtrio1->iertr != 0) return kFALSE;
+ // if(x2[0]<-1.E29) return kFALSE;
}
Bool_t FairGeanePro::Propagate(Int_t PDG) {
@@ -272,7 +275,8 @@ Bool_t FairGeanePro::Propagate(Int_t PDG
cout << " FairGeanePro::Propagate ---------------------------"<< " " << x1[0]<< " "<<
x1[1]<< " "<< x1[2] << endl;
fApp->GeanePreTrack(x1, p1, PDG);
gMC3->Ertrak(x1,p1,x2,p2,GeantCode, fPropOption.Data());
- if(x2[0]<-1.E29) return kFALSE;
+ if(afErtrio1->iertr != 0) return kFALSE;
+ // if(x2[0]<-1.E29) return kFALSE;
trklength=gMC3->TrackLength();
Double_t trasp[25];
@@ -532,7 +536,8 @@ int FairGeanePro::FindPCA(Int_t pca, Int
//check needed for low momentum tracks
gMC3->Ertrak(x1,p1,x2,p2,GeantCode, fPropOption.Data());
- if(x2[0]<-1.E29) return 1;
+ if(afErtrio1->iertr != 0) return 1;
+ // if(x2[0]<-1.E29) return 1;
gMC3->GetClose(po1,po2,po3,clen);
// check on cases when only two steps are performed!
For FairGeanePro.h:
--- FairGeanePro.orig.h 2009-04-24 14:00:30.000000000 +0200
+++ FairGeanePro.h 2009-04-23 17:15:46.000000000 +0200
@@ -84,6 +84,7 @@ public:
TVector3 Mom;
TArrayD *fErrorMat;
Ertrio_t *afErtrio;
+ Ertrio1_t *afErtrio1;
Float_t x1[3];
Float_t p1[3];
Int_t GeantCode;
If also your tests will be positive, we would ask Mohammad to send these changes to CERN (or, if
Mohammad agrees we can do that). After the CERN release we will need the new external packages realease
and when it will be ready I will put my changes concerning the geane directory in the svn repository.
Best Regards,
Alberto and Lia.
|
|
|
Goto Forum:
Current Time: Sun Oct 06 05:31:53 CEST 2024
Total time taken to generate the page: 0.00795 seconds
|