]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgeometry.cxx
added slewing correction by data
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.cxx
index c747c692e395d6f4514b3f920ffae6cb8d65578f..4d894291f39a89ad52b46d5e6f4b7e6fd8cbc00a 100644 (file)
@@ -196,7 +196,7 @@ ClassImp(AliTRDgeometry)
   const Double_t AliTRDgeometry::fgkXtrdEnd   = 366.33; // mother volume inside space frame !!!
 
   // The outer width of the chambers
-  const Float_t AliTRDgeometry::fgkCwidth[kNlayer] = {90.4, 94.8, 99.3, 103.7, 108.1, 112.6};
+  const Float_t AliTRDgeometry::fgkCwidth[kNlayer] = {  90.4,  94.8,  99.3, 103.7, 108.1, 112.6 };
   
   // The outer lengths of the chambers
   // Includes the spacings between the chambers!
@@ -207,32 +207,20 @@ ClassImp(AliTRDgeometry)
                                                              , { 145.0, 145.0, 110.0, 145.0, 145.0 }
                                                              , { 147.0, 147.0, 110.0, 147.0, 147.0 } };
 
+        Char_t  AliTRDgeometry::fgSMstatus[kNsector]         = { 1, 1, 1, 1, 1, 1, 1, 1, 1
+                                                              , 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+
   TObjArray* AliTRDgeometry::fgClusterMatrixArray = NULL;
 
   TObjArray* AliTRDgeometry::fgPadPlaneArray = NULL;
 
 //_____________________________________________________________________________
 AliTRDgeometry::AliTRDgeometry()
-  :AliGeometry()
 {
   //
   // AliTRDgeometry default constructor
   //
 
-  Init();
-
-}
-
-//_____________________________________________________________________________
-AliTRDgeometry::AliTRDgeometry(const AliTRDgeometry &g)
-  :AliGeometry(g)
-{
-  //
-  // AliTRDgeometry copy constructor
-  //
-
-  Init();
-
 }
 
 //_____________________________________________________________________________
@@ -244,45 +232,6 @@ AliTRDgeometry::~AliTRDgeometry()
 
 }
 
-//_____________________________________________________________________________
-AliTRDgeometry &AliTRDgeometry::operator=(const AliTRDgeometry &g)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &g) {
-    Init();
-  }
-
-  return *this;
-
-}
-
-//_____________________________________________________________________________
-void AliTRDgeometry::Init()
-{
-  //
-  // Initializes the geometry parameter
-  //
-
-  // The rotation matrix elements
-  Float_t phi = 0.0;
-  for (Int_t isector = 0; isector < fgkNsector; isector++) {
-    phi = 2.0 * TMath::Pi() /  (Float_t) fgkNsector * ((Float_t) isector + 0.5);
-    fRotB11[isector] = TMath::Cos(phi);
-    fRotB12[isector] = TMath::Sin(phi);
-    fRotB21[isector] = TMath::Sin(phi);
-    fRotB22[isector] = TMath::Cos(phi);
-  }
-  // SM status
-  for (Int_t i = 0; i < kNsector; i++) {
-    fSMstatus[i] = 1;
-  }
-
-}
-
 //_____________________________________________________________________________
 void AliTRDgeometry::CreatePadPlaneArray()
 {
@@ -293,7 +242,10 @@ void AliTRDgeometry::CreatePadPlaneArray()
   if (fgPadPlaneArray)
     return;
 
-  fgPadPlaneArray = new TObjArray(fgkNlayer * fgkNstack);  
+  static TObjArray padPlaneArray(fgkNlayer * fgkNstack);
+  padPlaneArray.SetOwner(kTRUE);
+
+  fgPadPlaneArray = &padPlaneArray;
   for (Int_t ilayer = 0; ilayer < fgkNlayer; ilayer++) {
     for (Int_t istack = 0; istack < fgkNstack; istack++) {
       Int_t ipp = GetDetectorSec(ilayer,istack);
@@ -2775,10 +2727,11 @@ Bool_t AliTRDgeometry::RotateBack(Int_t det
   // coordinates <loc> into the coordinates of the ALICE restframe <glb>.
   //
 
-  Int_t sector = GetSector(det);
+  Int_t   sector = GetSector(det);
+  Float_t phi = 2.0 * TMath::Pi() /  (Float_t) fgkNsector * ((Float_t) sector + 0.5);
 
-  glb[0] = loc[0] * fRotB11[sector] - loc[1] * fRotB12[sector];
-  glb[1] = loc[0] * fRotB21[sector] + loc[1] * fRotB22[sector];
+  glb[0] = loc[0] * TMath::Cos(phi) - loc[1] * TMath::Sin(phi);
+  glb[1] = loc[0] * TMath::Sin(phi) + loc[1] * TMath::Cos(phi);
   glb[2] = loc[2];
 
   return kTRUE;
@@ -2842,8 +2795,8 @@ Int_t AliTRDgeometry::GetStack(Double_t z, Int_t layer)
       (layer >= fgkNlayer)) return -1;
        
   Int_t    istck = fgkNstack;
-  Double_t zmin;
-  Double_t zmax;
+  Double_t zmin  = 0.0;
+  Double_t zmax  = 0.0;
 
   do {
     istck--;
@@ -2975,6 +2928,7 @@ Bool_t AliTRDgeometry::CreateClusterMatrixArray()
       case 13:
       case 14:
       case 15:
+        // Check for holes in from of PHOS
         if (istack == 2) {
           continue;
        }
@@ -2991,12 +2945,6 @@ Bool_t AliTRDgeometry::CreateClusterMatrixArray()
        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);
       TGeoPNEntry *pne     = gGeoManager->GetAlignableEntry(symname);