]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDgeometry.cxx
Train configuration can be now saved and replayed. If 'saveTrain' flag is set,
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.cxx
index 3e6f645d57523027f22ff7b248920f55d56f3cd1..ad7ee573672318cffe576530925062d265efaf36 100644 (file)
@@ -80,6 +80,12 @@ ClassImp(AliTRDgeometry)
                                               + AliTRDgeometry::fgkCamH
                                               + AliTRDgeometry::fgkCroH;  
 
+  // Distance of anode wire plane relative to middle of alignable volume
+  const Float_t  AliTRDgeometry::fgkAnodePos  = AliTRDgeometry::fgkCraH 
+                                              + AliTRDgeometry::fgkCdrH 
+                                              + AliTRDgeometry::fgkCamH/2.0
+                                              - 5.929;
+
   // Vertical spacing of the chambers
   const Float_t  AliTRDgeometry::fgkVspace    =   1.784;
   // Horizontal spacing of the chambers
@@ -160,6 +166,9 @@ ClassImp(AliTRDgeometry)
                                                 , fgkTime0Base + 4 * (Cheight() + Cspace()) 
                                                 , fgkTime0Base + 5 * (Cheight() + Cspace())};
 
+  const Double_t AliTRDgeometry::fgkXtrdBeg   = 288.43; // Values depend on position of TRD
+  const Double_t AliTRDgeometry::fgkXtrdEnd   = 366.33; // mother volume inside space frame !!!
+
 //_____________________________________________________________________________
 AliTRDgeometry::AliTRDgeometry()
   :AliGeometry()
@@ -317,6 +326,8 @@ AliTRDpadPlane *AliTRDgeometry::CreatePadPlane(Int_t ilayer, Int_t istack)
 
   padPlane->SetNcols(144);
 
+  padPlane->SetAnodeWireOffset(0.25);
+
   //
   // The pad plane parameter
   //
@@ -2870,5 +2881,39 @@ Bool_t AliTRDgeometry::IsHole(Int_t /*la*/, Int_t st, Int_t se) const
     return kTRUE; 
   }
   return kFALSE;
+}
 
+//_____________________________________________________________________________
+Bool_t AliTRDgeometry::IsOnBoundary(Int_t det, Float_t y, Float_t z, Float_t eps) const
+{
+  Int_t ly = GetLayer(det);
+  if ((ly <          0) || 
+      (ly >= fgkNlayer)) return kTRUE;
+       
+  Int_t stk = GetStack(det);
+  if ((stk <          0) || 
+      (stk >= fgkNstack)) return kTRUE;
+
+  AliTRDpadPlane *pp = (AliTRDpadPlane*) fPadPlaneArray->At(GetDetectorSec(ly, stk));
+  if(!pp) return kTRUE;
+
+  Double_t max  = pp->GetRow0();
+  Int_t n = pp->GetNrows();
+  Double_t min = max - 2 * pp->GetLengthOPad() 
+                 - (n-2) * pp->GetLengthIPad() 
+                 - (n-1) * pp->GetRowSpacing();
+  if(z < min+eps || z > max-eps){ 
+    //printf("z : min[%7.2f (%7.2f)] %7.2f max[(%7.2f) %7.2f]\n", min, min+eps, z, max-eps, max);
+    return kTRUE;
+  }
+  min  = pp->GetCol0();
+  n = pp->GetNcols();
+  max = min +2 * pp->GetWidthOPad() 
+       + (n-2) * pp->GetWidthIPad() 
+       + (n-1) * pp->GetColSpacing();
+  if(y < min+eps || y > max-eps){ 
+    //printf("y : min[%7.2f (%7.2f)] %7.2f max[(%7.2f) %7.2f]\n", min, min+eps, y, max-eps, max);
+    return kTRUE;
+  }
+  return kFALSE;
 }