]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgeometry.cxx
Make GetStack() and GetSector() static
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.cxx
index ee31c8e9ef2eb062416daad70c8ab486fbc4b0c5..46faf9874e5bb0f39fb4ea91040cf67a85a262bb 100644 (file)
@@ -273,27 +273,10 @@ void AliTRDgeometry::Init()
     fRotB22[isector] = TMath::Cos(phi);
   }
  
-}
-
-//_____________________________________________________________________________
-void AliTRDgeometry::SetSMstatus(Int_t sm, Char_t status)
-{
-  //
-  // Switch on/off supermodules in the geometry
-  //
-
-  AliTRDCommonParam::Instance()->SetSMstatus(sm,status);
-
-}
-
-//_____________________________________________________________________________
-Char_t AliTRDgeometry::GetSMstatus(Int_t sm) const
-{
-  //
-  // Get the supermodule status
-  //
-
-  return AliTRDCommonParam::Instance()->GetSMstatus(sm);
+  // SM status
+  for (Int_t i = 0; i < kNsector; i++) {
+    fSMstatus[i] = 1;
+  }
 
 }
 
@@ -1393,8 +1376,8 @@ void AliTRDgeometry::CreateFrame(Int_t *idtmed)
   //
 
   // The envelope volume (aluminum)
-  parTRD[0]  =  90.00/2.0;
-  parTRD[1]  = 114.00/2.0;
+  parTRD[0]  =  90.00/2.0 - 0.1;
+  parTRD[1]  = 114.00/2.0 - 0.1;
   parTRD[2]  =   1.50/2.0;
   parTRD[3]  =  70.30/2.0;
   gMC->Gsvolu("USCB","TRD1",idtmed[1301-1],parTRD,kNparTRD);
@@ -2642,7 +2625,7 @@ Int_t AliTRDgeometry::GetLayer(Int_t det)
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDgeometry::GetStack(Int_t det) const
+Int_t AliTRDgeometry::GetStack(Int_t det)
 {
   //
   // Reconstruct the stack number from the detector number
@@ -2684,7 +2667,7 @@ Int_t AliTRDgeometry::GetStack(Double_t z, Int_t layer)
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDgeometry::GetSector(Int_t det) const
+Int_t AliTRDgeometry::GetSector(Int_t det)
 {
   //
   // Reconstruct the sector number from the detector number
@@ -2766,6 +2749,14 @@ Bool_t AliTRDgeometry::CreateClusterMatrixArray()
     return kFALSE;
   }
 
+  TString volPath;
+  TString vpStr   = "ALIC_1/B077_1/BSEGMO";
+  TString vpApp1  = "_1/BTRD";
+  TString vpApp2  = "_1";
+  TString vpApp3a = "/UTR1_1/UTS1_1/UTI1_1";
+  TString vpApp3b = "/UTR2_1/UTS2_1/UTI2_1";
+  TString vpApp3c = "/UTR3_1/UTS3_1/UTI3_1";
+
   fClusterMatrixArray = new TObjArray(kNdet);
   AliAlignObjParams o;
 
@@ -2777,12 +2768,37 @@ Bool_t AliTRDgeometry::CreateClusterMatrixArray()
       Int_t        iLayerTRD = iLayer - AliGeomManager::kTRD1;
       Int_t        lid       = GetDetector(iLayerTRD,istack,isector);    
 
-      // Taking holes into account
-      if (((isector == 13) || (isector == 14) || (isector == 15)) && 
-          (istack == 2)) continue; 
+      // Check for disabled supermodules
+      volPath  = vpStr;
+      volPath += isector;
+      volPath += vpApp1;
+      volPath += isector;
+      volPath += vpApp2;
+      switch (isector) {
+      case 13:
+      case 14:
+      case 15:
+        if (istack == 2) {
+          continue;
+       }
+        volPath += vpApp3c;
+        break;
+      case 11:
+      case 12:
+        volPath += vpApp3b;
+        break;
+      default:
+        volPath += vpApp3a;
+      };
+      if (!gGeoManager->CheckPath(volPath)) {
+       continue;
+      }
 
-      // Taking disabled supermodules into account
-      if (!GetSMstatus(isector)) continue;
+      // Check for holes in from of PHOS
+      if (((isector == 13) || (isector == 14) || (isector == 15)) && 
+          (istack == 2)) {
+        continue; 
+      }
 
       UShort_t     volid   = AliGeomManager::LayerToVolUID(iLayer,iModule);
       const char  *symname = AliGeomManager::SymName(volid);