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.                  *
 **************************************************************************/

/* $Id$*/

//_________________________________________________________________________
// Geometry class  for EMCAL : singleton 
// EMCAL consists of layers of scintillator and lead
// with scintillator fiber arranged as "shish-kebab" skewers 
// Places the the Barrel Geometry of The EMCAL at Midrapidity
// between 80 and 180(or 190) degrees of Phi and
// -0.7 to 0.7 in eta 
//
//     EMCAL geometry tree:
//     EMCAL -> superModule -> module -> tower(cell)
//     Indexes
//     absId -> nSupMod     -> nModule -> (nIphi,nIeta)
//
//   Name choices: 
//   EMCAL_PDC06 (geometry used for PDC06 simulations, kept for backward compatibility)
//      = equivalent to SHISH_77_TRD1_2X2_FINAL_110DEG in old notation
//   EMCAL_COMPLETE (geometry for expected complete detector)
//      = equivalent to SHISH_77_TRD1_2X2_FINAL_110DEG scTh=0.176 pbTh=0.144
//          in old notation
//   EMCAL_FIRSTYEARV1 - geometry for December 2009 to December 2010 run period; 
//                fixed bug for positions of modules inside SM
//                (first module has tilt 0.75 degree);
//                the sizes updated with last information from production
//                drawing (end of October 2010). 
//      
//   EMCAL_COMPLETEV1: Same fixes as FIRSTYEAR and 10 SM instead of 10 + 2 one_third SM, for 2011 runs
//
//   EMCAL_COMPLETE12SMV1: contains 12 SM for runs from year 2012 and on
//
//   EMCAL_COMPLETE12SMV1_DCAL: contains 12 SM and 6 DCAL SM
//   
//   EMCAL_COMPLETE12SMV1_DCAL_8SM: contains 12 SM and 8 DCAL SM including the DCAL extention (2 SM)
//
//   EMCAL_COMPLETE12SMV1_DCAL_DEV: contains 12 SM shifted and 10 DCAL SM 
//
//   EMCAL_WSUC (Wayne State test stand)
//      = no definite equivalent in old notation, was only used by
//          Aleksei, but kept for testing purposes
//
//   etc.

//
// Usage: 
//        You can create the AliEMCALGeometry object independently from anything.
//        You have to use just the correct name of geometry. If name is empty string the
//        default name of geometry will be used.
//         
//  AliEMCALGeometry* g = AliEMCALGeometry::GetInstance(name,title); // first time
//  ..
//  g = AliEMCALGeometry::GetInstance();                             // after first time
//
//  MC:   If you work with MC data you have to get geometry the next way: 
//  ==                                      =============================
//  AliRunLoader    *rl   = AliRunLoader::Instance();
//  AliEMCALGeometry *geom = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry();
//  TGeoManager::Import("geometry.root");
//
//*-- Author: Sahal Yacoob (LBL / UCT)
//     and  : Yves Schutz (SUBATECH)
//     and  : Jennifer Klay (LBL)
//     and  : Alexei Pavlinov (WSU) 
//
//  Implementation for analysis usage, before AliEMCALGeometry now (06/2011) merged again
//  in AliEMCALGeometry
//                  
// -- Author: Magali Estienne (magali.estienne@subatech.in2p3.fr)
//     and  : Adapted for DCAL, M.L. Wang CCNU & Subatech Oct-18-2012
//
//
// Usage: 
//        You can create the AliEMCALGeometry object independently from anything.
//        You have to use just the correct name of geometry. If name is empty string the
//        default name of geometry will be used.
//         
//  AliEMCALGeometry* geom = new AliEMCALGeometry("EMCAL_COMPLETE12SMV1","EMCAL");
//  TGeoManager::Import("geometry.root");
//
//  MC:   If you work with MC data you have to get geometry the next way: 
//  ==                                      =============================
// !!!!!!!!! This part has to be modified
//  AliRunLoader    *rl   = AliRunLoader::GetRunLoader();
//  AliEMCALEMCGeometry *geom = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry();
//  TGeoManager::Import("geometry.root");


// --- ROOT system ---

#include <TParticle.h>
#include <TGeoManager.h>
#include <TGeoMatrix.h>
#include <TGeoBBox.h>
#include <TList.h>
#include <TBrowser.h>

// --- Standard library ---
//#include <Riostream.h>

// --- AliRoot header files ---
#include "AliLog.h"
#include "AliEMCALGeometry.h"
#include "AliEMCALShishKebabTrd1Module.h"

ClassImp(AliEMCALGeometry)

// these initialisations are needed for a singleton
AliEMCALGeometry  *AliEMCALGeometry::fgGeom      = 0;
const Char_t*      AliEMCALGeometry::fgkDefaultGeometryName = "EMCAL_COMPLETE12SMV1";

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry():
  fEMCGeometry(0x0),fGeoName(0),fEMCSMSystem(0x0),
  fKey110DEG(0),fnSupModInDCAL(0),fNCellsInSupMod(0),fNETAdiv(0),fNPHIdiv(0),
  fNCellsInModule(0),fPhiBoundariesOfSM(0x0),fPhiCentersOfSM(0x0),
  fPhiCentersOfSMSec(0x0),fPhiCentersOfCells(0x0),fCentersOfCellsEtaDir(0x0),
  fCentersOfCellsPhiDir(0x0),fEtaCentersOfCells(0x0),
  fNCells(0),fNPhi(0),fCentersOfCellsXDir(0x0),fArm1EtaMin(0),
  fArm1EtaMax(0),fArm1PhiMin(0),fArm1PhiMax(0),fEtaMaxOfTRD1(0),
  fDCALPhiMin(0),fDCALPhiMax(0),fEMCALPhiMax(0),fDCALStandardPhiMax(0),
  fDCALInnerExtandedEta(0),fShishKebabTrd1Modules(0),fPhiModuleSize(0.),
  fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fNZ(0),
  fIPDistance(0.),fLongModuleSize(0.),fShellThickness(0.),
  fZLength(0.),fSampling(0.),fUseExternalMatrices(kFALSE)
{
  // default ctor 
  // must be kept public for root persistency purposes, but should never be called by the outside world
  fEnvelop[0] = 0.;
  fEnvelop[1] = 0.;
  fEnvelop[2] = 0.;
  fParSM[0]   = 0.;
  fParSM[1]   = 0.;
  fParSM[2]   = 0.;
  for (Int_t i=0;i<AliEMCALGeoParams::fgkEMCALModules;i++)
    fkSModuleMatrix[i]=0 ;

  for (Int_t i = 0; i < 48; i++)
   for (Int_t j = 0; j < 124; j++) fFastOR2DMap[i][j] = -1;
}  

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const AliEMCALGeometry & geo)
  : TNamed(geo),
    fEMCGeometry(geo.fEMCGeometry),fGeoName(geo.fGeoName),fEMCSMSystem(geo.fEMCSMSystem),
    fKey110DEG(geo.fKey110DEG),fnSupModInDCAL(geo.fnSupModInDCAL),fNCellsInSupMod(geo.fNCellsInSupMod),fNETAdiv(geo.fNETAdiv),fNPHIdiv(geo.fNPHIdiv),
    fNCellsInModule(geo.fNCellsInModule),fPhiBoundariesOfSM(geo.fPhiBoundariesOfSM),fPhiCentersOfSM(geo.fPhiCentersOfSM),
    fPhiCentersOfSMSec(geo.fPhiCentersOfSMSec),fPhiCentersOfCells(geo.fPhiCentersOfCells),fCentersOfCellsEtaDir(geo.fCentersOfCellsEtaDir),
    fCentersOfCellsPhiDir(geo.fCentersOfCellsPhiDir),fEtaCentersOfCells(geo.fEtaCentersOfCells),
    fNCells(geo.fNCells),fNPhi(geo.fNPhi),fCentersOfCellsXDir(geo.fCentersOfCellsXDir),fArm1EtaMin(geo.fArm1EtaMin),
    fArm1EtaMax(geo.fArm1EtaMax),fArm1PhiMin(geo.fArm1PhiMin),fArm1PhiMax(geo.fArm1PhiMax),fEtaMaxOfTRD1(geo.fEtaMaxOfTRD1),
    fDCALPhiMin(geo.fDCALPhiMin),fDCALPhiMax(geo.fDCALPhiMax),fEMCALPhiMax(geo.fEMCALPhiMax),fDCALStandardPhiMax(geo.fDCALStandardPhiMax),
    fDCALInnerExtandedEta(geo.fDCALInnerExtandedEta),fShishKebabTrd1Modules(geo.fShishKebabTrd1Modules),fPhiModuleSize(geo.fPhiModuleSize),
    fEtaModuleSize(geo.fEtaModuleSize),fPhiTileSize(geo.fPhiTileSize),fEtaTileSize(geo.fEtaTileSize),fNZ(geo.fNZ),
    fIPDistance(geo.fIPDistance),fLongModuleSize(geo.fLongModuleSize),fShellThickness(geo.fShellThickness),
    fZLength(geo.fZLength),fSampling(geo.fSampling),fUseExternalMatrices(geo.fUseExternalMatrices)
{
  // Copy constarctor
  fEnvelop[0] = geo.fEnvelop[0];
  fEnvelop[1] = geo.fEnvelop[1];
  fEnvelop[2] = geo.fEnvelop[2];
  fParSM[0]   = geo.fParSM[0];
  fParSM[1]   = geo.fParSM[1];
  fParSM[2]   = geo.fParSM[2];
  for (Int_t i=0;i<AliEMCALGeoParams::fgkEMCALModules;i++)
    fkSModuleMatrix[i]=0 ;
  
  for (Int_t i = 0; i < 48; i++)
    for (Int_t j = 0; j < 124; j++) fFastOR2DMap[i][j] = geo.fFastOR2DMap[i][j];
}

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const Text_t* name,   const Text_t* title,
                                   const Text_t* mcname, const Text_t* mctitle) 
  : TNamed(name, title),
    fEMCGeometry(0x0),fGeoName(0),fEMCSMSystem(0x0),
    fKey110DEG(0),fnSupModInDCAL(0),fNCellsInSupMod(0),fNETAdiv(0),fNPHIdiv(0),
    fNCellsInModule(0),fPhiBoundariesOfSM(0x0),fPhiCentersOfSM(0x0),
    fPhiCentersOfSMSec(0x0),fPhiCentersOfCells(0x0),fCentersOfCellsEtaDir(0x0),
    fCentersOfCellsPhiDir(0x0),fEtaCentersOfCells(0x0),
    fNCells(0),fNPhi(0),fCentersOfCellsXDir(0x0),fArm1EtaMin(0),
    fArm1EtaMax(0),fArm1PhiMin(0),fArm1PhiMax(0),fEtaMaxOfTRD1(0),
    fDCALPhiMin(0),fDCALPhiMax(0),fEMCALPhiMax(0),fDCALStandardPhiMax(0),
    fDCALInnerExtandedEta(0),fShishKebabTrd1Modules(0),fPhiModuleSize(0.),
    fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fNZ(0),
    fIPDistance(0.),fLongModuleSize(0.),fShellThickness(0.),
    fZLength(0.),fSampling(0.), fUseExternalMatrices(kFALSE)
{ 
  // ctor only for normal usage 
  
  fEMCGeometry = new AliEMCALEMCGeometry(name,title,mcname,mctitle);
  fGeoName = fEMCGeometry->GetGeoName();
  fEMCSMSystem = fEMCGeometry->GetEMCSystem();
  fKey110DEG = fEMCGeometry->GetKey110DEG();
  fnSupModInDCAL = fEMCGeometry->GetnSupModInDCAL();
  fNCellsInSupMod = fEMCGeometry->GetNCellsInSupMod();
  fNETAdiv = fEMCGeometry->GetNETAdiv();
  fNPHIdiv = fEMCGeometry->GetNPHIdiv();
  fNCellsInModule = fNPHIdiv*fNETAdiv;
  static int i=0;
  Int_t nSMod = fEMCGeometry->GetNumberOfSuperModules();
  fPhiBoundariesOfSM.Set(nSMod);
  fPhiCentersOfSM.Set(nSMod/2);
  fPhiCentersOfSMSec.Set(nSMod/2);
  for(Int_t sm=0; sm<nSMod; sm++) {
    i = sm/2;
    fEMCGeometry->GetPhiBoundariesOfSM(sm,fPhiBoundariesOfSM[2*i],fPhiBoundariesOfSM[2*i+1]);
  }

  Double_t phiMin =  0.;
  Double_t phiMax =  0.;
  for(Int_t sm=0; sm<nSMod; sm++) {
    fEMCGeometry->GetPhiBoundariesOfSM(sm,phiMin,phiMax);
    i=sm/2;
    fPhiCentersOfSM[i] = fEMCGeometry->GetPhiCenterOfSM(sm);
    fPhiCentersOfSMSec[i] = fEMCGeometry->GetPhiCenterOfSMSec(sm);
  }
  fNCells = fEMCGeometry->GetNCells();
  fNPhi = fEMCGeometry->GetNPhi();
  fEnvelop[0] = fEMCGeometry->GetEnvelop(0);
  fEnvelop[1] = fEMCGeometry->GetEnvelop(1);
  fEnvelop[2] = fEMCGeometry->GetEnvelop(2);
  fParSM[0]   = fEMCGeometry->GetSuperModulesPar(0);
  fParSM[1]   = fEMCGeometry->GetSuperModulesPar(1);
  fParSM[2]   = fEMCGeometry->GetSuperModulesPar(2);
  fArm1EtaMin = fEMCGeometry->GetArm1EtaMin();
  fArm1EtaMax = fEMCGeometry->GetArm1EtaMax();
  fArm1PhiMin = fEMCGeometry->GetArm1PhiMin();
  fArm1PhiMax = fEMCGeometry->GetArm1PhiMax();
  fDCALPhiMin = fEMCGeometry->GetDCALPhiMin();
  fDCALPhiMax = fEMCGeometry->GetDCALPhiMax();
  fEMCALPhiMax = fEMCGeometry->GetEMCALPhiMax();
  fDCALStandardPhiMax = fEMCGeometry->GetDCALStandardPhiMax();
  fDCALInnerExtandedEta = fEMCGeometry->GetDCALInnerExtandedEta();
  fShellThickness = fEMCGeometry->GetShellThickness();
  fZLength    = fEMCGeometry->GetZLength();
  fSampling   = fEMCGeometry->GetSampling();
  fEtaModuleSize = fEMCGeometry->GetEtaModuleSize();
  fPhiModuleSize = fEMCGeometry->GetPhiModuleSize();
  fEtaTileSize = fEMCGeometry->GetEtaTileSize();
  fPhiTileSize = fEMCGeometry->GetPhiTileSize();
  fNZ          = fEMCGeometry->GetNZ();
  fIPDistance  = fEMCGeometry->GetIPDistance();
  fLongModuleSize = fEMCGeometry->GetLongModuleSize();

  CreateListOfTrd1Modules();

  for(Int_t smod=0; smod < AliEMCALGeoParams::fgkEMCALModules; smod++)
    fkSModuleMatrix[smod]=0 ;	
	
  if (AliDebugLevel()>=2) {
    fEMCGeometry->Print();
    PrintGeometryGeoUtils();
  }

  for (Int_t ix = 0; ix < 48; ix++)
	for(Int_t jx = 0; jx < 124; jx++) fFastOR2DMap[ix][jx] = -1;

  BuildFastOR2DMap();
}

//____________________________________________________________________________
AliEMCALGeometry & AliEMCALGeometry::operator = (const AliEMCALGeometry  & /*rvalue*/) 
{ 
  //assing operator
  Fatal("assignment operator", "not implemented") ; 
  return *this ;
}

//____________________________________________________________________________
AliEMCALGeometry::~AliEMCALGeometry(void)
{
  // dtor
  if (this==fgGeom)
  {
    AliError("Do not call delete on me");
    return;
  }
  
  if (fEMCGeometry)
  {
    for(Int_t smod = 0 ; smod < fEMCGeometry->GetNumberOfSuperModules(); smod++)
    {
      if(fkSModuleMatrix[smod])
        delete fkSModuleMatrix[smod] ;
      
      fkSModuleMatrix[smod]=0 ;
    }
    
    delete fEMCGeometry; // fEMCGeometry = 0 ;
  }
}

//______________________________________________________________________
AliEMCALGeometry *  AliEMCALGeometry::GetInstance()
{ 
  // Returns the pointer of the unique instance
  
  AliEMCALGeometry * rv = static_cast<AliEMCALGeometry *>( fgGeom );
  return rv; 
}

//______________________________________________________________________
AliEMCALGeometry* AliEMCALGeometry::GetInstance(const Text_t* name,   const Text_t* title,
                                                const Text_t* mcname, const Text_t* mctitle )
{
  // Returns the pointer of the unique instance
    
  AliEMCALGeometry * rv = 0; 
  if ( fgGeom == 0 ) {
    if ( strcmp(name,"") == 0 ) { // get default geometry
      fgGeom = new AliEMCALGeometry(fgkDefaultGeometryName, title,mcname,mctitle);
    } else {
      fgGeom = new AliEMCALGeometry(name, title,mcname,mctitle);
    }  // end if strcmp(name,"")
    if ( AliEMCALEMCGeometry::fgInit ) rv = (AliEMCALGeometry * ) fgGeom;
    else {
      rv = 0; 
      delete fgGeom; 
      fgGeom = 0; 
    } // end if fgInit
  }else{
    if ( strcmp(fgGeom->GetName(), name) != 0) {
      printf("\ncurrent geometry is %s : ", fgGeom->GetName());
      printf(" you cannot call %s ",name);  
    }else{
      rv = (AliEMCALGeometry *) fgGeom; 
    } // end 
  }  // end if fgGeom
  return rv; 
}

//________________________________________________________________________________________________
void AliEMCALGeometry::Browse(TBrowser* b)
{
  //Browse the modules
  if(fShishKebabTrd1Modules) b->Add(fShishKebabTrd1Modules);
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::IsFolder() const
{
  //Check if fShishKebabTrd1Modules is in folder
  if(fShishKebabTrd1Modules) return kTRUE;
  else                       return kFALSE;
}

//________________________________________________________________________________________________
void AliEMCALGeometry::GetGlobal(const Double_t *loc, Double_t *glob, int ind) const
{
  // Figure out the global numbering
  // of a given supermodule from the
  // local numbering and the transformation
  // matrix stored by the geometry manager (allows for misaligned
  // geometry)
	
  const TGeoHMatrix* m = GetMatrixForSuperModule(ind);
  if(m) {
    m->LocalToMaster(loc, glob);
  } else {
    AliFatal("Geo matrixes are not loaded \n") ;
  }
}

//________________________________________________________________________________________________
void AliEMCALGeometry::GetGlobal(const TVector3 &vloc, TVector3 &vglob, int ind) const
{
  //Figure out the global numbering
  //of a given supermodule from the
  //local numbering given a 3-vector location

  static Double_t tglob[3], tloc[3];
  vloc.GetXYZ(tloc);
  GetGlobal(tloc, tglob, ind);
  vglob.SetXYZ(tglob[0], tglob[1], tglob[2]);
}

//________________________________________________________________________________________________
void AliEMCALGeometry::GetGlobal(Int_t absId , double glob[3]) const
{
  // Alice numbering scheme - Jun 03, 2006
  static Int_t nSupMod=-1, nModule=-1, nIphi=-1, nIeta=-1;
  static double loc[3];

  glob[0]=glob[1]=glob[2]=0.0; // bad case
  if(RelPosCellInSModule(absId, loc)) {
    GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
    const TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod);
    if(m) {
      m->LocalToMaster(loc, glob);
    } else {
      AliFatal("Geo matrixes are not loaded \n") ;
    }
  }
}

//___________________________________________________________________
void AliEMCALGeometry::GetGlobal(Int_t absId , TVector3 &vglob) const
{
  // Alice numbering scheme - Jun 03, 2006
  static Double_t glob[3];

  GetGlobal(absId, glob);
  vglob.SetXYZ(glob[0], glob[1], glob[2]);
}

