]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDDetector.cxx
Removal of effc++ warnings
[u/mrichter/AliRoot.git] / FMD / AliFMDDetector.cxx
index 9be6505710789003dc994dd9f9013126dc599ca2..2a890d5e48723e6fca0ee43c34cb26684d1c64dd 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)
@@ -46,6 +51,14 @@ ClassImp(AliFMDDetector)
 AliFMDDetector::AliFMDDetector(Int_t id, AliFMDRing* inner, AliFMDRing* outer) 
   : TNamed(Form("FMD%d", id), "Forward multiplicity ring"), 
     fId(id), 
+    fInnerZ(0.),
+    fOuterZ(0.),
+    fHoneycombThickness(0.),
+    fAlThickness(0.),
+    fInnerHoneyLowR(0.),
+    fInnerHoneyHighR(0.),
+    fOuterHoneyLowR(0.),
+    fOuterHoneyHighR(0.),
     fInner(inner),
     fOuter(outer), 
     fInnerTransforms(0),
@@ -71,6 +84,14 @@ AliFMDDetector::AliFMDDetector(Int_t id, AliFMDRing* inner, AliFMDRing* outer)
 AliFMDDetector::AliFMDDetector(const AliFMDDetector& other)
   : TNamed(other), 
     fId(other.fId),
+    fInnerZ(0.),
+    fOuterZ(0.),
+    fHoneycombThickness(0.),
+    fAlThickness(0.),
+    fInnerHoneyLowR(0.),
+    fInnerHoneyHighR(0.),
+    fOuterHoneyLowR(0.),
+    fOuterHoneyHighR(0.),
     fInner(other.fInner),
     fOuter(other.fOuter),
     fInnerTransforms(other.fInnerTransforms),
@@ -129,6 +150,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 +170,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 +328,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 +338,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
 }
 
 //____________________________________________________________________