ROOT logo
/**************************************************************************
 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved.      *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
/* $Id$ */
/** @file    AliFMDDetector.cxx
    @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. 
//
// The AliFMDGeometry object owns the AliFMDDetector objects
//
// Latest changes by Christian Holm Christensen
//

#include <TGeoManager.h>	// ROOT_TGeoManager 
#include <TGeoPhysicalNode.h>   // ROOT_TGeoPhysicalNode
#include <TGeoMatrix.h>		// ROOT_TGeoMatrix 
#include <TMath.h>              // ROOT_TMath

#include "AliFMDDetector.h"	// ALIFMDSUBDETECTOR_H
#include "AliFMDRing.h"		// ALIFMDRING_H
#include "AliFMDDebug.h"		// ALIFMDDEBUG_H ALILOG_H

//====================================================================
ClassImp(AliFMDDetector)
#if 0
  ; // This is here to keep Emacs for indenting the next line
#endif

//____________________________________________________________________
AliFMDDetector::AliFMDDetector(Int_t id, AliFMDRing* inner, AliFMDRing* outer) 
  : TNamed(Form("FMD%d", id), "Forward multiplicity ring"), 
    fId(id), 
    fInnerZ(0.),
    fOuterZ(0.),
    fInnerHoneyLowR(0.),
    fInnerHoneyHighR(0.),
    fOuterHoneyLowR(0.),
    fOuterHoneyHighR(0.),
    fInner(inner),
    fOuter(outer), 
    fInnerTransforms(0),
    fOuterTransforms(0)
{
  // Constructor
  // 
  //   ID         Id of detector (1,2, or 3)
  //   INNER      Inner ring geometry 
  //   OUTER      Outer ring geometry (if any)
  // 
  SetInnerHoneyLowR(0);
  SetInnerHoneyHighR(0);
  SetInnerZ(0);
  SetOuterZ(0);
  SetOuterHoneyLowR(0);
  SetOuterHoneyHighR(0);
}

//____________________________________________________________________
AliFMDDetector::AliFMDDetector(const AliFMDDetector& other)
  : TNamed(other), 
    fId(other.fId),
    fInnerZ(0.),
    fOuterZ(0.),
    fInnerHoneyLowR(0.),
    fInnerHoneyHighR(0.),
    fOuterHoneyLowR(0.),
    fOuterHoneyHighR(0.),
    fInner(other.fInner),
    fOuter(other.fOuter),
    fInnerTransforms(other.fInnerTransforms),
    fOuterTransforms(other.fOuterTransforms)
{
  // Copy constructor 
  SetInnerHoneyLowR(other.GetInnerHoneyLowR());
  SetInnerHoneyHighR(other.GetInnerHoneyHighR());
  SetInnerZ(other.GetInnerZ());
  SetOuterZ(other.GetOuterZ());
  SetOuterHoneyLowR(other.GetOuterHoneyLowR());
  SetOuterHoneyHighR(other.GetOuterHoneyHighR());
}

//____________________________________________________________________
AliFMDDetector&
AliFMDDetector::operator=(const AliFMDDetector& other)
{
  // Assignment operator
  if (&other == this) return *this; 
  SetName(other.GetName());
  SetTitle(other.GetTitle());
  fId              = other.fId;
  fInner           = other.fInner;
  fOuter           = other.fOuter;
  fInnerTransforms = other.fInnerTransforms;
  fOuterTransforms = other.fOuterTransforms;
  SetInnerHoneyLowR(other.GetInnerHoneyLowR());
  SetInnerHoneyHighR(other.GetInnerHoneyHighR());
  SetInnerZ(other.GetInnerZ());
  SetOuterZ(other.GetOuterZ());
  SetOuterHoneyLowR(other.GetOuterHoneyLowR());
  SetOuterHoneyHighR(other.GetOuterHoneyHighR());
  return *this;
}

//____________________________________________________________________
void
AliFMDDetector::Init()
{
  // Initialize. 
  if (fInner) {
    SetInnerHoneyLowR(fInner->GetLowR() + 1.);
    SetInnerHoneyHighR(fInner->GetHighR() + 1.);
  }
  if (fOuter) {
    SetOuterHoneyLowR(fOuter->GetLowR() + 1.);
    SetOuterHoneyHighR(fOuter->GetHighR() + 1.);
  }  
}

//____________________________________________________________________
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);
  if (!matricies) return kTRUE;
  if (matricies->GetEntries() == r->GetNModules()) return kTRUE;
  return kFALSE;
}

#define IS_NODE_THIS(name) \
  (name[0] == 'F' && name[2] == 'M' && name[1] == Char_t(48+fId) && \
   (name[3] == 'T' || name[3] == 'B'))
#define IS_NODE_SENSOR(name)				\
  (name[0] == 'F' && (name[2] == 'B' || name[2] == 'F') && name[3] == 'H')
//#define IS_NODE_SENSOR(name)				
//  (name[0] == 'F' && name[2] == 'S' && name[3] == 'E')
#define IS_NODE_HALF(name) \
  (name[0] == 'F' && name[2] == 'M' && (name[3] == 'B' || name[3] == 'T'))
#define HALF_FORMAT   "FMD/FMD%d_%c"
#define SENSOR_FORMAT "FMD/FMD%d_%c/FMD%c_%02d"

//____________________________________________________________________
void
AliFMDDetector::InitTransformations()
{
  // Find all local<->global transformations for this detector. 
  if ((!fInner || (fInner && fInnerTransforms)) && 
      (!fOuter || (fOuter && fOuterTransforms))) {
    AliFMDDebug(5, ("Transforms for FMD%d already registered", fId));
    return;
  }
  AliFMDDebug(5, ("Initializing transforms for FMD%d", fId));
  if (!gGeoManager) {
    AliFatal("No TGeoManager defined");
    return;
  }

  // Implementation using alignable volume names. 
  // Make container of transforms 
  if (fInner && !fInnerTransforms) 
    fInnerTransforms = new TObjArray(fInner->GetNModules());
  if (fOuter && !fOuterTransforms) 
    fOuterTransforms = new TObjArray(fOuter->GetNModules());
  
  // Loop over bottom/top 
  for (size_t ihalf = 0; ihalf < 2; ihalf++) {
    char  half = (ihalf == 0 ? 'T' : 'B');
    TString path(Form(HALF_FORMAT, fId, half));
    TGeoPNEntry* entry = gGeoManager->GetAlignableEntry(path.Data());
    if (!entry) {
      AliError(Form("Alignable entry for half-detector \"%s\" not found!", 
		    path.Data()));
      continue;
    }
    TGeoPhysicalNode* pn = entry->GetPhysicalNode();
    if (!pn) {
      AliWarning(Form("Making physical volume for \"%s\"", path.Data()));
      pn = gGeoManager->MakeAlignablePN(entry);
      if (!pn) {
	AliError(Form("No physical node for \"%s\"", path.Data()));
	continue;
      }
    }
  }
  
  // Loop over rings 
  for (size_t iring = 0; iring < 2; iring++) {
    char ring = (iring == 0 ? 'I' : 'O');
    TObjArray*  trans = 0;
    AliFMDRing* r     = 0; 
    switch (ring) {
    case 'I': r = fInner; trans = fInnerTransforms; break;
    case 'O': r = fOuter; trans = fOuterTransforms; break; 
    }
    if (!r || !trans) continue;

    Int_t nModules = r->GetNModules();
    if (nModules <= 0) continue;

    // Loop over bottom/top 
    for (size_t ihalf = 0; ihalf < 2; ihalf++) {
      char  half = (ihalf == 0 ? 'T' : 'B');
      Int_t base = (half == 'T' ? 0 : nModules / 2);
      
      // Loop over modules in this half ring 
      for (Int_t imod = 0; imod < nModules / 2; imod++) {
	// Find physical node entry
	TString path(Form(SENSOR_FORMAT, fId, half, ring, base+imod));
	TGeoPNEntry* entry = gGeoManager->GetAlignableEntry(path.Data());
	if (!entry) {
	  AliError(Form("Alignable entry for sensor \"%s\" not found!", 
			path.Data()));
	  continue;
	}
	TGeoPhysicalNode* pn = entry->GetPhysicalNode();
	if (!pn) {
	  AliWarning(Form("Making physical volume for \"%s\"", path.Data()));
	  pn = gGeoManager->MakeAlignablePN(entry);
	  if (!pn) {
	    AliError(Form("No physical node for \"%s\"", path.Data()));
	    continue;
	  }
	}
	
	const TGeoMatrix* pm = pn->GetMatrix();
	if (!pm) {
	  AliError(Form("No matrix for path \"%s\"", path.Data()));
	  continue;
	}
	// Get transformation matrix for this node, and store it. 
	TGeoMatrix*  t = new TGeoHMatrix(*pm);
	trans->AddAt(t, base+imod);
	AliFMDDebug(5, ("Found matrix for path \"%s\": %p",path.Data(),pm));
      }
    }
  }
  if (HasAllTransforms('I') && HasAllTransforms('O')) return;

  // Alternative implementation using TGeoIter. 
  TGeoVolume* topVolume = gGeoManager->GetTopVolume();
  if (!topVolume) {
    AliFatal("No top-level volume defined");
    return;
  }
  // Make an iterator
  TGeoIterator next(topVolume);
  TGeoNode* node = 0;
  
  // Find the node corresponding to this detector, and then find the
  // sensor volumes 
  Bool_t thisNodeFound = kFALSE;
  Bool_t allInners     = HasAllTransforms('I');
  Bool_t allOuters     = HasAllTransforms('O');
  
  while ((node = static_cast<TGeoNode*>(next())) 
	 && !(allInners && allOuters)) {
    // Get nodes names 
    const Char_t* name = node->GetName();
    if (!name) continue;
    AliFMDDebug(50, ("Got volume %s", name));
    // Check if this node is this detector 
    // The base offset for numbers in the ASCII table is 48
    if (IS_NODE_THIS(name)) {
      AliFMDDebug(20, ("Found detector node '%s' for FMD%d", name, fId));
      thisNodeFound = kTRUE;
    }
    // if the detector was found, then we're on that branch, and we
    // check if this node represents a module in that branch.
    if (thisNodeFound && IS_NODE_SENSOR(name)) {
      AliFMDDebug(20, ("Found sensor node '%s' for FMD%d", name, fId));
      // Get the ring Id.
      Char_t ringid = name[1];

      // Get the approprate ring
      AliFMDRing* ring = GetRing(ringid);
      if (!ring) continue;

      // Check whether we have all the modules we need for this ring,
      // and if so, go on to the next node. 
      Bool_t& done = (ring == fInner ? allInners : allOuters);
      if ((done = HasAllTransforms(ringid))) {
	AliFMDDebug(20, ("Already has all module transforms for ring %c", 
			 ringid));
	continue;
      }

      // Get the approprate container
      TObjArray* matricies = (ringid == 'i' || ringid == 'I' 
			      ? fInnerTransforms : fOuterTransforms);

      // Get the copy (module) number, and check that it hasn't
      // already been added to the container. 
      Int_t copy  = node->GetNumber();
      if (matricies->At(copy)) {
	AliWarning(Form("Have a transformation for module %d in ring %c", 
			copy, ringid));
	continue;
      }

      // Get the global transformation matrix, and store it. 
      TGeoMatrix*  trans = new TGeoHMatrix(*(next.GetCurrentMatrix()));
      matricies->AddAt(trans, copy);

    }
  }
}

//____________________________________________________________________
void
AliFMDDetector::SetAlignableVolumes() const
{
  // Set alignable volumes. 
  // This will define the alignable volumes. 
  // That is currently, the modules and the half-rings. 
  
  AliFMDDebug(10, ("Making alignable volumes for FMD%d", fId));
  if (!gGeoManager) {
    AliFatal("No TGeoManager defined");
    return;
  }
  TGeoVolume* topVolume = gGeoManager->GetTopVolume();
  if (!topVolume) {
    AliFatal("No top-level volume defined");
    return;
  }

  // Make an iterator
  TGeoIterator next(topVolume);
  next.Reset(topVolume);
  next.SetTopName(Form("/%s_1", topVolume->GetName()));
  TGeoNode* node = 0;
  
  Int_t nInnerSensor = (fInner ? fInner->GetNModules() : 0);
  Int_t nOuterSensor = (fOuter ? fOuter->GetNModules() : 0);
  // Find the node corresponding to this detector, and then find the
  // sensor volumes 
  Bool_t thisNodeFound = kFALSE;
  Char_t thisHalf      = '\0';
  Int_t  iInnerSensor  = 0;
  Int_t  iOuterSensor  = 0;
  Bool_t hasTop        = false;
  Bool_t hasBottom     = false;
  
  TString path, align;
  while ((node = static_cast<TGeoNode*>(next())) 
	 && (iInnerSensor < nInnerSensor || iOuterSensor < nOuterSensor
	     || !hasBottom || !hasTop)) {
    // Get nodes names 
    const Char_t* name = node->GetName();
    if (!name) continue;
    AliFMDDebug((name[0] == 'F' ? 40 : 50), ("Got volume %s", name));
    // Check if this node is this detector 
    // The base offset for numbers in the ASCII table is 48
    if (IS_NODE_THIS(name)) {
      AliFMDDebug(20, ("Found detector node '%s' for FMD%d", name, fId));
      thisNodeFound = kTRUE;
    }

    // if a half ring is found, then we're on that branch, and we
    // check if this node represents a half ring on that branch 
    if (thisNodeFound && IS_NODE_HALF(name)) {
      AliFMDDebug(30, ("Found half node '%s' for FMD%d", name, fId));
      // Get the half Id.
      thisHalf = name[3];

      // Check if we're done 
      Bool_t done = (thisHalf == 'T' ? hasTop : hasBottom);
      if (done) {
	AliFMDDebug(20, ("Already has all halves for detector %c",name[1]));
	continue;
      }

      switch (thisHalf) {
      case 'T': hasTop = true; break;
      case 'B': hasBottom = true; break;
      default:  
	AliWarning(Form("Unknown part '%c' of FMD%d", thisHalf, fId));
	continue; // because the node is unknown. 
      }
      
      // Get the node path 
      next.GetPath(path);
      align = Form(HALF_FORMAT, fId, thisHalf);
    }
    
    // if the detector was found, then we're on that branch, and we
    // check if this node represents a module in that branch.
    if (thisNodeFound && thisHalf && IS_NODE_SENSOR(name)) {
      AliFMDDebug(30, ("Found sensor node '%s' for FMD%d", name, fId));
      // Get the ring Id.
      Char_t ringid = name[1];

      // check that the ring is valid 
      if (!GetRing(ringid)) {
	AliWarning(Form("Invalid ring %c for FMD%d", ringid, fId));
	continue;
      }

      // Check if we're done
      Bool_t done = false;
      switch (ringid) {
      case 'I': done = iInnerSensor >= nInnerSensor; break;
      case 'O': done = iOuterSensor >= nOuterSensor; break;
      default: continue;
      }
      if (done) {
	AliFMDDebug(20, ("Already has all sensor volumes for ring %c",ringid));
	continue;
      }
      // Get the copy (module) number, and check that it hasn't
      // already been added to the container. 
      Int_t copy  = node->GetNumber();
      next.GetPath(path);
      // path.Replace("ALIC", "/ALIC_1");
      align = Form(SENSOR_FORMAT, fId, thisHalf, ringid, copy);
      
      switch (ringid) {
      case 'I': iInnerSensor++; break;
      case 'O': iOuterSensor++; break;
      }
    }
    if (!align.IsNull() && !path.IsNull()) {
      AliFMDDebug(20, ("Got %s -> %s", path.Data(), align.Data()));
      TGeoPNEntry* entry = 
	gGeoManager->SetAlignableEntry(align.Data(),path.Data());
      if(!entry)
	AliFatal(Form("Alignable entry %s not created. "
		      "Volume path %s not valid", 
			align.Data(),path.Data()));
#ifdef MAKE_ALIGNABLE_PHYSICAL
      TGeoPhysicalNode* phys = gGeoManager->MakeAlignablePN(entry);
      if (!phys) 
	AliWarning(Form("Physical node entry %s not created. "
			"Volume path %s not valid", 
			align.Data(),path.Data()));
#endif
      align = "";
    }
    AliFMDDebug(20, ("FMD%d: top: %d bottom: %d Inner: %d/%d Outer %d/%d", 
		      fId, hasTop, hasBottom, iInnerSensor,  nInnerSensor, 
		      iOuterSensor, nOuterSensor));
  }
}

  

//____________________________________________________________________
AliFMDRing*
AliFMDDetector::GetRing(Char_t id) const
{
  // Get the specified ring 
  // 
  //   ID      Id of ring ('I' or 'O')
  // 
  switch (id) {
  case 'i':
  case 'I': return GetInner();
  case 'o':
  case 'O': return GetOuter();
  }
  return 0;
}

//____________________________________________________________________
Double_t
AliFMDDetector::GetRingZ(Char_t id) const
{
  // Get the z-coordinate specified ring 
  // 
  //   ID      Id of ring ('I' or 'O')
  // 
  switch (id) {
  case 'i':
  case 'I': return GetInnerZ();
  case 'o':
  case 'O': return GetOuterZ();
  }
  return 0;
}

//____________________________________________________________________
TGeoMatrix*
AliFMDDetector::FindTransform(Char_t ring, UShort_t sector) const 
{
  // Find the transformation that corresponds to sector sector in ring
  // ring. 
  TObjArray* matricies = 0;
  switch (ring) {
  case 'i': case 'I': matricies = fInnerTransforms; break;
  case 'o': case 'O': matricies = fOuterTransforms; break;
  }
  if (!matricies) { 
    AliWarning(Form("Unknown ring %c of FMD%d", ring, fId));
    return 0;
  }
  UInt_t module = sector / 2;
  TGeoMatrix* m = static_cast<TGeoMatrix*>(matricies->At(module));
  if (!m) {
    AliWarning(Form("No matrix found for sector %d in FMD%d%c", 
		    sector, fId, ring));
    return 0;
  }
  return m;
}

  
//____________________________________________________________________
void
AliFMDDetector::Detector2XYZ(Char_t   ring, 
			     UShort_t sector,
			     UShort_t strip, 
			     Double_t& x, 
			     Double_t& y, 
			     Double_t& z) const
{
  // Translate detector coordinates (this,ring,sector,strip) into
  // (x,y,z) coordinates (in global reference frame)
  AliFMDRing* r = GetRing(ring);
  if (!r) { 
    AliWarning(Form("No such ring FMD%d%c ", fId, ring));
    return;
  }
  TGeoMatrix* m = FindTransform(ring, sector);
  if (!m) { 
    AliWarning(Form("No transfrmation found for FMD%d%c[%02d]", 
		    fId, ring, sector));
    return;
  }
  Double_t rho      = r->GetStripRadius(strip);
  Double_t phi      = ((sector % 2) - .5) * r->GetTheta();
  Double_t siThick  = r->GetSiThickness();
#if 0 
  Double_t modThick = (siThick
		       + r->GetPrintboardThickness()
		       + r->GetCopperThickness()
		       + r->GetChipThickness()
		       + r->GetSpacing());
#endif
  AliFMDDebug(30, ("Rho %7.3f, angle %7.3f", rho, phi));
  Double_t local[]  = { rho * TMath::Cos(phi * TMath::DegToRad()), 
		        rho * TMath::Sin(phi * TMath::DegToRad()), 
		        /* -modThick + */ siThick / 2 };
  Double_t master[3];
  AliFMDDebug(30, ("Local (%7.3f,%7.3f,%7.3f)",local[0], local[1], local[2]));
  m->LocalToMaster(local, master);
  AliFMDDebug(30, ("Master (%7.3f,%7.3f,%7.3f)",
		    master[0],master[1],master[2]));
  x = master[0];
  y = master[1];
  z = master[2];
}