//______________________________________________________________________
void AliEMCALGeometry::PrintCellIndexes(Int_t absId, int pri, const char *tit) const
{
  // Service methods
  Int_t nSupMod, nModule, nIphi, nIeta;
  Int_t iphi, ieta;
  TVector3 vg;

  GetCellIndex(absId,  nSupMod, nModule, nIphi, nIeta);
  printf(" %s | absId : %i -> nSupMod %i nModule %i nIphi %i nIeta %i \n", tit, absId,  nSupMod, nModule, nIphi, nIeta);
  if(pri>0) {
    GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi,ieta);
    printf(" local SM index : iphi %i : ieta %i \n", iphi,ieta);
    GetGlobal(absId, vg);
    printf(" vglob : mag %7.2f : perp %7.2f : z %7.2f : eta %6.4f : phi %6.4f(%6.2f) \n", 
	   vg.Mag(), vg.Perp(), vg.Z(), vg.Eta(), vg.Phi(), vg.Phi()*TMath::RadToDeg());
  }
}

void AliEMCALGeometry::PrintLocalTrd1(Int_t pri) const
{
  // For comparing with numbers from drawing
  for(Int_t i=0; i<GetShishKebabTrd1Modules()->GetSize(); i++){
    printf(" %s | ", GetShishKebabModule(i)->GetName());
    if(i==0 && pri<1) GetShishKebabModule(i)->PrintShish(1);
    else     GetShishKebabModule(i)->PrintShish(pri);
  }
}

//________________________________________________________________________________________________
void AliEMCALGeometry::EtaPhiFromIndex(Int_t absId,Double_t &eta,Double_t &phi) const
{
  // Nov 16, 2006- float to double
  // version for TRD1 only
  static TVector3 vglob;
  GetGlobal(absId, vglob);
  eta = vglob.Eta();
  phi = vglob.Phi();
}

//________________________________________________________________________________________________
void AliEMCALGeometry::EtaPhiFromIndex(Int_t absId,Float_t &eta,Float_t &phi) const
{
  // Nov 16,2006 - should be discard in future
  static TVector3 vglob;
  GetGlobal(absId, vglob);
  eta = float(vglob.Eta());
  phi = float(vglob.Phi());
}

//
// == Shish-kebab cases ==
//
//________________________________________________________________________________________________
Int_t AliEMCALGeometry::GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const
{ 
  // 27-aug-04; 
  // corr. 21-sep-04; 
  //       13-oct-05; 110 degree case
  // May 31, 2006; ALICE numbering scheme:
  // 0 <= nSupMod < fNumberOfSuperModules
  // 0 <= nModule  < fNPHI * fNZ ( fNPHI * fNZ/2 for fKey110DEG=1)
  // 0 <= nIphi   < fNPHIdiv
  // 0 <= nIeta   < fNETAdiv
  // 0 <= absid   < fNCells
  Int_t id=0; // have to change from 0 to fNCells-1
  for( int i = 0 ; i < nSupMod; i++) {
    if(      GetSMType(i) == kEMCAL_Standard) id += fNCellsInSupMod;
    else if( GetSMType(i) == kEMCAL_Half)     id += fNCellsInSupMod/2;
    else if( GetSMType(i) == kEMCAL_3rd)      id += fNCellsInSupMod/3;
    else if( GetSMType(i) == kDCAL_Standard)  id += 2*fNCellsInSupMod/3;
    else if( GetSMType(i) == kDCAL_Ext)       id += fNCellsInSupMod/3;
    else {
      AliError(Form("Uknown SuperModule Type !!"));
    }
  }
  
  id += fNCellsInModule *nModule;
  id += fNPHIdiv *nIphi;
  id += nIeta;
  if( !CheckAbsCellId(id) ) {
    id = -TMath::Abs(id); // if negative something wrong
  }
  return id;
}

//________________________________________________________________________________________________
void  AliEMCALGeometry::GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta, 
			Int_t &iphim, Int_t &ietam, Int_t &nModule) const
{
  // Transition from cell indexes (ieta,iphi) to module indexes (ietam,iphim, nModule)
  static Int_t nphi=-1;
  nphi  = GetNumberOfModuleInPhiDirection(nSupMod);  

  ietam  = ieta/fNETAdiv;
  iphim  = iphi/fNPHIdiv;
  nModule = ietam * nphi + iphim; 
}

//________________________________________________________________________________________________
Int_t  AliEMCALGeometry::GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const
{
  // Transition from super module number(nSupMod) and cell indexes (ieta,iphi) to absId
  
  // Check if the indeces correspond to existing SM or tower indeces
  if(iphi    < 0 || iphi    >= AliEMCALGeoParams::fgkEMCALRows || 
     ieta    < 0 || ieta    >= AliEMCALGeoParams::fgkEMCALCols ||
     nSupMod < 0 || nSupMod >= GetNumberOfSuperModules()         )
  {
    AliDebug(1,Form("Wrong cell indexes : SM %d, column (eta) %d, row (phi) %d", nSupMod,ieta,iphi));
    return -1 ;
  }
  
  static Int_t ietam=-1, iphim=-1, nModule=-1;
  static Int_t nIeta=-1, nIphi=-1; // cell indexes in module

  GetModuleIndexesFromCellIndexesInSModule(nSupMod, iphi, ieta, ietam, iphim, nModule);

  nIeta = ieta%fNETAdiv;
  nIeta = fNETAdiv - 1 - nIeta;
  nIphi = iphi%fNPHIdiv;
  
  return GetAbsCellId(nSupMod, nModule, nIphi, nIeta);
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const
{ 
  // Return false if phi belongs a phi cracks between SM
 
  static Int_t i=0;

  if(TMath::Abs(eta) > fEtaMaxOfTRD1) return kFALSE;

  phi = TVector2::Phi_0_2pi(phi); // move phi to (0,2pi) boundaries
  Int_t nphism = fEMCGeometry->GetNumberOfSuperModules()/2;
  for(i=0; i<nphism; i++) {
    if(phi>=fPhiBoundariesOfSM[2*i] && phi<=fPhiBoundariesOfSM[2*i+1]) {
      nSupMod = 2*i;
      if(eta < 0.0) nSupMod++;
      if( GetSMType(nSupMod) == kDCAL_Standard) {// Gap between DCAL
        if(TMath::Abs(eta) < GetNEta()/3*(GetEMCGeometry()->GetTrd1Angle())*TMath::DegToRad()) return kFALSE;
      }
      AliDebug(1,Form("eta %f phi %f(%5.2f) : nSupMod %i : #bound %i", eta,phi,phi*TMath::RadToDeg(), nSupMod,i));
      return kTRUE;
    }
  }
  return kFALSE;
}


//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetAbsCellIdFromEtaPhi(Double_t eta, Double_t phi, Int_t &absId) const
{

  // Nov 17,2006
  // stay here - phi problem as usual 
  static Int_t nSupMod=-1, i=0, ieta=-1, iphi=-1, etaShift=0, neta=-1, nphi=-1;
  static Double_t absEta=0.0, d=0.0, dmin=0.0, phiLoc=0;
  absId = nSupMod = - 1;
  if(SuperModuleNumberFromEtaPhi(eta, phi, nSupMod)) {
    // phi index first
    phi    = TVector2::Phi_0_2pi(phi);
    phiLoc = phi - fPhiCentersOfSMSec[nSupMod/2];
    nphi   = fPhiCentersOfCells.GetSize();
    if (     GetSMType(nSupMod) == kEMCAL_Half ) nphi  /= 2;
    else if( GetSMType(nSupMod) == kEMCAL_3rd )  nphi  /= 3;
    else if( GetSMType(nSupMod) == kDCAL_Ext )   nphi  /= 3;
    
    dmin   = TMath::Abs(fPhiCentersOfCells[0]-phiLoc);
    iphi   = 0;
    for(i=1; i<nphi; i++) {
      d = TMath::Abs(fPhiCentersOfCells[i] - phiLoc);
      if(d < dmin) {
        dmin = d;
        iphi = i;
      }
      //printf(" i %i : d %f : dmin %f : fPhiCentersOfCells[i] %f \n", i, d, dmin, fPhiCentersOfCells[i]);
    }
    // odd SM are turned with respect of even SM - reverse indexes
    AliDebug(2,Form(" iphi %i : dmin %f (phi %f, phiLoc %f ) ", iphi, dmin, phi, phiLoc));

    // eta index
    absEta   = TMath::Abs(eta);
    neta     = fCentersOfCellsEtaDir.GetSize();
    etaShift = iphi*neta;
    ieta     = 0;
    if( GetSMType(nSupMod) == kDCAL_Standard) ieta += 16; //jump 16 cells for DCSM
    dmin     = TMath::Abs(fEtaCentersOfCells[etaShift + ieta]-absEta);
    for(i= ieta+1 ; i<neta; i++) {
      d = TMath::Abs(fEtaCentersOfCells[i+etaShift] - absEta);
      if(d < dmin) {
        dmin = d;
        ieta = i;
      }
    }
    if( GetSMType(nSupMod) == kDCAL_Standard) ieta -= 16; //jump 16 cells for DCSM

    AliDebug(2,Form(" ieta %i : dmin %f (eta=%f) : nSupMod %i ", ieta, dmin, eta, nSupMod));
     
   //patch for mapping following alice convention  
    if(nSupMod%2 == 0) {// 47 + 16 -ieta for DCSM, 47 - ieta for others, revert the ordering on A side in order to keep convention.
      ieta = (neta -1)-ieta;
      if( GetSMType(nSupMod) == kDCAL_Standard) ieta -= 16; //recover cells for DCSM
    }

    absId = GetAbsCellIdFromCellIndexes(nSupMod, iphi, ieta);
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t  AliEMCALGeometry::CheckAbsCellId(Int_t absId) const
{ 
  // May 31, 2006; only trd1 now
  if(absId<0 || absId >= fNCells) return kFALSE;
  else                            return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetCellIndex(Int_t absId,Int_t &nSupMod,Int_t &nModule,Int_t &nIphi,Int_t &nIeta) const
{ 
  // 21-sep-04; 19-oct-05;
  // May 31, 2006; ALICE numbering scheme:
  // 
  // In:
  // absId   - cell is as in Geant,     0<= absId   < fNCells;
  // Out:
  // nSupMod - super module(SM) number, 0<= nSupMod < fNumberOfSuperModules;
  // nModule  - module number in SM,     0<= nModule  < fNCellsInSupMod/fNCellsInSupMod or(/2) for tow last SM (10th and 11th);
  // nIphi   - cell number in phi driection inside module; 0<= nIphi < fNPHIdiv; 
  // nIeta   - cell number in eta driection inside module; 0<= nIeta < fNETAdiv; 
  // 
  if(!CheckAbsCellId(absId)) return kFALSE;

  static Int_t tmp = absId;
  Int_t test = absId;
 
  for(nSupMod = -1; test >= 0; ) {
    nSupMod++;
    tmp = test;
    if(      GetSMType(nSupMod) == kEMCAL_Standard) test -= fNCellsInSupMod;
    else if( GetSMType(nSupMod) == kEMCAL_Half)     test -= fNCellsInSupMod/2;
    else if( GetSMType(nSupMod) == kEMCAL_3rd)      test -= fNCellsInSupMod/3;
    else if( GetSMType(nSupMod) == kDCAL_Standard)  test -= 2*fNCellsInSupMod/3;
    else if( GetSMType(nSupMod) == kDCAL_Ext)       test -= fNCellsInSupMod/3;
    else {
      AliError(Form("Uknown SuperModule Type !!"));
      return kFALSE;
    }
  }
  nModule = tmp / fNCellsInModule;
  tmp     = tmp % fNCellsInModule;
  nIphi   = tmp / fNPHIdiv;
  nIeta   = tmp % fNPHIdiv;

  return kTRUE;
}

//________________________________________________________________________________________________
Int_t  AliEMCALGeometry::GetSuperModuleNumber(Int_t absId)  const
{
  // Return the number of the  supermodule given the absolute
  // ALICE numbering id

  static Int_t nSupMod=-1, nModule=-1, nIphi=-1, nIeta=-1;
  GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
  return nSupMod;
} 

//________________________________________________________________________________________________
void AliEMCALGeometry::GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule,  int &iphim, int &ietam) const
{ 
  // added nSupMod; - 19-oct-05 !
  // Alice numbering scheme        - Jun 01,2006 
  // ietam, iphi - indexes of module in two dimensional grid of SM
  // ietam - have to change from 0 to fNZ-1
  // iphim - have to change from 0 to nphi-1 (fNPhi-1 or fNPhi/2-1)
  static Int_t nphi=-1;
  if(      GetSMType(nSupMod) == kEMCAL_Half )  nphi = fNPhi/2; // halfSM
  else if( GetSMType(nSupMod) == kEMCAL_3rd  )  nphi = fNPhi/3; // 1/3 SM
  else if( GetSMType(nSupMod) == kDCAL_Ext   )  nphi = fNPhi/3; // 1/3 SM
  else                                          nphi = fNPhi;   // full SM
  
  ietam = nModule/nphi;
  iphim = nModule%nphi;
}

//________________________________________________________________________________________________
void AliEMCALGeometry::GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta, 
int &iphi, int &ieta) const
{ 
  // 
  // Added nSupMod; Nov 25, 05
  // Alice numbering scheme  - Jun 01,2006 
  // IN:
  // nSupMod - super module(SM) number, 0<= nSupMod < fNumberOfSuperModules;
  // nModule  - module number in SM,     0<= nModule  < fNCellsInSupMod/fNCellsInSupMod or(/2) for tow last SM (10th and 11th);
  // nIphi   - cell number in phi driection inside module; 0<= nIphi < fNPHIdiv; 
  // nIeta   - cell number in eta driection inside module; 0<= nIeta < fNETAdiv; 
  // 
  // OUT:
  // ieta, iphi - indexes of cell(tower) in two dimensional grid of SM
  // ieta - have to change from 0 to (fNZ*fNETAdiv-1)
  // iphi - have to change from 0 to (fNPhi*fNPHIdiv-1 or fNPhi*fNPHIdiv/2-1)
  //
  static Int_t iphim=-1, ietam=-1;

  GetModulePhiEtaIndexInSModule(nSupMod,nModule, iphim, ietam); 
  //  ieta  = ietam*fNETAdiv + (1-nIeta); // x(module) = -z(SM) 
  ieta  = ietam*fNETAdiv + (fNETAdiv - 1 - nIeta); // x(module) = -z(SM) 
  iphi  = iphim*fNPHIdiv + nIphi;     // y(module) =  y(SM) 

  if(iphi<0 || ieta<0)
  AliDebug(1,Form(" nSupMod %i nModule %i nIphi %i nIeta %i => ieta %i iphi %i\n", 
  nSupMod, nModule, nIphi, nIeta, ieta, iphi));
}

// Methods for AliEMCALRecPoint - Feb 19, 2006
//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const
{
  // Look to see what the relative
  // position inside a given cell is
  // for a recpoint.
  // Alice numbering scheme - Jun 08, 2006
  // In:
  // absId   - cell is as in Geant,     0<= absId   < fNCells;
  // OUT:
  // xr,yr,zr - x,y,z coordinates of cell with absId inside SM 

  // Shift index taking into account the difference between standard SM 
  // and SM of half (or one third) size in phi direction
 
  const Int_t kNphiIndex = fCentersOfCellsPhiDir.GetSize(); 
  Double_t  zshift = 0.5*GetDCALInnerEdge();
      
  static Int_t nSupMod=-1, nModule=-1, nIphi=-1, nIeta=-1, iphi=-1, ieta=-1;
  if(!CheckAbsCellId(absId)) return kFALSE;

  GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
  GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta); 
	
  //Get eta position. Careful with ALICE conventions (increase index decrease eta)	
  Int_t ieta2 = ieta;
  if(nSupMod%2 == 0) {
    ieta2 = (fCentersOfCellsEtaDir.GetSize()-1)-ieta;// 47-ieta, revert the ordering on A side in order to keep convention.
  }
  if( GetSMType(nSupMod) == kDCAL_Standard && nSupMod%2 ) ieta2 += 16; // DCAL revert the ordering on C side ...
  zr = fCentersOfCellsEtaDir.At(ieta2); 
  if( GetSMType(nSupMod) == kDCAL_Standard ) zr -= zshift; // DCAL shift (SMALLER SM)
  xr = fCentersOfCellsXDir.At(ieta2);

  //Get phi position. Careful with ALICE conventions (increase index increase phi)
  Int_t iphi2 = iphi;
  if( GetSMType(nSupMod) == kDCAL_Ext ) {
  if(nSupMod%2 != 0)   iphi2 = (kNphiIndex/3 -1)-iphi;  // 7-iphi [1/3SM], revert the ordering on C side in order to keep convention.
    yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/3);
  } else if( GetSMType(nSupMod) == kEMCAL_Half ){
    if(nSupMod%2 != 0)   iphi2 = (kNphiIndex/2 -1)-iphi;  //11-iphi [1/2SM], revert the ordering on C side in order to keep convention.
    yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/4);
  } else if( GetSMType(nSupMod) == kEMCAL_3rd ){
    if(nSupMod%2 != 0)   iphi2 = (kNphiIndex/3 -1)-iphi;  // 7-iphi [1/3SM], revert the ordering on C side in order to keep convention.
    yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/3);
  } else {
    if(nSupMod%2 != 0)   iphi2 = (kNphiIndex   -1)-iphi;// 23-iphi, revert the ordering on C side in order to keep conventi
    yr = fCentersOfCellsPhiDir.At(iphi2);
  } 
  AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));

  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t loc[3]) const
{
  // Look to see what the relative
  // position inside a given cell is
  // for a recpoint.	// Alice numbering scheme - Jun 03, 2006
  loc[0] = loc[1] = loc[2]=0.0;
  if(RelPosCellInSModule(absId, loc[0],loc[1],loc[2])) {
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, TVector3 &vloc) const
{
  // Look to see what the relative
  // position inside a given cell is
  // for a recpoint.  
  // Alice numbering scheme - Jun 03, 2006
  static Double_t loc[3];
  if(RelPosCellInSModule(absId,loc)) {
    vloc.SetXYZ(loc[0], loc[1], loc[2]);
    return kTRUE;
  } else {
    vloc.SetXYZ(0,0,0);
    return kFALSE;
  }
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t distEff, Double_t &xr, Double_t &yr, Double_t &zr) const
{
  // Jul 30, 2007 - taking into account position of shower max
  // Look to see what the relative
  // position inside a given cell is
  // for a recpoint.
  // In:
  // absId   - cell is as in Geant,     0<= absId   < fNCells;
  // e       - cluster energy
  // OUT:
  // xr,yr,zr - x,y,z coordinates of cell with absId inside SM 
  
  // Shift index taking into account the difference between standard SM 
  // and SM of half (or one third) size in phi direction
  
  const Int_t kNphiIndex = fCentersOfCellsPhiDir.GetSize();
  Double_t  zshift = 0.5*GetDCALInnerEdge();
  Int_t kDCalshift = 8;//wangml DCal cut first 8 modules(16 cells)
   
  static Int_t nSupMod=0, nModule=-1, nIphi=-1, nIeta=-1, iphi=-1, ieta=-1;
  static Int_t iphim=-1, ietam=-1;
  static AliEMCALShishKebabTrd1Module *mod = 0;
  static TVector2 v;
  if(!CheckAbsCellId(absId)) return kFALSE;
  
  GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
  GetModulePhiEtaIndexInSModule(nSupMod, nModule, iphim, ietam);
  GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta); 
  
  //Get eta position. Careful with ALICE conventions (increase index decrease eta)	
  if(nSupMod%2 == 0) {             
    ietam = (fCentersOfCellsEtaDir.GetSize()/2-1)-ietam;// 24-ietam, revert the ordering on A side in order to keep convention.
    if(nIeta == 0) nIeta = 1;
    else	   nIeta = 0;
  }
  if( GetSMType(nSupMod) == kDCAL_Standard && nSupMod%2) ietam += kDCalshift; // DCAL revert the ordering on C side ....
  mod = GetShishKebabModule(ietam);
  mod ->GetPositionAtCenterCellLine(nIeta, distEff, v); 
  xr = v.Y() - fParSM[0];
  zr = v.X() - fParSM[2];
  if( GetSMType(nSupMod) == kDCAL_Standard ) zr -= zshift; // DCAL shift (SMALLER SM)
 
  //Get phi position. Careful with ALICE conventions (increase index increase phi)
  Int_t iphi2 = iphi;
  if( GetSMType(nSupMod) == kDCAL_Ext ) {
     if(nSupMod%2 != 0)  iphi2 = (kNphiIndex/3 -1)-iphi;  // 7-iphi [1/3SM], revert the ordering on C side in order to keep convention.
     yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/3);
   } else if( GetSMType(nSupMod) == kEMCAL_Half ){
     if(nSupMod%2 != 0)  iphi2 = (kNphiIndex/2 -1)-iphi;  //11-iphi [1/2SM], revert the ordering on C side in order to keep convention.
     yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/2);
   } else if( GetSMType(nSupMod) == kEMCAL_3rd ){
     if(nSupMod%2 != 0)  iphi2 = (kNphiIndex/3 -1)-iphi;  // 7-iphi [1/3SM], revert the ordering on C side in order to keep convention.
     yr = fCentersOfCellsPhiDir.At(iphi2 + kNphiIndex/3);
   } else {
     if(nSupMod%2 != 0)  iphi2 = (kNphiIndex   -1)-iphi;// 23-iphi, revert the ordering on C side in order to keep convention.
     yr = fCentersOfCellsPhiDir.At(iphi2);
   }
  
  AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
  
  return kTRUE;
}

