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

// --- 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"
#include "AliEMCALTriggerMappingV1.h"
#include "AliEMCALTriggerMappingV2.h"

ClassImp(AliEMCALGeometry)

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

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry():
  fEMCGeometry(0x0),fTriggerMapping(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 ;
}  

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const AliEMCALGeometry & geo)
  : TNamed(geo),
    fEMCGeometry(geo.fEMCGeometry),fTriggerMapping(geo.fTriggerMapping),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 ;
}

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const Text_t* name,   const Text_t* title,
                                   const Text_t* mcname, const Text_t* mctitle) 
  : TNamed(name, title),
    fEMCGeometry(0x0),fTriggerMapping(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();
  }
  
  if ((fEMCGeometry->GetGeoName()).Contains("DCAL")) {
    fTriggerMapping = new AliEMCALTriggerMappingV2(46, this);
    AliLog::Message(AliLog::kInfo, "EMCAL Trigger Mapping Version V2 Enabled",
                    MODULENAME(), "AliEMCALGeometry", FUNCTIONNAME(), __FILE__, __LINE__);

  } else { 
    fTriggerMapping = new AliEMCALTriggerMappingV1(32, this);
    AliLog::Message(AliLog::kInfo, "EMCAL Trigger Mapping Version V1 Enabled",
                    MODULENAME(), "AliEMCALGeometry", FUNCTIONNAME(), __FILE__, __LINE__);
  }
}

//____________________________________________________________________________
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] ;<commit_msg>Set consistently the number of TRU to fit the OCDB one and avoid crash<commit_after>/**************************************************************************
 * 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.                  *
 **************************************************************************/

// --- 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"
#include "AliEMCALTriggerMappingV1.h"
#include "AliEMCALTriggerMappingV2.h"

ClassImp(AliEMCALGeometry)

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

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry():
  fEMCGeometry(0x0),fTriggerMapping(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 ;
}  

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const AliEMCALGeometry & geo)
  : TNamed(geo),
    fEMCGeometry(geo.fEMCGeometry),fTriggerMapping(geo.fTriggerMapping),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 ;
}

//____________________________________________________________________________
AliEMCALGeometry::AliEMCALGeometry(const Text_t* name,   const Text_t* title,
                                   const Text_t* mcname, const Text_t* mctitle) 
  : TNamed(name, title),
    fEMCGeometry(0x0),fTriggerMapping(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();
  }
  
  if ((fEMCGeometry->GetGeoName()).Contains("DCAL")) {
    fTriggerMapping = new AliEMCALTriggerMappingV2(46, this);
    AliLog::Message(AliLog::kInfo, "EMCAL Trigger Mapping Version V2 Enabled",
                    MODULENAME(), "AliEMCALGeometry", FUNCTIONNAME(), __FILE__, __LINE__);

  } else { 
    fTriggerMapping = new AliEMCALTriggerMappingV1(30, this);
    AliLog::Message(AliLog::kInfo, "EMCAL Trigger Mapping Version V1 Enabled",
                    MODULENAME(), "AliEMCALGeometry", FUNCTIONNAME(), __FILE__, __LINE__);
  }
}

//____________________________________________________________________________
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] ;
{'fraction_non_alphanumeric': 0.13789266022560576, 'fraction_numerical': 0.023774596590621682, 'mean_word_length': 5.324376199616123, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3613259', 'n_tokens_mistral': 7653, 'n_tokens_neox': 7371, 'n_words': 891}