]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSv5symm.cxx
Seed set correctly (P.Skowronski)
[u/mrichter/AliRoot.git] / ITS / AliITSv5symm.cxx
index 230dfc11c6c120768c0bcae539128198bac52e02..fb55d851f0638b809c22fa5f3886e540c4a5fced 100644 (file)
 
 /*
 $Log$
+Revision 1.12  2001/05/30 15:55:35  hristov
+Strings compared instead of pointers
+
+Revision 1.11  2001/05/30 14:04:31  hristov
+Dynamic cast replaced (F.Carminati)
+
+Revision 1.10  2001/05/25 06:47:16  hristov
+Bug fix in the creation of the AliITSgeom::fShape entry for SPD. Now there is both a proper shape entry and a default, should there be future changes. This bug was related to fMinorVersion=3 was not antisipated. (B.Nilsen)
+
+Revision 1.9  2001/04/18 12:07:37  barbera
+Number of modules in layer 5 and 6 re-set to 23 and 26
+
+Revision 1.8  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.7  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.6  2001/02/09 20:06:26  nilsen
+Fixed bug in distructor. Can't distroy fixxed length arrays. Thanks Peter.
+
 Revision 1.5  2001/02/09 00:05:31  nilsen
 Added fMajor/MinorVersion variables and made other changes to better make
 use of the new code changes in AliITSgeom related classes.
@@ -96,7 +123,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 +147,8 @@ AliITSv5symm::AliITSv5symm() {
     fIdSens = 0;
     fEuclidOut    = kFALSE; // Don't write Euclide file
     fGeomDetOut   = kFALSE; // Don't write .det file
-    fGeomDetIn    = kFALSE; // 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 = 2;
     for(i=0;i<60;i++) fRead[i] = '\0';
@@ -147,8 +174,8 @@ AliITSv5symm::AliITSv5symm(const char *name, const char *title) : AliITS(name, t
     for (i=0;i<fIdN;i++) fIdSens[i] = 0;
     fEuclidOut    = kFALSE; // Don't write Euclide file
     fGeomDetOut   = kFALSE; // Don't write .det file
-    fGeomDetIn    = kFALSE; // 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 = 2;
     for(i=0;i<60;i++) fRead[i] = '\0';
@@ -202,8 +229,9 @@ void AliITSv5symm::BuildGeometry(){
   //const int kColorITSSDD=kGreen;
   const int kColorITSSSD=kBlue;
   //
-  top=gAlice->GetGeometry()->GetNode("alice");
   AliITSgeom  *gm = this->GetITSgeom();
+  if(gm==0) return;
+  top=gAlice->GetGeometry()->GetNode("alice");
 
   Int_t       lay,lad,det,i;
   Text_t      name[10];
@@ -620,7 +648,7 @@ void AliITSv5symm::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(!((TGeant3*)gMC)) {
+    if(gMC->IsA()!=AliGeant3::Class()) {
        Error("InitAliITSgeom",
                "Wrong Monte Carlo. InitAliITSgeom uses TGeant3 calls");
        return;
@@ -666,7 +694,7 @@ void AliITSv5symm::InitAliITSgeom(){
 
     if(fITSgeom!=0) delete fITSgeom;
     nlad[0]=20;nlad[1]=40;nlad[2]=14;nlad[3]=22;nlad[4]=34;nlad[5]=38;
-    ndet[0]=4;ndet[1]=4;ndet[2]=6;ndet[3]=8;ndet[4]=22;ndet[5]=25;
+    ndet[0]=4;ndet[1]=4;ndet[2]=6;ndet[3]=8;ndet[4]=23;ndet[5]=26;
     fITSgeom = new AliITSgeom(0,6,nlad,ndet,mod);
     mod = -1;
     for(lay=1;lay<=nlayers;lay++){
@@ -690,9 +718,16 @@ void AliITSv5symm::InitAliITSgeom(){
                            if(fMinorVersion==1){
                              fITSgeom->ReSetShape(kSPD,
                                                  new AliITSgeomSPD300());
-                           } else if(fMinorVersion==2)
+                           } else if(fMinorVersion==2){
+                             fITSgeom->ReSetShape(kSPD,
+                                                 new AliITSgeomSPD300());
+                           }else if(fMinorVersion==3){
+                             fITSgeom->ReSetShape(kSPD,
+                                                 new AliITSgeomSPD425Long());
+                           }else{
                              fITSgeom->ReSetShape(kSPD,
                                                  new AliITSgeomSPD300());
+                           } // end if
                    } // end for det
                } // end for k
             } // end for j
@@ -733,8 +768,8 @@ void AliITSv5symm::Init(){
     Int_t i;
 
     cout << endl;
-    for(i=0;i<30;i++) cout << "*";cout << " ITSv5_Init ";
-    for(i=0;i<30;i++) cout << "*";cout << endl;
+    for(i=0;i<28;i++) cout << "*";cout << " ITSv5symm_Init ";
+    for(i=0;i<28;i++) cout << "*";cout << endl;
 //
     if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60);
     if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60);