ROOT logo
/**************************************************************************
* Copyright(c) 1998-1999, 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.                  *
**************************************************************************/

//====================================================================================================================================================
//
//      Class for the description of the structure for the planes of the ALICE Muon Forward Tracker
//
//      Contact author: antonio.uras@cern.ch
//
//====================================================================================================================================================

#include "TNamed.h"
#include "THnSparse.h"
#include "TClonesArray.h"
#include "TAxis.h"
#include "TPave.h"
#include "TCanvas.h"
#include "TH2D.h"
#include "TEllipse.h"
#include "TMath.h"
#include "AliLog.h"
#include "AliMFTConstants.h"
#include "AliMFTPlane.h"

const Double_t AliMFTPlane::fActiveSuperposition = AliMFTConstants::fActiveSuperposition;
const Double_t AliMFTPlane::fHeightActive        = AliMFTConstants::fHeightActive;
const Double_t AliMFTPlane::fHeightReadout       = AliMFTConstants::fHeightReadout;
const Double_t AliMFTPlane::fSupportExtMargin    = AliMFTConstants::fSupportExtMargin;

ClassImp(AliMFTPlane)

//====================================================================================================================================================

AliMFTPlane::AliMFTPlane():
  TNamed(),
  fPlaneNumber(-1),
  fZCenter(0), 
  fRMinSupport(0), 
  fRMax(0),
  fRMaxSupport(0),
  fPixelSizeX(0), 
  fPixelSizeY(0), 
  fThicknessActive(0), 
  fThicknessSupport(0), 
  fThicknessReadout(0),
  fZCenterActiveFront(0),
  fZCenterActiveBack(0),
  fEquivalentSilicon(0),
  fEquivalentSiliconBeforeFront(0),
  fEquivalentSiliconBeforeBack(0),
  fActiveElements(0),
  fReadoutElements(0),
  fSupportElements(0),
  fHasPixelRectangularPatternAlongY(kFALSE),
  fPlaneIsOdd(kFALSE)
{

  // default constructor

}

//====================================================================================================================================================

AliMFTPlane::AliMFTPlane(const Char_t *name, const Char_t *title):
  TNamed(name, title),
  fPlaneNumber(-1),
  fZCenter(0), 
  fRMinSupport(0), 
  fRMax(0),
  fRMaxSupport(0),
  fPixelSizeX(0), 
  fPixelSizeY(0), 
  fThicknessActive(0), 
  fThicknessSupport(0), 
  fThicknessReadout(0),
  fZCenterActiveFront(0),
  fZCenterActiveBack(0),
  fEquivalentSilicon(0),
  fEquivalentSiliconBeforeFront(0),
  fEquivalentSiliconBeforeBack(0),
  fActiveElements(0),
  fReadoutElements(0),
  fSupportElements(0),
  fHasPixelRectangularPatternAlongY(kFALSE),
  fPlaneIsOdd(kFALSE)
{

  // constructor
  fActiveElements  = new TClonesArray("THnSparseC");
  fReadoutElements = new TClonesArray("THnSparseC");
  fSupportElements = new TClonesArray("THnSparseC");
  fActiveElements->SetOwner(kTRUE);
  fReadoutElements->SetOwner(kTRUE);
  fSupportElements->SetOwner(kTRUE);
  
}

//====================================================================================================================================================

AliMFTPlane::AliMFTPlane(const AliMFTPlane& plane):
  TNamed(plane),
  fPlaneNumber(plane.fPlaneNumber),
  fZCenter(plane.fZCenter), 
  fRMinSupport(plane.fRMinSupport), 
  fRMax(plane.fRMax),
  fRMaxSupport(plane.fRMaxSupport),
  fPixelSizeX(plane.fPixelSizeX), 
  fPixelSizeY(plane.fPixelSizeY), 
  fThicknessActive(plane.fThicknessActive), 
  fThicknessSupport(plane.fThicknessSupport), 
  fThicknessReadout(plane.fThicknessReadout),
  fZCenterActiveFront(plane.fZCenterActiveFront),
  fZCenterActiveBack(plane.fZCenterActiveBack),
  fEquivalentSilicon(plane.fEquivalentSilicon),
  fEquivalentSiliconBeforeFront(plane.fEquivalentSiliconBeforeFront),
  fEquivalentSiliconBeforeBack(plane.fEquivalentSiliconBeforeBack),
  fActiveElements(0),
  fReadoutElements(0),
  fSupportElements(0),
  fHasPixelRectangularPatternAlongY(plane.fHasPixelRectangularPatternAlongY),
  fPlaneIsOdd(plane.fPlaneIsOdd)
{

  // copy constructor
  fActiveElements  = new TClonesArray(*(plane.fActiveElements));
  fActiveElements  -> SetOwner(kTRUE);
  fReadoutElements = new TClonesArray(*(plane.fReadoutElements));
  fReadoutElements -> SetOwner(kTRUE);
  fSupportElements = new TClonesArray(*(plane.fSupportElements));
  fSupportElements -> SetOwner(kTRUE);

	
}

//====================================================================================================================================================

AliMFTPlane::~AliMFTPlane() {

  AliInfo("Delete AliMFTPlane");
  if(fActiveElements) fActiveElements->Delete();
  delete fActiveElements; 
  if(fReadoutElements) fReadoutElements->Delete();
  delete fReadoutElements; 
  if(fSupportElements) fSupportElements->Delete();
  delete fSupportElements; 

}

//====================================================================================================================================================

void AliMFTPlane::Clear(const Option_t* /*opt*/) {

  AliInfo("Clear AliMFTPlane");
  if(fActiveElements) fActiveElements->Delete();
  delete fActiveElements; fActiveElements=NULL;
  if(fReadoutElements) fReadoutElements->Delete();
  delete fReadoutElements;  fReadoutElements=NULL; 
  if(fSupportElements) fSupportElements->Delete();
  delete fSupportElements;   fSupportElements=NULL;

}

//====================================================================================================================================================

AliMFTPlane& AliMFTPlane::operator=(const AliMFTPlane& plane) {

  // Assignment operator
  
  // check assignement to self
  if (this != &plane) {
    
    // base class assignement
    TNamed::operator=(plane);
    
    // clear memory
    Clear("");
    
    fPlaneNumber                      = plane.fPlaneNumber;
    fZCenter                          = plane.fZCenter; 
    fRMinSupport                      = plane.fRMinSupport; 
    fRMax                             = plane.fRMax;
    fRMaxSupport                      = plane.fRMaxSupport;
    fPixelSizeX                       = plane.fPixelSizeX;
    fPixelSizeY                       = plane.fPixelSizeY; 
    fThicknessActive                  = plane.fThicknessActive; 
    fThicknessSupport                 = plane.fThicknessSupport; 
    fThicknessReadout                 = plane.fThicknessReadout;
    fZCenterActiveFront               = plane.fZCenterActiveFront;
    fZCenterActiveBack                = plane.fZCenterActiveBack;
    fEquivalentSilicon                = plane.fEquivalentSilicon;
    fEquivalentSiliconBeforeFront     = plane.fEquivalentSiliconBeforeFront;
    fEquivalentSiliconBeforeBack      = plane.fEquivalentSiliconBeforeBack;
    fActiveElements = new TClonesArray(*(plane.fActiveElements));
    fActiveElements -> SetOwner(kTRUE);
    fReadoutElements = new TClonesArray(*(plane.fReadoutElements));
    fReadoutElements -> SetOwner(kTRUE);
    fSupportElements = new TClonesArray(*(plane.fSupportElements));
    fSupportElements -> SetOwner(kTRUE);
    fHasPixelRectangularPatternAlongY = plane.fHasPixelRectangularPatternAlongY;
    fPlaneIsOdd                       = plane.fPlaneIsOdd;

  }
  
  return *this;
  
}

