// Number of Modules and Layers may be controlled by
// the name of the instance defined
// EMCAL geometry tree:
-// EMCAL -> superModule -> module -> cell
+// EMCAL -> superModule -> module -> tower(cell)
// Indexes
-// absId -> nSupMod -> nTower -> (nIphi,nIeta)
+// absId -> nSupMod -> nModule -> (nIphi,nIeta)
//
//*-- Author: Sahal Yacoob (LBL / UCT)
// and : Yves Schutz (SUBATECH)
// and : Jennifer Klay (LBL)
// SHASHLYK : Aleksei Pavlinov (WSU)
//
-// --- AliRoot header files ---
+
#include <assert.h>
-#include <Riostream.h>
-#include <TMath.h>
-#include <TVector3.h>
-#include <TObjArray.h>
+// --- AliRoot header files ---
+#include <Riostream.h>
+#include <TBrowser.h>
+#include <TClonesArray.h>
#include <TGeoManager.h>
-#include <TGeoNode.h>
#include <TGeoMatrix.h>
+#include <TGeoNode.h>
#include <TMatrixD.h>
+#include <TObjArray.h>
#include <TObjString.h>
-#include <TClonesArray.h>
-#include <TBrowser.h>
+#include <TVector3.h>
// -- ALICE Headers.
-//#include "AliConst.h"
#include "AliLog.h"
// --- EMCAL headers
// these initialisations are needed for a singleton
AliEMCALGeometry *AliEMCALGeometry::fgGeom = 0;
Bool_t AliEMCALGeometry::fgInit = kFALSE;
-
+Char_t* AliEMCALGeometry::fgDefaultGeometryName = "SHISH_77_TRD1_2X2_FINAL_110DEG";
+//
+// 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
+//
AliEMCALGeometry::AliEMCALGeometry()
: AliGeometry(),
fShellThickness(0.),fZLength(0.),fGap2Active(0.),fNZ(0),fNPhi(0),fSampling(0.),fNumberOfSuperModules(0),
fSteelFrontThick(0.),fFrontSteelStrip(0.),fLateralSteelStrip(0.),fPassiveScintThick(0.),fPhiModuleSize(0.),
fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fLongModuleSize(0.),fNPhiSuperModule(0),fNPHIdiv(0),fNETAdiv(0),
- fNCells(0),fNCellsInSupMod(0),fNCellsInTower(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.),
+ fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.),
fPhiGapForSM(0.),fKey110DEG(0),fPhiBoundariesOfSM(0), fPhiCentersOfSM(0),fEtaMaxOfTRD1(0),
fTrd2AngleY(0.),f2Trd2Dy2(0.),fEmptySpace(0.),fTubsR(0.),fTubsTurnAngle(0.),fCentersOfCellsEtaDir(0),
fCentersOfCellsXDir(0),fCentersOfCellsPhiDir(0),fEtaCentersOfCells(0),fPhiCentersOfCells(0),
- fShishKebabTrd1Modules(0),fNAdditionalOpts(0)
+ fShishKebabTrd1Modules(0), fNAdditionalOpts(0),
+ fILOSS(-1), fIHADR(-1)
{
// default ctor only for internal usage (singleton)
// must be kept public for root persistency purposes, but should never be called by the outside world
fShellThickness(0.),fZLength(0.),fGap2Active(0.),fNZ(0),fNPhi(0),fSampling(0.),fNumberOfSuperModules(0),
fSteelFrontThick(0.),fFrontSteelStrip(0.),fLateralSteelStrip(0.),fPassiveScintThick(0.),fPhiModuleSize(0.),
fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fLongModuleSize(0.),fNPhiSuperModule(0),fNPHIdiv(0),fNETAdiv(0),
- fNCells(0),fNCellsInSupMod(0),fNCellsInTower(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.),
+ fNCells(0),fNCellsInSupMod(0),fNCellsInModule(0),fNTRU(0),fNTRUEta(0),fNTRUPhi(0),fTrd1Angle(0.),f2Trd1Dx2(0.),
fPhiGapForSM(0.),fKey110DEG(0),fPhiBoundariesOfSM(0), fPhiCentersOfSM(0), fEtaMaxOfTRD1(0),
fTrd2AngleY(0.),f2Trd2Dy2(0.),fEmptySpace(0.),fTubsR(0.),fTubsTurnAngle(0.),fCentersOfCellsEtaDir(0),
fCentersOfCellsXDir(0),fCentersOfCellsPhiDir(0),fEtaCentersOfCells(0),fPhiCentersOfCells(0),
- fShishKebabTrd1Modules(0),fNAdditionalOpts(0)
+ fShishKebabTrd1Modules(0),fNAdditionalOpts(0),
+ fILOSS(-1), fIHADR(-1)
{
// ctor only for internal usage (singleton)
AliDebug(2, Form("AliEMCALGeometry(%s,%s) ", name,title));
fNETAdiv(geom.fNETAdiv),
fNCells(geom.fNCells),
fNCellsInSupMod(geom.fNCellsInSupMod),
- fNCellsInTower(geom.fNCellsInTower),
+ fNCellsInModule(geom.fNCellsInModule),
fNTRU(geom.fNTRU),
fNTRUEta(geom.fNTRUEta),
fNTRUPhi(geom.fNTRUPhi),
fEtaCentersOfCells(geom.fEtaCentersOfCells),
fPhiCentersOfCells(geom.fPhiCentersOfCells),
fShishKebabTrd1Modules(geom.fShishKebabTrd1Modules),
- fNAdditionalOpts(geom.fNAdditionalOpts)
+ fNAdditionalOpts(geom.fNAdditionalOpts),
+ fILOSS(geom.fILOSS), fIHADR(geom.fIHADR)
{
//copy ctor
}
// Oct 30,2006 - SHISH_TRD1_CURRENT_1X1, SHISH_TRD1_CURRENT_2X2 or SHISH_TRD1_CURRENT_3X3;
//
- fAdditionalOpts[0] = "nl="; // number of sampling layers (fNECLayers)
- fAdditionalOpts[1] = "pbTh="; // cm, Thickness of the Pb (fECPbRadThick)
- fAdditionalOpts[2] = "scTh="; // cm, Thickness of the Sc (fECScintThick)
- fAdditionalOpts[3] = "latSS="; // cm, Thickness of lateral steel strip (fLateralSteelStrip)
+ fAdditionalOpts[0] = "nl="; // number of sampling layers (fNECLayers)
+ fAdditionalOpts[1] = "pbTh="; // cm, Thickness of the Pb (fECPbRadThick)
+ fAdditionalOpts[2] = "scTh="; // cm, Thickness of the Sc (fECScintThick)
+ fAdditionalOpts[3] = "latSS="; // cm, Thickness of lateral steel strip (fLateralSteelStrip)
+ fAdditionalOpts[4] = "allILOSS="; // = 0,1,2,3,4 (4 - energy loss without fluctuation)
+ fAdditionalOpts[5] = "allIHADR="; // = 0,1,2 (0 - no hadronic interaction)
fNAdditionalOpts = sizeof(fAdditionalOpts) / sizeof(char*);
fEtaTileSize = fEtaModuleSize/double(fNETAdiv) - fLateralSteelStrip; // 13-may-05
// constant for transition absid <--> indexes
- fNCellsInTower = fNPHIdiv*fNETAdiv;
- fNCellsInSupMod = fNCellsInTower*fNPhi*fNZ;
+ fNCellsInModule = fNPHIdiv*fNETAdiv;
+ fNCellsInSupMod = fNCellsInModule*fNPhi*fNZ;
fNCells = fNCellsInSupMod*fNumberOfSuperModules;
if(GetKey110DEG()) fNCells -= fNCellsInSupMod;
fPhiBoundariesOfSM[10] = fPhiBoundariesOfSM[11] - TMath::ATan2((fParSM[1]) , fIPDistance);
fPhiCentersOfSM[5] = (fPhiBoundariesOfSM[10]+fPhiBoundariesOfSM[11])/2.;
- fgInit = kTRUE;
-
//TRU parameters. These parameters values are not the final ones.
fNTRU = 3 ;
fNTRUEta = 3 ;
fNTRUPhi = 1 ;
+ // Define TGeoMatrix of SM - Jan 19, 2007 (just fro TRD1)
+ if(fGeoName.Contains("TRD1")) { // copy code from AliEMCALv0::CreateSmod()
+ int nphism = GetNumberOfSuperModules()/2;
+ double dphi = (GetArm1PhiMax() - GetArm1PhiMin())/nphism;
+ double rpos = (GetEnvelop(0) + GetEnvelop(1))/2.;
+ double phi, phiRad, xpos, ypos, zpos;
+ for(int i=0; i<nphism; i++){
+ phi = GetArm1PhiMin() + dphi*(2*i+1)/2.; // phi= 90, 110, 130, 150, 170, 190
+ phiRad = phi*TMath::Pi()/180.;
+ xpos = rpos * TMath::Cos(phiRad);
+ ypos = rpos * TMath::Sin(phiRad);
+ zpos = fParSM[2];
+ if(i==5) {
+ xpos += (fParSM[1]/2. * TMath::Sin(phiRad));
+ ypos -= (fParSM[1]/2. * TMath::Cos(phiRad));
+ }
+ // pozitive z
+ int ind = 2*i;
+ TGeoRotation *geoRot0 = new TGeoRotation("geoRot0", 90.0, phi, 90.0, 90.0+phi, 0.0, 0.0);
+ fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
+ xpos,ypos, zpos, geoRot0);
+ // negaive z
+ ind++;
+ double phiy = 90. + phi + 180.;
+ if(phiy>=360.) phiy -= 360.;
+ TGeoRotation *geoRot1 = new TGeoRotation("geoRot1", 90.0, phi, 90.0, phiy, 180.0, 0.0);
+ fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
+ xpos,ypos,-zpos, geoRot1);
+ } // for
+ }
+ fgInit = kTRUE;
+ AliInfo(" is ended");
}
void AliEMCALGeometry::PrintGeometry()
{
// Separate routine is callable from broswer; Nov 7,2006
- printf("\nInit: geometry of EMCAL named %s is as follows:\n", fGeoName.Data());
+ printf("\nInit: geometry of EMCAL named %s :\n", fGeoName.Data());
+ if(fArrayOpts) {
+ for(Int_t i=0; i<fArrayOpts->GetEntries(); i++){
+ TObjString *o = (TObjString*)fArrayOpts->At(i);
+ printf(" %i : %s \n", i, o->String().Data());
+ }
+ }
printf("Granularity: %d in eta and %d in phi\n", GetNZ(), GetNPhi()) ;
printf("Layout: phi = (%7.1f, %7.1f), eta = (%5.2f, %5.2f), IP = %7.2f -> for EMCAL envelope only\n",
GetArm1PhiMin(), GetArm1PhiMax(),GetArm1EtaMin(), GetArm1EtaMax(), GetIPDistance() );
if(fSteelFrontThick>0.)
printf(" fSteelFrontThick %6.3f cm \n", fSteelFrontThick);
printf(" fNPhi %i | fNZ %i \n", fNPhi, fNZ);
- printf(" fNCellsInTower %i : fNCellsInSupMod %i : fNCells %i\n",fNCellsInTower, fNCellsInSupMod, fNCells);
+ printf(" fNCellsInModule %i : fNCellsInSupMod %i : fNCells %i\n",fNCellsInModule, fNCellsInSupMod, fNCells);
if(fGeoName.Contains("MAY05")){
printf(" fFrontSteelStrip %6.4f cm (thickness of front steel strip)\n",
fFrontSteelStrip);
printf(" fLongModuleSize %6.3f cm \n", fLongModuleSize);
printf(" #supermodule in phi direction %i \n", fNPhiSuperModule );
}
+ printf(" fILOSS %i : fIHADR %i \n", fILOSS, fIHADR);
if(fGeoName.Contains("TRD")) {
printf(" fTrd1Angle %7.4f\n", fTrd1Angle);
printf(" f2Trd1Dx2 %7.4f\n", f2Trd1Dx2);
if((iphi+1)%12 == 0) printf("\n");
}
printf("\n");
+
+ }
+ printf(" Matrix transformation\n");
+ for(Int_t i=0; i<12; i++) {
+ TGeoMatrix *m = fMatrixOfSM[i];
+ if(m==0) continue;
+ const double *xyz = m->GetTranslation();
+ printf(" %2.2i %s %s x %7.2f y %7.2f z %7.2f\n",
+ i, m->GetName(), m->ClassName(), xyz[0],xyz[1],xyz[2]);
}
printf("\n Cells grid in phi directions : size %i\n", fCentersOfCellsPhiDir.GetSize());
}
}
}
+ cout<<endl;
}
void AliEMCALGeometry::PrintCellIndexes(Int_t absId, int pri, char *tit)
{
// Service methods
- Int_t nSupMod, nTower, nIphi, nIeta;
+ Int_t nSupMod, nModule, nIphi, nIeta;
Int_t iphi, ieta;
TVector3 vg;
- GetCellIndex(absId, nSupMod, nTower, nIphi, nIeta);
- printf(" %s | absId : %i -> nSupMod %i nTower %i nIphi %i nIeta %i \n", tit, absId, nSupMod, nTower, nIphi, nIeta);
+ 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,nTower,nIphi,nIeta, iphi,ieta);
+ 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",
void AliEMCALGeometry::CheckAdditionalOptions()
{
// Feb 06,2006
- //Additional options that
- //can be used to select
- //the specific geometry of
- //EMCAL to run
-
+ // Additional options that
+ // can be used to select
+ // the specific geometry of
+ // EMCAL to run
+ // Dec 27,2006
+ // adeed allILOSS= and allIHADR= for MIP investigation
fArrayOpts = new TObjArray;
Int_t nopt = AliEMCALHistoUtilities::ParseString(fGeoName, *fArrayOpts);
if(nopt==1) { // no aditional option(s)
} else if(addOpt.Contains("LATSS=",TString::kIgnoreCase)) {// Thickness of lateral steel strip (fLateralSteelStrip)
sscanf(addOpt.Data(),"LATSS=%f", &fLateralSteelStrip);
AliDebug(2,Form(" fLateralSteelStrip %f (new) \n", fLateralSteelStrip));
+ } else if(addOpt.Contains("ILOSS=",TString::kIgnoreCase)) {// As in Geant
+ sscanf(addOpt.Data(),"ALLILOSS=%i", &fILOSS);
+ AliDebug(2,Form(" fILOSS %i \n", fILOSS));
+ } else if(addOpt.Contains("IHADR=",TString::kIgnoreCase)) {// As in Geant
+ sscanf(addOpt.Data(),"ALLIHADR=%i", &fIHADR);
+ AliDebug(2,Form(" fIHADR %i \n", fIHADR));
}
}
}
Float_t amp = -1;
Float_t timeR = -1;
Int_t iSupMod = -1;
- Int_t nTower = -1;
+ Int_t nModule = -1;
Int_t nIphi = -1;
Int_t nIeta = -1;
Int_t iphi = -1;
timeR = dig->GetTimeR() ; // Earliest time of the digit
//Get eta and phi cell position in supermodule
- Bool_t bCell = GetCellIndex(id, iSupMod, nTower, nIphi, nIeta) ;
+ Bool_t bCell = GetCellIndex(id, iSupMod, nModule, nIphi, nIeta) ;
if(!bCell)
Error("FillTRU","Wrong cell id number") ;
- GetCellPhiEtaIndexInSModule(iSupMod,nTower,nIphi, nIeta,iphi,ieta);
+ GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);
//Check to which TRU in the supermodule belongs the cell.
//Supermodules are divided in a TRU matrix of dimension
AliEMCALGeometry * rv = 0;
if ( fgGeom == 0 ) {
- if ( strcmp(name,"") == 0 ) rv = 0;
- else {
- fgGeom = new AliEMCALGeometry(name, title);
- if ( fgInit ) rv = (AliEMCALGeometry * ) fgGeom;
- else {
- rv = 0;
- delete fgGeom;
- fgGeom = 0;
- } // end if fgInit
- } // end if strcmp(name,"")
+ if ( strcmp(name,"") == 0 ) { // get default geometry
+ fgGeom = new AliEMCALGeometry(fgDefaultGeometryName, title);
+ } else {
+ fgGeom = new AliEMCALGeometry(name, title);
+ } // end if strcmp(name,"")
+ if ( 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());
//
// == Shish-kebab cases ==
//
-Int_t AliEMCALGeometry::GetAbsCellId(Int_t nSupMod, Int_t nTower, Int_t nIphi, Int_t nIeta) const
+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 <= nTower < fNPHI * fNZ ( fNPHI * fNZ/2 for fKey110DEG=1)
+ // 0 <= nModule < fNPHI * fNZ ( fNPHI * fNZ/2 for fKey110DEG=1)
// 0 <= nIphi < fNPHIdiv
// 0 <= nIeta < fNETAdiv
// 0 <= absid < fNCells
} else {
id = fNCellsInSupMod*nSupMod;
}
- id += fNCellsInTower *nTower;
+ id += fNCellsInModule *nModule;
id += fNPHIdiv *nIphi;
id += nIeta;
if(id<0 || id >= fNCells) {
// printf(" id %6i(will be force to -1)\n", id);
// printf(" fNCells %6i\n", fNCells);
// printf(" nSupMod %6i\n", nSupMod);
-// printf(" nTower %6i\n", nTower);
+// printf(" nModule %6i\n", nModule);
// printf(" nIphi %6i\n", nIphi);
// printf(" nIeta %6i\n", nIeta);
id = -TMath::Abs(id); // if negative something wrong
else return kTRUE;
}
-Bool_t AliEMCALGeometry::GetCellIndex(Int_t absId,Int_t &nSupMod,Int_t &nTower,Int_t &nIphi,Int_t &nIeta) const
+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;
+ //
static Int_t tmp=0, sm10=0;
if(!CheckAbsCellId(absId)) return kFALSE;
tmp = absId % fNCellsInSupMod;
}
- nTower = tmp / fNCellsInTower;
- tmp = tmp % fNCellsInTower;
+ nModule = tmp / fNCellsInModule;
+ tmp = tmp % fNCellsInModule;
nIphi = tmp / fNPHIdiv;
nIeta = tmp % fNPHIdiv;
return kTRUE;
}
-void AliEMCALGeometry::GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nTower, int &iphim, int &ietam) const
+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
if(fKey110DEG == 1 && nSupMod>=10) nphi = fNPhi/2;
else nphi = fNPhi;
- ietam = nTower/nphi;
- iphim = nTower%nphi;
+ ietam = nModule/nphi;
+ iphim = nModule%nphi;
}
-void AliEMCALGeometry::GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nTower, Int_t nIphi, Int_t nIeta,
+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, ietam;
- GetModulePhiEtaIndexInSModule(nSupMod,nTower, iphim, ietam);
+ 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 nTower %i nIphi %i nIeta %i => ieta %i iphi %i\n",
- nSupMod, nTower, nIphi, nIeta, ieta, iphi));
+ AliDebug(1,Form(" nSupMod %i nModule %i nIphi %i nIeta %i => ieta %i iphi %i\n",
+ nSupMod, nModule, nIphi, nIeta, ieta, iphi));
}
Int_t AliEMCALGeometry::GetSuperModuleNumber(Int_t absId) const
// Return the number of the supermodule given the absolute
// ALICE numbering id
- static Int_t nSupMod, nTower, nIphi, nIeta;
- GetCellIndex(absId, nSupMod, nTower, nIphi, nIeta);
+ static Int_t nSupMod, nModule, nIphi, nIeta;
+ GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
return nSupMod;
}
void AliEMCALGeometry::GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta,
- Int_t &iphim, Int_t &ietam, Int_t &nTower) const
+ Int_t &iphim, Int_t &ietam, Int_t &nModule) const
{
- // Transition from cell indexes (ieta,iphi) to module indexes (ietam,iphim, nTower)
+ // Transition from cell indexes (ieta,iphi) to module indexes (ietam,iphim, nModule)
static Int_t nphi;
nphi = GetNumberOfModuleInPhiDirection(nSupMod);
ietam = ieta/fNETAdiv;
iphim = iphi/fNPHIdiv;
- nTower = ietam * nphi + iphim;
+ 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
- static Int_t ietam, iphim, nTower;
+ static Int_t ietam, iphim, nModule;
static Int_t nIeta, nIphi; // cell indexes in module
- GetModuleIndexesFromCellIndexesInSModule(nSupMod, iphi, ieta, ietam, iphim, nTower);
+ GetModuleIndexesFromCellIndexesInSModule(nSupMod, iphi, ieta, ietam, iphim, nModule);
nIeta = ieta%fNETAdiv;
nIeta = fNETAdiv - 1 - nIeta;
nIphi = iphi%fNPHIdiv;
- return GetAbsCellId(nSupMod, nTower, nIphi, nIeta);
+ return GetAbsCellId(nSupMod, nModule, nIphi, nIeta);
}
// 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 size in phi direction
const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
- static Int_t nSupMod, nTower, nIphi, nIeta, iphi, ieta;
+ static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
if(!CheckAbsCellId(absId)) return kFALSE;
- GetCellIndex(absId, nSupMod, nTower, nIphi, nIeta);
- GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi, ieta);
+ GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
+ GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi, ieta);
xr = fCentersOfCellsXDir.At(ieta);
zr = fCentersOfCellsEtaDir.At(ieta);
//
AliDebug(2,Form(" Cells grid in phi directions : size %i\n", fCentersOfCellsPhiDir.GetSize()));
Int_t ind=0; // this is phi index
- Int_t iphi=0, ieta=0, nTower=0, iphiTemp;
+ Int_t iphi=0, ieta=0, nModule=0, iphiTemp;
Double_t xr, zr, theta, phi, eta, r, x,y;
TVector3 vglob;
Double_t ytCenterModule, ytCenterCell;
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);
- nTower = fNPhi*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, nTower, 0, ic, iphiTemp, ieta);
+ GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
} if(fNPHIdiv==3) {
trd1->GetCenterOfCellInLocalCoordinateofSM_3X3(ic, xr, zr); // case of 3X3
- GetCellPhiEtaIndexInSModule(0, nTower, 0, ic, iphiTemp, ieta);
+ GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
} if(fNPHIdiv==1) {
trd1->GetCenterOfCellInLocalCoordinateofSM_1X1(xr, zr); // case of 1X1
- GetCellPhiEtaIndexInSModule(0, nTower, 0, ic, iphiTemp, ieta);
+ GetCellPhiEtaIndexInSModule(0, nModule, 0, ic, iphiTemp, ieta);
}
fCentersOfCellsXDir.AddAt(float(xr) - fParSM[0],ieta);
fCentersOfCellsEtaDir.AddAt(float(zr) - fParSM[2],ieta);
//Uses the geometry manager to
//load the transformation matrix
//for the supermodules
+ // Unused after 19 Jan, 2007 - keep for compatibility;
+ return;
static Bool_t transInit=kFALSE;
if(transInit) return;
void AliEMCALGeometry::Browse(TBrowser* b)
{
if(fShishKebabTrd1Modules) b->Add(fShishKebabTrd1Modules);
+ for(int i=0; i<fNumberOfSuperModules; i++) {
+ if(fMatrixOfSM[i]) b->Add(fMatrixOfSM[i]);
+ }
}
Bool_t AliEMCALGeometry::IsFolder() const