]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDDetector.cxx
o) adding log tags to all files
[u/mrichter/AliRoot.git] / FMD / AliFMDDetector.cxx
index 9be6505710789003dc994dd9f9013126dc599ca2..acde14a22fd81c604c5f421827ecad8f58227575 100644 (file)
     @author  Christian Holm Christensen <cholm@nbi.dk>
     @date    Mon Mar 27 12:36:27 2006
     @brief   Sub-detector base class implementation
+    @ingroup FMD_base
 */
 
 //____________________________________________________________________
 //
+// AliFMDDetector.   
+//
+// Base class for concrete FMD detectors, like AliFMD1, AliFMD2,
+// AliFMD3. 
 // Utility class to help implement the FMD geometry.  This provides
 // the interface for the concrete geometry implementations of the FMD
 // sub-detectors. 
@@ -34,7 +39,7 @@
 #include "AliLog.h"             // ALILOG_H
 #include <TGeoManager.h>       // ROOT_TGeoManager 
 #include <TGeoMatrix.h>                // ROOT_TGeoMatrix 
-#include <TMath.h>              // ROOT_TMath
+// #include <TMath.h>              // ROOT_TMath
 
 //====================================================================
 ClassImp(AliFMDDetector)
@@ -129,6 +134,8 @@ AliFMDDetector::Init()
 Bool_t
 AliFMDDetector::HasAllTransforms(Char_t ring) const
 {
+  // Check if we got all transformations for a given ring.  Return
+  // true in that case. 
   AliFMDRing* r = GetRing(ring);
   if (!r) return kTRUE;
   TObjArray* matricies = (r == fInner ? fInnerTransforms : fOuterTransforms);
@@ -147,6 +154,7 @@ AliFMDDetector::HasAllTransforms(Char_t ring) const
 void
 AliFMDDetector::InitTransformations()
 {
+  // Find all local<->global transformations for this detector. 
   if ((!fInner || (fInner && fInnerTransforms)) && 
       (!fOuter || (fOuter && fOuterTransforms))) {
     AliDebug(5, Form("Transforms for FMD%d already registered", fId));
@@ -304,7 +312,6 @@ AliFMDDetector::Detector2XYZ(Char_t   ring,
   // (x,y,z) coordinates (in global reference frame)
   AliFMDRing* r = GetRing(ring);
   if (!r) return;
-#if 1
   TGeoMatrix* m = FindTransform(ring, sector);
   if (!m) return;
   Double_t rho      = r->GetStripRadius(strip);
@@ -315,23 +322,19 @@ AliFMDDetector::Detector2XYZ(Char_t   ring,
                       + r->GetCopperThickness()
                       + r->GetChipThickness()
                       + r->GetSpacing());
-  AliDebug(10,Form("Rho %7.3f, angle %7.3f", rho, phi));
+  AliDebug(30,Form("Rho %7.3f, angle %7.3f", rho, phi));
 # define DEGRAD TMath::Pi() / 180. 
   Double_t local[]  = { rho * TMath::Cos(phi * DEGRAD), 
                        rho * TMath::Sin(phi * DEGRAD), 
                        -modThick + siThick / 2 };
   Double_t master[3];
-  AliDebug(10, Form("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
+  AliDebug(30, Form("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
   m->LocalToMaster(local, master);
-  AliDebug(10, Form("Master (%7.3f,%7.3f,%7.3f)",
+  AliDebug(30, Form("Master (%7.3f,%7.3f,%7.3f)",
                    master[0],master[1],master[2]));
   x = master[0];
   y = master[1];
   z = master[2];
-#else
-  z = GetRingZ(ring);
-  r->Detector2XYZ(sector, strip, x, y, z);
-#endif
 }
 
 //____________________________________________________________________