//====================================================================================================================================================

Bool_t AliMFTPlane::Init(Int_t    planeNumber,
			 Double_t zCenter, 
			 Double_t rMin, 
			 Double_t rMax, 
			 Double_t pixelSizeX, 
			 Double_t pixelSizeY, 
			 Double_t thicknessActive, 
			 Double_t thicknessSupport, 
			 Double_t thicknessReadout,
			 Bool_t   hasPixelRectangularPatternAlongY) {

  AliDebug(1, Form("Initializing Plane Structure for Plane %s", GetName()));

  fPlaneNumber      = planeNumber;
  fZCenter          = zCenter;
  fRMinSupport      = rMin;
  fRMax             = rMax;
  fPixelSizeX       = pixelSizeX;
  fPixelSizeY       = pixelSizeY;
  fThicknessActive  = thicknessActive;
  fThicknessSupport = thicknessSupport;
  fThicknessReadout = thicknessReadout;

  fHasPixelRectangularPatternAlongY = hasPixelRectangularPatternAlongY;

  fZCenterActiveFront = fZCenter - 0.5*fThicknessSupport - 0.5*fThicknessActive;
  fZCenterActiveBack  = fZCenter + 0.5*fThicknessSupport + 0.5*fThicknessActive;

  if (fRMax < fRMinSupport+fHeightActive) fRMax = fRMinSupport + fHeightActive;

  Int_t nLaddersWithinPipe = Int_t(fRMinSupport/(fHeightActive-fActiveSuperposition));
  if (fRMinSupport-nLaddersWithinPipe*(fHeightActive-fActiveSuperposition) > 0.5*(fHeightActive-2*fActiveSuperposition)) fPlaneIsOdd = kTRUE;
  else fPlaneIsOdd = kFALSE;

  fRMax = fRMinSupport + (fHeightActive-fActiveSuperposition) * 
    (Int_t((fRMax-fRMinSupport-fHeightActive)/(fHeightActive-fActiveSuperposition))+1) + fHeightActive;

  fRMaxSupport = TMath::Sqrt(fHeightActive*(2.*rMax-fHeightActive) + fRMax*fRMax) + fSupportExtMargin;
   
  return kTRUE;
 
}

//====================================================================================================================================================

Bool_t AliMFTPlane::CreateStructure() {

  Int_t nBins[3]={0};
  Double_t minPosition[3]={0}, maxPosition[3]={0};
  
  // ------------------- det elements: active + readout ----------------------------------

  Double_t lowEdgeActive = -1.*fRMax;
  Double_t supEdgeActive = lowEdgeActive + fHeightActive;
  Double_t zMinFront = fZCenter - 0.5*fThicknessSupport - fThicknessActive;
  Double_t zMinBack  = fZCenter + 0.5*fThicknessSupport;
  Double_t zMin = 0.;
  Bool_t isFront = kTRUE;
  
  while (supEdgeActive < 0.5*(fHeightActive+fHeightReadout)) {
    
    Double_t extLimitAtLowEdgeActive = TMath::Sqrt((fRMax-TMath::Abs(lowEdgeActive)) * TMath::Abs(2*fRMax - (fRMax-TMath::Abs(lowEdgeActive))));
    Double_t extLimitAtSupEdgeActive = TMath::Sqrt((fRMax-TMath::Abs(supEdgeActive)) * TMath::Abs(2*fRMax - (fRMax-TMath::Abs(supEdgeActive))));

    // creating new det element: active + readout
    
    Double_t extLimitDetElem = TMath::Max(extLimitAtLowEdgeActive, extLimitAtSupEdgeActive);
    
    if (supEdgeActive<-1.*fRMinSupport+0.01 || lowEdgeActive>1.*fRMinSupport-0.01) {     // single element covering the row
      
      nBins[0] = TMath::Nint(2.*extLimitDetElem/fPixelSizeX);
      nBins[1] = TMath::Nint(fHeightActive/fPixelSizeY);
      nBins[2] = 1;

      // element below the pipe
      
      if (isFront) zMin = zMinFront;
      else         zMin = zMinBack;

      minPosition[0] = -1.*extLimitDetElem;
      minPosition[1] = lowEdgeActive;
      minPosition[2] = zMin;
      
      maxPosition[0] = +1.*extLimitDetElem;
      maxPosition[1] = supEdgeActive;
      maxPosition[2] = zMin+fThicknessActive; 
      
      new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 3, nBins, minPosition, maxPosition);

      minPosition[1] = lowEdgeActive-fHeightReadout;
      maxPosition[1] = lowEdgeActive;
      
      new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   3, nBins, minPosition, maxPosition);

      // specular element above the pipe

      if (fPlaneIsOdd) {
	if (isFront) zMin = zMinBack;
	else         zMin = zMinFront;
      }

      minPosition[0] = -1.*extLimitDetElem;
      minPosition[1] = -1.*supEdgeActive;
      minPosition[2] = zMin;
      
      maxPosition[0] = +1.*extLimitDetElem;
      maxPosition[1] = -1.*lowEdgeActive;
      maxPosition[2] = zMin+fThicknessActive; 
      
      new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 3, nBins, minPosition, maxPosition);

      minPosition[1] = -1.*lowEdgeActive;
      maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);

      new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   3, nBins, minPosition, maxPosition);

    }
    
    else {     // two elements covering the row
      
      Double_t intLimitAtLowEdge = 0., intLimitAtSupEdge = 0.;
      if (fRMinSupport-TMath::Abs(lowEdgeActive)>0.) intLimitAtLowEdge = TMath::Sqrt((fRMinSupport-TMath::Abs(lowEdgeActive)) * TMath::Abs(2*fRMinSupport - (fRMinSupport-TMath::Abs(lowEdgeActive))));
      if (fRMinSupport-TMath::Abs(supEdgeActive)>0.) intLimitAtSupEdge = TMath::Sqrt((fRMinSupport-TMath::Abs(supEdgeActive)) * TMath::Abs(2*fRMinSupport - (fRMinSupport-TMath::Abs(supEdgeActive))));
      Double_t intLimitDetElem = TMath::Max(intLimitAtLowEdge, intLimitAtSupEdge);
      
      nBins[0] = TMath::Nint((extLimitDetElem-intLimitDetElem)/fPixelSizeX);
      nBins[1] = TMath::Nint(fHeightActive/fPixelSizeY);
      nBins[2] = 1;
      
      // left element: y < 0
      
      if (isFront) zMin = zMinFront;
      else         zMin = zMinBack;

      minPosition[0] = -1.*extLimitDetElem;
      minPosition[1] = lowEdgeActive;
      minPosition[2] = zMin;
      
      maxPosition[0] = -1.*intLimitDetElem;
      maxPosition[1] = supEdgeActive;
      maxPosition[2] = zMin+fThicknessActive; 
      
      new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 3, nBins, minPosition, maxPosition);	
      
      minPosition[1] = lowEdgeActive-fHeightReadout;
      maxPosition[1] = lowEdgeActive;
      
      new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   3, nBins, minPosition, maxPosition);

      // left element: y > 0
      
      if (supEdgeActive < 0.5*fHeightActive) {
	
      	if (fPlaneIsOdd) {
      	  if (isFront) zMin = zMinBack;
      	  else         zMin = zMinFront;
      	}
	
      	minPosition[0] = -1.*extLimitDetElem;
      	minPosition[1] = -1.*supEdgeActive;
      	minPosition[2] = zMin;
	
      	maxPosition[0] = -1.*intLimitDetElem;
      	maxPosition[1] = -1.*lowEdgeActive;
      	maxPosition[2] = zMin+fThicknessActive; 
	
      	new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
      									   Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
      									   3, nBins, minPosition, maxPosition);	
	
      	minPosition[1] = -1.*lowEdgeActive;
      	maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);
	
      	new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
      									     Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
      									     3, nBins, minPosition, maxPosition);
      
      }

      // right element: y < 0
      
      if (isFront) zMin = zMinFront;
      else         zMin = zMinBack;

      minPosition[0] = +1.*intLimitDetElem;
      minPosition[1] = lowEdgeActive;
      minPosition[2] = zMin;
      
      maxPosition[0] = +1.*extLimitDetElem;
      maxPosition[1] = supEdgeActive;
      maxPosition[2] = zMin+fThicknessActive; 
      
      new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
									 3, nBins, minPosition, maxPosition);	
      
      minPosition[1] = lowEdgeActive-fHeightReadout;
      maxPosition[1] = lowEdgeActive;

      new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
									   3, nBins, minPosition, maxPosition);

      // right element: y > 0
      
      if (supEdgeActive < 0.5*fHeightActive) {

      	if (fPlaneIsOdd) {
      	  if (isFront) zMin = zMinBack;
      	  else         zMin = zMinFront;
      	}
	
      	minPosition[0] = +1.*intLimitDetElem;
      	minPosition[1] = -1.*supEdgeActive;
      	minPosition[2] = zMin;
	
      	maxPosition[0] = +1.*extLimitDetElem;
      	maxPosition[1] = -1.*lowEdgeActive;
      	maxPosition[2] = zMin+fThicknessActive; 
	
      	new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
      									   Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
      									   3, nBins, minPosition, maxPosition);	
	
      	minPosition[1] = -1.*lowEdgeActive;
      	maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);
	
      	new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
      									     Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
      									     3, nBins, minPosition, maxPosition);

      }
      
    }
    
    lowEdgeActive += fHeightActive - fActiveSuperposition;
    supEdgeActive = lowEdgeActive + fHeightActive;
    isFront = !isFront;
    
  }
  
  // ------------------- support element -------------------------------------------------
  
  nBins[0] = 1;
  nBins[1] = 1;
  nBins[2] = 1;
  
  minPosition[0] = -1.*fRMaxSupport;
  minPosition[1] = -1.*fRMaxSupport;
  minPosition[2] = fZCenter - 0.5*fThicknessSupport;
  
  maxPosition[0] = +1.*fRMaxSupport;
  maxPosition[1] = +1.*fRMaxSupport;
  maxPosition[2] = fZCenter + 0.5*fThicknessSupport;
  
  new ((*fSupportElements)[fSupportElements->GetEntries()]) THnSparseC(Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
								       Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
								       3, nBins, minPosition, maxPosition);

  // --------------------------------------------------------------------------------------

  AliDebug(1, Form("Structure completed for MFT plane %s", GetName()));

  return kTRUE;
  
}

