Project
Loading...
Searching...
No Matches
o2::mch::geo Namespace Reference

get the local-to-global transformation for a given detection element More...

Classes

class  MisAligner
 

Typedefs

using TransformationCreator = std::function< o2::math_utils::Transform3D(int detElemId)>
 

Functions

void createGeometry (TGeoManager &geom, TGeoVolume &topVolume)
 
std::vector< TGeoVolume * > getSensitiveVolumes ()
 
void addAlignableVolumes (TGeoManager &geom)
 
TransformationCreator transformationFromTGeoManager (const TGeoManager &geo)
 
TransformationCreator transformationFromJSON (std::istream &in)
 
std::array< double, 9 > angles2matrix (double yaw, double pitch, double roll)
 
std::tuple< double, double, double > matrix2angles (gsl::span< double > rot)
 
std::string volumePathName (int deId)
 

Variables

std::array< int, 156 > allDeIds = o2::mch::constants::deIdsForAllMCH
 

Detailed Description

get the local-to-global transformation for a given detection element

Typedef Documentation

◆ TransformationCreator

using o2::mch::geo::TransformationCreator = typedef std::function<o2::math_utils::Transform3D(int detElemId)>

A geometry transformation creator must be able to create a transformation for any valid MCH detection element id.

That transformation is used to convert coordinates from local (x,y in detection element plane) to global (x,y,z in Alice Coordinate System) and vice-versa

Parameters
detElemIdmust be a valid detection element
geoa reference to a GeoManager that must contain MCH volumes
Exceptions
ifdetElemId is not valid

Definition at line 39 of file Transformations.h.

Function Documentation

◆ addAlignableVolumes()

void o2::mch::geo::addAlignableVolumes ( TGeoManager &  geom)

Add alignable MCH volumes to the global geometry.

Creates entries for alignable volumes associating symbolic volume names with corresponding volume paths.

Warning
It also closes the geometry if it is not yet closed.
Parameters
geoManagerthe (global) TGeoManager instance, which thus must exist before calling this function.

Definition at line 99 of file Geometry.cxx.

◆ angles2matrix()

std::array< double, 9 > o2::mch::geo::angles2matrix ( double  yaw,
double  pitch,
double  roll 
)

Convert the 3 Tait–Bryan angles (yaw,pitch,roll) into the 9 matrix elements of a rotation matrix.

Parameters
yawrotation around z-axis, in radian
pitchrotation around y'-axis (new y-axis resulting from yaw rotation), in radian
rollrotation around x''-axis (new x-axis resulting from yaw and pitch rotations), in radian

Definition at line 114 of file Transformations.cxx.

◆ createGeometry()

void o2::mch::geo::createGeometry ( TGeoManager &  geom,
TGeoVolume &  topVolume 
)

createGeometry creates MCH geometry.

Geometry comprises volumes, materials and alignable volumes.

Note that the geometry of stations 1 and 2 is attached to volume YOUT1 if it exist, or to topVolume otherwise.

Geometry for stations 3, 4 and 5 are always attached to topVolume.

Parameters
topVolumethe volume the MCH geometry is attached topVolume

Definition at line 74 of file Geometry.cxx.

◆ getSensitiveVolumes()

std::vector< TGeoVolume * > o2::mch::geo::getSensitiveVolumes ( )

get a list of MCH sensitive volumes.

Returns
a vector of all the MCH volumes that participate in the particle tracking (in the transport sense).

Definition at line 86 of file Geometry.cxx.

◆ matrix2angles()

std::tuple< double, double, double > o2::mch::geo::matrix2angles ( gsl::span< double >  rot)

Convert the 9 matrix elements of a rotation matrix into 3 Tait-Bryan angles (yaw,pitch,roll).

Parameters
rota 9-elements vector
Returns
a tuple of the 3 angles <yaw,pitch,roll>. The angles are expressed in radian

Definition at line 136 of file Transformations.cxx.

◆ transformationFromJSON()

TransformationCreator o2::mch::geo::transformationFromJSON ( std::istream &  in)

Definition at line 62 of file Transformations.cxx.

◆ transformationFromTGeoManager()

TransformationCreator o2::mch::geo::transformationFromTGeoManager ( const TGeoManager &  geo)

Tranformation creator using TGeoManager.

Parameters
geoa reference to a GeoManager that must contain MCH volumes

Definition at line 29 of file Transformations.cxx.

◆ volumePathName()

std::string o2::mch::geo::volumePathName ( int  deId)

Definition at line 18 of file VolumePaths.cxx.

Variable Documentation

◆ allDeIds

std::array< int, 156 > o2::mch::geo::allDeIds = o2::mch::constants::deIdsForAllMCH

The list of detection element identifiers for MCH

Definition at line 27 of file Transformations.cxx.