Project
Loading...
Searching...
No Matches
o2::base::GeometryManager Class Reference

#include <GeometryManager.h>

Inherits TObject.

Classes

struct  MatBudgetExt
 

Public Member Functions

 ~GeometryManager () override=default
 Default destructor.
 

Static Public Member Functions

static void loadGeometry (std::string_view geomFilePath="", bool applyMisalignment=false, bool preferAlignedFile=true)
 
static bool isGeometryLoaded ()
 
static void applyMisalignent (bool applyMisalignment=true)
 
static Bool_t getOriginalMatrix (o2::detectors::DetID detid, int sensid, TGeoHMatrix &m)
 
static Bool_t getOriginalMatrix (const char *symname, TGeoHMatrix &m)
 
static TGeoHMatrix * getMatrix (const char *symname)
 
static const chargetSymbolicName (o2::detectors::DetID detid, int sensid)
 
static TGeoPNEntry * getPNEntry (o2::detectors::DetID detid, Int_t sensid)
 
static TGeoHMatrix * getMatrix (o2::detectors::DetID detid, Int_t sensid)
 
static int getSensID (o2::detectors::DetID detid, int sensid)
 
static bool applyAlignment (const std::vector< o2::detectors::AlignParam > &algPars)
 misalign geometry with alignment objects from the array, optionaly check overlaps
 
static bool applyAlignment (const std::vector< const std::vector< o2::detectors::AlignParam > * > algPars)
 
static o2::base::MatBudget meanMaterialBudget (float x0, float y0, float z0, float x1, float y1, float z1, TGeoNavigator *nav=nullptr)
 
static o2::base::MatBudget meanMaterialBudget (const math_utils::Point3D< float > &start, const math_utils::Point3D< float > &end, TGeoNavigator *nav=nullptr)
 
static o2::base::MatBudget meanMaterialBudget (const math_utils::Point3D< double > &start, const math_utils::Point3D< double > &end, TGeoNavigator *nav=nullptr)
 
static MatBudgetExt meanMaterialBudgetExt (float x0, float y0, float z0, float x1, float y1, float z1)
 
static MatBudgetExt meanMaterialBudgetExt (const math_utils::Point3D< float > &start, const math_utils::Point3D< float > &end)
 
static MatBudgetExt meanMaterialBudgetExt (const math_utils::Point3D< double > &start, const math_utils::Point3D< double > &end)
 
static constexpr bool isVecGeomAvailable ()
 
static bool ensureVecGeomWorld ()
 
static bool vecGeomLocate (double x, double y, double z, std::vector< TGeoNode * > &chain)
 

Detailed Description

Class for interfacing to the geometry; it also builds and manages the look-up tables for fast access to geometry and alignment information for sensitive alignable volumes: 1) the look-up table mapping unique volume ids to TGeoPNEntries. This allows to access directly by means of the unique index the associated symbolic name and original global matrix in addition to the functionality of the physical node associated to a given alignable volume 2) the look-up table of the alignment objects associated to the indexed alignable volumes

Definition at line 56 of file GeometryManager.h.

Constructor & Destructor Documentation

◆ ~GeometryManager()

o2::base::GeometryManager::~GeometryManager ( )
overridedefault

Default destructor.

Member Function Documentation

◆ applyAlignment() [1/2]

bool GeometryManager::applyAlignment ( const std::vector< const std::vector< o2::detectors::AlignParam > * >  algPars)
static

misalign geometry with alignment objects from the array, optionaly check overlaps

Definition at line 260 of file GeometryManager.cxx.

◆ applyAlignment() [2/2]

bool GeometryManager::applyAlignment ( const std::vector< o2::detectors::AlignParam > &  algPars)
static

misalign geometry with alignment objects from the array, optionaly check overlaps

misalign geometry with alignment objects from the array, optionaly check overlaps

Definition at line 272 of file GeometryManager.cxx.

◆ applyMisalignent()

void GeometryManager::applyMisalignent ( bool  applyMisalignment = true)
static

Get the global transformation matrix (ideal geometry) for a given alignable volume The alignable volume is identified by 'symname' which has to be either a valid symbolic name, the query being performed after alignment, or a valid volume path if the query is performed before alignment.

< load geometry from file

Definition at line 523 of file GeometryManager.cxx.

◆ ensureVecGeomWorld()

bool GeometryManager::ensureVecGeomWorld ( )
static

Builds the VecGeom world from the currently loaded TGeo geometry, once per process, and reports whether a VecGeom navigator is available at all. Unlike isVecGeomAvailable() this is a runtime answer, so a caller outside this library – which does not see the private O2_WITH_VECGEOM define – can still ask.

Definition at line 739 of file GeometryManager.cxx.

◆ getMatrix() [1/2]

TGeoHMatrix * GeometryManager::getMatrix ( const char symname)
static

Definition at line 168 of file GeometryManager.cxx.