//________________________________________________________________________________________________
void AliEMCALGeometry::CreateListOfTrd1Modules()
{
  // Generate the list of Trd1 modules
  // which will make up the EMCAL
  // geometry
  // key: look to the AliEMCALShishKebabTrd1Module::

  AliDebug(2,Form(" AliEMCALGeometry::CreateListOfTrd1Modules() started "));

  AliEMCALShishKebabTrd1Module *mod=0, *mTmp=0; // current module
  if(fShishKebabTrd1Modules == 0) {
    fShishKebabTrd1Modules = new TList;
    fShishKebabTrd1Modules->SetName("ListOfTRD1");
    for(int iz=0; iz< fEMCGeometry->GetNZ(); iz++) {
      if(iz==0) {
	//        mod  = new AliEMCALShishKebabTrd1Module(TMath::Pi()/2.,this);
        mod  = new AliEMCALShishKebabTrd1Module(TMath::Pi()/2.,fEMCGeometry);
      } else {
        mTmp  = new AliEMCALShishKebabTrd1Module(*mod);
        mod   = mTmp;
      }
      fShishKebabTrd1Modules->Add(mod);
    }
  } else {
    AliDebug(2,Form(" Already exits : "));
  }
  mod = (AliEMCALShishKebabTrd1Module*)fShishKebabTrd1Modules->At(fShishKebabTrd1Modules->GetSize()-1);
  fEtaMaxOfTRD1 = mod->GetMaxEtaOfModule(0);

  AliDebug(2,Form(" fShishKebabTrd1Modules has %i modules : max eta %5.4f \n",
                  fShishKebabTrd1Modules->GetSize(),fEtaMaxOfTRD1));
  // Feb 20,2006;
  // Jun 01, 2006 - ALICE numbering scheme
  // define grid for cells in eta(z) and x directions in local coordinates system of SM
  // Works just for 2x2 case only -- ?? start here
  //
  //
  // Define grid for cells in phi(y) direction in local coordinates system of SM
  // as for 2X2 as for 3X3 - Nov 8,2006
  //
  AliDebug(2,Form(" Cells grid in phi directions : size %i\n", fCentersOfCellsPhiDir.GetSize()));
  Int_t ind=0; // this is phi index
  Int_t ieta=0, nModule=0, iphiTemp;
  Double_t xr=0., zr=0., theta=0., phi=0., eta=0., r=0., x=0.,y=0.;
  TVector3 vglob;
  Double_t ytCenterModule=0.0, ytCenterCell=0.0;

  fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
  fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);

  Double_t r0 = fIPDistance + fLongModuleSize/2.;
  for(Int_t it=0; it<fNPhi; it++) { // cycle on modules
    ytCenterModule = -fParSM[1] + fPhiModuleSize*(2*it+1)/2;  // center of module
    for(Int_t ic=0; ic<fNPHIdiv; ic++) { // cycle on cells in module
      if(fNPHIdiv==2) {
        ytCenterCell = ytCenterModule + fPhiTileSize *(2*ic-1)/2.;
      } else if(fNPHIdiv==3){
        ytCenterCell = ytCenterModule + fPhiTileSize *(ic-1);
      } else if(fNPHIdiv==1){
        ytCenterCell = ytCenterModule;
      }
      fCentersOfCellsPhiDir.AddAt(ytCenterCell,ind);
      // Define grid on phi direction
      // Grid is not the same for different eta bin;
      // Effect is small but is still here
      phi = TMath::ATan2(ytCenterCell, r0);
      fPhiCentersOfCells.AddAt(phi, ind);

      AliDebug(2,Form(" ind %2.2i : y %8.3f ", ind, fCentersOfCellsPhiDir.At(ind)));
      ind++;
    }
  }

  fCentersOfCellsEtaDir.Set(fNZ *fNETAdiv);
  fCentersOfCellsXDir.Set(fNZ *fNETAdiv);
  fEtaCentersOfCells.Set(fNZ *fNETAdiv * fNPhi*fNPHIdiv);
  AliDebug(2,Form(" Cells grid in eta directions : size %i\n", fCentersOfCellsEtaDir.GetSize()));
  for(Int_t it=0; it<fNZ; it++) {
    AliEMCALShishKebabTrd1Module *trd1 = GetShishKebabModule(it);
    nModule = fNPhi*it;
    for(Int_t ic=0; ic<fNETAdiv; ic++) {
      if(fNPHIdiv==2) {
        trd1->GetCenterOfCellInLocalCoordinateofSM(ic, xr, zr);      // case of 2X2
        GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
      } if(fNPHIdiv==3) {
        trd1->GetCenterOfCellInLocalCoordinateofSM3X3(ic, xr, zr);  // case of 3X3
        GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
      } if(fNPHIdiv==1) {
        trd1->GetCenterOfCellInLocalCoordinateofSM1X1(xr, zr);      // case of 1X1
        GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
      }
      fCentersOfCellsXDir.AddAt(float(xr) - fParSM[0],ieta);
      fCentersOfCellsEtaDir.AddAt(float(zr) - fParSM[2],ieta);
      // Define grid on eta direction for each bin in phi
      for(int iphi=0; iphi<fCentersOfCellsPhiDir.GetSize(); iphi++) {
        x = xr + trd1->GetRadius();
        y = fCentersOfCellsPhiDir[iphi];
        r = TMath::Sqrt(x*x + y*y + zr*zr);
        theta = TMath::ACos(zr/r);
        eta   = AliEMCALShishKebabTrd1Module::ThetaToEta(theta);
        //        ind   = ieta*fCentersOfCellsPhiDir.GetSize() + iphi;
        ind   = iphi*fCentersOfCellsEtaDir.GetSize() + ieta;
        fEtaCentersOfCells.AddAt(eta, ind);
      }
      //printf(" ieta %i : xr + trd1->GetRadius() %f : zr %f : eta %f \n", ieta, xr + trd1->GetRadius(), zr, eta);
    }
  }
  for(Int_t i=0; i<fCentersOfCellsEtaDir.GetSize(); i++) {
    AliDebug(2,Form(" ind %2.2i : z %8.3f : x %8.3f", i+1,
                    fCentersOfCellsEtaDir.At(i),fCentersOfCellsXDir.At(i)));
  }

}

//________________________________________________________________________________________________
AliEMCALShishKebabTrd1Module* AliEMCALGeometry::GetShishKebabModule(Int_t neta) const
{
  //This method was too long to be
  //included in the header file - the
  //rule checker complained about it's
  //length, so we move it here.  It returns the
  //shishkebabmodule at a given eta index point.

  static AliEMCALShishKebabTrd1Module* trd1=0;
  if(fShishKebabTrd1Modules && neta>=0 && neta<fShishKebabTrd1Modules->GetSize()) {
    trd1 = (AliEMCALShishKebabTrd1Module*)fShishKebabTrd1Modules->At(neta);
  } else trd1 = 0;
  return trd1;
}

//___________________________________________________________________
void AliEMCALGeometry::PrintGeometryGeoUtils()
{
  //Print information from geometry
  fEMCGeometry->PrintGeometry();

  printf(" fShishKebabTrd1Modules has %i modules : max eta %5.4f \n", 
	 fShishKebabTrd1Modules->GetSize(),fEtaMaxOfTRD1);
  
  printf("\n Cells grid in eta directions : size %i\n", fCentersOfCellsEtaDir.GetSize());
  for(Int_t i=0; i<fCentersOfCellsEtaDir.GetSize(); i++) {
    printf(" ind %2.2i : z %8.3f : x %8.3f \n", i, 
	   fCentersOfCellsEtaDir.At(i),fCentersOfCellsXDir.At(i));
    int ind=0; // Nov 21,2006
    for(Int_t iphi=0; iphi<fCentersOfCellsPhiDir.GetSize(); iphi++) {
      ind = iphi*fCentersOfCellsEtaDir.GetSize() + i;
      printf("%6.4f ", fEtaCentersOfCells[ind]);
      if((iphi+1)%12 == 0) printf("\n");
    }
    printf("\n");
    
  }

  printf("\n Cells grid in phi directions : size %i\n", fCentersOfCellsPhiDir.GetSize());
  for(Int_t i=0; i<fCentersOfCellsPhiDir.GetSize(); i++) {
    double phi=fPhiCentersOfCells.At(i);
    printf(" ind %2.2i : y %8.3f : phi %7.5f(%6.2f) \n", i, fCentersOfCellsPhiDir.At(i), 
	   phi, phi*TMath::RadToDeg());
  }
}

//____________________________________________________________________________
Bool_t  AliEMCALGeometry::Impact(const TParticle * particle) const 
{
  // Tells if a particle enters EMCAL
  Bool_t in=kFALSE;
  Int_t absID=0;
  TVector3 vtx(particle->Vx(),particle->Vy(),particle->Vz());
  TVector3 vimpact(0,0,0);
  ImpactOnEmcal(vtx,particle->Theta(),particle->Phi(),absID,vimpact);
  if(absID>=0) 
    in=kTRUE;
  return in;
}
//____________________________________________________________________________
void AliEMCALGeometry::ImpactOnEmcal(TVector3 vtx, Double_t theta, Double_t phi, 
				     Int_t & absId, TVector3 & vimpact) const
{
  // calculates the impact coordinates on EMCAL (centre of a tower/not on EMCAL surface) 
  // of a neutral particle  
  // emitted in the vertex vtx[3] with direction theta and phi in the ALICE global coordinate system

  TVector3 p(TMath::Sin(theta)*TMath::Cos(phi),TMath::Sin(theta)*TMath::Sin(phi),TMath::Cos(theta)) ;

  vimpact.SetXYZ(0,0,0);
  absId=-1;
  if(phi==0 || theta==0) return;

  TVector3 direction;
  Double_t factor = (fIPDistance-vtx[1])/p[1];
  direction = vtx + factor*p;

  //from particle direction -> tower hitted
  GetAbsCellIdFromEtaPhi(direction.Eta(),direction.Phi(),absId);
  
  //tower absID hitted -> tower/module plane (evaluated at the center of the tower)
  Int_t nSupMod=-1, nModule=-1, nIphi=-1, nIeta=-1;
  Double_t loc[3],loc2[3],loc3[3];
  Double_t glob[3]={},glob2[3]={},glob3[3]={};
  
  if(!RelPosCellInSModule(absId,loc)) return;
  
  //loc is cell center of tower
  GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);

  //look at 2 neighbours-s cell using nIphi={0,1} and nIeta={0,1}
  Int_t nIphi2=-1,nIeta2=-1,absId2=-1,absId3=-1;
  if(nIeta==0) nIeta2=1;
  else nIeta2=0;
  absId2=GetAbsCellId(nSupMod,nModule,nIphi,nIeta2);  
  if(nIphi==0) nIphi2=1;
  else nIphi2=0;
  absId3=GetAbsCellId(nSupMod,nModule,nIphi2,nIeta);

  //2nd point on emcal cell plane
  if(!RelPosCellInSModule(absId2,loc2)) return;
    
  //3rd point on emcal cell plane
  if(!RelPosCellInSModule(absId3,loc3)) return;
    
  // Get Matrix
  const TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod);
  if(m) {
    m->LocalToMaster(loc, glob);
    m->LocalToMaster(loc2, glob2);
    m->LocalToMaster(loc3, glob3);
  } else {
    AliFatal("Geo matrixes are not loaded \n") ;
  }

  //Equation of Plane from glob,glob2,glob3 (Ax+By+Cz+D=0)
  Double_t a = glob[1]*(glob2[2]-glob3[2]) + glob2[1]*(glob3[2]-glob[2]) + glob3[1]*(glob[2]-glob2[2]);
  Double_t b = glob[2]*(glob2[0]-glob3[0]) + glob2[2]*(glob3[0]-glob[0]) + glob3[2]*(glob[0]-glob2[0]);
  Double_t c = glob[0]*(glob2[1]-glob3[1]) + glob2[0]*(glob3[1]-glob[1]) + glob3[0]*(glob[1]-glob2[1]);
  Double_t d = glob[0]*(glob2[1]*glob3[2]-glob3[1]*glob2[2]) + glob2[0]*(glob3[1]*glob[2]-glob[1]*glob3[2]) + glob3[0]*(glob[1]*glob2[2]-glob2[1]*glob[2]);
  d=-d;
  
  //shift equation of plane from tower/module center to surface along vector (A,B,C) normal to tower/module plane
  Double_t dist = fLongModuleSize/2.;
  Double_t norm = TMath::Sqrt(a*a+b*b+c*c);
  Double_t glob4[3]={};
  TVector3 dir(a,b,c);
  TVector3 point(glob[0],glob[1],glob[2]); 
  if(point.Dot(dir)<0) dist*=-1;
  glob4[0]=glob[0]-dist*a/norm;
  glob4[1]=glob[1]-dist*b/norm;
  glob4[2]=glob[2]-dist*c/norm;
  d = glob4[0]*a +  glob4[1]*b +  glob4[2]*c ;
  d = -d;

  //Line determination (2 points for equation of line : vtx and direction)
  //impact between line (particle) and plane (module/tower plane)
  Double_t den = a*(vtx(0)-direction(0)) + b*(vtx(1)-direction(1)) + c*(vtx(2)-direction(2));
  if(den==0){
    printf("ImpactOnEmcal() No solution :\n");
    return;
  }
  
  Double_t length = a*vtx(0)+b*vtx(1)+c*vtx(2)+d;
  length /=den;
  
  vimpact.SetXYZ(vtx(0)+length*(direction(0)-vtx(0)),vtx(1)+length*(direction(1)-vtx(1)),vtx(2)+length*(direction(2)-vtx(2)));
  
  //shift vimpact from tower/module surface to center along vector (A,B,C) normal to tower/module plane
  vimpact.SetXYZ(vimpact(0)+dist*a/norm,vimpact(1)+dist*b/norm,vimpact(2)+dist*c/norm);
  
  return;
}

//_____________________________________________________________________________
Bool_t AliEMCALGeometry::IsInEMCAL(Double_t x, Double_t y, Double_t z) const 
{
  // Checks whether point is inside the EMCal volume 
  if( IsInEMCALOrDCAL(x,y,z) == 1 ) return kTRUE;
  else return kFALSE;
}

//_____________________________________________________________________________
Bool_t AliEMCALGeometry::IsInDCAL(Double_t x, Double_t y, Double_t z) const 
{
  // Checks whether point is inside the DCal volume
  if( IsInEMCALOrDCAL(x,y,z) == 2 ) return kTRUE;
  else return kFALSE;
}

//_____________________________________________________________________________
Int_t AliEMCALGeometry::IsInEMCALOrDCAL(Double_t x, Double_t y, Double_t z) const 
{
  // Checks whether point is inside the EMCal volume (included DCal), used in AliEMCALv*.cxx
  //
  // Code uses cylindrical approximation made of inner radius (for speed)
  //
  // Points behind EMCAl/DCal, i.e. R > outer radius, but eta, phi in acceptance 
  // are considered to inside

  Double_t r=sqrt(x*x+y*y);

  if ( r <= fEnvelop[0] ) return 0;
  else {
    Double_t theta = TMath::ATan2(r,z);
    Double_t eta;
    if(theta == 0)  eta = 9999;
    else            eta = -TMath::Log(TMath::Tan(theta/2.));
    if (eta < fArm1EtaMin || eta > fArm1EtaMax) return 0;

    Double_t phi = TMath::ATan2(y,x) * 180./TMath::Pi();
    if (phi < 0) phi += 360;  // phi should go from 0 to 360 in this case

    if (      phi >= fArm1PhiMin         && phi <= fEMCALPhiMax ) return 1;
    else if ( phi >= fDCALPhiMin         && phi <= fDCALStandardPhiMax && TMath::Abs(eta) > fDCALInnerExtandedEta ) return 2;
    else if ( phi > fDCALStandardPhiMax  && phi <= fDCALPhiMax  ) return 2;
    else return 0;
  } 
}

