]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv5.cxx
Macros moved from oldmacros on the standard ITS directory
[u/mrichter/AliRoot.git] / ITS / AliITSv5.cxx
index ec10b59f62c60086abe1bc275ced7eb6b80cc401..a8588bdbfcb470389a62dd79affb88cff05d981e 100644 (file)
 
 /*
 $Log$
+Revision 1.34  2001/05/30 15:55:35  hristov
+Strings compared instead of pointers
+
+Revision 1.33  2001/05/30 14:04:31  hristov
+Dynamic cast replaced (F.Carminati)
+
+Revision 1.32  2001/03/23 00:12:23  nilsen
+Set Reading of AliITSgeom data from Geant3 common blocks as the default and
+not a .det file. Removed redundent calls to BuildGeometry.
+
+Revision 1.31  2001/02/13 16:53:35  nilsen
+Fixed a but when trying to use GEANT4. Needed to replace
+if(!((TGeant3*)gMC)) with if(!(dynamic_casst<TGeant3*>(gMC)))
+because just casting gMC to be TGeant3* even when it realy is a TGeant3 pointer
+did not result in a zero value. For AliITSv5asymm and AliITSv5symm, needed
+to fix a bug in the initilizers and a bug in BuildGeometry. This is now done
+in the same way as in AliITSv5.cxx.
+
 Revision 1.30  2001/02/09 20:06:26  nilsen
 Fixed bug in distructor. Can't distroy fixxed length arrays. Thanks Peter.
 
@@ -96,7 +114,7 @@ Introduction of the Copyright and cvs Log
 
 #include "AliMC.h"
 #include "AliRun.h"
-#include "../TGeant3/TGeant3.h"
+#include "AliGeant3.h"
 #include "AliITShit.h"
 #include "AliITSGeant3Geometry.h"
 #include "AliITS.h"
@@ -120,8 +138,8 @@ AliITSv5::AliITSv5() {
     fIdSens = 0;
     fEuclidOut    = kFALSE; // Don't write Euclide file
     fGeomDetOut   = kFALSE; // Don't write .det file
-    fGeomDetIn    = kTRUE; // Read .det file
-    fGeomOldDetIn = kTRUE;  // Read old formatted .det file
+    fGeomDetIn    = kFALSE; // Don't Read .det file
+    fGeomOldDetIn = kFALSE; // Don't Read old formatted .det file
     fMajorVersion = IsVersion();
     fMinorVersion = 1;
     for(i=0;i<60;i++) fRead[i] = '\0';
@@ -147,8 +165,8 @@ AliITSv5::AliITSv5(const char *name, const char *title) : AliITS(name, title){
     for (i=0;i<fIdN;i++) fIdSens[i] = 0;
     fEuclidOut    = kFALSE; // Don't write Euclide file
     fGeomDetOut   = kFALSE; // Don't write .det file
-    fGeomDetIn    = kTRUE; // Read .det file
-    fGeomOldDetIn = kTRUE;  // Read old formatted .det file
+    fGeomDetIn    = kFALSE; // Don't Read .det file
+    fGeomOldDetIn = kFALSE; // Don't Read old formatted .det file
     fMajorVersion = IsVersion();
     fMinorVersion = 1;
     for(i=0;i<60;i++) fRead[i] = '\0';
@@ -625,7 +643,7 @@ void AliITSv5::InitAliITSgeom(){
 //     Based on the geometry tree defined in Geant 3.21, this
 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
 // sturture.
-    if(!(dynamic_cast<TGeant3*>(gMC))) {
+    if(gMC->IsA()!=AliGeant3::Class()) {
        Error("InitAliITSgeom",
                "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls");
        return;
@@ -731,13 +749,11 @@ void AliITSv5::Init(){
 //     Initialise the ITS after it has been created.
 ////////////////////////////////////////////////////////////////////////
     Int_t i;
-    Bool_t bg = kFALSE;
 
     cout << endl;
     for(i=0;i<30;i++) cout << "*";cout << " ITSv5_Init ";
     for(i=0;i<30;i++) cout << "*";cout << endl;
 //
-    if(fITSgeom==0) bg = kTRUE;
     if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60);
     if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60);
     if(fGeomDetIn && !fGeomOldDetIn){
@@ -749,8 +765,6 @@ void AliITSv5::Init(){
 
     if(!fGeomDetIn) this->InitAliITSgeom();
     if(fGeomDetOut) fITSgeom->WriteNewFile(fWrite);
-    if(bg) BuildGeometry(); // call BuildGeometry here if fITSgeom was not
-                            // defined ealier
     AliITS::Init();
 //
     for(i=0;i<72;i++) cout << "*";