15#ifndef ALICEO2_BASE_GEOMETRYMANAGER_H_
16#define ALICEO2_BASE_GEOMETRYMANAGER_H_
18#include <TGeoManager.h>
19#include <TGeoMaterial.h>
20#include <TGeoPhysicalNode.h>
62 static void loadGeometry(std::string_view geomFilePath =
"",
bool applyMisalignment =
false,
bool preferAlignedFile =
true);
72 static TGeoHMatrix*
getMatrix(
const char* symname);
80 return detid <= o2::detectors::DetID::FOC ? ((detid << sDetOffset) | (sensid & sSensorMask)) : ((detid << sDetOffsetLarge) | (sensid & sSensorMaskLarge));
87 static bool applyAlignment(
const std::vector<o2::detectors::AlignParam>& algPars);
88 static bool applyAlignment(
const std::vector<
const std::vector<o2::detectors::AlignParam>*> algPars);
111 TGeoNavigator* nav =
nullptr);
133#ifdef O2_WITH_VECGEOM
157 static TGeoHMatrix*
getMatrix(TGeoPNEntry* pne);
158 static void accountMaterial(
const TGeoMaterial* material, MatBudgetExt& bd);
161 bd.
meanRho = material->GetDensity();
162 bd.
meanX2X0 = material->GetRadLen();
168 static Bool_t getOriginalMatrixFromPath(
const char*
path, TGeoHMatrix&
m);
172 static constexpr UInt_t sDetOffset = 15;
173 static constexpr UInt_t sSensorMask = (0x1 << sDetOffset) - 1;
174 static constexpr UInt_t sDetOffsetLarge = 17;
175 static constexpr UInt_t sSensorMaskLarge = (0x1 << sDetOffsetLarge) - 1;
176 static std::mutex sTGMutex;
178 ClassDefOverride(GeometryManager, 0);
Declarations for material properties of the cell (voxel)
static bool isGeometryLoaded()
~GeometryManager() override=default
Default destructor.
static constexpr bool isVecGeomAvailable()
static const char * getSymbolicName(o2::detectors::DetID detid, int sensid)
static TGeoHMatrix * getMatrix(o2::detectors::DetID detid, Int_t sensid)
static bool ensureVecGeomWorld()
static Bool_t getOriginalMatrix(o2::detectors::DetID detid, int sensid, TGeoHMatrix &m)
static void loadGeometry(std::string_view geomFilePath="", bool applyMisalignment=false, bool preferAlignedFile=true)
static MatBudgetExt meanMaterialBudgetExt(const math_utils::Point3D< float > &start, const math_utils::Point3D< float > &end)
static o2::base::MatBudget meanMaterialBudget(const math_utils::Point3D< double > &start, const math_utils::Point3D< double > &end, TGeoNavigator *nav=nullptr)
static bool applyAlignment(const std::vector< o2::detectors::AlignParam > &algPars)
misalign geometry with alignment objects from the array, optionaly check overlaps
static o2::base::MatBudget meanMaterialBudget(float x0, float y0, float z0, float x1, float y1, float z1, TGeoNavigator *nav=nullptr)
static MatBudgetExt meanMaterialBudgetExt(float x0, float y0, float z0, float x1, float y1, float z1)
static int getSensID(o2::detectors::DetID detid, int sensid)
static bool vecGeomLocate(double x, double y, double z, std::vector< TGeoNode * > &chain)
static TGeoHMatrix * getMatrix(const char *symname)
static MatBudgetExt meanMaterialBudgetExt(const math_utils::Point3D< double > &start, const math_utils::Point3D< double > &end)
static TGeoPNEntry * getPNEntry(o2::detectors::DetID detid, Int_t sensid)
static void applyMisalignent(bool applyMisalignment=true)
static o2::base::MatBudget meanMaterialBudget(const math_utils::Point3D< float > &start, const math_utils::Point3D< float > &end, TGeoNavigator *nav=nullptr)
Static class with identifiers, bitmasks and names for ALICE detectors.
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLuint GLsizei GLsizei * length
GLsizei const GLchar *const * path
GLuint GLfloat GLfloat y0
GLdouble GLdouble GLdouble z
std::string detectors(const std::vector< std::string > &det, unsigned mask)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
MatBudgetExt(const MatBudgetExt &src)=default
MatBudgetExt & operator=(const MatBudgetExt &src)=default
void normalize(double nrm)
ClassDefNV(MatBudgetExt, 1)
float meanRho
mean density, g/cm^3
float meanX2X0
fraction of radiaton lenght