//________________________________________________________________________________________________
Int_t AliEMCALGeometry::GetAbsTRUNumberFromNumberInSm(const Int_t row, const Int_t col, const Int_t sm) const
{ 
  // Nov 6, 2007
  // Get TRU absolute number from column, row and Super Module number
  Int_t itru = row + col*fEMCGeometry->GetNModulesInTRUPhi() + sm*fEMCGeometry->GetNTRU();
  // printf("  GetAbsTRUNumberFromNumberInSm : row %2i col %2i sm %2i -> itru %2i\n", row, col, sm, itru); 
  return itru;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetAbsFastORIndexFromTRU(const Int_t iTRU, const Int_t iADC, Int_t& id) const
{
  //Trigger mapping method, get  FastOr Index from TRU

  if (iTRU > GetNTotalTRU()-1 || iTRU < 0 || iADC > 95 || iADC < 0) 
  {
    AliError("TRU out of range!");
    return kFALSE;
  }
	
  id  = ( iTRU % 2 ) ? iADC%4 + 4 * (23 - int(iADC/4)) : (3 - iADC%4) + 4 * int(iADC/4);
  id += iTRU * 96;
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iADC) const
{
  //Trigger mapping method, get TRU number from FastOr Index

  Int_t nModule = GetNTotalTRU()*96;
  if (id > nModule-1 || id < 0)
  {
    AliError("Id out of range!");
    return kFALSE;
  }
	
  iTRU = id / 96;
  iADC = id % 96;
  iADC = ( iTRU % 2 ) ? iADC%4 + 4 * (23 - int(iADC/4)) : (3 - iADC%4) + 4 * int(iADC/4);
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetPositionInTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iEta, Int_t& iPhi) const
{
  //Trigger mapping method, get position in TRU from FasOr Index
	
  Int_t iADC=-1;	
  if (!GetTRUFromAbsFastORIndex(id, iTRU, iADC)) return kFALSE;
	
  Int_t x = iADC / 4;
  Int_t y = iADC % 4;
  if ( iTRU % 2 ) // C side 
  {
    iEta = 23 - x;
    iPhi =      y;
  }
  else            // A side
  {
    iEta =      x;
    iPhi =  3 - y;
  }
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t& iSM, Int_t& iEta, Int_t& iPhi) const
{
  //Trigger mapping method, get position in Super Module from FasOr Index

  Int_t iTRU=-1;
  if (!GetPositionInTRUFromAbsFastORIndex(id, iTRU, iEta, iPhi)) return kFALSE;
  if (iTRU % 2) // C side
  {
    iSM  = 2 * ( int( int(iTRU / 2) / 3 ) ) + 1;
  }
  else            // A side
  {
    iSM  = 2 * ( int( int(iTRU / 2) / 3 ) );
  }
  iPhi += 4 * int((iTRU % 6) / 2);
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetPositionInEMCALFromAbsFastORIndex(const Int_t id, Int_t& iEta, Int_t& iPhi) const
{
  //Trigger mapping method, get position in EMCAL from FastOR index

  Int_t iSM=-1;
  if (GetPositionInSMFromAbsFastORIndex(id, iSM, iEta, iPhi))
  {
    if (iSM % 2) iEta += 24; 
    iPhi += 12 * int(iSM / 2);
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetAbsFastORIndexFromPositionInTRU(const Int_t iTRU, const Int_t iEta, const Int_t iPhi, Int_t& id) const
{
  //Trigger mapping method, get Index if FastOr from Position in TRU
  if (iTRU < 0 || iTRU > GetNTotalTRU()-1 || iEta < 0 || iEta > 23 || iPhi < 0 || iPhi > 3) 
  {
    AliError(Form("Out of range! iTRU=%d, iEta=%d, iPhi=%d", iTRU, iEta, iPhi));	
    return kFALSE;
  }
  id =  iPhi  + 4 * iEta + iTRU * 96;
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetAbsFastORIndexFromPositionInSM(const Int_t  iSM, const Int_t iEta, const Int_t iPhi, Int_t& id) const
{
  //Trigger mapping method, from position in SM Index get FastOR index 

  Int_t iSMMax  = fEMCGeometry->GetNumberOfSuperModules();
  Int_t iEtaMax = fEMCGeometry->GetNZ();
  Int_t iPhiMax = fEMCGeometry->GetNPhi();
  if( GetSMType(iSM) == kEMCAL_3rd || GetSMType(iSM) == kDCAL_Ext ) iPhiMax /= 3;
  if( GetSMType(iSM) == kEMCAL_Half )                               iPhiMax /= 2;
  if( GetSMType(iSM) == kDCAL_Standard )                            iEtaMax = iEtaMax*2/3;

  if (iSM < 0 || iSM >= iSMMax || iEta < 0 || iEta >= iEtaMax || iPhi < 0 || iPhi >= iPhiMax) 
  {
    AliError("Out of range!");
    return kFALSE;
  }
  Int_t x = iEta;
  Int_t y = iPhi % 4;	
  Int_t iOff = (iSM % 2) ? 1 : 0;
  Int_t iTRU = 2 * int(iPhi / 4) + 6 * int(iSM / 2) + iOff;
  if(IsDCALSM(iSM) ) iTRU -=4;
  if (GetAbsFastORIndexFromPositionInTRU(iTRU, x, y, id))
  {
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetAbsFastORIndexFromPositionInEMCAL(const Int_t iEta, const Int_t iPhi, Int_t& id) const
{
  //Trigger mapping method, from position in EMCAL Index get FastOR index 

  if (iEta < 0 || iEta > 47 || iPhi < 0 || iPhi >= 2*GetNTotalTRU() )//for future DCAL trigge
  {
    AliError(Form("Out of range! eta: %2d phi: %2d", iEta, iPhi));
    return kFALSE;
  }
  if (fFastOR2DMap[iEta][iPhi] == -1) 
  {
    AliError("Invalid index!");
    return kFALSE;
  }
  id = fFastOR2DMap[iEta][iPhi];
  return kTRUE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetFastORIndexFromCellIndex(const Int_t id, Int_t& idx) const
{
  //Trigger mapping method, from cell index get FastOR index 

  Int_t iSupMod, nModule, nIphi, nIeta, iphim, ietam;
  Bool_t isOK = GetCellIndex( id, iSupMod, nModule, nIphi, nIeta );
  GetModulePhiEtaIndexInSModule( iSupMod, nModule, iphim, ietam );
  if (isOK && GetAbsFastORIndexFromPositionInSM(iSupMod, ietam, iphim, idx))
  {
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetCellIndexFromFastORIndex(const Int_t id, Int_t idx[4]) const
{
  //Trigger mapping method, from FASTOR index get cell index 

  Int_t iSM=-1, iEta=-1, iPhi=-1;
  if (GetPositionInSMFromAbsFastORIndex(id, iSM, iEta, iPhi))
  {
    Int_t ix = 2 * iEta;
    Int_t iy = 2 * iPhi;
    for (Int_t i=0; i<2; i++)
    {
      for (Int_t j=0; j<2; j++)
      {
        idx[2*i+j] = GetAbsCellIdFromCellIndexes(iSM, iy + i, ix + j);
      }
    }
    return kTRUE;
  }
  return kFALSE;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetTRUIndexFromSTUIndex(const Int_t id, Int_t& idx) const
{
  //Trigger mapping method, from STU index get TRU index 

   idx = GetTRUIndexFromSTUIndex(id);
   if (idx > GetNTotalTRU()-1 || idx < 0)
   {
     AliError(Form("TRU index out of range: %d",idx));
     return kFALSE;
   }
   return kTRUE;
}

//________________________________________________________________________________________________
Int_t AliEMCALGeometry::GetTRUIndexFromSTUIndex(const Int_t id) const
{
  //Trigger mapping method, from STU index get TRU index 

  if (id > GetNTotalTRU()-1 || id < 0) 
  {
    AliError(Form("TRU index out of range: %d",id));
  }

  Int_t idx = 0;
  if(id < 32){
    idx = (id > 15) ? 2 * (31 - id) : 2 * (15 - id) + 1;
  } else if(id >= 32){// DCAL
    idx = (id > 32+3*fnSupModInDCAL/2-1) ? 2 * (GetNTotalTRU()-1 - id)+32 : 2 * (32+3*fnSupModInDCAL/2-1 - id) + 32+1;
  }
  return idx;
}

//________________________________________________________________________________________________
void AliEMCALGeometry::BuildFastOR2DMap()
{
  // Needed by STU

  for (Int_t i = 0; i < GetNTotalTRU(); i++)
  {
    for (Int_t j = 0; j < 24; j++)
    {
      for (Int_t k = 0; k < 4; k++)
      {
        Int_t id;
        if (GetAbsFastORIndexFromPositionInTRU(i, j, k, id))
        {
          Int_t x = j, y = k + 4 * int(i / 2);
          if (i % 2) x += 24;
          fFastOR2DMap[x][y] = id;
        }
      }			
    }
  }
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetTRUIndexFromOnlineIndex(const Int_t id, Int_t& idx) const
{
  //Trigger mapping method, from STU index get TRU index 

   idx = GetOnlineIndexFromTRUIndex(id);
   if (idx > GetNTotalTRU()-1 || idx < 0)
   {
     AliError(Form("TRU index out of range: %d",idx));
     return kFALSE;
   }
   return kTRUE;
}

//________________________________________________________________________________________________
Int_t AliEMCALGeometry::GetTRUIndexFromOnlineIndex(const Int_t id) const
{
  //Trigger mapping method, from STU index get TRU index 
	
  if (id > GetNTotalTRU()-1 || id < 0) 
  {
    AliError(Form("TRU index out of range: %d",id));
  }
  if (id == 31) {
    return 31;
  }
  if (fGeoName.Contains("DCAL_8SM") && id == 51) {
    return 51;
  }

  //jump 4 TRUs for DCAL
  Int_t tmp=0;
  if(id > 31) tmp = id+4;
  else        tmp = id;
  Int_t idx = ((tmp% 6) < 3) ? 6 * int(tmp/ 6) + 2 * (tmp% 3) : 6 * int(tmp/ 6) + 2 * (2 - (tmp% 3)) + 1;
  if(id > 31) idx-=4;
  return idx;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetOnlineIndexFromTRUIndex(const Int_t id, Int_t& idx) const
{
  //Trigger mapping method, from STU index get TRU index 
 
    idx = GetOnlineIndexFromTRUIndex(id);
    if (idx > GetNTotalTRU()-1 || idx < 0)
   {
     AliError(Form("TRU index out of range: %d",idx));
     return kFALSE;
   }
   return kTRUE;
}
//________________________________________________________________________________________________
Int_t AliEMCALGeometry::GetOnlineIndexFromTRUIndex(const Int_t id) const
{
  //Trigger mapping method, from STU index get TRU index 
	
  if (id > GetNTotalTRU()-1 || id < 0) 
  {
    AliError(Form("TRU index out of range: %d",id));
  }
  if (id == 31) {
    return 31;
  }
  if (fGeoName.Contains("DCAL_8SM") && id == 51) {
    return 51;
  }

  //jump 4 TRUs for DCAL
  Int_t tmp=0;
  if(id > 31) tmp = id+4;
  else        tmp = id;
  Int_t idx = (tmp % 2) ? int((6 - (tmp % 6)) / 2) + 3 * (2 * int(tmp / 6) + 1) : 3 * int(tmp / 6) + int(tmp / 2);
  if(id > 31) idx-=4;
  return idx;
}

//________________________________________________________________________________________________
Bool_t AliEMCALGeometry::GetFastORIndexFromL0Index(const Int_t iTRU, const Int_t id, Int_t idx[], const Int_t size) const
{
  //Trigger mapping method, from L0 index get FastOR index 

  if (size <= 0 ||size > 4)
  {
    AliError("Size not supported!");
    return kFALSE;
  }
		
  Int_t motif[4] = {0, 1, 4, 5};
  switch (size)
  {
    case 1: // Cosmic trigger
      if (!GetAbsFastORIndexFromTRU(iTRU, id, idx[1])) return kFALSE;
      break;
    case 4: // 4 x 4
      for (Int_t k = 0; k < 4; k++)
      {
        Int_t iADC = motif[k] + 4 * int(id / 3) + (id % 3);
				
        if (!GetAbsFastORIndexFromTRU(iTRU, iADC, idx[k])) return kFALSE;
      }
      break;
    default:
      break;
  }
	
  return kTRUE;
}

//____________________________________________________________________________
const TGeoHMatrix * AliEMCALGeometry::GetMatrixForSuperModule(Int_t smod) const 
{
  //Provides shift-rotation matrix for EMCAL
	
  if(smod < 0 || smod > fEMCGeometry->GetNumberOfSuperModules()) 
    AliFatal(Form("Wrong supermodule index -> %d",smod));
		
  //If GeoManager exists, take matrixes from it
	
  //
  //    if(fKey110DEG && ind>=10) {
  //    }
  //
  //    if(!gGeoManager->cd(volpath.Data()))
  //      AliFatal(Form("AliEMCALGeometry::GeoManager cannot find path %s!",volpath.Data()));
  //
  //    TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
  
  //Use matrices set externally
  if(!gGeoManager || (gGeoManager && fUseExternalMatrices)){
    if(fkSModuleMatrix[smod]){
      return fkSModuleMatrix[smod] ;
    }
    else{
      AliInfo("Stop:");
      printf("\t Can not find EMCAL misalignment matrixes\n") ;
      printf("\t Either import TGeoManager from geometry.root or \n");
      printf("\t read stored matrixes from AliESD Header:  \n") ;   
      printf("\t AliEMCALGeometry::SetMisalMatrixes(header->GetEMCALMisalMatrix()) \n") ;
      AliFatal("") ;
    }  
  }//external matrices
  
  if(gGeoManager){
    const Int_t buffersize = 255;
    char path[buffersize] ;
    TString SMName;
    Int_t tmpType = -1;
    Int_t SMOrder = 0;
//Get the order for SM
    for( Int_t i = 0; i < smod+1; i++){
      if(GetSMType(i) == tmpType) {
        SMOrder++;
      } else {
        tmpType = GetSMType(i);
        SMOrder = 1;
      }
    } 

    if(GetSMType(smod) == kEMCAL_Standard )      SMName = "SMOD";
    else if(GetSMType(smod) == kEMCAL_Half )     SMName = "SM10";
    else if(GetSMType(smod) == kEMCAL_3rd )      SMName = "SM3rd";
    else if( GetSMType(smod) == kDCAL_Standard ) SMName = "DCSM";
    else if( GetSMType(smod) == kDCAL_Ext )      SMName = "DCEXT";
    else AliError("Unkown SM Type!!");
    snprintf(path,buffersize,"/ALIC_1/XEN1_1/%s_%d", SMName.Data(), SMOrder) ;

    if (!gGeoManager->cd(path)){
      AliFatal(Form("Geo manager can not find path %s!\n",path));
    }
    return gGeoManager->GetCurrentMatrix();
  }
  return 0 ;
}

//______________________________________________________________________
void AliEMCALGeometry::GetModulePhiEtaIndexInSModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru, Int_t &iphiSM, Int_t &ietaSM) const 
{
  // This method transforms the (eta,phi) index of module in a 
  // TRU matrix into Super Module (eta,phi) index.
  
  // Calculate in which row and column where the TRU are 
  // ordered in the SM

  Int_t col = itru/fEMCGeometry->GetNTRUPhi() ; // indexes of TRU in SM
  Int_t row = itru - col*fEMCGeometry->GetNTRUPhi();
   
  iphiSM = fEMCGeometry->GetNModulesInTRUPhi()*row + iphitru  ;
  ietaSM = fEMCGeometry->GetNModulesInTRUEta()*col + ietatru  ; 
}

//__________________________________________________________________________________________________________________
void AliEMCALGeometry::RecalculateTowerPosition(Float_t drow, Float_t dcol, const Int_t sm, const Float_t depth,
                                                const Float_t misaligTransShifts[15], const Float_t misaligRotShifts[15], Float_t global[3]) const
{ 
  //Transform clusters cell position into global with alternative method, taking into account the depth calculation.
  //Input are: the tower indeces, 
  //           supermodule, 
  //           particle type (photon 0, electron 1, hadron 2 )
  //           misalignment shifts to global position in case of need.
  // Federico.Ronchetti@cern.ch
    
  // To use in a print later
  Float_t droworg = drow;
  Float_t dcolorg = dcol;
  
  if(gGeoManager){
    //Recover some stuff

    const Int_t nSMod = fEMCGeometry->GetNumberOfSuperModules();
 
    gGeoManager->cd("ALIC_1/XEN1_1");
    TGeoNode        *geoXEn1 = gGeoManager->GetCurrentNode();
    TGeoNodeMatrix  *geoSM[nSMod];        
    TGeoVolume      *geoSMVol[nSMod];     
    TGeoShape       *geoSMShape[nSMod];    
    TGeoBBox        *geoBox[nSMod];        
    TGeoMatrix      *geoSMMatrix[nSMod];       
    
    for(int iSM = 0; iSM < nSMod; iSM++) {  
      geoSM[iSM]       = dynamic_cast<TGeoNodeMatrix *>(geoXEn1->GetDaughter(iSM));
      geoSMVol[iSM]    = geoSM[iSM]->GetVolume(); 
      geoSMShape[iSM]  = geoSMVol[iSM]->GetShape();
      geoBox[iSM]      = dynamic_cast<TGeoBBox *>(geoSMShape[iSM]);
      geoSMMatrix[iSM] = geoSM[iSM]->GetMatrix();
    }
    
    if(sm % 2 == 0) {
      dcol = 47. - dcol;
      drow = 23. - drow;
    }
    
    Int_t istrip = 0;
    Float_t z0   = 0;
    Float_t zb   = 0;
    Float_t zIs = 0;
    
    Float_t x,y,z; // return variables in terry's RF
    
    //***********************************************************
    //Do not like this: too many hardcoded values, is it not already stored somewhere else?
    //                : need more comments in the code 
    //***********************************************************
    
    Float_t dz = 6.0;   // base cell width in eta
    Float_t dx = 6.004; // base cell width in phi
    
    
    //Float_t L = 26.04; // active tower length for hadron (lead+scint+paper)
    // we use the geant numbers 13.87*2=27.74
    Float_t teta1 = 0.;
      
    //Do some basic checks
    if (dcol >= 47.5 || dcol<-0.5) {
      AliError(Form("Bad tower coordinate dcol=%f, where dcol >= 47.5 || dcol<-0.5; org: %f", dcol, dcolorg));
      return;
    }
    if (drow >= 23.5 || drow<-0.5) {
      AliError(Form("Bad tower coordinate drow=%f, where drow >= 23.5 || drow<-0.5; org: %f", drow, droworg));
      return;
    }
    if (sm >= nSMod || sm < 0) {
      AliError(Form("Bad SM number sm=%d, where sm >= %d || sm < 0", nSMod, sm));
      return;
    }    
    
    istrip = int ((dcol+0.5)/2);
    
    // tapering angle
    teta1 = TMath::DegToRad() * istrip * 1.5;
    
    // calculation of module corner along z 
    // as a function of strip
    
    for (int is=0; is<= istrip; is++) {
      
      teta1 = TMath::DegToRad() * (is*1.5 + 0.75);
      if(is==0)
        zIs = zIs + 2*dz*TMath::Cos(teta1);
      else
        zIs = zIs + 2*dz*TMath::Cos(teta1) + 2*dz*TMath::Sin(teta1)*TMath::Tan(teta1-0.75*TMath::DegToRad());
      
    }
    
    z0 = dz*(dcol-2*istrip+0.5);
    zb = (2*dz-z0-depth*TMath::Tan(teta1));
    
    z = zIs - zb*TMath::Cos(teta1);
    y = depth/TMath::Cos(teta1) + zb*TMath::Sin(teta1);
    
    x = (drow + 0.5)*dx;
    
    // moving the origin from terry's RF
    // to the GEANT one
    
    double xx =  y - geoBox[sm]->GetDX();
    double yy = -x + geoBox[sm]->GetDY(); 
    double zz =  z - geoBox[sm]->GetDZ(); 
    const double localIn[3] = {xx, yy, zz};
    double dglobal[3];
    //geoSMMatrix[sm]->Print();
    //printf("TFF Local    (row = %d, col = %d, x = %3.2f,  y = %3.2f, z = %3.2f)\n", iroworg, icolorg, localIn[0], localIn[1], localIn[2]);
    geoSMMatrix[sm]->LocalToMaster(localIn, dglobal);
    //printf("TFF Global   (row = %2.0f, col = %2.0f, x = %3.2f,  y = %3.2f, z = %3.2f)\n", drow, dcol, dglobal[0], dglobal[1], dglobal[2]);
    
    //apply global shifts
    if(sm == 2 || sm == 3) {//sector 1
      global[0] = dglobal[0] + misaligTransShifts[3] + misaligRotShifts[3]*TMath::Sin(TMath::DegToRad()*20) ; 
      global[1] = dglobal[1] + misaligTransShifts[4] + misaligRotShifts[4]*TMath::Cos(TMath::DegToRad()*20) ; 
      global[2] = dglobal[2] + misaligTransShifts[5];
    }
    else if(sm == 0 || sm == 1){//sector 0
      global[0] = dglobal[0] + misaligTransShifts[0]; 
      global[1] = dglobal[1] + misaligTransShifts[1]; 
      global[2] = dglobal[2] + misaligTransShifts[2];
    }
    else {
      AliInfo("Careful, correction not implemented yet!");
      global[0] = dglobal[0] ;
      global[1] = dglobal[1] ;
      global[2] = dglobal[2] ;
    }
  }
  else{
    AliFatal("Geometry boxes information, check that geometry.root is loaded\n");
  }
}

//__________________________________________________________________________________________________________________
void AliEMCALGeometry::SetMisalMatrix(const TGeoHMatrix * m, Int_t smod) 
{
  // Method to set shift-rotational matrixes from ESDHeader
  // Move from header due to coding violations : Dec 2,2011 by PAI
  fUseExternalMatrices = kTRUE;

  if (smod >= 0 && smod < fEMCGeometry->GetNumberOfSuperModules()){
    if(!fkSModuleMatrix[smod]) fkSModuleMatrix[smod] = new TGeoHMatrix(*m) ; //Set only if not set yet
  } else AliFatal(Form("Wrong supermodule index -> %d",smod));
}

//__________________________________________________________________________________________________________________
Bool_t AliEMCALGeometry::IsDCALSM(Int_t iSupMod) const
{
  if( fEMCSMSystem[iSupMod] == kDCAL_Standard || fEMCSMSystem[iSupMod] == kDCAL_Ext ) return kTRUE;
  return kFALSE;
}

//__________________________________________________________________________________________________________________
Bool_t AliEMCALGeometry::IsDCALExtSM(Int_t iSupMod) const
{
  if( fEMCSMSystem[iSupMod] == kDCAL_Ext ) return kTRUE;
  return kFALSE;
}
 AliEMCALGeometry.cxx:1
 AliEMCALGeometry.cxx:2
 AliEMCALGeometry.cxx:3
 AliEMCALGeometry.cxx:4
 AliEMCALGeometry.cxx:5
 AliEMCALGeometry.cxx:6
 AliEMCALGeometry.cxx:7
 AliEMCALGeometry.cxx:8
 AliEMCALGeometry.cxx:9
 AliEMCALGeometry.cxx:10
 AliEMCALGeometry.cxx:11
 AliEMCALGeometry.cxx:12
 AliEMCALGeometry.cxx:13
 AliEMCALGeometry.cxx:14
 AliEMCALGeometry.cxx:15
 AliEMCALGeometry.cxx:16
 AliEMCALGeometry.cxx:17
 AliEMCALGeometry.cxx:18
 AliEMCALGeometry.cxx:19
 AliEMCALGeometry.cxx:20
 AliEMCALGeometry.cxx:21
 AliEMCALGeometry.cxx:22
 AliEMCALGeometry.cxx:23
 AliEMCALGeometry.cxx:24
 AliEMCALGeometry.cxx:25
 AliEMCALGeometry.cxx:26
 AliEMCALGeometry.cxx:27
 AliEMCALGeometry.cxx:28
 AliEMCALGeometry.cxx:29
 AliEMCALGeometry.cxx:30
 AliEMCALGeometry.cxx:31
 AliEMCALGeometry.cxx:32
 AliEMCALGeometry.cxx:33
 AliEMCALGeometry.cxx:34
 AliEMCALGeometry.cxx:35
 AliEMCALGeometry.cxx:36
 AliEMCALGeometry.cxx:37
 AliEMCALGeometry.cxx:38
 AliEMCALGeometry.cxx:39
 AliEMCALGeometry.cxx:40
 AliEMCALGeometry.cxx:41
 AliEMCALGeometry.cxx:42
 AliEMCALGeometry.cxx:43
 AliEMCALGeometry.cxx:44
 AliEMCALGeometry.cxx:45
 AliEMCALGeometry.cxx:46
 AliEMCALGeometry.cxx:47
 AliEMCALGeometry.cxx:48
 AliEMCALGeometry.cxx:49
 AliEMCALGeometry.cxx:50
 AliEMCALGeometry.cxx:51
 AliEMCALGeometry.cxx:52
 AliEMCALGeometry.cxx:53
 AliEMCALGeometry.cxx:54
 AliEMCALGeometry.cxx:55
 AliEMCALGeometry.cxx:56
 AliEMCALGeometry.cxx:57
 AliEMCALGeometry.cxx:58
 AliEMCALGeometry.cxx:59
 AliEMCALGeometry.cxx:60
 AliEMCALGeometry.cxx:61
 AliEMCALGeometry.cxx:62
 AliEMCALGeometry.cxx:63
 AliEMCALGeometry.cxx:64
 AliEMCALGeometry.cxx:65
 AliEMCALGeometry.cxx:66
 AliEMCALGeometry.cxx:67
 AliEMCALGeometry.cxx:68
 AliEMCALGeometry.cxx:69
 AliEMCALGeometry.cxx:70
 AliEMCALGeometry.cxx:71
 AliEMCALGeometry.cxx:72
 AliEMCALGeometry.cxx:73
 AliEMCALGeometry.cxx:74
 AliEMCALGeometry.cxx:75
 AliEMCALGeometry.cxx:76
 AliEMCALGeometry.cxx:77
 AliEMCALGeometry.cxx:78
 AliEMCALGeometry.cxx:79
 AliEMCALGeometry.cxx:80
 AliEMCALGeometry.cxx:81
 AliEMCALGeometry.cxx:82
 AliEMCALGeometry.cxx:83
 AliEMCALGeometry.cxx:84
 AliEMCALGeometry.cxx:85
 AliEMCALGeometry.cxx:86
 AliEMCALGeometry.cxx:87
 AliEMCALGeometry.cxx:88
 AliEMCALGeometry.cxx:89
 AliEMCALGeometry.cxx:90
 AliEMCALGeometry.cxx:91
 AliEMCALGeometry.cxx:92
 AliEMCALGeometry.cxx:93
 AliEMCALGeometry.cxx:94
 AliEMCALGeometry.cxx:95
 AliEMCALGeometry.cxx:96
 AliEMCALGeometry.cxx:97
 AliEMCALGeometry.cxx:98
 AliEMCALGeometry.cxx:99
 AliEMCALGeometry.cxx:100
 AliEMCALGeometry.cxx:101
 AliEMCALGeometry.cxx:102
 AliEMCALGeometry.cxx:103
 AliEMCALGeometry.cxx:104
 AliEMCALGeometry.cxx:105
 AliEMCALGeometry.cxx:106
 AliEMCALGeometry.cxx:107
 AliEMCALGeometry.cxx:108
 AliEMCALGeometry.cxx:109
 AliEMCALGeometry.cxx:110
 AliEMCALGeometry.cxx:111
 AliEMCALGeometry.cxx:112
 AliEMCALGeometry.cxx:113
 AliEMCALGeometry.cxx:114
 AliEMCALGeometry.cxx:115
 AliEMCALGeometry.cxx:116
 AliEMCALGeometry.cxx:117
 AliEMCALGeometry.cxx:118
 AliEMCALGeometry.cxx:119
 AliEMCALGeometry.cxx:120
 AliEMCALGeometry.cxx:121
 AliEMCALGeometry.cxx:122
 AliEMCALGeometry.cxx:123
 AliEMCALGeometry.cxx:124
 AliEMCALGeometry.cxx:125
 AliEMCALGeometry.cxx:126
 AliEMCALGeometry.cxx:127
 AliEMCALGeometry.cxx:128
 AliEMCALGeometry.cxx:129
 AliEMCALGeometry.cxx:130
 AliEMCALGeometry.cxx:131
 AliEMCALGeometry.cxx:132
 AliEMCALGeometry.cxx:133
 AliEMCALGeometry.cxx:134
 AliEMCALGeometry.cxx:135
 AliEMCALGeometry.cxx:136
 AliEMCALGeometry.cxx:137
 AliEMCALGeometry.cxx:138
 AliEMCALGeometry.cxx:139
 AliEMCALGeometry.cxx:140
 AliEMCALGeometry.cxx:141
 AliEMCALGeometry.cxx:142
 AliEMCALGeometry.cxx:143
 AliEMCALGeometry.cxx:144
 AliEMCALGeometry.cxx:145
 AliEMCALGeometry.cxx:146
 AliEMCALGeometry.cxx:147
 AliEMCALGeometry.cxx:148
 AliEMCALGeometry.cxx:149
 AliEMCALGeometry.cxx:150
 AliEMCALGeometry.cxx:151
 AliEMCALGeometry.cxx:152
 AliEMCALGeometry.cxx:153
 AliEMCALGeometry.cxx:154
 AliEMCALGeometry.cxx:155
 AliEMCALGeometry.cxx:156
 AliEMCALGeometry.cxx:157
 AliEMCALGeometry.cxx:158
 AliEMCALGeometry.cxx:159
 AliEMCALGeometry.cxx:160
 AliEMCALGeometry.cxx:161
 AliEMCALGeometry.cxx:162
 AliEMCALGeometry.cxx:163
 AliEMCALGeometry.cxx:164
 AliEMCALGeometry.cxx:165
 AliEMCALGeometry.cxx:166
 AliEMCALGeometry.cxx:167
 AliEMCALGeometry.cxx:168
 AliEMCALGeometry.cxx:169
 AliEMCALGeometry.cxx:170
 AliEMCALGeometry.cxx:171
 AliEMCALGeometry.cxx:172
 AliEMCALGeometry.cxx:173
 AliEMCALGeometry.cxx:174
 AliEMCALGeometry.cxx:175
 AliEMCALGeometry.cxx:176
 AliEMCALGeometry.cxx:177
 AliEMCALGeometry.cxx:178
 AliEMCALGeometry.cxx:179
 AliEMCALGeometry.cxx:180
 AliEMCALGeometry.cxx:181
 AliEMCALGeometry.cxx:182
 AliEMCALGeometry.cxx:183
 AliEMCALGeometry.cxx:184
 AliEMCALGeometry.cxx:185
 AliEMCALGeometry.cxx:186
 AliEMCALGeometry.cxx:187
 AliEMCALGeometry.cxx:188
 AliEMCALGeometry.cxx:189
 AliEMCALGeometry.cxx:190
 AliEMCALGeometry.cxx:191
 AliEMCALGeometry.cxx:192
 AliEMCALGeometry.cxx:193
 AliEMCALGeometry.cxx:194
 AliEMCALGeometry.cxx:195
 AliEMCALGeometry.cxx:196
 AliEMCALGeometry.cxx:197
 AliEMCALGeometry.cxx:198
 AliEMCALGeometry.cxx:199
 AliEMCALGeometry.cxx:200
 AliEMCALGeometry.cxx:201
 AliEMCALGeometry.cxx:202
 AliEMCALGeometry.cxx:203
 AliEMCALGeometry.cxx:204
 AliEMCALGeometry.cxx:205
 AliEMCALGeometry.cxx:206
 AliEMCALGeometry.cxx:207
 AliEMCALGeometry.cxx:208
 AliEMCALGeometry.cxx:209
 AliEMCALGeometry.cxx:210
 AliEMCALGeometry.cxx:211
 AliEMCALGeometry.cxx:212
 AliEMCALGeometry.cxx:213
 AliEMCALGeometry.cxx:214
 AliEMCALGeometry.cxx:215
 AliEMCALGeometry.cxx:216
 AliEMCALGeometry.cxx:217
 AliEMCALGeometry.cxx:218
 AliEMCALGeometry.cxx:219
 AliEMCALGeometry.cxx:220
 AliEMCALGeometry.cxx:221
 AliEMCALGeometry.cxx:222
 AliEMCALGeometry.cxx:223
 AliEMCALGeometry.cxx:224
 AliEMCALGeometry.cxx:225
 AliEMCALGeometry.cxx:226
 AliEMCALGeometry.cxx:227
 AliEMCALGeometry.cxx:228
 AliEMCALGeometry.cxx:229
 AliEMCALGeometry.cxx:230
 AliEMCALGeometry.cxx:231
 AliEMCALGeometry.cxx:232
 AliEMCALGeometry.cxx:233
 AliEMCALGeometry.cxx:234
 AliEMCALGeometry.cxx:235
 AliEMCALGeometry.cxx:236
 AliEMCALGeometry.cxx:237
 AliEMCALGeometry.cxx:238
 AliEMCALGeometry.cxx:239
 AliEMCALGeometry.cxx:240
 AliEMCALGeometry.cxx:241
 AliEMCALGeometry.cxx:242
 AliEMCALGeometry.cxx:243
 AliEMCALGeometry.cxx:244
 AliEMCALGeometry.cxx:245
 AliEMCALGeometry.cxx:246
 AliEMCALGeometry.cxx:247
 AliEMCALGeometry.cxx:248
 AliEMCALGeometry.cxx:249
 AliEMCALGeometry.cxx:250
 AliEMCALGeometry.cxx:251
 AliEMCALGeometry.cxx:252
 AliEMCALGeometry.cxx:253
 AliEMCALGeometry.cxx:254
 AliEMCALGeometry.cxx:255
 AliEMCALGeometry.cxx:256
 AliEMCALGeometry.cxx:257
 AliEMCALGeometry.cxx:258
 AliEMCALGeometry.cxx:259
 AliEMCALGeometry.cxx:260
 AliEMCALGeometry.cxx:261
 AliEMCALGeometry.cxx:262
 AliEMCALGeometry.cxx:263
 AliEMCALGeometry.cxx:264
 AliEMCALGeometry.cxx:265
 AliEMCALGeometry.cxx:266
 AliEMCALGeometry.cxx:267
 AliEMCALGeometry.cxx:268
 AliEMCALGeometry.cxx:269
 AliEMCALGeometry.cxx:270
 AliEMCALGeometry.cxx:271
 AliEMCALGeometry.cxx:272
 AliEMCALGeometry.cxx:273
 AliEMCALGeometry.cxx:274
 AliEMCALGeometry.cxx:275
 AliEMCALGeometry.cxx:276
 AliEMCALGeometry.cxx:277
 AliEMCALGeometry.cxx:278
 AliEMCALGeometry.cxx:279
 AliEMCALGeometry.cxx:280
 AliEMCALGeometry.cxx:281
 AliEMCALGeometry.cxx:282
 AliEMCALGeometry.cxx:283
 AliEMCALGeometry.cxx:284
 AliEMCALGeometry.cxx:285
 AliEMCALGeometry.cxx:286
 AliEMCALGeometry.cxx:287
 AliEMCALGeometry.cxx:288
 AliEMCALGeometry.cxx:289
 AliEMCALGeometry.cxx:290
 AliEMCALGeometry.cxx:291
 AliEMCALGeometry.cxx:292
 AliEMCALGeometry.cxx:293
 AliEMCALGeometry.cxx:294
 AliEMCALGeometry.cxx:295
 AliEMCALGeometry.cxx:296
 AliEMCALGeometry.cxx:297
 AliEMCALGeometry.cxx:298
 AliEMCALGeometry.cxx:299
 AliEMCALGeometry.cxx:300
 AliEMCALGeometry.cxx:301
 AliEMCALGeometry.cxx:302
 AliEMCALGeometry.cxx:303
 AliEMCALGeometry.cxx:304
 AliEMCALGeometry.cxx:305
 AliEMCALGeometry.cxx:306
 AliEMCALGeometry.cxx:307
 AliEMCALGeometry.cxx:308
 AliEMCALGeometry.cxx:309
 AliEMCALGeometry.cxx:310
 AliEMCALGeometry.cxx:311
 AliEMCALGeometry.cxx:312
 AliEMCALGeometry.cxx:313
 AliEMCALGeometry.cxx:314
 AliEMCALGeometry.cxx:315
 AliEMCALGeometry.cxx:316
 AliEMCALGeometry.cxx:317
 AliEMCALGeometry.cxx:318
 AliEMCALGeometry.cxx:319
 AliEMCALGeometry.cxx:320
 AliEMCALGeometry.cxx:321
 AliEMCALGeometry.cxx:322
 AliEMCALGeometry.cxx:323
 AliEMCALGeometry.cxx:324
 AliEMCALGeometry.cxx:325
 AliEMCALGeometry.cxx:326
 AliEMCALGeometry.cxx:327
 AliEMCALGeometry.cxx:328
 AliEMCALGeometry.cxx:329
 AliEMCALGeometry.cxx:330
 AliEMCALGeometry.cxx:331
 AliEMCALGeometry.cxx:332
 AliEMCALGeometry.cxx:333
 AliEMCALGeometry.cxx:334
 AliEMCALGeometry.cxx:335
 AliEMCALGeometry.cxx:336
 AliEMCALGeometry.cxx:337
 AliEMCALGeometry.cxx:338
 AliEMCALGeometry.cxx:339
 AliEMCALGeometry.cxx:340
 AliEMCALGeometry.cxx:341
 AliEMCALGeometry.cxx:342
 AliEMCALGeometry.cxx:343
 AliEMCALGeometry.cxx:344
 AliEMCALGeometry.cxx:345
 AliEMCALGeometry.cxx:346
 AliEMCALGeometry.cxx:347
 AliEMCALGeometry.cxx:348
 AliEMCALGeometry.cxx:349
 AliEMCALGeometry.cxx:350
 AliEMCALGeometry.cxx:351
 AliEMCALGeometry.cxx:352
 AliEMCALGeometry.cxx:353
 AliEMCALGeometry.cxx:354
 AliEMCALGeometry.cxx:355
 AliEMCALGeometry.cxx:356
 AliEMCALGeometry.cxx:357
 AliEMCALGeometry.cxx:358
 AliEMCALGeometry.cxx:359
 AliEMCALGeometry.cxx:360
 AliEMCALGeometry.cxx:361
 AliEMCALGeometry.cxx:362
 AliEMCALGeometry.cxx:363
 AliEMCALGeometry.cxx:364
 AliEMCALGeometry.cxx:365
 AliEMCALGeometry.cxx:366
 AliEMCALGeometry.cxx:367
 AliEMCALGeometry.cxx:368
 AliEMCALGeometry.cxx:369
 AliEMCALGeometry.cxx:370
 AliEMCALGeometry.cxx:371
 AliEMCALGeometry.cxx:372
 AliEMCALGeometry.cxx:373
 AliEMCALGeometry.cxx:374
 AliEMCALGeometry.cxx:375
 AliEMCALGeometry.cxx:376
 AliEMCALGeometry.cxx:377
 AliEMCALGeometry.cxx:378
 AliEMCALGeometry.cxx:379
 AliEMCALGeometry.cxx:380
 AliEMCALGeometry.cxx:381
 AliEMCALGeometry.cxx:382
 AliEMCALGeometry.cxx:383
 AliEMCALGeometry.cxx:384
 AliEMCALGeometry.cxx:385
 AliEMCALGeometry.cxx:386
 AliEMCALGeometry.cxx:387
 AliEMCALGeometry.cxx:388
 AliEMCALGeometry.cxx:389
 AliEMCALGeometry.cxx:390
 AliEMCALGeometry.cxx:391
 AliEMCALGeometry.cxx:392
 AliEMCALGeometry.cxx:393
 AliEMCALGeometry.cxx:394
 AliEMCALGeometry.cxx:395
 AliEMCALGeometry.cxx:396
 AliEMCALGeometry.cxx:397
 AliEMCALGeometry.cxx:398
 AliEMCALGeometry.cxx:399
 AliEMCALGeometry.cxx:400
 AliEMCALGeometry.cxx:401
 AliEMCALGeometry.cxx:402
 AliEMCALGeometry.cxx:403
 AliEMCALGeometry.cxx:404
 AliEMCALGeometry.cxx:405
 AliEMCALGeometry.cxx:406
 AliEMCALGeometry.cxx:407
 AliEMCALGeometry.cxx:408
 AliEMCALGeometry.cxx:409
 AliEMCALGeometry.cxx:410
 AliEMCALGeometry.cxx:411
 AliEMCALGeometry.cxx:412
 AliEMCALGeometry.cxx:413
 AliEMCALGeometry.cxx:414
 AliEMCALGeometry.cxx:415
 AliEMCALGeometry.cxx:416
 AliEMCALGeometry.cxx:417
 AliEMCALGeometry.cxx:418
 AliEMCALGeometry.cxx:419
 AliEMCALGeometry.cxx:420
 AliEMCALGeometry.cxx:421
 AliEMCALGeometry.cxx:422
 AliEMCALGeometry.cxx:423
 AliEMCALGeometry.cxx:424
 AliEMCALGeometry.cxx:425
 AliEMCALGeometry.cxx:426
 AliEMCALGeometry.cxx:427
 AliEMCALGeometry.cxx:428
 AliEMCALGeometry.cxx:429
 AliEMCALGeometry.cxx:430
 AliEMCALGeometry.cxx:431
 AliEMCALGeometry.cxx:432
 AliEMCALGeometry.cxx:433
 AliEMCALGeometry.cxx:434
 AliEMCALGeometry.cxx:435
 AliEMCALGeometry.cxx:436
 AliEMCALGeometry.cxx:437
 AliEMCALGeometry.cxx:438
 AliEMCALGeometry.cxx:439
 AliEMCALGeometry.cxx:440
 AliEMCALGeometry.cxx:441
 AliEMCALGeometry.cxx:442
 AliEMCALGeometry.cxx:443
 AliEMCALGeometry.cxx:444
 AliEMCALGeometry.cxx:445
 AliEMCALGeometry.cxx:446
 AliEMCALGeometry.cxx:447
 AliEMCALGeometry.cxx:448
 AliEMCALGeometry.cxx:449
 AliEMCALGeometry.cxx:450
 AliEMCALGeometry.cxx:451
 AliEMCALGeometry.cxx:452
 AliEMCALGeometry.cxx:453
 AliEMCALGeometry.cxx:454
 AliEMCALGeometry.cxx:455
 AliEMCALGeometry.cxx:456
 AliEMCALGeometry.cxx:457
 AliEMCALGeometry.cxx:458
 AliEMCALGeometry.cxx:459
 AliEMCALGeometry.cxx:460
 AliEMCALGeometry.cxx:461
 AliEMCALGeometry.cxx:462
 AliEMCALGeometry.cxx:463
 AliEMCALGeometry.cxx:464
 AliEMCALGeometry.cxx:465
 AliEMCALGeometry.cxx:466
 AliEMCALGeometry.cxx:467
 AliEMCALGeometry.cxx:468
 AliEMCALGeometry.cxx:469
 AliEMCALGeometry.cxx:470
 AliEMCALGeometry.cxx:471
 AliEMCALGeometry.cxx:472
 AliEMCALGeometry.cxx:473
 AliEMCALGeometry.cxx:474
 AliEMCALGeometry.cxx:475
 AliEMCALGeometry.cxx:476
 AliEMCALGeometry.cxx:477
 AliEMCALGeometry.cxx:478
 AliEMCALGeometry.cxx:479
 AliEMCALGeometry.cxx:480
 AliEMCALGeometry.cxx:481
 AliEMCALGeometry.cxx:482
 AliEMCALGeometry.cxx:483
 AliEMCALGeometry.cxx:484
 AliEMCALGeometry.cxx:485
 AliEMCALGeometry.cxx:486
 AliEMCALGeometry.cxx:487
 AliEMCALGeometry.cxx:488
 AliEMCALGeometry.cxx:489
 AliEMCALGeometry.cxx:490
 AliEMCALGeometry.cxx:491
 AliEMCALGeometry.cxx:492
 AliEMCALGeometry.cxx:493
 AliEMCALGeometry.cxx:494
 AliEMCALGeometry.cxx:495
 AliEMCALGeometry.cxx:496
 AliEMCALGeometry.cxx:497
 AliEMCALGeometry.cxx:498
 AliEMCALGeometry.cxx:499
 AliEMCALGeometry.cxx:500
 AliEMCALGeometry.cxx:501
 AliEMCALGeometry.cxx:502
 AliEMCALGeometry.cxx:503
 AliEMCALGeometry.cxx:504
 AliEMCALGeometry.cxx:505
 AliEMCALGeometry.cxx:506
 AliEMCALGeometry.cxx:507
 AliEMCALGeometry.cxx:508
 AliEMCALGeometry.cxx:509
 AliEMCALGeometry.cxx:510
 AliEMCALGeometry.cxx:511
 AliEMCALGeometry.cxx:512
 AliEMCALGeometry.cxx:513
 AliEMCALGeometry.cxx:514
 AliEMCALGeometry.cxx:515
 AliEMCALGeometry.cxx:516
 AliEMCALGeometry.cxx:517
 AliEMCALGeometry.cxx:518
 AliEMCALGeometry.cxx:519
 AliEMCALGeometry.cxx:520
 AliEMCALGeometry.cxx:521
 AliEMCALGeometry.cxx:522
 AliEMCALGeometry.cxx:523
 AliEMCALGeometry.cxx:524
 AliEMCALGeometry.cxx:525
 AliEMCALGeometry.cxx:526
 AliEMCALGeometry.cxx:527
 AliEMCALGeometry.cxx:528
 AliEMCALGeometry.cxx:529
 AliEMCALGeometry.cxx:530
 AliEMCALGeometry.cxx:531
 AliEMCALGeometry.cxx:532
 AliEMCALGeometry.cxx:533
 AliEMCALGeometry.cxx:534
 AliEMCALGeometry.cxx:535
 AliEMCALGeometry.cxx:536
 AliEMCALGeometry.cxx:537
 AliEMCALGeometry.cxx:538
 AliEMCALGeometry.cxx:539
 AliEMCALGeometry.cxx:540
 AliEMCALGeometry.cxx:541
 AliEMCALGeometry.cxx:542
 AliEMCALGeometry.cxx:543
 AliEMCALGeometry.cxx:544
 AliEMCALGeometry.cxx:545
 AliEMCALGeometry.cxx:546
 AliEMCALGeometry.cxx:547
 AliEMCALGeometry.cxx:548
 AliEMCALGeometry.cxx:549
 AliEMCALGeometry.cxx:550
 AliEMCALGeometry.cxx:551
 AliEMCALGeometry.cxx:552
 AliEMCALGeometry.cxx:553
 AliEMCALGeometry.cxx:554
 AliEMCALGeometry.cxx:555
 AliEMCALGeometry.cxx:556
 AliEMCALGeometry.cxx:557
 AliEMCALGeometry.cxx:558
 AliEMCALGeometry.cxx:559
 AliEMCALGeometry.cxx:560
 AliEMCALGeometry.cxx:561
 AliEMCALGeometry.cxx:562
 AliEMCALGeometry.cxx:563
 AliEMCALGeometry.cxx:564
 AliEMCALGeometry.cxx:565
 AliEMCALGeometry.cxx:566
 AliEMCALGeometry.cxx:567
 AliEMCALGeometry.cxx:568
 AliEMCALGeometry.cxx:569
 AliEMCALGeometry.cxx:570
 AliEMCALGeometry.cxx:571
 AliEMCALGeometry.cxx:572
 AliEMCALGeometry.cxx:573
 AliEMCALGeometry.cxx:574
 AliEMCALGeometry.cxx:575
 AliEMCALGeometry.cxx:576
 AliEMCALGeometry.cxx:577
 AliEMCALGeometry.cxx:578
 AliEMCALGeometry.cxx:579
 AliEMCALGeometry.cxx:580
 AliEMCALGeometry.cxx:581
 AliEMCALGeometry.cxx:582
 AliEMCALGeometry.cxx:583
 AliEMCALGeometry.cxx:584
 AliEMCALGeometry.cxx:585
 AliEMCALGeometry.cxx:586
 AliEMCALGeometry.cxx:587
 AliEMCALGeometry.cxx:588
 AliEMCALGeometry.cxx:589
 AliEMCALGeometry.cxx:590
 AliEMCALGeometry.cxx:591
 AliEMCALGeometry.cxx:592
 AliEMCALGeometry.cxx:593
 AliEMCALGeometry.cxx:594
 AliEMCALGeometry.cxx:595
 AliEMCALGeometry.cxx:596
 AliEMCALGeometry.cxx:597
 AliEMCALGeometry.cxx:598
 AliEMCALGeometry.cxx:599
 AliEMCALGeometry.cxx:600
 AliEMCALGeometry.cxx:601
 AliEMCALGeometry.cxx:602
 AliEMCALGeometry.cxx:603
 AliEMCALGeometry.cxx:604
 AliEMCALGeometry.cxx:605
 AliEMCALGeometry.cxx:606
 AliEMCALGeometry.cxx:607
 AliEMCALGeometry.cxx:608
 AliEMCALGeometry.cxx:609
 AliEMCALGeometry.cxx:610
 AliEMCALGeometry.cxx:611
 AliEMCALGeometry.cxx:612
 AliEMCALGeometry.cxx:613
 AliEMCALGeometry.cxx:614
 AliEMCALGeometry.cxx:615
 AliEMCALGeometry.cxx:616
 AliEMCALGeometry.cxx:617
 AliEMCALGeometry.cxx:618
 AliEMCALGeometry.cxx:619
 AliEMCALGeometry.cxx:620
 AliEMCALGeometry.cxx:621
 AliEMCALGeometry.cxx:622
 AliEMCALGeometry.cxx:623
 AliEMCALGeometry.cxx:624
 AliEMCALGeometry.cxx:625
 AliEMCALGeometry.cxx:626
 AliEMCALGeometry.cxx:627
 AliEMCALGeometry.cxx:628
 AliEMCALGeometry.cxx:629
 AliEMCALGeometry.cxx:630
 AliEMCALGeometry.cxx:631
 AliEMCALGeometry.cxx:632
 AliEMCALGeometry.cxx:633
 AliEMCALGeometry.cxx:634
 AliEMCALGeometry.cxx:635
 AliEMCALGeometry.cxx:636
 AliEMCALGeometry.cxx:637
 AliEMCALGeometry.cxx:638
 AliEMCALGeometry.cxx:639
 AliEMCALGeometry.cxx:640
 AliEMCALGeometry.cxx:641
 AliEMCALGeometry.cxx:642
 AliEMCALGeometry.cxx:643
 AliEMCALGeometry.cxx:644
 AliEMCALGeometry.cxx:645
 AliEMCALGeometry.cxx:646
 AliEMCALGeometry.cxx:647
 AliEMCALGeometry.cxx:648
 AliEMCALGeometry.cxx:649
 AliEMCALGeometry.cxx:650
 AliEMCALGeometry.cxx:651
 AliEMCALGeometry.cxx:652
 AliEMCALGeometry.cxx:653
 AliEMCALGeometry.cxx:654
 AliEMCALGeometry.cxx:655
 AliEMCALGeometry.cxx:656
 AliEMCALGeometry.cxx:657
 AliEMCALGeometry.cxx:658
 AliEMCALGeometry.cxx:659
 AliEMCALGeometry.cxx:660
 AliEMCALGeometry.cxx:661
 AliEMCALGeometry.cxx:662
 AliEMCALGeometry.cxx:663
 AliEMCALGeometry.cxx:664
 AliEMCALGeometry.cxx:665
 AliEMCALGeometry.cxx:666
 AliEMCALGeometry.cxx:667
 AliEMCALGeometry.cxx:668
 AliEMCALGeometry.cxx:669
 AliEMCALGeometry.cxx:670
 AliEMCALGeometry.cxx:671
 AliEMCALGeometry.cxx:672
 AliEMCALGeometry.cxx:673
 AliEMCALGeometry.cxx:674
 AliEMCALGeometry.cxx:675
 AliEMCALGeometry.cxx:676
 AliEMCALGeometry.cxx:677
 AliEMCALGeometry.cxx:678
 AliEMCALGeometry.cxx:679
 AliEMCALGeometry.cxx:680
 AliEMCALGeometry.cxx:681
 AliEMCALGeometry.cxx:682
 AliEMCALGeometry.cxx:683
 AliEMCALGeometry.cxx:684
 AliEMCALGeometry.cxx:685
 AliEMCALGeometry.cxx:686
 AliEMCALGeometry.cxx:687
 AliEMCALGeometry.cxx:688
 AliEMCALGeometry.cxx:689
 AliEMCALGeometry.cxx:690
 AliEMCALGeometry.cxx:691
 AliEMCALGeometry.cxx:692
 AliEMCALGeometry.cxx:693
 AliEMCALGeometry.cxx:694
 AliEMCALGeometry.cxx:695
 AliEMCALGeometry.cxx:696
 AliEMCALGeometry.cxx:697
 AliEMCALGeometry.cxx:698
 AliEMCALGeometry.cxx:699
 AliEMCALGeometry.cxx:700
 AliEMCALGeometry.cxx:701
 AliEMCALGeometry.cxx:702
 AliEMCALGeometry.cxx:703
 AliEMCALGeometry.cxx:704
 AliEMCALGeometry.cxx:705
 AliEMCALGeometry.cxx:706
 AliEMCALGeometry.cxx:707
 AliEMCALGeometry.cxx:708
 AliEMCALGeometry.cxx:709
 AliEMCALGeometry.cxx:710
 AliEMCALGeometry.cxx:711
 AliEMCALGeometry.cxx:712
 AliEMCALGeometry.cxx:713
 AliEMCALGeometry.cxx:714
 AliEMCALGeometry.cxx:715
 AliEMCALGeometry.cxx:716
 AliEMCALGeometry.cxx:717
 AliEMCALGeometry.cxx:718
 AliEMCALGeometry.cxx:719
 AliEMCALGeometry.cxx:720
 AliEMCALGeometry.cxx:721
 AliEMCALGeometry.cxx:722
 AliEMCALGeometry.cxx:723
 AliEMCALGeometry.cxx:724
 AliEMCALGeometry.cxx:725
 AliEMCALGeometry.cxx:726
 AliEMCALGeometry.cxx:727
 AliEMCALGeometry.cxx:728
 AliEMCALGeometry.cxx:729
 AliEMCALGeometry.cxx:730
 AliEMCALGeometry.cxx:731
 AliEMCALGeometry.cxx:732
 AliEMCALGeometry.cxx:733
 AliEMCALGeometry.cxx:734
 AliEMCALGeometry.cxx:735
 AliEMCALGeometry.cxx:736
 AliEMCALGeometry.cxx:737
 AliEMCALGeometry.cxx:738
 AliEMCALGeometry.cxx:739
 AliEMCALGeometry.cxx:740
 AliEMCALGeometry.cxx:741
 AliEMCALGeometry.cxx:742
 AliEMCALGeometry.cxx:743
 AliEMCALGeometry.cxx:744
 AliEMCALGeometry.cxx:745
 AliEMCALGeometry.cxx:746
 AliEMCALGeometry.cxx:747
 AliEMCALGeometry.cxx:748
 AliEMCALGeometry.cxx:749
 AliEMCALGeometry.cxx:750
 AliEMCALGeometry.cxx:751
 AliEMCALGeometry.cxx:752
 AliEMCALGeometry.cxx:753
 AliEMCALGeometry.cxx:754
 AliEMCALGeometry.cxx:755
 AliEMCALGeometry.cxx:756
 AliEMCALGeometry.cxx:757
 AliEMCALGeometry.cxx:758
 AliEMCALGeometry.cxx:759
 AliEMCALGeometry.cxx:760
 AliEMCALGeometry.cxx:761
 AliEMCALGeometry.cxx:762
 AliEMCALGeometry.cxx:763
 AliEMCALGeometry.cxx:764
 AliEMCALGeometry.cxx:765
 AliEMCALGeometry.cxx:766
 AliEMCALGeometry.cxx:767
 AliEMCALGeometry.cxx:768
 AliEMCALGeometry.cxx:769
 AliEMCALGeometry.cxx:770
 AliEMCALGeometry.cxx:771
 AliEMCALGeometry.cxx:772
 AliEMCALGeometry.cxx:773
 AliEMCALGeometry.cxx:774
 AliEMCALGeometry.cxx:775
 AliEMCALGeometry.cxx:776
 AliEMCALGeometry.cxx:777
 AliEMCALGeometry.cxx:778
 AliEMCALGeometry.cxx:779
 AliEMCALGeometry.cxx:780
 AliEMCALGeometry.cxx:781
 AliEMCALGeometry.cxx:782
 AliEMCALGeometry.cxx:783
 AliEMCALGeometry.cxx:784
 AliEMCALGeometry.cxx:785
 AliEMCALGeometry.cxx:786
 AliEMCALGeometry.cxx:787
 AliEMCALGeometry.cxx:788
 AliEMCALGeometry.cxx:789
 AliEMCALGeometry.cxx:790
 AliEMCALGeometry.cxx:791
 AliEMCALGeometry.cxx:792
 AliEMCALGeometry.cxx:793
 AliEMCALGeometry.cxx:794
 AliEMCALGeometry.cxx:795
 AliEMCALGeometry.cxx:796
 AliEMCALGeometry.cxx:797
 AliEMCALGeometry.cxx:798
 AliEMCALGeometry.cxx:799
 AliEMCALGeometry.cxx:800
 AliEMCALGeometry.cxx:801
 AliEMCALGeometry.cxx:802
 AliEMCALGeometry.cxx:803
 AliEMCALGeometry.cxx:804
 AliEMCALGeometry.cxx:805
 AliEMCALGeometry.cxx:806
 AliEMCALGeometry.cxx:807
 AliEMCALGeometry.cxx:808
 AliEMCALGeometry.cxx:809
 AliEMCALGeometry.cxx:810
 AliEMCALGeometry.cxx:811
 AliEMCALGeometry.cxx:812
 AliEMCALGeometry.cxx:813
 AliEMCALGeometry.cxx:814
 AliEMCALGeometry.cxx:815
 AliEMCALGeometry.cxx:816
 AliEMCALGeometry.cxx:817
 AliEMCALGeometry.cxx:818
 AliEMCALGeometry.cxx:819
 AliEMCALGeometry.cxx:820
 AliEMCALGeometry.cxx:821
 AliEMCALGeometry.cxx:822
 AliEMCALGeometry.cxx:823
 AliEMCALGeometry.cxx:824
 AliEMCALGeometry.cxx:825
 AliEMCALGeometry.cxx:826
 AliEMCALGeometry.cxx:827
 AliEMCALGeometry.cxx:828
 AliEMCALGeometry.cxx:829
 AliEMCALGeometry.cxx:830
 AliEMCALGeometry.cxx:831
 AliEMCALGeometry.cxx:832
 AliEMCALGeometry.cxx:833
 AliEMCALGeometry.cxx:834
 AliEMCALGeometry.cxx:835
 AliEMCALGeometry.cxx:836
 AliEMCALGeometry.cxx:837
 AliEMCALGeometry.cxx:838
 AliEMCALGeometry.cxx:839
 AliEMCALGeometry.cxx:840
 AliEMCALGeometry.cxx:841
 AliEMCALGeometry.cxx:842
 AliEMCALGeometry.cxx:843
 AliEMCALGeometry.cxx:844
 AliEMCALGeometry.cxx:845
 AliEMCALGeometry.cxx:846
 AliEMCALGeometry.cxx:847
 AliEMCALGeometry.cxx:848
 AliEMCALGeometry.cxx:849
 AliEMCALGeometry.cxx:850
 AliEMCALGeometry.cxx:851
 AliEMCALGeometry.cxx:852
 AliEMCALGeometry.cxx:853
 AliEMCALGeometry.cxx:854
 AliEMCALGeometry.cxx:855
 AliEMCALGeometry.cxx:856
 AliEMCALGeometry.cxx:857
 AliEMCALGeometry.cxx:858
 AliEMCALGeometry.cxx:859
 AliEMCALGeometry.cxx:860
 AliEMCALGeometry.cxx:861
 AliEMCALGeometry.cxx:862
 AliEMCALGeometry.cxx:863
 AliEMCALGeometry.cxx:864
 AliEMCALGeometry.cxx:865
 AliEMCALGeometry.cxx:866
 AliEMCALGeometry.cxx:867
 AliEMCALGeometry.cxx:868
 AliEMCALGeometry.cxx:869
 AliEMCALGeometry.cxx:870
 AliEMCALGeometry.cxx:871
 AliEMCALGeometry.cxx:872
 AliEMCALGeometry.cxx:873
 AliEMCALGeometry.cxx:874
 AliEMCALGeometry.cxx:875
 AliEMCALGeometry.cxx:876
 AliEMCALGeometry.cxx:877
 AliEMCALGeometry.cxx:878
 AliEMCALGeometry.cxx:879
 AliEMCALGeometry.cxx:880
 AliEMCALGeometry.cxx:881
 AliEMCALGeometry.cxx:882
 AliEMCALGeometry.cxx:883
 AliEMCALGeometry.cxx:884
 AliEMCALGeometry.cxx:885
 AliEMCALGeometry.cxx:886
 AliEMCALGeometry.cxx:887
 AliEMCALGeometry.cxx:888
 AliEMCALGeometry.cxx:889
 AliEMCALGeometry.cxx:890
 AliEMCALGeometry.cxx:891
 AliEMCALGeometry.cxx:892
 AliEMCALGeometry.cxx:893
 AliEMCALGeometry.cxx:894
 AliEMCALGeometry.cxx:895
 AliEMCALGeometry.cxx:896
 AliEMCALGeometry.cxx:897
 AliEMCALGeometry.cxx:898
 AliEMCALGeometry.cxx:899
 AliEMCALGeometry.cxx:900
 AliEMCALGeometry.cxx:901
 AliEMCALGeometry.cxx:902
 AliEMCALGeometry.cxx:903
 AliEMCALGeometry.cxx:904
 AliEMCALGeometry.cxx:905
 AliEMCALGeometry.cxx:906
 AliEMCALGeometry.cxx:907
 AliEMCALGeometry.cxx:908
 AliEMCALGeometry.cxx:909
 AliEMCALGeometry.cxx:910
 AliEMCALGeometry.cxx:911
 AliEMCALGeometry.cxx:912
 AliEMCALGeometry.cxx:913
 AliEMCALGeometry.cxx:914
 AliEMCALGeometry.cxx:915
 AliEMCALGeometry.cxx:916
 AliEMCALGeometry.cxx:917
 AliEMCALGeometry.cxx:918
 AliEMCALGeometry.cxx:919
 AliEMCALGeometry.cxx:920
 AliEMCALGeometry.cxx:921
 AliEMCALGeometry.cxx:922
 AliEMCALGeometry.cxx:923
 AliEMCALGeometry.cxx:924
 AliEMCALGeometry.cxx:925
 AliEMCALGeometry.cxx:926
 AliEMCALGeometry.cxx:927
 AliEMCALGeometry.cxx:928
 AliEMCALGeometry.cxx:929
 AliEMCALGeometry.cxx:930
 AliEMCALGeometry.cxx:931
 AliEMCALGeometry.cxx:932
 AliEMCALGeometry.cxx:933
 AliEMCALGeometry.cxx:934
 AliEMCALGeometry.cxx:935
 AliEMCALGeometry.cxx:936
 AliEMCALGeometry.cxx:937
 AliEMCALGeometry.cxx:938
 AliEMCALGeometry.cxx:939
 AliEMCALGeometry.cxx:940
 AliEMCALGeometry.cxx:941
 AliEMCALGeometry.cxx:942
 AliEMCALGeometry.cxx:943
 AliEMCALGeometry.cxx:944
 AliEMCALGeometry.cxx:945
 AliEMCALGeometry.cxx:946
 AliEMCALGeometry.cxx:947
 AliEMCALGeometry.cxx:948
 AliEMCALGeometry.cxx:949
 AliEMCALGeometry.cxx:950
 AliEMCALGeometry.cxx:951
 AliEMCALGeometry.cxx:952
 AliEMCALGeometry.cxx:953
 AliEMCALGeometry.cxx:954
 AliEMCALGeometry.cxx:955
 AliEMCALGeometry.cxx:956
 AliEMCALGeometry.cxx:957
 AliEMCALGeometry.cxx:958
 AliEMCALGeometry.cxx:959
 AliEMCALGeometry.cxx:960
 AliEMCALGeometry.cxx:961
 AliEMCALGeometry.cxx:962
 AliEMCALGeometry.cxx:963
 AliEMCALGeometry.cxx:964
 AliEMCALGeometry.cxx:965
 AliEMCALGeometry.cxx:966
 AliEMCALGeometry.cxx:967
 AliEMCALGeometry.cxx:968
 AliEMCALGeometry.cxx:969
 AliEMCALGeometry.cxx:970
 AliEMCALGeometry.cxx:971
 AliEMCALGeometry.cxx:972
 AliEMCALGeometry.cxx:973
 AliEMCALGeometry.cxx:974
 AliEMCALGeometry.cxx:975
 AliEMCALGeometry.cxx:976
 AliEMCALGeometry.cxx:977
 AliEMCALGeometry.cxx:978
 AliEMCALGeometry.cxx:979
 AliEMCALGeometry.cxx:980
 AliEMCALGeometry.cxx:981
 AliEMCALGeometry.cxx:982
 AliEMCALGeometry.cxx:983
 AliEMCALGeometry.cxx:984
 AliEMCALGeometry.cxx:985
 AliEMCALGeometry.cxx:986
 AliEMCALGeometry.cxx:987
 AliEMCALGeometry.cxx:988
 AliEMCALGeometry.cxx:989
 AliEMCALGeometry.cxx:990
 AliEMCALGeometry.cxx:991
 AliEMCALGeometry.cxx:992
 AliEMCALGeometry.cxx:993
 AliEMCALGeometry.cxx:994
 AliEMCALGeometry.cxx:995
 AliEMCALGeometry.cxx:996
 AliEMCALGeometry.cxx:997
 AliEMCALGeometry.cxx:998
 AliEMCALGeometry.cxx:999
 AliEMCALGeometry.cxx:1000
 AliEMCALGeometry.cxx:1001
 AliEMCALGeometry.cxx:1002
 AliEMCALGeometry.cxx:1003
 AliEMCALGeometry.cxx:1004
 AliEMCALGeometry.cxx:1005
 AliEMCALGeometry.cxx:1006
 AliEMCALGeometry.cxx:1007
 AliEMCALGeometry.cxx:1008
 AliEMCALGeometry.cxx:1009
 AliEMCALGeometry.cxx:1010
 AliEMCALGeometry.cxx:1011
 AliEMCALGeometry.cxx:1012
 AliEMCALGeometry.cxx:1013
 AliEMCALGeometry.cxx:1014
 AliEMCALGeometry.cxx:1015
 AliEMCALGeometry.cxx:1016
 AliEMCALGeometry.cxx:1017
 AliEMCALGeometry.cxx:1018
 AliEMCALGeometry.cxx:1019
 AliEMCALGeometry.cxx:1020
 AliEMCALGeometry.cxx:1021
 AliEMCALGeometry.cxx:1022
 AliEMCALGeometry.cxx:1023
 AliEMCALGeometry.cxx:1024
 AliEMCALGeometry.cxx:1025
 AliEMCALGeometry.cxx:1026
 AliEMCALGeometry.cxx:1027
 AliEMCALGeometry.cxx:1028
 AliEMCALGeometry.cxx:1029
 AliEMCALGeometry.cxx:1030
 AliEMCALGeometry.cxx:1031
 AliEMCALGeometry.cxx:1032
 AliEMCALGeometry.cxx:1033
 AliEMCALGeometry.cxx:1034
 AliEMCALGeometry.cxx:1035
 AliEMCALGeometry.cxx:1036
 AliEMCALGeometry.cxx:1037
 AliEMCALGeometry.cxx:1038
 AliEMCALGeometry.cxx:1039
 AliEMCALGeometry.cxx:1040
 AliEMCALGeometry.cxx:1041
 AliEMCALGeometry.cxx:1042
 AliEMCALGeometry.cxx:1043
 AliEMCALGeometry.cxx:1044
 AliEMCALGeometry.cxx:1045
 AliEMCALGeometry.cxx:1046
 AliEMCALGeometry.cxx:1047
 AliEMCALGeometry.cxx:1048
 AliEMCALGeometry.cxx:1049
 AliEMCALGeometry.cxx:1050
 AliEMCALGeometry.cxx:1051
 AliEMCALGeometry.cxx:1052
 AliEMCALGeometry.cxx:1053
 AliEMCALGeometry.cxx:1054
 AliEMCALGeometry.cxx:1055
 AliEMCALGeometry.cxx:1056
 AliEMCALGeometry.cxx:1057
 AliEMCALGeometry.cxx:1058
 AliEMCALGeometry.cxx:1059
 AliEMCALGeometry.cxx:1060
 AliEMCALGeometry.cxx:1061
 AliEMCALGeometry.cxx:1062
 AliEMCALGeometry.cxx:1063
 AliEMCALGeometry.cxx:1064
 AliEMCALGeometry.cxx:1065
 AliEMCALGeometry.cxx:1066
 AliEMCALGeometry.cxx:1067
 AliEMCALGeometry.cxx:1068
 AliEMCALGeometry.cxx:1069
 AliEMCALGeometry.cxx:1070
 AliEMCALGeometry.cxx:1071
 AliEMCALGeometry.cxx:1072
 AliEMCALGeometry.cxx:1073
 AliEMCALGeometry.cxx:1074
 AliEMCALGeometry.cxx:1075
 AliEMCALGeometry.cxx:1076
 AliEMCALGeometry.cxx:1077
 AliEMCALGeometry.cxx:1078
 AliEMCALGeometry.cxx:1079
 AliEMCALGeometry.cxx:1080
 AliEMCALGeometry.cxx:1081
 AliEMCALGeometry.cxx:1082
 AliEMCALGeometry.cxx:1083
 AliEMCALGeometry.cxx:1084
 AliEMCALGeometry.cxx:1085
 AliEMCALGeometry.cxx:1086
 AliEMCALGeometry.cxx:1087
 AliEMCALGeometry.cxx:1088
 AliEMCALGeometry.cxx:1089
 AliEMCALGeometry.cxx:1090
 AliEMCALGeometry.cxx:1091
 AliEMCALGeometry.cxx:1092
 AliEMCALGeometry.cxx:1093
 AliEMCALGeometry.cxx:1094
 AliEMCALGeometry.cxx:1095
 AliEMCALGeometry.cxx:1096
 AliEMCALGeometry.cxx:1097
 AliEMCALGeometry.cxx:1098
 AliEMCALGeometry.cxx:1099
 AliEMCALGeometry.cxx:1100
 AliEMCALGeometry.cxx:1101
 AliEMCALGeometry.cxx:1102
 AliEMCALGeometry.cxx:1103
 AliEMCALGeometry.cxx:1104
 AliEMCALGeometry.cxx:1105
 AliEMCALGeometry.cxx:1106
 AliEMCALGeometry.cxx:1107
 AliEMCALGeometry.cxx:1108
 AliEMCALGeometry.cxx:1109
 AliEMCALGeometry.cxx:1110
 AliEMCALGeometry.cxx:1111
 AliEMCALGeometry.cxx:1112
 AliEMCALGeometry.cxx:1113
 AliEMCALGeometry.cxx:1114
 AliEMCALGeometry.cxx:1115
 AliEMCALGeometry.cxx:1116
 AliEMCALGeometry.cxx:1117
 AliEMCALGeometry.cxx:1118
 AliEMCALGeometry.cxx:1119
 AliEMCALGeometry.cxx:1120
 AliEMCALGeometry.cxx:1121
 AliEMCALGeometry.cxx:1122
 AliEMCALGeometry.cxx:1123
 AliEMCALGeometry.cxx:1124
 AliEMCALGeometry.cxx:1125
 AliEMCALGeometry.cxx:1126
 AliEMCALGeometry.cxx:1127
 AliEMCALGeometry.cxx:1128
 AliEMCALGeometry.cxx:1129
 AliEMCALGeometry.cxx:1130
 AliEMCALGeometry.cxx:1131
 AliEMCALGeometry.cxx:1132
 AliEMCALGeometry.cxx:1133
 AliEMCALGeometry.cxx:1134
 AliEMCALGeometry.cxx:1135
 AliEMCALGeometry.cxx:1136
 AliEMCALGeometry.cxx:1137
 AliEMCALGeometry.cxx:1138
 AliEMCALGeometry.cxx:1139
 AliEMCALGeometry.cxx:1140
 AliEMCALGeometry.cxx:1141
 AliEMCALGeometry.cxx:1142
 AliEMCALGeometry.cxx:1143
 AliEMCALGeometry.cxx:1144
 AliEMCALGeometry.cxx:1145
 AliEMCALGeometry.cxx:1146
 AliEMCALGeometry.cxx:1147
 AliEMCALGeometry.cxx:1148
 AliEMCALGeometry.cxx:1149
 AliEMCALGeometry.cxx:1150
 AliEMCALGeometry.cxx:1151
 AliEMCALGeometry.cxx:1152
 AliEMCALGeometry.cxx:1153
 AliEMCALGeometry.cxx:1154
 AliEMCALGeometry.cxx:1155
 AliEMCALGeometry.cxx:1156
 AliEMCALGeometry.cxx:1157
 AliEMCALGeometry.cxx:1158
 AliEMCALGeometry.cxx:1159
 AliEMCALGeometry.cxx:1160
 AliEMCALGeometry.cxx:1161
 AliEMCALGeometry.cxx:1162
 AliEMCALGeometry.cxx:1163
 AliEMCALGeometry.cxx:1164
 AliEMCALGeometry.cxx:1165
 AliEMCALGeometry.cxx:1166
 AliEMCALGeometry.cxx:1167
 AliEMCALGeometry.cxx:1168
 AliEMCALGeometry.cxx:1169
 AliEMCALGeometry.cxx:1170
 AliEMCALGeometry.cxx:1171
 AliEMCALGeometry.cxx:1172
 AliEMCALGeometry.cxx:1173
 AliEMCALGeometry.cxx:1174
 AliEMCALGeometry.cxx:1175
 AliEMCALGeometry.cxx:1176
 AliEMCALGeometry.cxx:1177
 AliEMCALGeometry.cxx:1178
 AliEMCALGeometry.cxx:1179
 AliEMCALGeometry.cxx:1180
 AliEMCALGeometry.cxx:1181
 AliEMCALGeometry.cxx:1182
 AliEMCALGeometry.cxx:1183
 AliEMCALGeometry.cxx:1184
 AliEMCALGeometry.cxx:1185
 AliEMCALGeometry.cxx:1186
 AliEMCALGeometry.cxx:1187
 AliEMCALGeometry.cxx:1188
 AliEMCALGeometry.cxx:1189
 AliEMCALGeometry.cxx:1190
 AliEMCALGeometry.cxx:1191
 AliEMCALGeometry.cxx:1192
 AliEMCALGeometry.cxx:1193
 AliEMCALGeometry.cxx:1194
 AliEMCALGeometry.cxx:1195
 AliEMCALGeometry.cxx:1196
 AliEMCALGeometry.cxx:1197
 AliEMCALGeometry.cxx:1198
 AliEMCALGeometry.cxx:1199
 AliEMCALGeometry.cxx:1200
 AliEMCALGeometry.cxx:1201
 AliEMCALGeometry.cxx:1202
 AliEMCALGeometry.cxx:1203
 AliEMCALGeometry.cxx:1204
 AliEMCALGeometry.cxx:1205
 AliEMCALGeometry.cxx:1206
 AliEMCALGeometry.cxx:1207
 AliEMCALGeometry.cxx:1208
 AliEMCALGeometry.cxx:1209
 AliEMCALGeometry.cxx:1210
 AliEMCALGeometry.cxx:1211
 AliEMCALGeometry.cxx:1212
 AliEMCALGeometry.cxx:1213
 AliEMCALGeometry.cxx:1214
 AliEMCALGeometry.cxx:1215
 AliEMCALGeometry.cxx:1216
 AliEMCALGeometry.cxx:1217
 AliEMCALGeometry.cxx:1218
 AliEMCALGeometry.cxx:1219
 AliEMCALGeometry.cxx:1220
 AliEMCALGeometry.cxx:1221
 AliEMCALGeometry.cxx:1222
 AliEMCALGeometry.cxx:1223
 AliEMCALGeometry.cxx:1224
 AliEMCALGeometry.cxx:1225
 AliEMCALGeometry.cxx:1226
 AliEMCALGeometry.cxx:1227
 AliEMCALGeometry.cxx:1228
 AliEMCALGeometry.cxx:1229
 AliEMCALGeometry.cxx:1230
 AliEMCALGeometry.cxx:1231
 AliEMCALGeometry.cxx:1232
 AliEMCALGeometry.cxx:1233
 AliEMCALGeometry.cxx:1234
 AliEMCALGeometry.cxx:1235
 AliEMCALGeometry.cxx:1236
 AliEMCALGeometry.cxx:1237
 AliEMCALGeometry.cxx:1238
 AliEMCALGeometry.cxx:1239
 AliEMCALGeometry.cxx:1240
 AliEMCALGeometry.cxx:1241
 AliEMCALGeometry.cxx:1242
 AliEMCALGeometry.cxx:1243
 AliEMCALGeometry.cxx:1244
 AliEMCALGeometry.cxx:1245
 AliEMCALGeometry.cxx:1246
 AliEMCALGeometry.cxx:1247
 AliEMCALGeometry.cxx:1248
 AliEMCALGeometry.cxx:1249
 AliEMCALGeometry.cxx:1250
 AliEMCALGeometry.cxx:1251
 AliEMCALGeometry.cxx:1252
 AliEMCALGeometry.cxx:1253
 AliEMCALGeometry.cxx:1254
 AliEMCALGeometry.cxx:1255
 AliEMCALGeometry.cxx:1256
 AliEMCALGeometry.cxx:1257
 AliEMCALGeometry.cxx:1258
 AliEMCALGeometry.cxx:1259
 AliEMCALGeometry.cxx:1260
 AliEMCALGeometry.cxx:1261
 AliEMCALGeometry.cxx:1262
 AliEMCALGeometry.cxx:1263
 AliEMCALGeometry.cxx:1264
 AliEMCALGeometry.cxx:1265
 AliEMCALGeometry.cxx:1266
 AliEMCALGeometry.cxx:1267
 AliEMCALGeometry.cxx:1268
 AliEMCALGeometry.cxx:1269
 AliEMCALGeometry.cxx:1270
 AliEMCALGeometry.cxx:1271
 AliEMCALGeometry.cxx:1272
 AliEMCALGeometry.cxx:1273
 AliEMCALGeometry.cxx:1274
 AliEMCALGeometry.cxx:1275
 AliEMCALGeometry.cxx:1276
 AliEMCALGeometry.cxx:1277
 AliEMCALGeometry.cxx:1278
 AliEMCALGeometry.cxx:1279
 AliEMCALGeometry.cxx:1280
 AliEMCALGeometry.cxx:1281
 AliEMCALGeometry.cxx:1282
 AliEMCALGeometry.cxx:1283
 AliEMCALGeometry.cxx:1284
 AliEMCALGeometry.cxx:1285
 AliEMCALGeometry.cxx:1286
 AliEMCALGeometry.cxx:1287
 AliEMCALGeometry.cxx:1288
 AliEMCALGeometry.cxx:1289
 AliEMCALGeometry.cxx:1290
 AliEMCALGeometry.cxx:1291
 AliEMCALGeometry.cxx:1292
 AliEMCALGeometry.cxx:1293
 AliEMCALGeometry.cxx:1294
 AliEMCALGeometry.cxx:1295
 AliEMCALGeometry.cxx:1296
 AliEMCALGeometry.cxx:1297
 AliEMCALGeometry.cxx:1298
 AliEMCALGeometry.cxx:1299
 AliEMCALGeometry.cxx:1300
 AliEMCALGeometry.cxx:1301
 AliEMCALGeometry.cxx:1302
 AliEMCALGeometry.cxx:1303
 AliEMCALGeometry.cxx:1304
 AliEMCALGeometry.cxx:1305
 AliEMCALGeometry.cxx:1306
 AliEMCALGeometry.cxx:1307
 AliEMCALGeometry.cxx:1308
 AliEMCALGeometry.cxx:1309
 AliEMCALGeometry.cxx:1310
 AliEMCALGeometry.cxx:1311
 AliEMCALGeometry.cxx:1312
 AliEMCALGeometry.cxx:1313
 AliEMCALGeometry.cxx:1314
 AliEMCALGeometry.cxx:1315
 AliEMCALGeometry.cxx:1316
 AliEMCALGeometry.cxx:1317
 AliEMCALGeometry.cxx:1318
 AliEMCALGeometry.cxx:1319
 AliEMCALGeometry.cxx:1320
 AliEMCALGeometry.cxx:1321
 AliEMCALGeometry.cxx:1322
 AliEMCALGeometry.cxx:1323
 AliEMCALGeometry.cxx:1324
 AliEMCALGeometry.cxx:1325
 AliEMCALGeometry.cxx:1326
 AliEMCALGeometry.cxx:1327
 AliEMCALGeometry.cxx:1328
 AliEMCALGeometry.cxx:1329
 AliEMCALGeometry.cxx:1330
 AliEMCALGeometry.cxx:1331
 AliEMCALGeometry.cxx:1332
 AliEMCALGeometry.cxx:1333
 AliEMCALGeometry.cxx:1334
 AliEMCALGeometry.cxx:1335
 AliEMCALGeometry.cxx:1336
 AliEMCALGeometry.cxx:1337
 AliEMCALGeometry.cxx:1338
 AliEMCALGeometry.cxx:1339
 AliEMCALGeometry.cxx:1340
 AliEMCALGeometry.cxx:1341
 AliEMCALGeometry.cxx:1342
 AliEMCALGeometry.cxx:1343
 AliEMCALGeometry.cxx:1344
 AliEMCALGeometry.cxx:1345
 AliEMCALGeometry.cxx:1346
 AliEMCALGeometry.cxx:1347
 AliEMCALGeometry.cxx:1348
 AliEMCALGeometry.cxx:1349
 AliEMCALGeometry.cxx:1350
 AliEMCALGeometry.cxx:1351
 AliEMCALGeometry.cxx:1352
 AliEMCALGeometry.cxx:1353
 AliEMCALGeometry.cxx:1354
 AliEMCALGeometry.cxx:1355
 AliEMCALGeometry.cxx:1356
 AliEMCALGeometry.cxx:1357
 AliEMCALGeometry.cxx:1358
 AliEMCALGeometry.cxx:1359
 AliEMCALGeometry.cxx:1360
 AliEMCALGeometry.cxx:1361
 AliEMCALGeometry.cxx:1362
 AliEMCALGeometry.cxx:1363
 AliEMCALGeometry.cxx:1364
 AliEMCALGeometry.cxx:1365
 AliEMCALGeometry.cxx:1366
 AliEMCALGeometry.cxx:1367
 AliEMCALGeometry.cxx:1368
 AliEMCALGeometry.cxx:1369
 AliEMCALGeometry.cxx:1370
 AliEMCALGeometry.cxx:1371
 AliEMCALGeometry.cxx:1372
 AliEMCALGeometry.cxx:1373
 AliEMCALGeometry.cxx:1374
 AliEMCALGeometry.cxx:1375
 AliEMCALGeometry.cxx:1376
 AliEMCALGeometry.cxx:1377
 AliEMCALGeometry.cxx:1378
 AliEMCALGeometry.cxx:1379
 AliEMCALGeometry.cxx:1380
 AliEMCALGeometry.cxx:1381
 AliEMCALGeometry.cxx:1382
 AliEMCALGeometry.cxx:1383
 AliEMCALGeometry.cxx:1384
 AliEMCALGeometry.cxx:1385
 AliEMCALGeometry.cxx:1386
 AliEMCALGeometry.cxx:1387
 AliEMCALGeometry.cxx:1388
 AliEMCALGeometry.cxx:1389
 AliEMCALGeometry.cxx:1390
 AliEMCALGeometry.cxx:1391
 AliEMCALGeometry.cxx:1392
 AliEMCALGeometry.cxx:1393
 AliEMCALGeometry.cxx:1394
 AliEMCALGeometry.cxx:1395
 AliEMCALGeometry.cxx:1396
 AliEMCALGeometry.cxx:1397
 AliEMCALGeometry.cxx:1398
 AliEMCALGeometry.cxx:1399
 AliEMCALGeometry.cxx:1400
 AliEMCALGeometry.cxx:1401
 AliEMCALGeometry.cxx:1402
 AliEMCALGeometry.cxx:1403
 AliEMCALGeometry.cxx:1404
 AliEMCALGeometry.cxx:1405
 AliEMCALGeometry.cxx:1406
 AliEMCALGeometry.cxx:1407
 AliEMCALGeometry.cxx:1408
 AliEMCALGeometry.cxx:1409
 AliEMCALGeometry.cxx:1410
 AliEMCALGeometry.cxx:1411
 AliEMCALGeometry.cxx:1412
 AliEMCALGeometry.cxx:1413
 AliEMCALGeometry.cxx:1414
 AliEMCALGeometry.cxx:1415
 AliEMCALGeometry.cxx:1416
 AliEMCALGeometry.cxx:1417
 AliEMCALGeometry.cxx:1418
 AliEMCALGeometry.cxx:1419
 AliEMCALGeometry.cxx:1420
 AliEMCALGeometry.cxx:1421
 AliEMCALGeometry.cxx:1422
 AliEMCALGeometry.cxx:1423
 AliEMCALGeometry.cxx:1424
 AliEMCALGeometry.cxx:1425
 AliEMCALGeometry.cxx:1426
 AliEMCALGeometry.cxx:1427
 AliEMCALGeometry.cxx:1428
 AliEMCALGeometry.cxx:1429
 AliEMCALGeometry.cxx:1430
 AliEMCALGeometry.cxx:1431
 AliEMCALGeometry.cxx:1432
 AliEMCALGeometry.cxx:1433
 AliEMCALGeometry.cxx:1434
 AliEMCALGeometry.cxx:1435
 AliEMCALGeometry.cxx:1436
 AliEMCALGeometry.cxx:1437
 AliEMCALGeometry.cxx:1438
 AliEMCALGeometry.cxx:1439
 AliEMCALGeometry.cxx:1440
 AliEMCALGeometry.cxx:1441
 AliEMCALGeometry.cxx:1442
 AliEMCALGeometry.cxx:1443
 AliEMCALGeometry.cxx:1444
 AliEMCALGeometry.cxx:1445
 AliEMCALGeometry.cxx:1446
 AliEMCALGeometry.cxx:1447
 AliEMCALGeometry.cxx:1448
 AliEMCALGeometry.cxx:1449
 AliEMCALGeometry.cxx:1450
 AliEMCALGeometry.cxx:1451
 AliEMCALGeometry.cxx:1452
 AliEMCALGeometry.cxx:1453
 AliEMCALGeometry.cxx:1454
 AliEMCALGeometry.cxx:1455
 AliEMCALGeometry.cxx:1456
 AliEMCALGeometry.cxx:1457
 AliEMCALGeometry.cxx:1458
 AliEMCALGeometry.cxx:1459
 AliEMCALGeometry.cxx:1460
 AliEMCALGeometry.cxx:1461
 AliEMCALGeometry.cxx:1462
 AliEMCALGeometry.cxx:1463
 AliEMCALGeometry.cxx:1464
 AliEMCALGeometry.cxx:1465
 AliEMCALGeometry.cxx:1466
 AliEMCALGeometry.cxx:1467
 AliEMCALGeometry.cxx:1468
 AliEMCALGeometry.cxx:1469
 AliEMCALGeometry.cxx:1470
 AliEMCALGeometry.cxx:1471
 AliEMCALGeometry.cxx:1472
 AliEMCALGeometry.cxx:1473
 AliEMCALGeometry.cxx:1474
 AliEMCALGeometry.cxx:1475
 AliEMCALGeometry.cxx:1476
 AliEMCALGeometry.cxx:1477
 AliEMCALGeometry.cxx:1478
 AliEMCALGeometry.cxx:1479
 AliEMCALGeometry.cxx:1480
 AliEMCALGeometry.cxx:1481
 AliEMCALGeometry.cxx:1482
 AliEMCALGeometry.cxx:1483
 AliEMCALGeometry.cxx:1484
 AliEMCALGeometry.cxx:1485
 AliEMCALGeometry.cxx:1486
 AliEMCALGeometry.cxx:1487
 AliEMCALGeometry.cxx:1488
 AliEMCALGeometry.cxx:1489
 AliEMCALGeometry.cxx:1490
 AliEMCALGeometry.cxx:1491
 AliEMCALGeometry.cxx:1492
 AliEMCALGeometry.cxx:1493
 AliEMCALGeometry.cxx:1494
 AliEMCALGeometry.cxx:1495
 AliEMCALGeometry.cxx:1496
 AliEMCALGeometry.cxx:1497
 AliEMCALGeometry.cxx:1498
 AliEMCALGeometry.cxx:1499
 AliEMCALGeometry.cxx:1500
 AliEMCALGeometry.cxx:1501
 AliEMCALGeometry.cxx:1502
 AliEMCALGeometry.cxx:1503
 AliEMCALGeometry.cxx:1504
 AliEMCALGeometry.cxx:1505
 AliEMCALGeometry.cxx:1506
 AliEMCALGeometry.cxx:1507
 AliEMCALGeometry.cxx:1508
 AliEMCALGeometry.cxx:1509
 AliEMCALGeometry.cxx:1510
 AliEMCALGeometry.cxx:1511
 AliEMCALGeometry.cxx:1512
 AliEMCALGeometry.cxx:1513
 AliEMCALGeometry.cxx:1514
 AliEMCALGeometry.cxx:1515
 AliEMCALGeometry.cxx:1516
 AliEMCALGeometry.cxx:1517
 AliEMCALGeometry.cxx:1518
 AliEMCALGeometry.cxx:1519
 AliEMCALGeometry.cxx:1520
 AliEMCALGeometry.cxx:1521
 AliEMCALGeometry.cxx:1522
 AliEMCALGeometry.cxx:1523
 AliEMCALGeometry.cxx:1524
 AliEMCALGeometry.cxx:1525
 AliEMCALGeometry.cxx:1526
 AliEMCALGeometry.cxx:1527
 AliEMCALGeometry.cxx:1528
 AliEMCALGeometry.cxx:1529
 AliEMCALGeometry.cxx:1530
 AliEMCALGeometry.cxx:1531
 AliEMCALGeometry.cxx:1532
 AliEMCALGeometry.cxx:1533
 AliEMCALGeometry.cxx:1534
 AliEMCALGeometry.cxx:1535
 AliEMCALGeometry.cxx:1536
 AliEMCALGeometry.cxx:1537
 AliEMCALGeometry.cxx:1538
 AliEMCALGeometry.cxx:1539
 AliEMCALGeometry.cxx:1540
 AliEMCALGeometry.cxx:1541
 AliEMCALGeometry.cxx:1542
 AliEMCALGeometry.cxx:1543
 AliEMCALGeometry.cxx:1544
 AliEMCALGeometry.cxx:1545
 AliEMCALGeometry.cxx:1546
 AliEMCALGeometry.cxx:1547
 AliEMCALGeometry.cxx:1548
 AliEMCALGeometry.cxx:1549
 AliEMCALGeometry.cxx:1550
 AliEMCALGeometry.cxx:1551
 AliEMCALGeometry.cxx:1552
 AliEMCALGeometry.cxx:1553
 AliEMCALGeometry.cxx:1554
 AliEMCALGeometry.cxx:1555
 AliEMCALGeometry.cxx:1556
 AliEMCALGeometry.cxx:1557
 AliEMCALGeometry.cxx:1558
 AliEMCALGeometry.cxx:1559
 AliEMCALGeometry.cxx:1560
 AliEMCALGeometry.cxx:1561
 AliEMCALGeometry.cxx:1562
 AliEMCALGeometry.cxx:1563
 AliEMCALGeometry.cxx:1564
 AliEMCALGeometry.cxx:1565
 AliEMCALGeometry.cxx:1566
 AliEMCALGeometry.cxx:1567
 AliEMCALGeometry.cxx:1568
 AliEMCALGeometry.cxx:1569
 AliEMCALGeometry.cxx:1570
 AliEMCALGeometry.cxx:1571
 AliEMCALGeometry.cxx:1572
 AliEMCALGeometry.cxx:1573
 AliEMCALGeometry.cxx:1574
 AliEMCALGeometry.cxx:1575
 AliEMCALGeometry.cxx:1576
 AliEMCALGeometry.cxx:1577
 AliEMCALGeometry.cxx:1578
 AliEMCALGeometry.cxx:1579
 AliEMCALGeometry.cxx:1580
 AliEMCALGeometry.cxx:1581
 AliEMCALGeometry.cxx:1582
 AliEMCALGeometry.cxx:1583
 AliEMCALGeometry.cxx:1584
 AliEMCALGeometry.cxx:1585
 AliEMCALGeometry.cxx:1586
 AliEMCALGeometry.cxx:1587
 AliEMCALGeometry.cxx:1588
 AliEMCALGeometry.cxx:1589
 AliEMCALGeometry.cxx:1590
 AliEMCALGeometry.cxx:1591
 AliEMCALGeometry.cxx:1592
 AliEMCALGeometry.cxx:1593
 AliEMCALGeometry.cxx:1594
 AliEMCALGeometry.cxx:1595
 AliEMCALGeometry.cxx:1596
 AliEMCALGeometry.cxx:1597
 AliEMCALGeometry.cxx:1598
 AliEMCALGeometry.cxx:1599
 AliEMCALGeometry.cxx:1600
 AliEMCALGeometry.cxx:1601
 AliEMCALGeometry.cxx:1602
 AliEMCALGeometry.cxx:1603
 AliEMCALGeometry.cxx:1604
 AliEMCALGeometry.cxx:1605
 AliEMCALGeometry.cxx:1606
 AliEMCALGeometry.cxx:1607
 AliEMCALGeometry.cxx:1608
 AliEMCALGeometry.cxx:1609
 AliEMCALGeometry.cxx:1610
 AliEMCALGeometry.cxx:1611
 AliEMCALGeometry.cxx:1612
 AliEMCALGeometry.cxx:1613
 AliEMCALGeometry.cxx:1614
 AliEMCALGeometry.cxx:1615
 AliEMCALGeometry.cxx:1616
 AliEMCALGeometry.cxx:1617
 AliEMCALGeometry.cxx:1618
 AliEMCALGeometry.cxx:1619
 AliEMCALGeometry.cxx:1620
 AliEMCALGeometry.cxx:1621
 AliEMCALGeometry.cxx:1622
 AliEMCALGeometry.cxx:1623
 AliEMCALGeometry.cxx:1624
 AliEMCALGeometry.cxx:1625
 AliEMCALGeometry.cxx:1626
 AliEMCALGeometry.cxx:1627
 AliEMCALGeometry.cxx:1628
 AliEMCALGeometry.cxx:1629
 AliEMCALGeometry.cxx:1630
 AliEMCALGeometry.cxx:1631
 AliEMCALGeometry.cxx:1632
 AliEMCALGeometry.cxx:1633
 AliEMCALGeometry.cxx:1634
 AliEMCALGeometry.cxx:1635
 AliEMCALGeometry.cxx:1636
 AliEMCALGeometry.cxx:1637
 AliEMCALGeometry.cxx:1638
 AliEMCALGeometry.cxx:1639
 AliEMCALGeometry.cxx:1640
 AliEMCALGeometry.cxx:1641
 AliEMCALGeometry.cxx:1642
 AliEMCALGeometry.cxx:1643
 AliEMCALGeometry.cxx:1644
 AliEMCALGeometry.cxx:1645
 AliEMCALGeometry.cxx:1646
 AliEMCALGeometry.cxx:1647
 AliEMCALGeometry.cxx:1648
 AliEMCALGeometry.cxx:1649
 AliEMCALGeometry.cxx:1650
 AliEMCALGeometry.cxx:1651
 AliEMCALGeometry.cxx:1652
 AliEMCALGeometry.cxx:1653
 AliEMCALGeometry.cxx:1654
 AliEMCALGeometry.cxx:1655
 AliEMCALGeometry.cxx:1656
 AliEMCALGeometry.cxx:1657
 AliEMCALGeometry.cxx:1658
 AliEMCALGeometry.cxx:1659
 AliEMCALGeometry.cxx:1660
 AliEMCALGeometry.cxx:1661
 AliEMCALGeometry.cxx:1662
 AliEMCALGeometry.cxx:1663
 AliEMCALGeometry.cxx:1664
 AliEMCALGeometry.cxx:1665
 AliEMCALGeometry.cxx:1666
 AliEMCALGeometry.cxx:1667
 AliEMCALGeometry.cxx:1668
 AliEMCALGeometry.cxx:1669
 AliEMCALGeometry.cxx:1670
 AliEMCALGeometry.cxx:1671
 AliEMCALGeometry.cxx:1672
 AliEMCALGeometry.cxx:1673
 AliEMCALGeometry.cxx:1674
 AliEMCALGeometry.cxx:1675
 AliEMCALGeometry.cxx:1676
 AliEMCALGeometry.cxx:1677
 AliEMCALGeometry.cxx:1678
 AliEMCALGeometry.cxx:1679
 AliEMCALGeometry.cxx:1680
 AliEMCALGeometry.cxx:1681
 AliEMCALGeometry.cxx:1682
 AliEMCALGeometry.cxx:1683
 AliEMCALGeometry.cxx:1684
 AliEMCALGeometry.cxx:1685
 AliEMCALGeometry.cxx:1686
 AliEMCALGeometry.cxx:1687
 AliEMCALGeometry.cxx:1688
 AliEMCALGeometry.cxx:1689
 AliEMCALGeometry.cxx:1690
 AliEMCALGeometry.cxx:1691
 AliEMCALGeometry.cxx:1692
 AliEMCALGeometry.cxx:1693
 AliEMCALGeometry.cxx:1694
 AliEMCALGeometry.cxx:1695
 AliEMCALGeometry.cxx:1696
 AliEMCALGeometry.cxx:1697
 AliEMCALGeometry.cxx:1698
 AliEMCALGeometry.cxx:1699
 AliEMCALGeometry.cxx:1700
 AliEMCALGeometry.cxx:1701
 AliEMCALGeometry.cxx:1702
 AliEMCALGeometry.cxx:1703
 AliEMCALGeometry.cxx:1704
 AliEMCALGeometry.cxx:1705
 AliEMCALGeometry.cxx:1706
 AliEMCALGeometry.cxx:1707
 AliEMCALGeometry.cxx:1708
 AliEMCALGeometry.cxx:1709
 AliEMCALGeometry.cxx:1710
 AliEMCALGeometry.cxx:1711
 AliEMCALGeometry.cxx:1712
 AliEMCALGeometry.cxx:1713
 AliEMCALGeometry.cxx:1714
 AliEMCALGeometry.cxx:1715
 AliEMCALGeometry.cxx:1716
 AliEMCALGeometry.cxx:1717
 AliEMCALGeometry.cxx:1718
 AliEMCALGeometry.cxx:1719
 AliEMCALGeometry.cxx:1720
 AliEMCALGeometry.cxx:1721
 AliEMCALGeometry.cxx:1722
 AliEMCALGeometry.cxx:1723
 AliEMCALGeometry.cxx:1724
 AliEMCALGeometry.cxx:1725
 AliEMCALGeometry.cxx:1726
 AliEMCALGeometry.cxx:1727
 AliEMCALGeometry.cxx:1728
 AliEMCALGeometry.cxx:1729
 AliEMCALGeometry.cxx:1730
 AliEMCALGeometry.cxx:1731
 AliEMCALGeometry.cxx:1732
 AliEMCALGeometry.cxx:1733
 AliEMCALGeometry.cxx:1734
 AliEMCALGeometry.cxx:1735
 AliEMCALGeometry.cxx:1736
 AliEMCALGeometry.cxx:1737
 AliEMCALGeometry.cxx:1738
 AliEMCALGeometry.cxx:1739
 AliEMCALGeometry.cxx:1740
 AliEMCALGeometry.cxx:1741
 AliEMCALGeometry.cxx:1742
 AliEMCALGeometry.cxx:1743
 AliEMCALGeometry.cxx:1744
 AliEMCALGeometry.cxx:1745
 AliEMCALGeometry.cxx:1746
 AliEMCALGeometry.cxx:1747
 AliEMCALGeometry.cxx:1748
 AliEMCALGeometry.cxx:1749
 AliEMCALGeometry.cxx:1750
 AliEMCALGeometry.cxx:1751
 AliEMCALGeometry.cxx:1752
 AliEMCALGeometry.cxx:1753
 AliEMCALGeometry.cxx:1754
 AliEMCALGeometry.cxx:1755
 AliEMCALGeometry.cxx:1756
 AliEMCALGeometry.cxx:1757
 AliEMCALGeometry.cxx:1758
 AliEMCALGeometry.cxx:1759
 AliEMCALGeometry.cxx:1760
 AliEMCALGeometry.cxx:1761
 AliEMCALGeometry.cxx:1762
 AliEMCALGeometry.cxx:1763
 AliEMCALGeometry.cxx:1764
 AliEMCALGeometry.cxx:1765
 AliEMCALGeometry.cxx:1766
 AliEMCALGeometry.cxx:1767
 AliEMCALGeometry.cxx:1768
 AliEMCALGeometry.cxx:1769
 AliEMCALGeometry.cxx:1770
 AliEMCALGeometry.cxx:1771
 AliEMCALGeometry.cxx:1772
 AliEMCALGeometry.cxx:1773
 AliEMCALGeometry.cxx:1774
 AliEMCALGeometry.cxx:1775
 AliEMCALGeometry.cxx:1776
 AliEMCALGeometry.cxx:1777
 AliEMCALGeometry.cxx:1778
 AliEMCALGeometry.cxx:1779
 AliEMCALGeometry.cxx:1780
 AliEMCALGeometry.cxx:1781
 AliEMCALGeometry.cxx:1782
 AliEMCALGeometry.cxx:1783
 AliEMCALGeometry.cxx:1784
 AliEMCALGeometry.cxx:1785
 AliEMCALGeometry.cxx:1786
 AliEMCALGeometry.cxx:1787
 AliEMCALGeometry.cxx:1788
 AliEMCALGeometry.cxx:1789
 AliEMCALGeometry.cxx:1790
 AliEMCALGeometry.cxx:1791
 AliEMCALGeometry.cxx:1792
 AliEMCALGeometry.cxx:1793
 AliEMCALGeometry.cxx:1794
 AliEMCALGeometry.cxx:1795
 AliEMCALGeometry.cxx:1796
 AliEMCALGeometry.cxx:1797
 AliEMCALGeometry.cxx:1798
 AliEMCALGeometry.cxx:1799
 AliEMCALGeometry.cxx:1800
 AliEMCALGeometry.cxx:1801
 AliEMCALGeometry.cxx:1802
 AliEMCALGeometry.cxx:1803
 AliEMCALGeometry.cxx:1804
 AliEMCALGeometry.cxx:1805
 AliEMCALGeometry.cxx:1806
 AliEMCALGeometry.cxx:1807
 AliEMCALGeometry.cxx:1808
 AliEMCALGeometry.cxx:1809
 AliEMCALGeometry.cxx:1810
 AliEMCALGeometry.cxx:1811
 AliEMCALGeometry.cxx:1812