Skip navigation.
Home

EMCAL Geometry Software

EMCAL Geometry, description and methods

This page is intended for a description of the geometry, how it works, how can we access to it and its methods.  Very preliminary version, to be worked.

The EMCAL geometry is implemented in several classes, here I present a very brief description:

  • AliEMCALGeoUtils: Steering geometry class.  No dependencies on STEER or EMCAL non geometry classes. Can be called during the analysis not loading all aliroot classes.
  • AliEMCALGeometry: Derives from AliEMCALGeoUtils, contains dependencies on other EMCAL classes (AliEMCALRecPoint)
  • AliEMCALEMCGeometry: Does the geometry initialization. Does all the definitions of the geometry (towers composition, size, Super Modules number ...)
  • AliEMCALGeoParams:  Class container of some of the geometry parameters so that it can be accessed everywhere in the EMCAL code, to avoid "magic numbers". Its use has to be propagated to all the code.
  • AliEMCALShishKebabTrd1Module: Here the modules are defined and the position of the modules in the local super module reference system is calculated

 

How to get the geometry

You can get the geometry pointer in the following ways:

  • If galice.root is available:

    AliRunLoader *rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),"read");

    rl->LoadgAlice();//Needed to get geometry

    AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL"));

    AliRun * alirun = rl->GetAliRun();

    AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL"); AliEMCALGeometry * geom = emcal->GetGeometry();

  • else if galice.root is not available:

   AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance("EMCAL_COMPLETE") ;

In this case you might need the file geometry.root if you want to access to certain methods that require local to global position transformations. This file can be generated doing a simple simulation, it just contains the transformation matrix to go from global to local.

The way to load this file is:

   TGeoManager::Import("geometry.root");

The transformation matrices are also stored in the ESDs so if you do not load this file, you can have to load these matrices from the ESDs.

 If you want to see different parameters used in the geometry printed (cells centers, distance to IP, etc), you have just to execute the method PrintGeometry().

 

 Geometry configuration options

Right now we have the following geometry options:
  • EMCAL_COMPLETE: 12 Super Modules (2 half Super Modules)
  • EMCAL_FIRSTYEAR: 4 Super Modules

There are other options but NOT TO BE USED, at some point they have to be removed:

  • EMCAL_PDC06: Old geometry, for reading old data (which might not exist).
  • EMCAL_WSU: Prototype geometry. 

By default geometry is loaded with the EMCAL_COMPLETE configuration.

 

 Mapping

The tower row/column mapping online and offline follows the alice numbering convention, here you will see a few pictures displaying the position of the super modules from different points of view and the position of the tower index in them

 

 You can find also a pdf and a ppt with the 3 figures/slides.

Tower index transformation methods

Absolute tower ID to Row/Column index

Each EMCAL supermodule is composed of 24x48 towers (phi,eta), grouped in 4x4 modules. Each tower (even each module) has a unique number assigned, called in the code "absolute ID" number (absId). This number can be transformed into a row (phi direction) or column (eta direction) index. Here I list how can we go from the absId to the (row, col) formulation or viceversa:

  • From absId to col-row: 

Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;

//Check if this absId exists

if(!CheckAbsCellId(absId)) return kFALSE;

// Get from the absId the super module number, the module number and the eta-phi index (0 or 1) in the module

GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);

// Get from the  the super module number, the module number and the eta-phi index (0 or 1) in the module the tower row (iphi) and column (ieta)
GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta); 

  • From col-row to absId, following the same notation as above: 

absid = GetAbsCellIdFromCellIndexes(nSupMode, iphi, ieta);

or

absid = GetAbsCellId(nSupMod, nModule, nIphi, nIeta);

Other interesting method is

Int_t   GetSuperModuleNumber(Int_t absId)  

 

Tower index to local / global reference system position

Local coordinates

