]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgeometryFull.cxx
New offline PID code by Prashant
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometryFull.cxx
index ae69523abc3a1fae3cf6c5eb3319eb3132f95a3b..475a9e74bb3c320f65964deaf328c27a0f97b155 100644 (file)
 
 /*
 $Log$
+Revision 1.15  2005/04/20 13:03:36  cblume
+Fix of geometry and pad plane parameter
+
+Revision 1.14  2004/05/07 06:52:50  cblume
+Bug fix to allow for fPHOShole and not fRICHhole
+
+Revision 1.13  2004/02/27 15:40:18  cblume
+Fix definition of rotation matrices
+
+Revision 1.12  2003/09/18 09:06:07  cblume
+Geometry update, Removal of compiler warnings
+
 Revision 1.10  2002/11/21 22:38:47  alibrary
 Removing AliMC and AliMCProcess
 
@@ -74,7 +86,7 @@ Add new TRD classes
 #include "TVirtualMC.h"
 
 #include "AliTRDgeometryFull.h"
-#include "AliTRDparameter.h"
+#include "AliTRDCommonParam.h"
 
 ClassImp(AliTRDgeometryFull)
 
@@ -113,19 +125,23 @@ void AliTRDgeometryFull::Init()
 
   // The outer lengths of the chambers for the sectors with holes for the PHOS
   Float_t lengthPH[kNplan][kNcham] = { { 124.0, 117.0,   0.0, 117.0, 124.0 }
+                                     , { 124.0, 117.0,   0.0, 117.0, 124.0 }
                                     , { 131.0, 124.0,   0.0, 124.0, 131.0 }
                                     , { 138.0, 131.0,   0.0, 131.0, 138.0 }
                                     , { 145.0, 138.0,   0.0, 138.0, 145.0 }
-                                    , { 147.0, 140.0,   0.0, 140.0, 147.0 }
                                     , { 147.0, 140.0,   0.0, 140.0, 147.0 } };
+  // Old layer 6                                    
+  //                                 , { 147.0, 140.0,   0.0, 140.0, 147.0 } };
 
   // The outer lengths of the chambers for the sectors with holes for the RICH
   Float_t lengthRH[kNplan][kNcham] = { {  87.5,   0.0,   0.0,   0.0,  87.5 }
+                                    , {  87.5,   0.0,   0.0,   0.0,  87.5 }
                                     , { 101.5,   0.0,   0.0,   0.0, 101.5 }
                                     , { 115.5,   0.0,   0.0,   0.0, 115.5 }
                                     , { 129.5,   0.0,   0.0,   0.0, 129.5 }
-                                    , { 133.5,   0.0,   0.0,   0.0, 133.5 }
                                     , { 133.5,   0.0,   0.0,   0.0, 133.5 } };
+  // Old layer 6
+  //                                , { 133.5,   0.0,   0.0,   0.0, 133.5 } };
 
   for (icham = 0; icham < kNcham; icham++) {
     for (iplan = 0; iplan < kNplan; iplan++) {
@@ -947,12 +963,18 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
   // The rotation matrices
   const Int_t kNmatrix = 3;
   Int_t   matrix[kNmatrix];
-  gMC->Matrix(matrix[0],100.0,0.0,90.0,90.0, 0.0,0.0);
-  gMC->Matrix(matrix[1], 80.0,0.0,90.0,90.0, 0.0,0.0);
-  gMC->Matrix(matrix[2],  0.0,0.0,90.0,90.0,90.0,0.0);
-
-  AliTRDparameter *parameter = new AliTRDparameter("par","TRD parameter");
-
+  gMC->Matrix(matrix[0],100.0,  0.0, 90.0, 90.0, 10.0,  0.0);
+  gMC->Matrix(matrix[1], 80.0,  0.0, 90.0, 90.0, 10.0,180.0);
+  gMC->Matrix(matrix[2],  0.0,  0.0, 90.0, 90.0, 90.0,  0.0);
+
+  AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
+  if (!commonParam)
+  {
+    printf("<AliTRDgeometryFull::CreateServices> ");
+    printf("Could not get common params\n");
+    return;
+  }
+    
   //
   // The cooling arterias
   //
@@ -1143,7 +1165,7 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
     for (iplan = 0; iplan < kNplan-1; iplan++) { 
       Int_t   iDet    = GetDetectorSec(iplan,icham);
       Int_t   iCopy   = GetDetector(iplan,icham,0) * 100;
-      Int_t   nMCMrow = parameter->GetRowMax(iplan,icham,0);
+      Int_t   nMCMrow = commonParam->GetRowMax(iplan,icham,0);
       Float_t ySize   = (GetChamberLength(iplan,icham) - 2.*fgkRpadW) 
                       / ((Float_t) nMCMrow);
       sprintf(cTagV,"UU%02d",iDet);
@@ -1210,7 +1232,7 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
     for (iplan = 0; iplan < kNplan-1; iplan++) { 
       Int_t   iDet    = GetDetectorSec(iplan,icham);
       Int_t   iCopy   = GetDetector(iplan,icham,0) * 100;
-      Int_t   nMCMrow = parameter->GetRowMax(iplan,icham,0);
+      Int_t   nMCMrow = commonParam->GetRowMax(iplan,icham,0);
       Float_t ySize   = (GetChamberLength(iplan,icham) - 2.*fgkRpadW) 
                       / ((Float_t) nMCMrow);
       sprintf(cTagV,"UU%02d",iDet);
@@ -1305,7 +1327,7 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
     for (iplan = 0; iplan < kNplan-1; iplan++) { 
       Int_t   iDet    = GetDetectorSec(iplan,icham);
       Int_t   iCopy   = GetDetector(iplan,icham,0) * 1000;
-      Int_t   nMCMrow = parameter->GetRowMax(iplan,icham,0);
+      Int_t   nMCMrow = commonParam->GetRowMax(iplan,icham,0);
       Float_t ySize   = (GetChamberLength(iplan,icham) - 2.*fgkRpadW) 
                       / ((Float_t) nMCMrow);
       Int_t   nMCMcol = 8;
@@ -1345,7 +1367,7 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
          }
         }
       }
-      if (fPHOShole) {
+      if (fRICHhole) {
         sprintf(cTagV,"UU%02d",iDet+2*kNdet);
         for (Int_t iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
           for (Int_t iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
@@ -1367,42 +1389,4 @@ void AliTRDgeometryFull::CreateServices(Int_t *idtmed)
 
     }
   }
-
-  delete parameter;
-
-}
-
-//_____________________________________________________________________________
-void AliTRDgeometryFull::SetOldGeometry()
-{
-  //
-  // Use the old chamber lengths
-  //
-
-  Int_t icham;
-  Int_t iplan;
-
-  AliTRDgeometry::SetOldGeometry();
-
-  Float_t lengthPH[kNplan][kNcham] = { { 123.5, 116.5,   0.0, 116.5, 123.5 }
-                                    , { 131.0, 124.0,   0.0, 124.0, 131.0 }
-                                    , { 134.5, 131.5,   0.0, 131.5, 134.5 }
-                                    , { 142.0, 139.0,   0.0, 139.0, 142.0 }
-                                    , { 142.0, 146.0,   0.0, 146.0, 142.0 }
-                                     , { 134.5, 153.5,   0.0, 153.5, 134.5 } };
-
-  Float_t lengthRH[kNplan][kNcham] = { {  86.5,   0.0,   0.0,   0.0,  86.5 }
-                                    , { 101.5,   0.0,   0.0,   0.0, 101.5 }
-                                    , { 112.5,   0.0,   0.0,   0.0, 112.5 }
-                                    , { 127.5,   0.0,   0.0,   0.0, 127.5 }
-                                    , { 134.5,   0.0,   0.0,   0.0, 134.5 }
-                                     , { 134.5,   0.0,   0.0,   0.0, 134.5 } };
-                                                                               
-  for (icham = 0; icham < kNcham; icham++) {
-    for (iplan = 0; iplan < kNplan; iplan++) {
-      fClengthPH[iplan][icham] = lengthPH[iplan][icham];
-      fClengthRH[iplan][icham] = lengthRH[iplan][icham];
-    }
-  }
-
 }