//____________________________________________________________________
Bool_t
AliFMDDetector::XYZ2Detector(Double_t  x,
			     Double_t  y,
			     Double_t  z,
			     Char_t&   ring, 
			     UShort_t& sector,
			     UShort_t& strip) const
{
  // Translate (x,y,z) coordinates (in global reference frame) into 
  // detector coordinates (this,ring,sector,strip).
  AliFMDRing* rng = 0;
  ring = -1;
  for (int j = 0; j < 2; j++) {
    rng = GetRing(j == 0 ? 'I'  : 'O');
    if (!rng) continue;
    Double_t ringZ    = GetRingZ(j == 0 ? 'I'  : 'O');
    Double_t modSpace = TMath::Sign(rng->GetModuleSpacing(), ringZ);
    if (TMath::Abs(z - ringZ) < 0.01 || 
	TMath::Abs(z - ringZ + modSpace) < 0.01) break;
    rng = 0;
  }
  if (rng && rng->XYZ2Detector(x, y, z - GetRingZ(rng->GetId()),
			       sector, strip)) {
    ring = rng->GetId();
    return kTRUE;
  }
  return kFALSE;
}

  

//____________________________________________________________________
// 
// EOF
//
 AliFMDDetector.cxx:1
 AliFMDDetector.cxx:2
 AliFMDDetector.cxx:3
 AliFMDDetector.cxx:4
 AliFMDDetector.cxx:5
 AliFMDDetector.cxx:6
 AliFMDDetector.cxx:7
 AliFMDDetector.cxx:8
 AliFMDDetector.cxx:9
 AliFMDDetector.cxx:10
 AliFMDDetector.cxx:11
 AliFMDDetector.cxx:12
 AliFMDDetector.cxx:13
 AliFMDDetector.cxx:14
 AliFMDDetector.cxx:15
 AliFMDDetector.cxx:16
 AliFMDDetector.cxx:17
 AliFMDDetector.cxx:18
 AliFMDDetector.cxx:19
 AliFMDDetector.cxx:20
 AliFMDDetector.cxx:21
 AliFMDDetector.cxx:22
 AliFMDDetector.cxx:23
 AliFMDDetector.cxx:24
 AliFMDDetector.cxx:25
 AliFMDDetector.cxx:26
 AliFMDDetector.cxx:27
 AliFMDDetector.cxx:28
 AliFMDDetector.cxx:29
 AliFMDDetector.cxx:30
 AliFMDDetector.cxx:31
 AliFMDDetector.cxx:32
 AliFMDDetector.cxx:33
 AliFMDDetector.cxx:34
 AliFMDDetector.cxx:35
 AliFMDDetector.cxx:36
 AliFMDDetector.cxx:37
 AliFMDDetector.cxx:38
 AliFMDDetector.cxx:39
 AliFMDDetector.cxx:40
 AliFMDDetector.cxx:41
 AliFMDDetector.cxx:42
 AliFMDDetector.cxx:43
 AliFMDDetector.cxx:44
 AliFMDDetector.cxx:45
 AliFMDDetector.cxx:46
 AliFMDDetector.cxx:47
 AliFMDDetector.cxx:48
 AliFMDDetector.cxx:49
 AliFMDDetector.cxx:50
 AliFMDDetector.cxx:51
 AliFMDDetector.cxx:52
 AliFMDDetector.cxx:53
 AliFMDDetector.cxx:54
 AliFMDDetector.cxx:55
 AliFMDDetector.cxx:56
 AliFMDDetector.cxx:57
 AliFMDDetector.cxx:58
 AliFMDDetector.cxx:59
 AliFMDDetector.cxx:60
 AliFMDDetector.cxx:61
 AliFMDDetector.cxx:62
 AliFMDDetector.cxx:63
 AliFMDDetector.cxx:64
 AliFMDDetector.cxx:65
 AliFMDDetector.cxx:66
 AliFMDDetector.cxx:67
 AliFMDDetector.cxx:68
 AliFMDDetector.cxx:69
 AliFMDDetector.cxx:70
 AliFMDDetector.cxx:71
 AliFMDDetector.cxx:72
 AliFMDDetector.cxx:73
 AliFMDDetector.cxx:74
 AliFMDDetector.cxx:75
 AliFMDDetector.cxx:76
 AliFMDDetector.cxx:77
 AliFMDDetector.cxx:78
 AliFMDDetector.cxx:79
 AliFMDDetector.cxx:80
 AliFMDDetector.cxx:81
 AliFMDDetector.cxx:82
 AliFMDDetector.cxx:83
 AliFMDDetector.cxx:84
 AliFMDDetector.cxx:85
 AliFMDDetector.cxx:86
 AliFMDDetector.cxx:87
 AliFMDDetector.cxx:88
 AliFMDDetector.cxx:89
 AliFMDDetector.cxx:90
 AliFMDDetector.cxx:91
 AliFMDDetector.cxx:92
 AliFMDDetector.cxx:93
 AliFMDDetector.cxx:94
 AliFMDDetector.cxx:95
 AliFMDDetector.cxx:96
 AliFMDDetector.cxx:97
 AliFMDDetector.cxx:98
 AliFMDDetector.cxx:99
 AliFMDDetector.cxx:100
 AliFMDDetector.cxx:101
 AliFMDDetector.cxx:102
 AliFMDDetector.cxx:103
 AliFMDDetector.cxx:104
 AliFMDDetector.cxx:105
 AliFMDDetector.cxx:106
 AliFMDDetector.cxx:107
 AliFMDDetector.cxx:108
 AliFMDDetector.cxx:109
 AliFMDDetector.cxx:110
 AliFMDDetector.cxx:111
 AliFMDDetector.cxx:112
 AliFMDDetector.cxx:113
 AliFMDDetector.cxx:114
 AliFMDDetector.cxx:115
 AliFMDDetector.cxx:116
 AliFMDDetector.cxx:117
 AliFMDDetector.cxx:118
 AliFMDDetector.cxx:119
 AliFMDDetector.cxx:120
 AliFMDDetector.cxx:121
 AliFMDDetector.cxx:122
 AliFMDDetector.cxx:123
 AliFMDDetector.cxx:124
 AliFMDDetector.cxx:125
 AliFMDDetector.cxx:126
 AliFMDDetector.cxx:127
 AliFMDDetector.cxx:128
 AliFMDDetector.cxx:129
 AliFMDDetector.cxx:130
 AliFMDDetector.cxx:131
 AliFMDDetector.cxx:132
 AliFMDDetector.cxx:133
 AliFMDDetector.cxx:134
 AliFMDDetector.cxx:135
 AliFMDDetector.cxx:136
 AliFMDDetector.cxx:137
 AliFMDDetector.cxx:138
 AliFMDDetector.cxx:139
 AliFMDDetector.cxx:140
 AliFMDDetector.cxx:141
 AliFMDDetector.cxx:142
 AliFMDDetector.cxx:143
 AliFMDDetector.cxx:144
 AliFMDDetector.cxx:145
 AliFMDDetector.cxx:146
 AliFMDDetector.cxx:147
 AliFMDDetector.cxx:148
 AliFMDDetector.cxx:149
 AliFMDDetector.cxx:150
 AliFMDDetector.cxx:151
 AliFMDDetector.cxx:152
 AliFMDDetector.cxx:153
 AliFMDDetector.cxx:154
 AliFMDDetector.cxx:155
 AliFMDDetector.cxx:156
 AliFMDDetector.cxx:157
 AliFMDDetector.cxx:158
 AliFMDDetector.cxx:159
 AliFMDDetector.cxx:160
 AliFMDDetector.cxx:161
 AliFMDDetector.cxx:162
 AliFMDDetector.cxx:163
 AliFMDDetector.cxx:164
 AliFMDDetector.cxx:165
 AliFMDDetector.cxx:166
 AliFMDDetector.cxx:167
 AliFMDDetector.cxx:168
 AliFMDDetector.cxx:169
 AliFMDDetector.cxx:170
 AliFMDDetector.cxx:171
 AliFMDDetector.cxx:172
 AliFMDDetector.cxx:173
 AliFMDDetector.cxx:174
 AliFMDDetector.cxx:175
 AliFMDDetector.cxx:176
 AliFMDDetector.cxx:177
 AliFMDDetector.cxx:178
 AliFMDDetector.cxx:179
 AliFMDDetector.cxx:180
 AliFMDDetector.cxx:181
 AliFMDDetector.cxx:182
 AliFMDDetector.cxx:183
 AliFMDDetector.cxx:184
 AliFMDDetector.cxx:185
 AliFMDDetector.cxx:186
 AliFMDDetector.cxx:187
 AliFMDDetector.cxx:188
 AliFMDDetector.cxx:189
 AliFMDDetector.cxx:190
 AliFMDDetector.cxx:191
 AliFMDDetector.cxx:192
 AliFMDDetector.cxx:193
 AliFMDDetector.cxx:194
 AliFMDDetector.cxx:195
 AliFMDDetector.cxx:196
 AliFMDDetector.cxx:197
 AliFMDDetector.cxx:198
 AliFMDDetector.cxx:199
 AliFMDDetector.cxx:200
 AliFMDDetector.cxx:201
 AliFMDDetector.cxx:202
 AliFMDDetector.cxx:203
 AliFMDDetector.cxx:204
 AliFMDDetector.cxx:205
 AliFMDDetector.cxx:206
 AliFMDDetector.cxx:207
 AliFMDDetector.cxx:208
 AliFMDDetector.cxx:209
 AliFMDDetector.cxx:210
 AliFMDDetector.cxx:211
 AliFMDDetector.cxx:212
 AliFMDDetector.cxx:213
 AliFMDDetector.cxx:214
 AliFMDDetector.cxx:215
 AliFMDDetector.cxx:216
 AliFMDDetector.cxx:217
 AliFMDDetector.cxx:218
 AliFMDDetector.cxx:219
 AliFMDDetector.cxx:220
 AliFMDDetector.cxx:221
 AliFMDDetector.cxx:222
 AliFMDDetector.cxx:223
 AliFMDDetector.cxx:224
 AliFMDDetector.cxx:225
 AliFMDDetector.cxx:226
 AliFMDDetector.cxx:227
 AliFMDDetector.cxx:228
 AliFMDDetector.cxx:229
 AliFMDDetector.cxx:230
 AliFMDDetector.cxx:231
 AliFMDDetector.cxx:232
 AliFMDDetector.cxx:233
 AliFMDDetector.cxx:234
 AliFMDDetector.cxx:235
 AliFMDDetector.cxx:236
 AliFMDDetector.cxx:237
 AliFMDDetector.cxx:238
 AliFMDDetector.cxx:239
 AliFMDDetector.cxx:240
 AliFMDDetector.cxx:241
 AliFMDDetector.cxx:242
 AliFMDDetector.cxx:243
 AliFMDDetector.cxx:244
 AliFMDDetector.cxx:245
 AliFMDDetector.cxx:246
 AliFMDDetector.cxx:247
 AliFMDDetector.cxx:248
 AliFMDDetector.cxx:249
 AliFMDDetector.cxx:250
 AliFMDDetector.cxx:251
 AliFMDDetector.cxx:252
 AliFMDDetector.cxx:253
 AliFMDDetector.cxx:254
 AliFMDDetector.cxx:255
 AliFMDDetector.cxx:256
 AliFMDDetector.cxx:257
 AliFMDDetector.cxx:258
 AliFMDDetector.cxx:259
 AliFMDDetector.cxx:260
 AliFMDDetector.cxx:261
 AliFMDDetector.cxx:262
 AliFMDDetector.cxx:263
 AliFMDDetector.cxx:264
 AliFMDDetector.cxx:265
 AliFMDDetector.cxx:266
 AliFMDDetector.cxx:267
 AliFMDDetector.cxx:268
 AliFMDDetector.cxx:269
 AliFMDDetector.cxx:270
 AliFMDDetector.cxx:271
 AliFMDDetector.cxx:272
 AliFMDDetector.cxx:273
 AliFMDDetector.cxx:274
 AliFMDDetector.cxx:275
 AliFMDDetector.cxx:276
 AliFMDDetector.cxx:277
 AliFMDDetector.cxx:278
 AliFMDDetector.cxx:279
 AliFMDDetector.cxx:280
 AliFMDDetector.cxx:281
 AliFMDDetector.cxx:282
 AliFMDDetector.cxx:283
 AliFMDDetector.cxx:284
 AliFMDDetector.cxx:285
 AliFMDDetector.cxx:286
 AliFMDDetector.cxx:287
 AliFMDDetector.cxx:288
 AliFMDDetector.cxx:289
 AliFMDDetector.cxx:290
 AliFMDDetector.cxx:291
 AliFMDDetector.cxx:292
 AliFMDDetector.cxx:293
 AliFMDDetector.cxx:294
 AliFMDDetector.cxx:295
 AliFMDDetector.cxx:296
 AliFMDDetector.cxx:297
 AliFMDDetector.cxx:298
 AliFMDDetector.cxx:299
 AliFMDDetector.cxx:300
 AliFMDDetector.cxx:301
 AliFMDDetector.cxx:302
 AliFMDDetector.cxx:303
 AliFMDDetector.cxx:304
 AliFMDDetector.cxx:305
 AliFMDDetector.cxx:306
 AliFMDDetector.cxx:307
 AliFMDDetector.cxx:308
 AliFMDDetector.cxx:309
 AliFMDDetector.cxx:310
 AliFMDDetector.cxx:311
 AliFMDDetector.cxx:312
 AliFMDDetector.cxx:313
 AliFMDDetector.cxx:314
 AliFMDDetector.cxx:315
 AliFMDDetector.cxx:316
 AliFMDDetector.cxx:317
 AliFMDDetector.cxx:318
 AliFMDDetector.cxx:319
 AliFMDDetector.cxx:320
 AliFMDDetector.cxx:321
 AliFMDDetector.cxx:322
 AliFMDDetector.cxx:323
 AliFMDDetector.cxx:324
 AliFMDDetector.cxx:325
 AliFMDDetector.cxx:326
 AliFMDDetector.cxx:327
 AliFMDDetector.cxx:328
 AliFMDDetector.cxx:329
 AliFMDDetector.cxx:330
 AliFMDDetector.cxx:331
 AliFMDDetector.cxx:332
 AliFMDDetector.cxx:333
 AliFMDDetector.cxx:334
 AliFMDDetector.cxx:335
 AliFMDDetector.cxx:336
 AliFMDDetector.cxx:337
 AliFMDDetector.cxx:338
 AliFMDDetector.cxx:339
 AliFMDDetector.cxx:340
 AliFMDDetector.cxx:341
 AliFMDDetector.cxx:342
 AliFMDDetector.cxx:343
 AliFMDDetector.cxx:344
 AliFMDDetector.cxx:345
 AliFMDDetector.cxx:346
 AliFMDDetector.cxx:347
 AliFMDDetector.cxx:348
 AliFMDDetector.cxx:349
 AliFMDDetector.cxx:350
 AliFMDDetector.cxx:351
 AliFMDDetector.cxx:352
 AliFMDDetector.cxx:353
 AliFMDDetector.cxx:354
 AliFMDDetector.cxx:355
 AliFMDDetector.cxx:356
 AliFMDDetector.cxx:357
 AliFMDDetector.cxx:358
 AliFMDDetector.cxx:359
 AliFMDDetector.cxx:360
 AliFMDDetector.cxx:361
 AliFMDDetector.cxx:362
 AliFMDDetector.cxx:363
 AliFMDDetector.cxx:364
 AliFMDDetector.cxx:365
 AliFMDDetector.cxx:366
 AliFMDDetector.cxx:367
 AliFMDDetector.cxx:368
 AliFMDDetector.cxx:369
 AliFMDDetector.cxx:370
 AliFMDDetector.cxx:371
 AliFMDDetector.cxx:372
 AliFMDDetector.cxx:373
 AliFMDDetector.cxx:374
 AliFMDDetector.cxx:375
 AliFMDDetector.cxx:376
 AliFMDDetector.cxx:377
 AliFMDDetector.cxx:378
 AliFMDDetector.cxx:379
 AliFMDDetector.cxx:380
 AliFMDDetector.cxx:381
 AliFMDDetector.cxx:382
 AliFMDDetector.cxx:383
 AliFMDDetector.cxx:384
 AliFMDDetector.cxx:385
 AliFMDDetector.cxx:386
 AliFMDDetector.cxx:387
 AliFMDDetector.cxx:388
 AliFMDDetector.cxx:389
 AliFMDDetector.cxx:390
 AliFMDDetector.cxx:391
 AliFMDDetector.cxx:392
 AliFMDDetector.cxx:393
 AliFMDDetector.cxx:394
 AliFMDDetector.cxx:395
 AliFMDDetector.cxx:396
 AliFMDDetector.cxx:397
 AliFMDDetector.cxx:398
 AliFMDDetector.cxx:399
 AliFMDDetector.cxx:400
 AliFMDDetector.cxx:401
 AliFMDDetector.cxx:402
 AliFMDDetector.cxx:403
 AliFMDDetector.cxx:404
 AliFMDDetector.cxx:405
 AliFMDDetector.cxx:406
 AliFMDDetector.cxx:407
 AliFMDDetector.cxx:408
 AliFMDDetector.cxx:409
 AliFMDDetector.cxx:410
 AliFMDDetector.cxx:411
 AliFMDDetector.cxx:412
 AliFMDDetector.cxx:413
 AliFMDDetector.cxx:414
 AliFMDDetector.cxx:415
 AliFMDDetector.cxx:416
 AliFMDDetector.cxx:417
 AliFMDDetector.cxx:418
 AliFMDDetector.cxx:419
 AliFMDDetector.cxx:420
 AliFMDDetector.cxx:421
 AliFMDDetector.cxx:422
 AliFMDDetector.cxx:423
 AliFMDDetector.cxx:424
 AliFMDDetector.cxx:425
 AliFMDDetector.cxx:426
 AliFMDDetector.cxx:427
 AliFMDDetector.cxx:428
 AliFMDDetector.cxx:429
 AliFMDDetector.cxx:430
 AliFMDDetector.cxx:431
 AliFMDDetector.cxx:432
 AliFMDDetector.cxx:433
 AliFMDDetector.cxx:434
 AliFMDDetector.cxx:435
 AliFMDDetector.cxx:436
 AliFMDDetector.cxx:437
 AliFMDDetector.cxx:438
 AliFMDDetector.cxx:439
 AliFMDDetector.cxx:440
 AliFMDDetector.cxx:441
 AliFMDDetector.cxx:442
 AliFMDDetector.cxx:443
 AliFMDDetector.cxx:444
 AliFMDDetector.cxx:445
 AliFMDDetector.cxx:446
 AliFMDDetector.cxx:447
 AliFMDDetector.cxx:448
 AliFMDDetector.cxx:449
 AliFMDDetector.cxx:450
 AliFMDDetector.cxx:451
 AliFMDDetector.cxx:452
 AliFMDDetector.cxx:453
 AliFMDDetector.cxx:454
 AliFMDDetector.cxx:455
 AliFMDDetector.cxx:456
 AliFMDDetector.cxx:457
 AliFMDDetector.cxx:458
 AliFMDDetector.cxx:459
 AliFMDDetector.cxx:460
 AliFMDDetector.cxx:461
 AliFMDDetector.cxx:462
 AliFMDDetector.cxx:463
 AliFMDDetector.cxx:464
 AliFMDDetector.cxx:465
 AliFMDDetector.cxx:466
 AliFMDDetector.cxx:467
 AliFMDDetector.cxx:468
 AliFMDDetector.cxx:469
 AliFMDDetector.cxx:470
 AliFMDDetector.cxx:471
 AliFMDDetector.cxx:472
 AliFMDDetector.cxx:473
 AliFMDDetector.cxx:474
 AliFMDDetector.cxx:475
 AliFMDDetector.cxx:476
 AliFMDDetector.cxx:477
 AliFMDDetector.cxx:478
 AliFMDDetector.cxx:479
 AliFMDDetector.cxx:480
 AliFMDDetector.cxx:481
 AliFMDDetector.cxx:482
 AliFMDDetector.cxx:483
 AliFMDDetector.cxx:484
 AliFMDDetector.cxx:485
 AliFMDDetector.cxx:486
 AliFMDDetector.cxx:487
 AliFMDDetector.cxx:488
 AliFMDDetector.cxx:489
 AliFMDDetector.cxx:490
 AliFMDDetector.cxx:491
 AliFMDDetector.cxx:492
 AliFMDDetector.cxx:493
 AliFMDDetector.cxx:494
 AliFMDDetector.cxx:495
 AliFMDDetector.cxx:496
 AliFMDDetector.cxx:497
 AliFMDDetector.cxx:498
 AliFMDDetector.cxx:499
 AliFMDDetector.cxx:500
 AliFMDDetector.cxx:501
 AliFMDDetector.cxx:502
 AliFMDDetector.cxx:503
 AliFMDDetector.cxx:504
 AliFMDDetector.cxx:505
 AliFMDDetector.cxx:506
 AliFMDDetector.cxx:507
 AliFMDDetector.cxx:508
 AliFMDDetector.cxx:509
 AliFMDDetector.cxx:510
 AliFMDDetector.cxx:511
 AliFMDDetector.cxx:512
 AliFMDDetector.cxx:513
 AliFMDDetector.cxx:514
 AliFMDDetector.cxx:515
 AliFMDDetector.cxx:516
 AliFMDDetector.cxx:517
 AliFMDDetector.cxx:518
 AliFMDDetector.cxx:519
 AliFMDDetector.cxx:520
 AliFMDDetector.cxx:521
 AliFMDDetector.cxx:522
 AliFMDDetector.cxx:523
 AliFMDDetector.cxx:524
 AliFMDDetector.cxx:525
 AliFMDDetector.cxx:526
 AliFMDDetector.cxx:527
 AliFMDDetector.cxx:528
 AliFMDDetector.cxx:529
 AliFMDDetector.cxx:530
 AliFMDDetector.cxx:531
 AliFMDDetector.cxx:532
 AliFMDDetector.cxx:533
 AliFMDDetector.cxx:534
 AliFMDDetector.cxx:535
 AliFMDDetector.cxx:536
 AliFMDDetector.cxx:537
 AliFMDDetector.cxx:538
 AliFMDDetector.cxx:539
 AliFMDDetector.cxx:540
 AliFMDDetector.cxx:541
 AliFMDDetector.cxx:542
 AliFMDDetector.cxx:543
 AliFMDDetector.cxx:544
 AliFMDDetector.cxx:545
 AliFMDDetector.cxx:546
 AliFMDDetector.cxx:547
 AliFMDDetector.cxx:548
 AliFMDDetector.cxx:549
 AliFMDDetector.cxx:550
 AliFMDDetector.cxx:551
 AliFMDDetector.cxx:552
 AliFMDDetector.cxx:553
 AliFMDDetector.cxx:554
 AliFMDDetector.cxx:555
 AliFMDDetector.cxx:556
 AliFMDDetector.cxx:557
 AliFMDDetector.cxx:558
 AliFMDDetector.cxx:559
 AliFMDDetector.cxx:560
 AliFMDDetector.cxx:561
 AliFMDDetector.cxx:562
 AliFMDDetector.cxx:563
 AliFMDDetector.cxx:564
 AliFMDDetector.cxx:565
 AliFMDDetector.cxx:566
 AliFMDDetector.cxx:567
 AliFMDDetector.cxx:568
 AliFMDDetector.cxx:569
 AliFMDDetector.cxx:570
 AliFMDDetector.cxx:571
 AliFMDDetector.cxx:572
 AliFMDDetector.cxx:573
 AliFMDDetector.cxx:574
 AliFMDDetector.cxx:575
 AliFMDDetector.cxx:576
 AliFMDDetector.cxx:577
 AliFMDDetector.cxx:578
 AliFMDDetector.cxx:579
 AliFMDDetector.cxx:580
 AliFMDDetector.cxx:581
 AliFMDDetector.cxx:582
 AliFMDDetector.cxx:583
 AliFMDDetector.cxx:584
 AliFMDDetector.cxx:585
 AliFMDDetector.cxx:586
 AliFMDDetector.cxx:587
 AliFMDDetector.cxx:588
 AliFMDDetector.cxx:589
 AliFMDDetector.cxx:590
 AliFMDDetector.cxx:591
 AliFMDDetector.cxx:592
 AliFMDDetector.cxx:593
 AliFMDDetector.cxx:594
 AliFMDDetector.cxx:595
 AliFMDDetector.cxx:596
 AliFMDDetector.cxx:597
 AliFMDDetector.cxx:598
 AliFMDDetector.cxx:599
 AliFMDDetector.cxx:600
 AliFMDDetector.cxx:601
 AliFMDDetector.cxx:602
 AliFMDDetector.cxx:603
 AliFMDDetector.cxx:604
 AliFMDDetector.cxx:605
 AliFMDDetector.cxx:606
 AliFMDDetector.cxx:607
 AliFMDDetector.cxx:608
 AliFMDDetector.cxx:609
 AliFMDDetector.cxx:610
 AliFMDDetector.cxx:611
 AliFMDDetector.cxx:612
 AliFMDDetector.cxx:613
 AliFMDDetector.cxx:614
 AliFMDDetector.cxx:615