//====================================================================================================================================================

THnSparseC* AliMFTPlane::GetActiveElement(Int_t id) {

  if (id<0 || id>=GetNActiveElements()) return NULL;
  else return (THnSparseC*) fActiveElements->At(id);

}

//====================================================================================================================================================

THnSparseC* AliMFTPlane::GetReadoutElement(Int_t id) {

  if (id<0 || id>=GetNReadoutElements()) return NULL;
  else return (THnSparseC*) fReadoutElements->At(id);

}

//====================================================================================================================================================

THnSparseC* AliMFTPlane::GetSupportElement(Int_t id) {

  if (id<0 || id>=GetNSupportElements()) return NULL;
  else return (THnSparseC*) fSupportElements->At(id);

}

//====================================================================================================================================================

void AliMFTPlane::DrawPlane(Option_t *opt) {

  // ------------------- "FRONT" option ------------------

  if (!strcmp(opt, "front")) {

    TCanvas *cnv = new TCanvas("cnv", GetName(), 900, 900);
    cnv->Draw();

    TH2D *h = new TH2D("tmp", GetName(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(0)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(0)->GetXmax(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(1)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(1)->GetXmax());
    h->SetXTitle("x [cm]");
    h->SetYTitle("y [cm]");
    h->Draw();

    AliInfo("Created hist");

    TEllipse *supportExt = new TEllipse(0.0, 0.0, fRMaxSupport, fRMaxSupport);
    TEllipse *supportInt = new TEllipse(0.0, 0.0, fRMinSupport, fRMinSupport);
    supportExt->SetFillColor(kCyan-10);
    supportExt -> Draw("same");
    supportInt -> Draw("same");

    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      if (!IsFront(GetActiveElement(iEl))) continue;
      TPave *pave = new TPave(GetActiveElement(iEl)->GetAxis(0)->GetXmin(), 
			      GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
			      GetActiveElement(iEl)->GetAxis(0)->GetXmax(), 
			      GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
      pave -> SetFillColor(kGreen);
      pave -> Draw("same");
    }

    for (Int_t iEl=0; iEl<GetNReadoutElements(); iEl++) {
      if (!IsFront(GetReadoutElement(iEl))) continue;
      TPave *pave = new TPave(GetReadoutElement(iEl)->GetAxis(0)->GetXmin(), 
			      GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
			      GetReadoutElement(iEl)->GetAxis(0)->GetXmax(), 
			      GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
      pave -> SetFillColor(kRed);
      pave -> Draw("same");
    }

  }
    
  // ------------------- "BACK" option ------------------

  else if (!strcmp(opt, "back")) {

    TCanvas *cnv = new TCanvas("cnv", GetName(), 900, 900);
    cnv->Draw();
    
    TH2D *h = new TH2D("tmp", GetName(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(0)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(0)->GetXmax(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(1)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(1)->GetXmax());
    h->SetXTitle("x [cm]");
    h->SetYTitle("y [cm]");
    h->Draw();

    TEllipse *supportExt = new TEllipse(0.0, 0.0, fRMaxSupport, fRMaxSupport);
    TEllipse *supportInt = new TEllipse(0.0, 0.0, fRMinSupport, fRMinSupport);
    supportExt -> SetFillColor(kCyan-10);
    supportExt -> Draw("same");
    supportInt -> Draw("same");

    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      if (IsFront(GetActiveElement(iEl))) continue;
      TPave *pave = new TPave(GetActiveElement(iEl)->GetAxis(0)->GetXmin(), 
			      GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
			      GetActiveElement(iEl)->GetAxis(0)->GetXmax(), 
			      GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
      pave -> SetFillColor(kGreen);
      pave -> Draw("same");
    }

    for (Int_t iEl=0; iEl<GetNReadoutElements(); iEl++) {
      if (IsFront(GetReadoutElement(iEl))) continue;
      TPave *pave = new TPave(GetReadoutElement(iEl)->GetAxis(0)->GetXmin(), 
			      GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
			      GetReadoutElement(iEl)->GetAxis(0)->GetXmax(), 
			      GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
      pave -> SetFillColor(kRed);
      pave -> Draw("same");
    }

  }

  // ------------------- "BOTH" option ------------------

  else if (!strcmp(opt, "both")) {

    TCanvas *cnv = new TCanvas("cnv", GetName(), 900, 900);
    cnv->Draw();

    TH2D *h = new TH2D("tmp", GetName(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(0)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(0)->GetXmax(), 
		       1, 1.1*GetSupportElement(0)->GetAxis(1)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(1)->GetXmax());
    h->SetXTitle("x [cm]");
    h->SetYTitle("y [cm]");
    h->Draw();

    TEllipse *supportExt = new TEllipse(0.0, 0.0, fRMaxSupport, fRMaxSupport);
    TEllipse *supportInt = new TEllipse(0.0, 0.0, fRMinSupport, fRMinSupport);
    supportExt -> SetFillColor(kCyan-10);
    supportExt -> Draw("same");
    supportInt -> Draw("same");

    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      if (IsFront(GetActiveElement(iEl)) && GetActiveElement(iEl)->GetAxis(0)->GetXmin()<0.) {
	TPave *pave = new TPave(GetActiveElement(iEl)->GetAxis(0)->GetXmin(), 
				GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
				TMath::Min(GetActiveElement(iEl)->GetAxis(0)->GetXmax(), 0.),
				GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
	pave -> SetFillColor(kGreen);
	pave -> Draw("same");
      }
      else if (!IsFront(GetActiveElement(iEl)) && GetActiveElement(iEl)->GetAxis(0)->GetXmax()>0.) {
	TPave *pave = new TPave(TMath::Max(GetActiveElement(iEl)->GetAxis(0)->GetXmin(), 0.), 
				GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
				GetActiveElement(iEl)->GetAxis(0)->GetXmax(), 
				GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
	pave -> SetFillColor(kGreen);
	pave -> Draw("same");
      }
    }
    
    for (Int_t iEl=0; iEl<GetNReadoutElements(); iEl++) {
      if (IsFront(GetReadoutElement(iEl)) && GetReadoutElement(iEl)->GetAxis(0)->GetXmin()<0.) {
	TPave *pave = new TPave(GetReadoutElement(iEl)->GetAxis(0)->GetXmin(), 
				GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
				TMath::Min(GetReadoutElement(iEl)->GetAxis(0)->GetXmax(), 0.), 
				GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
	pave -> SetFillColor(kRed);
	pave -> Draw("same");
      }
      else if (!IsFront(GetReadoutElement(iEl)) && GetReadoutElement(iEl)->GetAxis(0)->GetXmax()>0.) {
	TPave *pave = new TPave(TMath::Max(GetReadoutElement(iEl)->GetAxis(0)->GetXmin(), 0.),  
				GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
				GetReadoutElement(iEl)->GetAxis(0)->GetXmax(), 
				GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
	pave -> SetFillColor(kRed);
	pave -> Draw("same");
      }
    }
    
  }

  // ------------------- "PROFILE" option ------------------

  else if (!strcmp(opt, "profile")) {

    TCanvas *cnv = new TCanvas("cnv", GetName(), 300, 900);
    cnv->Draw();

    TH2D *h = new TH2D("tmp", GetName(), 
		       1, fZCenter-1.1*(0.5*fThicknessSupport+fThicknessActive), fZCenter+1.1*(0.5*fThicknessSupport+fThicknessActive),
		       1, 1.1*GetSupportElement(0)->GetAxis(1)->GetXmin(), 1.1*GetSupportElement(0)->GetAxis(1)->GetXmax());
    h->SetXTitle("z [cm]");
    h->SetYTitle("y [cm]");
    h->Draw();

    TPave *supportExt = new TPave(GetSupportElement(0)->GetAxis(2)->GetXmin(), -fRMaxSupport, 
				  GetSupportElement(0)->GetAxis(2)->GetXmax(),  fRMaxSupport);
    TPave *supportInt = new TPave(GetSupportElement(0)->GetAxis(2)->GetXmin(), -fRMinSupport, 
				  GetSupportElement(0)->GetAxis(2)->GetXmax(),  fRMinSupport);
    supportExt -> SetFillColor(kCyan-10);
    supportInt -> SetFillColor(kCyan-10);
    supportExt -> SetBorderSize(1);
    supportInt -> SetBorderSize(1);
    supportExt -> Draw("same");
    supportInt -> Draw("same");

    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      TPave * pave = 0;
      if (IsFront(GetActiveElement(iEl))) {
	pave = new TPave(GetActiveElement(iEl)->GetAxis(2)->GetXmax() - 
			 5*(GetActiveElement(iEl)->GetAxis(2)->GetXmax()-GetActiveElement(iEl)->GetAxis(2)->GetXmin()), 
			 GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
			 GetActiveElement(iEl)->GetAxis(2)->GetXmax(), 
			 GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
      }
      else {
	pave = new TPave(GetActiveElement(iEl)->GetAxis(2)->GetXmin(), 
			 GetActiveElement(iEl)->GetAxis(1)->GetXmin(), 
			 GetActiveElement(iEl)->GetAxis(2)->GetXmin() + 
			 5*(GetActiveElement(iEl)->GetAxis(2)->GetXmax()-GetActiveElement(iEl)->GetAxis(2)->GetXmin()), 
			 GetActiveElement(iEl)->GetAxis(1)->GetXmax(), 1);
      }	
      pave -> SetFillColor(kGreen);
      pave -> Draw("same");
    }
    
    for (Int_t iEl=0; iEl<GetNReadoutElements(); iEl++) {
      TPave *pave = 0;
      if (IsFront(GetReadoutElement(iEl))) {
	pave = new TPave(GetReadoutElement(iEl)->GetAxis(2)->GetXmax() - 
			 5*(GetReadoutElement(iEl)->GetAxis(2)->GetXmax()-GetReadoutElement(iEl)->GetAxis(2)->GetXmin()), 
			 GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
			 GetReadoutElement(iEl)->GetAxis(2)->GetXmax(), 
			 GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
      }
      else {
	pave = new TPave(GetReadoutElement(iEl)->GetAxis(2)->GetXmin(), 
			 GetReadoutElement(iEl)->GetAxis(1)->GetXmin(), 
			 GetReadoutElement(iEl)->GetAxis(2)->GetXmin() + 
			 5*(GetReadoutElement(iEl)->GetAxis(2)->GetXmax()-GetReadoutElement(iEl)->GetAxis(2)->GetXmin()), 
			 GetReadoutElement(iEl)->GetAxis(1)->GetXmax(), 1);
      }	
      pave -> SetFillColor(kRed);
      pave -> Draw("same");
    }
    
  }

}

//====================================================================================================================================================

Int_t AliMFTPlane::GetNumberOfChips(Option_t *opt) {

  Int_t nChips = 0;

  if (!strcmp(opt, "front")) {
    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      if (!IsFront(GetActiveElement(iEl))) continue;
      Double_t length = GetActiveElement(iEl)->GetAxis(0)->GetXmax() - GetActiveElement(iEl)->GetAxis(0)->GetXmin();
      nChips += Int_t (length/AliMFTConstants::fWidthChip) + 1;
    }
  }

  else if (!strcmp(opt, "back")) {
    for (Int_t iEl=0; iEl<GetNActiveElements(); iEl++) {
      if (IsFront(GetActiveElement(iEl))) continue;
      Double_t length = GetActiveElement(iEl)->GetAxis(0)->GetXmax() - GetActiveElement(iEl)->GetAxis(0)->GetXmin();
      nChips += Int_t (length/AliMFTConstants::fWidthChip) + 1;
    }
  }

  return nChips;

}

//====================================================================================================================================================
 AliMFTPlane.cxx:1
 AliMFTPlane.cxx:2
 AliMFTPlane.cxx:3
 AliMFTPlane.cxx:4
 AliMFTPlane.cxx:5
 AliMFTPlane.cxx:6
 AliMFTPlane.cxx:7
 AliMFTPlane.cxx:8
 AliMFTPlane.cxx:9
 AliMFTPlane.cxx:10
 AliMFTPlane.cxx:11
 AliMFTPlane.cxx:12
 AliMFTPlane.cxx:13
 AliMFTPlane.cxx:14
 AliMFTPlane.cxx:15
 AliMFTPlane.cxx:16
 AliMFTPlane.cxx:17
 AliMFTPlane.cxx:18
 AliMFTPlane.cxx:19
 AliMFTPlane.cxx:20
 AliMFTPlane.cxx:21
 AliMFTPlane.cxx:22
 AliMFTPlane.cxx:23
 AliMFTPlane.cxx:24
 AliMFTPlane.cxx:25
 AliMFTPlane.cxx:26
 AliMFTPlane.cxx:27
 AliMFTPlane.cxx:28
 AliMFTPlane.cxx:29
 AliMFTPlane.cxx:30
 AliMFTPlane.cxx:31
 AliMFTPlane.cxx:32
 AliMFTPlane.cxx:33
 AliMFTPlane.cxx:34
 AliMFTPlane.cxx:35
 AliMFTPlane.cxx:36
 AliMFTPlane.cxx:37
 AliMFTPlane.cxx:38
 AliMFTPlane.cxx:39
 AliMFTPlane.cxx:40
 AliMFTPlane.cxx:41
 AliMFTPlane.cxx:42
 AliMFTPlane.cxx:43
 AliMFTPlane.cxx:44
 AliMFTPlane.cxx:45
 AliMFTPlane.cxx:46
 AliMFTPlane.cxx:47
 AliMFTPlane.cxx:48
 AliMFTPlane.cxx:49
 AliMFTPlane.cxx:50
 AliMFTPlane.cxx:51
 AliMFTPlane.cxx:52
 AliMFTPlane.cxx:53
 AliMFTPlane.cxx:54
 AliMFTPlane.cxx:55
 AliMFTPlane.cxx:56
 AliMFTPlane.cxx:57
 AliMFTPlane.cxx:58
 AliMFTPlane.cxx:59
 AliMFTPlane.cxx:60
 AliMFTPlane.cxx:61
 AliMFTPlane.cxx:62
 AliMFTPlane.cxx:63
 AliMFTPlane.cxx:64
 AliMFTPlane.cxx:65
 AliMFTPlane.cxx:66
 AliMFTPlane.cxx:67
 AliMFTPlane.cxx:68
 AliMFTPlane.cxx:69
 AliMFTPlane.cxx:70
 AliMFTPlane.cxx:71
 AliMFTPlane.cxx:72
 AliMFTPlane.cxx:73
 AliMFTPlane.cxx:74
 AliMFTPlane.cxx:75
 AliMFTPlane.cxx:76
 AliMFTPlane.cxx:77
 AliMFTPlane.cxx:78
 AliMFTPlane.cxx:79
 AliMFTPlane.cxx:80
 AliMFTPlane.cxx:81
 AliMFTPlane.cxx:82
 AliMFTPlane.cxx:83
 AliMFTPlane.cxx:84
 AliMFTPlane.cxx:85
 AliMFTPlane.cxx:86
 AliMFTPlane.cxx:87
 AliMFTPlane.cxx:88
 AliMFTPlane.cxx:89
 AliMFTPlane.cxx:90
 AliMFTPlane.cxx:91
 AliMFTPlane.cxx:92
 AliMFTPlane.cxx:93
 AliMFTPlane.cxx:94
 AliMFTPlane.cxx:95
 AliMFTPlane.cxx:96
 AliMFTPlane.cxx:97
 AliMFTPlane.cxx:98
 AliMFTPlane.cxx:99
 AliMFTPlane.cxx:100
 AliMFTPlane.cxx:101
 AliMFTPlane.cxx:102
 AliMFTPlane.cxx:103
 AliMFTPlane.cxx:104
 AliMFTPlane.cxx:105
 AliMFTPlane.cxx:106
 AliMFTPlane.cxx:107
 AliMFTPlane.cxx:108
 AliMFTPlane.cxx:109
 AliMFTPlane.cxx:110
 AliMFTPlane.cxx:111
 AliMFTPlane.cxx:112
 AliMFTPlane.cxx:113
 AliMFTPlane.cxx:114
 AliMFTPlane.cxx:115
 AliMFTPlane.cxx:116
 AliMFTPlane.cxx:117
 AliMFTPlane.cxx:118
 AliMFTPlane.cxx:119
 AliMFTPlane.cxx:120
 AliMFTPlane.cxx:121
 AliMFTPlane.cxx:122
 AliMFTPlane.cxx:123
 AliMFTPlane.cxx:124
 AliMFTPlane.cxx:125
 AliMFTPlane.cxx:126
 AliMFTPlane.cxx:127
 AliMFTPlane.cxx:128
 AliMFTPlane.cxx:129
 AliMFTPlane.cxx:130
 AliMFTPlane.cxx:131
 AliMFTPlane.cxx:132
 AliMFTPlane.cxx:133
 AliMFTPlane.cxx:134
 AliMFTPlane.cxx:135
 AliMFTPlane.cxx:136
 AliMFTPlane.cxx:137
 AliMFTPlane.cxx:138
 AliMFTPlane.cxx:139
 AliMFTPlane.cxx:140
 AliMFTPlane.cxx:141
 AliMFTPlane.cxx:142
 AliMFTPlane.cxx:143
 AliMFTPlane.cxx:144
 AliMFTPlane.cxx:145
 AliMFTPlane.cxx:146
 AliMFTPlane.cxx:147
 AliMFTPlane.cxx:148
 AliMFTPlane.cxx:149
 AliMFTPlane.cxx:150
 AliMFTPlane.cxx:151
 AliMFTPlane.cxx:152
 AliMFTPlane.cxx:153
 AliMFTPlane.cxx:154
 AliMFTPlane.cxx:155
 AliMFTPlane.cxx:156
 AliMFTPlane.cxx:157
 AliMFTPlane.cxx:158
 AliMFTPlane.cxx:159
 AliMFTPlane.cxx:160
 AliMFTPlane.cxx:161
 AliMFTPlane.cxx:162
 AliMFTPlane.cxx:163
 AliMFTPlane.cxx:164
 AliMFTPlane.cxx:165
 AliMFTPlane.cxx:166
 AliMFTPlane.cxx:167
 AliMFTPlane.cxx:168
 AliMFTPlane.cxx:169
 AliMFTPlane.cxx:170
 AliMFTPlane.cxx:171
 AliMFTPlane.cxx:172
 AliMFTPlane.cxx:173
 AliMFTPlane.cxx:174
 AliMFTPlane.cxx:175
 AliMFTPlane.cxx:176
 AliMFTPlane.cxx:177
 AliMFTPlane.cxx:178
 AliMFTPlane.cxx:179
 AliMFTPlane.cxx:180
 AliMFTPlane.cxx:181
 AliMFTPlane.cxx:182
 AliMFTPlane.cxx:183
 AliMFTPlane.cxx:184
 AliMFTPlane.cxx:185
 AliMFTPlane.cxx:186
 AliMFTPlane.cxx:187
 AliMFTPlane.cxx:188
 AliMFTPlane.cxx:189
 AliMFTPlane.cxx:190
 AliMFTPlane.cxx:191
 AliMFTPlane.cxx:192
 AliMFTPlane.cxx:193
 AliMFTPlane.cxx:194
 AliMFTPlane.cxx:195
 AliMFTPlane.cxx:196
 AliMFTPlane.cxx:197
 AliMFTPlane.cxx:198
 AliMFTPlane.cxx:199
 AliMFTPlane.cxx:200
 AliMFTPlane.cxx:201
 AliMFTPlane.cxx:202
 AliMFTPlane.cxx:203
 AliMFTPlane.cxx:204
 AliMFTPlane.cxx:205
 AliMFTPlane.cxx:206
 AliMFTPlane.cxx:207
 AliMFTPlane.cxx:208
 AliMFTPlane.cxx:209
 AliMFTPlane.cxx:210
 AliMFTPlane.cxx:211
 AliMFTPlane.cxx:212
 AliMFTPlane.cxx:213
 AliMFTPlane.cxx:214
 AliMFTPlane.cxx:215
 AliMFTPlane.cxx:216
 AliMFTPlane.cxx:217
 AliMFTPlane.cxx:218
 AliMFTPlane.cxx:219
 AliMFTPlane.cxx:220
 AliMFTPlane.cxx:221
 AliMFTPlane.cxx:222
 AliMFTPlane.cxx:223
 AliMFTPlane.cxx:224
 AliMFTPlane.cxx:225
 AliMFTPlane.cxx:226
 AliMFTPlane.cxx:227
 AliMFTPlane.cxx:228
 AliMFTPlane.cxx:229
 AliMFTPlane.cxx:230
 AliMFTPlane.cxx:231
 AliMFTPlane.cxx:232
 AliMFTPlane.cxx:233
 AliMFTPlane.cxx:234
 AliMFTPlane.cxx:235
 AliMFTPlane.cxx:236
 AliMFTPlane.cxx:237
 AliMFTPlane.cxx:238
 AliMFTPlane.cxx:239
 AliMFTPlane.cxx:240
 AliMFTPlane.cxx:241
 AliMFTPlane.cxx:242
 AliMFTPlane.cxx:243
 AliMFTPlane.cxx:244
 AliMFTPlane.cxx:245
 AliMFTPlane.cxx:246
 AliMFTPlane.cxx:247
 AliMFTPlane.cxx:248
 AliMFTPlane.cxx:249
 AliMFTPlane.cxx:250
 AliMFTPlane.cxx:251
 AliMFTPlane.cxx:252
 AliMFTPlane.cxx:253
 AliMFTPlane.cxx:254
 AliMFTPlane.cxx:255
 AliMFTPlane.cxx:256
 AliMFTPlane.cxx:257
 AliMFTPlane.cxx:258
 AliMFTPlane.cxx:259
 AliMFTPlane.cxx:260
 AliMFTPlane.cxx:261
 AliMFTPlane.cxx:262
 AliMFTPlane.cxx:263
 AliMFTPlane.cxx:264
 AliMFTPlane.cxx:265
 AliMFTPlane.cxx:266
 AliMFTPlane.cxx:267
 AliMFTPlane.cxx:268
 AliMFTPlane.cxx:269
 AliMFTPlane.cxx:270
 AliMFTPlane.cxx:271
 AliMFTPlane.cxx:272
 AliMFTPlane.cxx:273
 AliMFTPlane.cxx:274
 AliMFTPlane.cxx:275
 AliMFTPlane.cxx:276
 AliMFTPlane.cxx:277
 AliMFTPlane.cxx:278
 AliMFTPlane.cxx:279
 AliMFTPlane.cxx:280
 AliMFTPlane.cxx:281
 AliMFTPlane.cxx:282
 AliMFTPlane.cxx:283
 AliMFTPlane.cxx:284
 AliMFTPlane.cxx:285
 AliMFTPlane.cxx:286
 AliMFTPlane.cxx:287
 AliMFTPlane.cxx:288
 AliMFTPlane.cxx:289
 AliMFTPlane.cxx:290
 AliMFTPlane.cxx:291
 AliMFTPlane.cxx:292
 AliMFTPlane.cxx:293
 AliMFTPlane.cxx:294
 AliMFTPlane.cxx:295
 AliMFTPlane.cxx:296
 AliMFTPlane.cxx:297
 AliMFTPlane.cxx:298
 AliMFTPlane.cxx:299
 AliMFTPlane.cxx:300
 AliMFTPlane.cxx:301
 AliMFTPlane.cxx:302
 AliMFTPlane.cxx:303
 AliMFTPlane.cxx:304
 AliMFTPlane.cxx:305
 AliMFTPlane.cxx:306
 AliMFTPlane.cxx:307
 AliMFTPlane.cxx:308
 AliMFTPlane.cxx:309
 AliMFTPlane.cxx:310
 AliMFTPlane.cxx:311
 AliMFTPlane.cxx:312
 AliMFTPlane.cxx:313
 AliMFTPlane.cxx:314
 AliMFTPlane.cxx:315
 AliMFTPlane.cxx:316
 AliMFTPlane.cxx:317
 AliMFTPlane.cxx:318
 AliMFTPlane.cxx:319
 AliMFTPlane.cxx:320
 AliMFTPlane.cxx:321
 AliMFTPlane.cxx:322
 AliMFTPlane.cxx:323
 AliMFTPlane.cxx:324
 AliMFTPlane.cxx:325
 AliMFTPlane.cxx:326
 AliMFTPlane.cxx:327
 AliMFTPlane.cxx:328
 AliMFTPlane.cxx:329
 AliMFTPlane.cxx:330
 AliMFTPlane.cxx:331
 AliMFTPlane.cxx:332
 AliMFTPlane.cxx:333
 AliMFTPlane.cxx:334
 AliMFTPlane.cxx:335
 AliMFTPlane.cxx:336
 AliMFTPlane.cxx:337
 AliMFTPlane.cxx:338
 AliMFTPlane.cxx:339
 AliMFTPlane.cxx:340
 AliMFTPlane.cxx:341
 AliMFTPlane.cxx:342
 AliMFTPlane.cxx:343
 AliMFTPlane.cxx:344
 AliMFTPlane.cxx:345
 AliMFTPlane.cxx:346
 AliMFTPlane.cxx:347
 AliMFTPlane.cxx:348
 AliMFTPlane.cxx:349
 AliMFTPlane.cxx:350
 AliMFTPlane.cxx:351
 AliMFTPlane.cxx:352
 AliMFTPlane.cxx:353
 AliMFTPlane.cxx:354
 AliMFTPlane.cxx:355
 AliMFTPlane.cxx:356
 AliMFTPlane.cxx:357
 AliMFTPlane.cxx:358
 AliMFTPlane.cxx:359
 AliMFTPlane.cxx:360
 AliMFTPlane.cxx:361
 AliMFTPlane.cxx:362
 AliMFTPlane.cxx:363
 AliMFTPlane.cxx:364
 AliMFTPlane.cxx:365
 AliMFTPlane.cxx:366
 AliMFTPlane.cxx:367
 AliMFTPlane.cxx:368
 AliMFTPlane.cxx:369
 AliMFTPlane.cxx:370
 AliMFTPlane.cxx:371
 AliMFTPlane.cxx:372
 AliMFTPlane.cxx:373
 AliMFTPlane.cxx:374
 AliMFTPlane.cxx:375
 AliMFTPlane.cxx:376
 AliMFTPlane.cxx:377
 AliMFTPlane.cxx:378
 AliMFTPlane.cxx:379
 AliMFTPlane.cxx:380
 AliMFTPlane.cxx:381
 AliMFTPlane.cxx:382
 AliMFTPlane.cxx:383
 AliMFTPlane.cxx:384
 AliMFTPlane.cxx:385
 AliMFTPlane.cxx:386
 AliMFTPlane.cxx:387
 AliMFTPlane.cxx:388
 AliMFTPlane.cxx:389
 AliMFTPlane.cxx:390
 AliMFTPlane.cxx:391
 AliMFTPlane.cxx:392
 AliMFTPlane.cxx:393
 AliMFTPlane.cxx:394
 AliMFTPlane.cxx:395
 AliMFTPlane.cxx:396
 AliMFTPlane.cxx:397
 AliMFTPlane.cxx:398
 AliMFTPlane.cxx:399
 AliMFTPlane.cxx:400
 AliMFTPlane.cxx:401
 AliMFTPlane.cxx:402
 AliMFTPlane.cxx:403
 AliMFTPlane.cxx:404
 AliMFTPlane.cxx:405
 AliMFTPlane.cxx:406
 AliMFTPlane.cxx:407
 AliMFTPlane.cxx:408
 AliMFTPlane.cxx:409
 AliMFTPlane.cxx:410
 AliMFTPlane.cxx:411
 AliMFTPlane.cxx:412
 AliMFTPlane.cxx:413
 AliMFTPlane.cxx:414
 AliMFTPlane.cxx:415
 AliMFTPlane.cxx:416
 AliMFTPlane.cxx:417
 AliMFTPlane.cxx:418
 AliMFTPlane.cxx:419
 AliMFTPlane.cxx:420
 AliMFTPlane.cxx:421
 AliMFTPlane.cxx:422
 AliMFTPlane.cxx:423
 AliMFTPlane.cxx:424
 AliMFTPlane.cxx:425
 AliMFTPlane.cxx:426
 AliMFTPlane.cxx:427
 AliMFTPlane.cxx:428
 AliMFTPlane.cxx:429
 AliMFTPlane.cxx:430
 AliMFTPlane.cxx:431
 AliMFTPlane.cxx:432
 AliMFTPlane.cxx:433
 AliMFTPlane.cxx:434
 AliMFTPlane.cxx:435
 AliMFTPlane.cxx:436
 AliMFTPlane.cxx:437
 AliMFTPlane.cxx:438
 AliMFTPlane.cxx:439
 AliMFTPlane.cxx:440
 AliMFTPlane.cxx:441
 AliMFTPlane.cxx:442
 AliMFTPlane.cxx:443
 AliMFTPlane.cxx:444
 AliMFTPlane.cxx:445
 AliMFTPlane.cxx:446
 AliMFTPlane.cxx:447
 AliMFTPlane.cxx:448
 AliMFTPlane.cxx:449
 AliMFTPlane.cxx:450
 AliMFTPlane.cxx:451
 AliMFTPlane.cxx:452
 AliMFTPlane.cxx:453
 AliMFTPlane.cxx:454
 AliMFTPlane.cxx:455
 AliMFTPlane.cxx:456
 AliMFTPlane.cxx:457
 AliMFTPlane.cxx:458
 AliMFTPlane.cxx:459
 AliMFTPlane.cxx:460
 AliMFTPlane.cxx:461
 AliMFTPlane.cxx:462
 AliMFTPlane.cxx:463
 AliMFTPlane.cxx:464
 AliMFTPlane.cxx:465
 AliMFTPlane.cxx:466
 AliMFTPlane.cxx:467
 AliMFTPlane.cxx:468
 AliMFTPlane.cxx:469
 AliMFTPlane.cxx:470
 AliMFTPlane.cxx:471
 AliMFTPlane.cxx:472
 AliMFTPlane.cxx:473
 AliMFTPlane.cxx:474
 AliMFTPlane.cxx:475
 AliMFTPlane.cxx:476
 AliMFTPlane.cxx:477
 AliMFTPlane.cxx:478
 AliMFTPlane.cxx:479
 AliMFTPlane.cxx:480
 AliMFTPlane.cxx:481
 AliMFTPlane.cxx:482
 AliMFTPlane.cxx:483
 AliMFTPlane.cxx:484
 AliMFTPlane.cxx:485
 AliMFTPlane.cxx:486
 AliMFTPlane.cxx:487
 AliMFTPlane.cxx:488
 AliMFTPlane.cxx:489
 AliMFTPlane.cxx:490
 AliMFTPlane.cxx:491
 AliMFTPlane.cxx:492
 AliMFTPlane.cxx:493
 AliMFTPlane.cxx:494
 AliMFTPlane.cxx:495
 AliMFTPlane.cxx:496
 AliMFTPlane.cxx:497
 AliMFTPlane.cxx:498
 AliMFTPlane.cxx:499
 AliMFTPlane.cxx:500
 AliMFTPlane.cxx:501
 AliMFTPlane.cxx:502
 AliMFTPlane.cxx:503
 AliMFTPlane.cxx:504
 AliMFTPlane.cxx:505
 AliMFTPlane.cxx:506
 AliMFTPlane.cxx:507
 AliMFTPlane.cxx:508
 AliMFTPlane.cxx:509
 AliMFTPlane.cxx:510
 AliMFTPlane.cxx:511
 AliMFTPlane.cxx:512
 AliMFTPlane.cxx:513
 AliMFTPlane.cxx:514
 AliMFTPlane.cxx:515
 AliMFTPlane.cxx:516
 AliMFTPlane.cxx:517
 AliMFTPlane.cxx:518
 AliMFTPlane.cxx:519
 AliMFTPlane.cxx:520
 AliMFTPlane.cxx:521
 AliMFTPlane.cxx:522
 AliMFTPlane.cxx:523
 AliMFTPlane.cxx:524
 AliMFTPlane.cxx:525
 AliMFTPlane.cxx:526
 AliMFTPlane.cxx:527
 AliMFTPlane.cxx:528
 AliMFTPlane.cxx:529
 AliMFTPlane.cxx:530
 AliMFTPlane.cxx:531
 AliMFTPlane.cxx:532
 AliMFTPlane.cxx:533
 AliMFTPlane.cxx:534
 AliMFTPlane.cxx:535
 AliMFTPlane.cxx:536
 AliMFTPlane.cxx:537
 AliMFTPlane.cxx:538
 AliMFTPlane.cxx:539
 AliMFTPlane.cxx:540
 AliMFTPlane.cxx:541
 AliMFTPlane.cxx:542
 AliMFTPlane.cxx:543
 AliMFTPlane.cxx:544
 AliMFTPlane.cxx:545
 AliMFTPlane.cxx:546
 AliMFTPlane.cxx:547
 AliMFTPlane.cxx:548
 AliMFTPlane.cxx:549
 AliMFTPlane.cxx:550
 AliMFTPlane.cxx:551
 AliMFTPlane.cxx:552
 AliMFTPlane.cxx:553
 AliMFTPlane.cxx:554
 AliMFTPlane.cxx:555
 AliMFTPlane.cxx:556
 AliMFTPlane.cxx:557
 AliMFTPlane.cxx:558
 AliMFTPlane.cxx:559
 AliMFTPlane.cxx:560
 AliMFTPlane.cxx:561
 AliMFTPlane.cxx:562
 AliMFTPlane.cxx:563
 AliMFTPlane.cxx:564
 AliMFTPlane.cxx:565
 AliMFTPlane.cxx:566
 AliMFTPlane.cxx:567
 AliMFTPlane.cxx:568
 AliMFTPlane.cxx:569
 AliMFTPlane.cxx:570
 AliMFTPlane.cxx:571
 AliMFTPlane.cxx:572
 AliMFTPlane.cxx:573
 AliMFTPlane.cxx:574
 AliMFTPlane.cxx:575
 AliMFTPlane.cxx:576
 AliMFTPlane.cxx:577
 AliMFTPlane.cxx:578
 AliMFTPlane.cxx:579
 AliMFTPlane.cxx:580
 AliMFTPlane.cxx:581
 AliMFTPlane.cxx:582
 AliMFTPlane.cxx:583
 AliMFTPlane.cxx:584
 AliMFTPlane.cxx:585
 AliMFTPlane.cxx:586
 AliMFTPlane.cxx:587
 AliMFTPlane.cxx:588
 AliMFTPlane.cxx:589
 AliMFTPlane.cxx:590
 AliMFTPlane.cxx:591
 AliMFTPlane.cxx:592
 AliMFTPlane.cxx:593
 AliMFTPlane.cxx:594
 AliMFTPlane.cxx:595
 AliMFTPlane.cxx:596
 AliMFTPlane.cxx:597
 AliMFTPlane.cxx:598
 AliMFTPlane.cxx:599
 AliMFTPlane.cxx:600
 AliMFTPlane.cxx:601
 AliMFTPlane.cxx:602
 AliMFTPlane.cxx:603
 AliMFTPlane.cxx:604
 AliMFTPlane.cxx:605
 AliMFTPlane.cxx:606
 AliMFTPlane.cxx:607
 AliMFTPlane.cxx:608
 AliMFTPlane.cxx:609
 AliMFTPlane.cxx:610
 AliMFTPlane.cxx:611
 AliMFTPlane.cxx:612
 AliMFTPlane.cxx:613
 AliMFTPlane.cxx:614
 AliMFTPlane.cxx:615
 AliMFTPlane.cxx:616
 AliMFTPlane.cxx:617
 AliMFTPlane.cxx:618
 AliMFTPlane.cxx:619
 AliMFTPlane.cxx:620
 AliMFTPlane.cxx:621
 AliMFTPlane.cxx:622
 AliMFTPlane.cxx:623
 AliMFTPlane.cxx:624
 AliMFTPlane.cxx:625
 AliMFTPlane.cxx:626
 AliMFTPlane.cxx:627
 AliMFTPlane.cxx:628
 AliMFTPlane.cxx:629
 AliMFTPlane.cxx:630
 AliMFTPlane.cxx:631
 AliMFTPlane.cxx:632
 AliMFTPlane.cxx:633
 AliMFTPlane.cxx:634
 AliMFTPlane.cxx:635
 AliMFTPlane.cxx:636
 AliMFTPlane.cxx:637
 AliMFTPlane.cxx:638
 AliMFTPlane.cxx:639
 AliMFTPlane.cxx:640
 AliMFTPlane.cxx:641
 AliMFTPlane.cxx:642
 AliMFTPlane.cxx:643
 AliMFTPlane.cxx:644
 AliMFTPlane.cxx:645
 AliMFTPlane.cxx:646
 AliMFTPlane.cxx:647
 AliMFTPlane.cxx:648
 AliMFTPlane.cxx:649
 AliMFTPlane.cxx:650
 AliMFTPlane.cxx:651
 AliMFTPlane.cxx:652
 AliMFTPlane.cxx:653
 AliMFTPlane.cxx:654
 AliMFTPlane.cxx:655
 AliMFTPlane.cxx:656
 AliMFTPlane.cxx:657
 AliMFTPlane.cxx:658
 AliMFTPlane.cxx:659
 AliMFTPlane.cxx:660
 AliMFTPlane.cxx:661
 AliMFTPlane.cxx:662
 AliMFTPlane.cxx:663
 AliMFTPlane.cxx:664
 AliMFTPlane.cxx:665
 AliMFTPlane.cxx:666
 AliMFTPlane.cxx:667
 AliMFTPlane.cxx:668
 AliMFTPlane.cxx:669
 AliMFTPlane.cxx:670
 AliMFTPlane.cxx:671
 AliMFTPlane.cxx:672
 AliMFTPlane.cxx:673
 AliMFTPlane.cxx:674
 AliMFTPlane.cxx:675
 AliMFTPlane.cxx:676
 AliMFTPlane.cxx:677
 AliMFTPlane.cxx:678
 AliMFTPlane.cxx:679
 AliMFTPlane.cxx:680
 AliMFTPlane.cxx:681
 AliMFTPlane.cxx:682
 AliMFTPlane.cxx:683
 AliMFTPlane.cxx:684
 AliMFTPlane.cxx:685
 AliMFTPlane.cxx:686
 AliMFTPlane.cxx:687
 AliMFTPlane.cxx:688
 AliMFTPlane.cxx:689
 AliMFTPlane.cxx:690
 AliMFTPlane.cxx:691
 AliMFTPlane.cxx:692
 AliMFTPlane.cxx:693
 AliMFTPlane.cxx:694
 AliMFTPlane.cxx:695
 AliMFTPlane.cxx:696
 AliMFTPlane.cxx:697
 AliMFTPlane.cxx:698
 AliMFTPlane.cxx:699
 AliMFTPlane.cxx:700
 AliMFTPlane.cxx:701
 AliMFTPlane.cxx:702
 AliMFTPlane.cxx:703
 AliMFTPlane.cxx:704
 AliMFTPlane.cxx:705
 AliMFTPlane.cxx:706
 AliMFTPlane.cxx:707
 AliMFTPlane.cxx:708
 AliMFTPlane.cxx:709
 AliMFTPlane.cxx:710
 AliMFTPlane.cxx:711
 AliMFTPlane.cxx:712
 AliMFTPlane.cxx:713
 AliMFTPlane.cxx:714
 AliMFTPlane.cxx:715
 AliMFTPlane.cxx:716
 AliMFTPlane.cxx:717
 AliMFTPlane.cxx:718
 AliMFTPlane.cxx:719
 AliMFTPlane.cxx:720
 AliMFTPlane.cxx:721
 AliMFTPlane.cxx:722
 AliMFTPlane.cxx:723
 AliMFTPlane.cxx:724
 AliMFTPlane.cxx:725
 AliMFTPlane.cxx:726
 AliMFTPlane.cxx:727
 AliMFTPlane.cxx:728
 AliMFTPlane.cxx:729
 AliMFTPlane.cxx:730
 AliMFTPlane.cxx:731
 AliMFTPlane.cxx:732
 AliMFTPlane.cxx:733
 AliMFTPlane.cxx:734
 AliMFTPlane.cxx:735
 AliMFTPlane.cxx:736
 AliMFTPlane.cxx:737
 AliMFTPlane.cxx:738
 AliMFTPlane.cxx:739
 AliMFTPlane.cxx:740
 AliMFTPlane.cxx:741
 AliMFTPlane.cxx:742
 AliMFTPlane.cxx:743
 AliMFTPlane.cxx:744
 AliMFTPlane.cxx:745
 AliMFTPlane.cxx:746
 AliMFTPlane.cxx:747
 AliMFTPlane.cxx:748
 AliMFTPlane.cxx:749
 AliMFTPlane.cxx:750
 AliMFTPlane.cxx:751
 AliMFTPlane.cxx:752
 AliMFTPlane.cxx:753
 AliMFTPlane.cxx:754
 AliMFTPlane.cxx:755
 AliMFTPlane.cxx:756
 AliMFTPlane.cxx:757
 AliMFTPlane.cxx:758
 AliMFTPlane.cxx:759
 AliMFTPlane.cxx:760
 AliMFTPlane.cxx:761
 AliMFTPlane.cxx:762
 AliMFTPlane.cxx:763
 AliMFTPlane.cxx:764
 AliMFTPlane.cxx:765
 AliMFTPlane.cxx:766
 AliMFTPlane.cxx:767
 AliMFTPlane.cxx:768
 AliMFTPlane.cxx:769
 AliMFTPlane.cxx:770
 AliMFTPlane.cxx:771
 AliMFTPlane.cxx:772
 AliMFTPlane.cxx:773