12#ifndef ALICEO2_EMCAL_GEOMETRY_H_
13#define ALICEO2_EMCAL_GEOMETRY_H_
20#include <RStringView.h>
21#include <TGeoMatrix.h>
34class ShishKebabTrd1Module;
60 Geometry(
const std::string_view
name,
const std::string_view mcname =
"",
const std::string_view mctitle =
"");
86 const std::string_view mctitle =
"");
95 const std::string_view mcname =
"TGeant3",
96 const std::string_view mctitle =
"");
133 Bool_t
Impact(
const TParticle* particle)
const;
253 Bool_t
IsDCALSM(Int_t nSupMod)
const;
286 void GetGlobal(
const Double_t* loc, Double_t* glob,
int ind)
const;
294 void GetGlobal(
const TVector3& vloc, TVector3& vglob,
int ind)
const;
302 void GetGlobal(Int_t absId, Double_t glob[3])
const;
309 void GetGlobal(Int_t absId, TVector3& vglob)
const;
403 int GetAbsCellId(
int supermoduleID,
int moduleID,
int phiInModule,
int etaInModule)
const;
414 std::tuple<int, int, int, int>
GetCellIndex(Int_t absId)
const;
514 std::tuple<int, int, int>
getOnlineID(
int towerID);
553 return 2.0 * TMath::ATan(TMath::Exp(-eta));
577 const Float_t misaligTransShifts[15],
const Float_t misaligRotShifts[15],
604 void DefineEMC(std::string_view mcname, std::string_view mctitle);
629 std::vector<Double_t>
693 std::array<int, 46>
mCRORCID = {110, 110, 112, 112, 110, 110, 112, 112, 110, 110, 112, 112, 111, 111, 113, 113, 111, 111, 113, 113, 111, 111, 113, 113, 114, 114, 116, 116, 114, 114, 116, 116, 115, 115, 117, 117, 115, 115, 117, 117, -1, -1, -1, -1, 111, 117};
694 std::array<int, 46>
mCRORCLink = {0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 0, 1, 0, 1, 2, 3, 2, 3, 4, -1, 4, 5, 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, -1, -1, -1, -1, -1, 5, 3};
705 if (absId < 0 || absId >=
mNCells) {
EMCAL geometry definition.
Float_t GetDCALInnerExtandedEta() const
std::tuple< int, int, int > GetModuleIndexesFromCellIndexesInSModule(int supermoduleID, int phiInSupermodule, int etaInSupermodule) const
Transition from cell indexes (iphi, ieta) to module indexes (iphim, ietam, nModule)
Float_t mFrontSteelStrip
13-may-05
static Geometry * GetInstanceFromRunNumber(Int_t runNumber, const std::string_view="", const std::string_view mcname="TGeant3", const std::string_view mctitle="")
Instanciate geometry depending on the run number. Mostly used in analysis and MC anchors.
Float_t mEtaMaxOfTRD1
Max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
Int_t GetSuperModuleNumber(Int_t absId) const
Get cell SM, from absolute ID number.
void 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
std::tuple< int, int, int, int > CalculateCellIndex(Int_t absId) const
Calculate cell SM, module numbers from absolute ID number.
Float_t mIPDistance
Radial Distance of the inner surface of the EMCAL.
Float_t mDCALPhiMin
Minimum angular position of DCAL in Phi (degrees)
Float_t mPassiveScintThick
13-may-05
Float_t mPhiTileSize
Size of phi tile.
int GlobalRow(int cellID) const
Get row number of cell in global numbering scheme.
Float_t GetDCALPhiMax() const
Int_t mNZ
Number of Towers in the Z direction.
Float_t mECScintThick
cm, Thickness of the scintillators
const TGeoHMatrix * GetMatrixForSuperModuleFromGeoManager(Int_t smod) const
Provides shift-rotation matrix for EMCAL from the TGeoManager.
std::tuple< int, int > GetCellPhiEtaIndexInSModule(int supermoduleID, int moduleID, int phiInModule, int etaInModule) const
Get eta-phi indexes of cell in SM.
Float_t GetSampling() const
std::tuple< int, int, int, int > GetCellIndex(Int_t absId) const
Get cell SM, module numbers from absolute ID number.
Float_t GetArm1PhiMin() const
Int_t GetNCellsInSupMod() const
std::tuple< double, double > GetPhiBoundariesOfSM(Int_t nSupMod) const
Int_t mNECLayers
number of scintillator layers
Int_t GetNZ() const
Get the number of modules in supermodule in z- (beam) direction.
std::vector< Double_t > mPhiCentersOfCells
[fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
const TGeoHMatrix * GetMatrixForSuperModule(Int_t smod) const
Provides shift-rotation matrix for EMCAL from externally set matrix or from TGeoManager.
Geometry & operator=(const Geometry &rvalue)
Assignment operator.
Float_t GetDCALInnerEdge() const
static Bool_t IsInitialized()
std::tuple< int, int, int > getOnlineID(int towerID)
Get link ID, row and column from cell ID, have a look here: https://alice.its.cern....
Int_t GetNEta() const
Get the number of modules in supermodule in #eta direction.
Float_t GetLateralSteelStrip() const
void SetSampling(Float_t samp)
Float_t mEtaModuleSize
Eta -> Y.
Double_t GetPhiCenterOfSMSec(Int_t nsupmod) const
Float_t GetPhiModuleSize() const
Float_t GetSuperModulesPar(Int_t ipar) const
std::vector< Double_t > GetCentersOfCellsXDir() const
Bool_t CheckAbsCellId(Int_t absId) const
Check whether a cell number is valid.
Float_t Get2Trd1Dx2() const
const Char_t * GetNameOfEMCALEnvelope() const
Float_t GetFrontSteelStrip() const
Float_t mZLength
Total length in z direction.
Float_t mEnvelop[3]
The GEANT TUB for the detector.
Float_t mDCALInnerEdge
Inner edge for DCAL.
void CreateListOfTrd1Modules()
std::vector< Double_t > GetCentersOfCellsPhiDir() const
Float_t mParSM[3]
SM sizes as in GEANT (TRD1)
Float_t GetShellThickness() const
Int_t mNCellsInModule
Number cell in module.
std::vector< EMCALSMType > mEMCSMSystem
geometry structure
Bool_t IsDCALExtSM(Int_t nSupMod) const
Check if iSupMod is a valid DCal 1/3rd SM.
std::tuple< int, int, int, int > GetCellIndexFromGlobalRowCol(int row, int col) const
Get the cell indices from global position in the EMCAL.
Int_t mIHADR
Options for Geant (MIP business) - will call in AliEMCAL.
Double_t GetPhiCenterOfSM(Int_t nsupmod) const
Int_t GetKey110DEG() const
const TGeoHMatrix * SMODULEMATRIX[EMCAL_MODULES]
Orientations of EMCAL super modules.
std::tuple< int, int > GetModulePhiEtaIndexInSModule(int supermoduleID, int moduleID) const
Get eta-phi indexes of module in SM.
std::tuple< int, int, int > GetPositionInSupermoduleFromGlobalRowCol(int row, int col) const
Get the posision (row, col) of a global row-col position.
Float_t GetArm1EtaMin() const
const TGeoHMatrix * GetMatrixForSuperModuleFromArray(Int_t smod) const
Provides shift-rotation matrix for EMCAL from fkSModuleMatrix[smod].
Float_t GetPhiSuperModule() const
Float_t ZFromEtaR(Float_t r, Float_t eta) const
Float_t mTrd1AlFrontThick
Thickness of the Al front plate.
Float_t mSampling
Sampling factor.
Float_t mDCALPhiMax
Maximum angular position of DCAL in Phi (degrees)
Float_t mTrd1BondPaperThick
Thickness of the Bond Paper sheet.
Int_t GetNCellsInModule() const
Float_t GetPhiGapForSuperModules() const
Float_t GetEMCALPhiMax() const
Int_t mNCells
Number of cells in calo.
Float_t mArm1PhiMin
Minimum angular position of EMCAL in Phi (degrees)
void SetMisalMatrix(const TGeoHMatrix *m, Int_t smod) const
Float_t GetDeltaEta() const
const std::vector< ShishKebabTrd1Module > & GetShishKebabTrd1Modules() const
Int_t mNETAdiv
Number eta division of module.
std::vector< EMCALSMType > GetEMCSystem() const
Float_t mLateralSteelStrip
13-may-05
std::tuple< int, int > GlobalRowColFromIndex(int cellID) const
get (Column,Row) pair of cell in global numbering scheme
Float_t GetDCALPhiMin() const
Int_t GetnSupModInDCAL() const
Float_t mTrd1Angle
angle in x-z plane (in degree)
Float_t mECPbRadThickness
cm, Thickness of the Pb radiators
void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const
Figure out the global coordinates from local coordinates on a supermodule.
std::vector< Double_t > mEtaCentersOfCells
[fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position;
int GetAbsCellId(int supermoduleID, int moduleID, int phiInModule, int etaInModule) const
Get cell absolute ID number from location module (2 times 2 cells) of a super module.
Float_t mArm1PhiMax
Maximum angular position of EMCAL in Phi (degrees)
static Geometry * GetInstance()
Get geometry instance. It should have been set before.
std::array< int, 46 > mCRORCID
std::tuple< double, double > EtaPhiFromIndex(Int_t absId) const
Figure out the eta/phi coordinates of a cell.
Int_t mKey110DEG
For calculation abs cell id; 19-oct-05.
std::vector< Double_t > mPhiCentersOfSMSec
Phi of centers of section where SM lies; size is fNumberOfSuperModules/2.
std::vector< Double_t > mCentersOfCellsEtaDir
Size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
std::string mGeoName
Geometry name string.
Int_t GetNPhiSuperModule() const
int GlobalCol(int cellID) const
Get column number of cell in global numbering scheme.
Float_t mShellThickness
Total thickness in (x,y) direction.
EMCALSMType GetSMType(Int_t nSupMod) const
std::vector< Double_t > mCentersOfCellsPhiDir
Size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
std::vector< Double_t > GetPhiCentersOfCells() const
Float_t GetSteelFrontThickness() const
Int_t mNPHIdiv
Number phi division of module.
Int_t mnSupModInDCAL
For calculation abs cell id; 06-nov-12.
Float_t mEtaTileSize
Size of eta tile.
std::tuple< int, int > getLinkAssignment(int ddlID) const
Temporary link assignment (till final link assignment is known -.
Float_t GetDeltaPhi() const
Float_t GetLongModuleSize() const
std::array< int, 46 > mCRORCLink
Float_t GetPhiTileSize() const
int SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi) const
Given a global eta/phi point check if it belongs to a supermodule covered region.
void DefineEMC(std::string_view mcname, std::string_view mctitle)
Init function of previous class EMCGeometry.
Bool_t IsDCALSM(Int_t nSupMod) const
Check if iSupMod is a valid DCal standard SM.
void Init()
initializes the parameters of EMCAL
Bool_t Impact(const TParticle *particle) const
Check if particle falls in the EMCal/DCal geometry.
std::vector< ShishKebabTrd1Module > mShishKebabTrd1Modules
List of modules.
Float_t GetZLength() const
Bool_t IsInEMCAL(const math_utils::Point3D< double > &pnt) const
Checks whether point is inside the EMCal volume.
Float_t AngleFromEta(Float_t eta) const
math_utils::Point3D< double > RelPosCellInSModule(Int_t absId, Double_t distEf) const
Look to see what the relative position inside a given cell is for a recpoint.
const std::string & GetName() const
Float_t mEMCALPhiMax
Maximum angular position of EMCAL in Phi (degrees)
Bool_t IsInDCAL(const math_utils::Point3D< double > &pnt) const
Checks whether point is inside the DCal volume.
static const std::string & GetDefaultGeometryName()
Int_t GetNECLayers() const
Float_t GetIPDistance() const
Int_t mNPhiSuperModule
9 - number supermodule in phi direction
Float_t mPhiModuleSize
Phi -> X.
Float_t mPhiGapForSM
Gap betweeen supermodules in phi direction.
Geometry()=default
Default constructor. It must be kept public for root persistency purposes, but should never be called...
Float_t m2Trd1Dx2
2*dx2 for TRD1
Float_t GetDCALStandardPhiMax() const
AcceptanceType_t IsInEMCALOrDCAL(const math_utils::Point3D< double > &pnt) const
Checks whether point is inside the EMCal volume (included DCal)
Float_t GetTrd1Angle() const
std::vector< Double_t > GetEtaCentersOfCells() const
Int_t mILOSS
Options for Geant (MIP business) - will call in AliEMCAL.
Int_t GetNumberOfSuperModules() const
Float_t GetECScintThick() const
Int_t GetNumberOfModuleInPhiDirection(Int_t nSupMod) const
std::tuple< int, int > ShiftOnlineToOfflineCellIndexes(Int_t supermoduleID, Int_t iphi, Int_t ieta) const
Adapt cell indices in supermodule to online indexing.
Float_t mPhiSuperModule
Phi of normal supermodule (20, in degree)
Float_t GetTrd1BondPaperThick() const
Float_t mArm1EtaMin
Minimum pseudorapidity position of EMCAL in Eta.
void ImpactOnEmcal(const math_utils::Point3D< double > &vtx, Double_t theta, Double_t phi, Int_t &absId, math_utils::Point3D< double > &vimpact) const
Get the impact coordinates on EMCAL.
Float_t GetArm1EtaMax() const
std::vector< Double_t > GetCentersOfCellsEtaDir() const
Int_t GetNPhi() const
Get the number of modules in supermodule in #phi direction.
Float_t mArm1EtaMax
Maximum pseudorapidity position of EMCAL in Eta.
Int_t GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const
Transition from super module number (nSupMod) and cell indexes (ieta,iphi) to cell absolute ID number...
std::vector< Double_t > mCentersOfCellsXDir
Size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm)
Float_t GetEtaModuleSize() const
Float_t GetTrd1AlFrontThick() const
Int_t mNPhi
Number of Towers in the PHI direction.
const ShishKebabTrd1Module & GetShishKebabModule(Int_t neta) const
Get the Module parameters for a eta.
Int_t mNumberOfSuperModules
default is 12 = 6 * 2
std::tuple< double, double > GetPhiBoundariesOfSMGap(Int_t nPhiSec) const
std::vector< Double_t > mPhiBoundariesOfSM
Phi boundaries of SM in rad; size is fNumberOfSuperModules;.
std::vector< std::tuple< int, int, int, int > > mCellIndexLookup
Lookup table for cell indices.
void DefineSamplingFraction(const std::string_view mcname="", const std::string_view mctitle="")
Set the value of the Sampling used to calibrate the MC hits energy (check)
Float_t mDCALStandardPhiMax
Special edge for the case that DCAL contian extension.
Float_t mLongModuleSize
Size of long module.
Float_t GetEnvelop(Int_t index) const
Float_t mSteelFrontThick
Thickness of the front stell face of the support box - 9-sep-04; obsolete?
Float_t GetECPbRadThick() const
Float_t GetArm1PhiMax() const
int GetAbsCellIdFromEtaPhi(Double_t eta, Double_t phi) const
Get cell absolute ID number from eta and phi location.
Int_t mNCellsInSupMod
Number cell in super module.
int GetCellAbsIDFromGlobalRowCol(int row, int col) const
Get the absolute cell ID from global position in the EMCAL.
std::tuple< int, int > ShiftOfflineToOnlineCellIndexes(Int_t supermoduleID, Int_t iphi, Int_t ieta) const
Adapt cell indices in supermodule to offline indexing.
std::vector< Double_t > mPhiCentersOfSM
Phi of centers of SM; size is fNumberOfSuperModules/2.
Float_t GetPassiveScintThick() const
Float_t mDCALInnerExtandedEta
DCAL inner edge in Eta (with some extension)
Float_t GetEtaTileSize() const
Main class for TRD1 geometry of Shish-Kebab case.
Handling error due to invalid supermodule.
GLuint const GLchar * name
GLint GLint GLsizei GLsizei GLsizei depth
const std::string DEFAULT_GEOMETRY
@ EMCAL_MODULES
Number of modules, 12 for EMCal + 8 for DCAL.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...