To correlate the tower index and its position in local coordinates we have the following methods: 

  Bool_t  AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const;

  Bool_t  AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, Double_t loc[3]) const;

  Bool_t  AliEMCALGeoUtils::RelPosCellInSModule(Int_t absId, TVector3 &vloc) const;

 which input is the absId and the output are the coordinates of the center of towers in the local coordinates of the Super Module. What it does inside is to get from the absId the column and row index of the cell, independently of the Super Module (like above), and it gets the center of the cell from 3 arrays (x,y,z) filled with such quantities. How and where are calculated such central positions?  The arrays are filled during the initialization of the geometry in method

  AliEMCALGeoUtils::CreateListOfTrd1Modules()

<<<<<Someone else should explain how it works>>>>>

 

In case we calculate the cluster position, things are a bit different.

 

<<<<< This explanation should go to the clusterization section>>>>

 

This is done in 

void AliEMCALRecPoint::EvalLocalPosition()

First we calculate the cell position with the  method 

AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double_t tmax, Double_t &xr, Double_t &yr, Double_t &zr)

The calculation of the cell position done here is different in the "x-z" but the same in "y". 

 

<<<<<Someone else should explain how it works>>>>>

 

 

In this particular case the position calculation per tower depends on the position of the maximum cell, and the sum of the energy of the cells of the cluster. The maximum depth (tmax) is calculated with the method

  Double_t AliEMCALRecPoint::TmaxInCm(const Double_t e){

      //e: energy sum of cells

static Double_t ca = 4.82;// shower max parameter - first guess; ca=TMath::Log(1000./8.07)

      static Double_t x0 = 1.23; // radiation lenght (cm)

      static Double_t tmax = 0.; // position of electromagnetic shower max in cm

      tmax = TMath::Log(e) + ca+0.5;

      tmax *= x0; // convert to cm

  }

After the cells position of the cluster is get, the position of the cluster is calculated averaging the cell positions with a logarithmic weight:

  w(cell i) = TMath::Max( 0., logWeight + TMath::Log( energy[cell i] / summed_cluster_cell_energy ));

where the logWeight was chosen to be 4.5 (this value was taken from PHOS, never optimized as far as I know)

So in the end the position,  is 

f = Sum(f(i) * w(i))/Sum(w(i))

where f=x,y,z.

 

 Global coordinates

 

To transform from local to global we have the methods

  void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const;

  void GetGlobal(const TVector3 &vloc, TVector3 &vglob, int ind) const;

  void GetGlobal(Int_t absId, Double_t glob[3]) const;

  void GetGlobal(Int_t absId, TVector3 &vglob) const;

 

 These methods take the local coordinates and transform them into global coordinates using the transformation matrix of the Super Module.

 

TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod);

if(m) m->LocalToMaster(loc, glob);

 

 GetGlobal is called in the following useful methods in the geometry class:

 

  •  Return the eta and phi angular position of the cell from the AbsId
    • void    EtaPhiFromIndex(Int_t absId, Double_t &eta, Double_t &phi) const;
    • void    EtaPhiFromIndex(Int_t absId, Float_t &eta, Float_t &phi) const;
  • Print information of the cells. For "pri>0" returns more information. "tit" has not much use, this value is printed.
    • void PrintCellIndexes(Int_t absId, int pri, const char *tit)

 

 

Geometry Alignment

AliRoot contains a frame for the correction of the misplacement of geometry objects with respect to the ideal positions. You can have a look in STEER to classes: 

AliAlignObj  AliAlignObjMatrix  AliAlignObjParams  AliAlignmentTracks

In EMCAL, we have the class AliEMCALSurvey that creates the corrections to the alignable objects.  The class AliEMCALSurvey was established to take the survey parameters from OCDB, calculate the shift in position of the center of the end faces of the supermodules from the nominal position, and convert this to a transformation matrix for each supermodule which is applied to correct the global position of the supermodules.  All calculations of global positions would then use these corrected supermodule positions to determine their locations within the ALICE global coordinate system.