◆ getMatrix() [2/2]

static TGeoHMatrix * o2::base::GeometryManager::getMatrix ( o2::detectors::DetID  detid,
Int_t  sensid 
)
static

◆ getOriginalMatrix() [1/2]

Bool_t GeometryManager::getOriginalMatrix ( const char symname,
TGeoHMatrix &  m 
)
static

Definition at line 63 of file GeometryManager.cxx.

◆ getOriginalMatrix() [2/2]

static Bool_t o2::base::GeometryManager::getOriginalMatrix ( o2::detectors::DetID  detid,
int  sensid,
TGeoHMatrix &  m 
)
static

◆ getPNEntry()

TGeoPNEntry * GeometryManager::getPNEntry ( o2::detectors::DetID  detid,
Int_t  sensid 
)
static

Get PN Entry of sensitive volume sensid of detector detid

Definition at line 201 of file GeometryManager.cxx.

◆ getSensID()

static int o2::base::GeometryManager::getSensID ( o2::detectors::DetID  detid,
int  sensid 
)
inlinestatic

compose combined detector+sensor ID for sensitive volumes

Definition at line 77 of file GeometryManager.h.

◆ getSymbolicName()

const char * GeometryManager::getSymbolicName ( o2::detectors::DetID  detid,
int  sensid 
)
static

Get symoblic name of sensitive volume sensid of detector detid

Definition at line 187 of file GeometryManager.cxx.

◆ isGeometryLoaded()

static bool o2::base::GeometryManager::isGeometryLoaded ( )
inlinestatic

Definition at line 63 of file GeometryManager.h.

◆ isVecGeomAvailable()

static constexpr bool o2::base::GeometryManager::isVecGeomAvailable ( )
inlinestaticconstexpr

Whether this build of O2 was configured with the optional VecGeom material-budget backend (i.e. TGeo2VecGeom was found at CMake configure time).

Definition at line 139 of file GeometryManager.h.

◆ loadGeometry()

void GeometryManager::loadGeometry ( std::string_view  geomFilePath = "",
bool  applyMisalignment = false,
bool  preferAlignedFile = true 
)
static

< load geometry from file When applyMisalignedment == false --> read from unaligned file When preferAlignedFile == true and applyMisalignment == true : Prefer reading from existing aligned file

< load directly from aligned file and apply alignment on top

< load geometry from unaligned file and apply alignment on top

Definition at line 536 of file GeometryManager.cxx.

◆ meanMaterialBudget() [1/3]

static o2::base::MatBudget o2::base::GeometryManager::meanMaterialBudget ( const math_utils::Point3D< double > &  start,
const math_utils::Point3D< double > &  end,
TGeoNavigator *  nav = nullptr 
)
inlinestatic

Definition at line 116 of file GeometryManager.h.

◆ meanMaterialBudget() [2/3]

static o2::base::MatBudget o2::base::GeometryManager::meanMaterialBudget ( const math_utils::Point3D< float > &  start,
const math_utils::Point3D< float > &  end,
TGeoNavigator *  nav = nullptr 
)
inlinestatic

Definition at line 112 of file GeometryManager.h.

◆ meanMaterialBudget() [3/3]

o2::base::MatBudget GeometryManager::meanMaterialBudget ( float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1,
TGeoNavigator *  nav = nullptr 
)
static

Mean material budget between two points. Pass a navigator owned by the calling thread to run lock-free from several threads; with nav = nullptr the shared navigator is used under a mutex, as before.

Definition at line 423 of file GeometryManager.cxx.

◆ meanMaterialBudgetExt() [1/3]

static MatBudgetExt o2::base::GeometryManager::meanMaterialBudgetExt ( const math_utils::Point3D< double > &  start,
const math_utils::Point3D< double > &  end 
)
inlinestatic

Definition at line 126 of file GeometryManager.h.

◆ meanMaterialBudgetExt() [2/3]

static MatBudgetExt o2::base::GeometryManager::meanMaterialBudgetExt ( const math_utils::Point3D< float > &  start,
const math_utils::Point3D< float > &  end 
)
inlinestatic

Definition at line 122 of file GeometryManager.h.

◆ meanMaterialBudgetExt() [3/3]

GeometryManager::MatBudgetExt GeometryManager::meanMaterialBudgetExt ( float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1 
)
static

Definition at line 327 of file GeometryManager.cxx.

◆ vecGeomLocate()

bool GeometryManager::vecGeomLocate ( double  x,
double  y,
double  z,
std::vector< TGeoNode * > &  chain 
)
static

The VecGeom navigator's answer for a point: fills chain with the TGeo nodes of the located path, top node first. False when this build has no VecGeom backend or the point lies outside the world. Assemblies are flattened in the VecGeom geometry, so the chain is shorter than the TGeo path through the same point.

Definition at line 750 of file GeometryManager.cxx.


The documentation for this class was generated from the following files: