]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDRing.cxx
Initialization of some data members. Copy constructor and assignment operators made...
[u/mrichter/AliRoot.git] / FMD / AliFMDRing.cxx
index 93a93238f9f56aee33244e7121885264beb3d35c..0fe186cdcce0eeb32db5a64b4b05c0d30498bbc9 100644 (file)
@@ -44,6 +44,7 @@ AliFMDRing::AliFMDRing(Char_t id)
     fId(id), 
     fVerticies(0)
 {
+  // CTOR
   SetBondingWidth();
   SetWaferRadius();
   SetSiThickness();
@@ -54,6 +55,7 @@ AliFMDRing::AliFMDRing(Char_t id)
   SetPrintboardThickness();
   SetCopperThickness();
   SetChipThickness();
+  SetSpacing();
   
   if (fId == 'I' || fId == 'i') {
     SetLowR(4.3);
@@ -73,6 +75,7 @@ AliFMDRing::AliFMDRing(Char_t id)
 void
 AliFMDRing::Init()
 {
+  // Initialize 
   Double_t tanTheta  = TMath::Tan(fTheta * TMath::Pi() / 180.);
   Double_t tanTheta2 = TMath::Power(tanTheta,2);
   Double_t r2        = TMath::Power(fWaferRadius,2);
@@ -111,9 +114,21 @@ AliFMDRing::Init()
 TVector2*
 AliFMDRing::GetVertex(Int_t i) const
 {
+  // Get the i'th vertex of polygon shape
   return static_cast<TVector2*>(fVerticies.At(i));
 }
 
+//____________________________________________________________________
+Double_t
+AliFMDRing::GetStripRadius(UShort_t strip) const
+{
+  // Return the nominal strip radius 
+  Double_t rmax     = GetMaxR();
+  Double_t stripoff = GetMinR();
+  Double_t dstrip   = (rmax - stripoff) / GetNStrips();
+  return (strip + .5) * dstrip + stripoff; // fLowR
+}
 //____________________________________________________________________
 void
 AliFMDRing::Detector2XYZ(UShort_t sector,
@@ -122,6 +137,8 @@ AliFMDRing::Detector2XYZ(UShort_t sector,
                         Double_t& y, 
                         Double_t& z) const
 {
+  // Translate detector coordinates (this,sector,strip) to global
+  // coordinates (x,y,z)
   if (sector >= GetNSectors()) {
     Error("Detector2XYZ", "Invalid sector number %d (>=%d) in ring %c", 
          sector, GetNSectors(), fId);
@@ -148,6 +165,8 @@ AliFMDRing::XYZ2Detector(Double_t  x,
                         UShort_t& sector,
                         UShort_t& strip) const
 {
+  // Translate global coordinates (x,y,z) to detector coordinates
+  // (this,sector,strip)
   sector = strip = 0;
   Double_t r = TMath::Sqrt(x * x + y * y);
   Int_t str = Int_t((r - fMinR) / GetPitch());