Project
Loading...
Searching...
No Matches
o2::detectors::AlignParam Class Reference

#include <AlignParam.h>

Public Member Functions

 AlignParam ()=default
 
 ~AlignParam ()=default
 
 AlignParam (const char *symname, int algID, double x, double y, double z, double psi, double theta, double phi, bool global=true)
 
 AlignParam (const char *symname, int algID, TGeoMatrix &m, bool global=true)
 
const std::string & getSymName () const
 return symbolic name of the volume
 
double getPhi () const
 iparamater's getters
 
double getPsi () const
 
double getTheta () const
 
double getX () const
 
double getY () const
 
double getZ () const
 
bool applyToGeometry () const
 apply object to geoemetry
 
TGeoHMatrix createMatrix () const
 extract global delta matrix
 
bool createLocalMatrix (TGeoHMatrix &m) const
 extract local delta matrix
 
void setSymName (const char *m)
 set symbolic name of the volume
 
int getAlignableID () const
 return alignable entry ID
 
void setAlignableID (int id)
 set alignable entry ID
 
void setGlobalParams (double x, double y, double z, double psi, double theta, double phi)
 ================ methods for direct setting of delta params
 
void setRotation (double psi, double theta, double phi)
 set global delta rotations angles in radian
 
void setTranslation (double x, double y, double z)
 set global delta displacements in cm
 
void setGlobalParams (const TGeoMatrix &m)
 set params from the matrix of global delta
 
void setTranslation (const TGeoMatrix &m)
 set translation from the matrix of global delta
 
bool setRotation (const TGeoMatrix &m)
 
bool setLocalParams (double x, double y, double z, double psi, double theta, double phi)
 ================ methods for setting global delta params from local delta
 
bool setLocalTranslation (double x, double y, double z)
 set global delta translation from the local delta translation
 
bool setLocalRotation (double psi, double theta, double phi)
 set global delta rotation from the local delta rotation
 
bool setLocalParams (const TGeoMatrix &m)
 set global delta params from the local delta matrix
 
bool setLocalTranslation (const TGeoMatrix &m)
 set the global delta transformation from translation part of local delta matrix
 
bool setLocalRotation (const TGeoMatrix &m)
 set the global delta rotation from rotation part of local delta matrix
 
int getLevel () const
 
void print () const
 
int rectify (double zero=1e-13)
 

Protected Member Functions

bool matrixToAngles (const double *rot, double &psi, double &theta, double &phi) const
 
void anglesToMatrix (double psi, double theta, double phi, double *rot) const
 
void setMatrixRotation (double psi, double theta, double phi, TGeoHMatrix &dest) const
 
void setMatrixTranslation (double x, double y, double z, TGeoHMatrix &dest) const
 

Detailed Description

Base class for alignment parameters, containing global delta of rotation and translation For the detail of alignment framework check http://alice-offline.web.cern.ch/Activities/Alignment

Definition at line 32 of file AlignParam.h.

Constructor & Destructor Documentation

◆ AlignParam() [1/3]

o2::detectors::AlignParam::AlignParam ( )
default

◆ ~AlignParam()

o2::detectors::AlignParam::~AlignParam ( )
default

◆ AlignParam() [2/3]

AlignParam::AlignParam ( const char symname,
int  algID,
double  x,
double  y,
double  z,
double  psi,
double  theta,
double  phi,
bool  global = true 
)

standard constructor with 3 translation + 3 rotation parameters If the user explicitly sets the global variable to false then the parameters are interpreted as giving the local transformation. This requires to have a gGeoMenager active instance, otherwise the constructor will fail (no object created)

Definition at line 26 of file AlignParam.cxx.

◆ AlignParam() [3/3]

AlignParam::AlignParam ( const char symname,
int  algID,
TGeoMatrix &  m,
bool  global = true 
)

Definition at line 46 of file AlignParam.cxx.

Member Function Documentation

◆ anglesToMatrix()

void AlignParam::anglesToMatrix ( double  psi,
double  theta,
double  phi,
double *  rot 
) const
protected

Definition at line 132 of file AlignParam.cxx.

◆ applyToGeometry()

bool AlignParam::applyToGeometry ( ) const

apply object to geoemetry

Apply the current alignment object to the TGeo geometry This method returns FALSE if the symname of the object was not valid neither to get a TGeoPEntry nor as a volume path

Definition at line 261 of file AlignParam.cxx.

◆ createLocalMatrix()

bool AlignParam::createLocalMatrix ( TGeoHMatrix &  m) const

extract local delta matrix

Definition at line 220 of file AlignParam.cxx.

◆ createMatrix()

TGeoHMatrix AlignParam::createMatrix ( ) const

extract global delta matrix

create a copy of alignment global delta matrix

Definition at line 60 of file AlignParam.cxx.

◆ getAlignableID()

int o2::detectors::AlignParam::getAlignableID ( ) const
inline

return alignable entry ID

Definition at line 67 of file AlignParam.h.

◆ getLevel()

int AlignParam::getLevel ( ) const

Return the geometry level of the alignable volume to which the alignment object is associated; this is the number of slashes in the corresponding volume path

Definition at line 322 of file AlignParam.cxx.

◆ getPhi()

double o2::detectors::AlignParam::getPhi ( ) const
inline

iparamater's getters

Definition at line 47 of file AlignParam.h.

◆ getPsi()

double o2::detectors::AlignParam::getPsi ( ) const
inline

Definition at line 48 of file AlignParam.h.

◆ getSymName()

const std::string & o2::detectors::AlignParam::getSymName ( ) const
inline

return symbolic name of the volume

Definition at line 45 of file AlignParam.h.

◆ getTheta()

double o2::detectors::AlignParam::getTheta ( ) const
inline

Definition at line 49 of file AlignParam.h.

◆ getX()

double o2::detectors::AlignParam::getX ( ) const
inline

Definition at line 50 of file AlignParam.h.

◆ getY()

double o2::detectors::AlignParam::getY ( ) const
inline

Definition at line 51 of file AlignParam.h.

◆ getZ()

double o2::detectors::AlignParam::getZ ( ) const
inline

Definition at line 52 of file AlignParam.h.

◆ matrixToAngles()

bool AlignParam::matrixToAngles ( const double *  rot,
double &  psi,
double &  theta,
double &  phi 
) const
protected

Calculates the Euler angles in "x y z" notation using the rotation matrix Returns false in case the rotation angles can not be extracted from the matrix

Definition at line 114 of file AlignParam.cxx.

◆ print()

void AlignParam::print ( ) const

Definition at line 347 of file AlignParam.cxx.

◆ rectify()

int AlignParam::rectify ( double  zero = 1e-13)

Definition at line 453 of file AlignParam.cxx.

◆ setAlignableID()

void o2::detectors::AlignParam::setAlignableID ( int  id)
inline

set alignable entry ID

Definition at line 70 of file AlignParam.h.

◆ setGlobalParams() [1/2]

void AlignParam::setGlobalParams ( const TGeoMatrix &  m)

set params from the matrix of global delta

set params from the matrix of global delta

Definition at line 381 of file AlignParam.cxx.

◆ setGlobalParams() [2/2]

void AlignParam::setGlobalParams ( double  x,
double  y,
double  z,
double  psi,
double  theta,
double  phi 
)

================ methods for direct setting of delta params

set parameters of global delta

set parameters of global delta

Definition at line 355 of file AlignParam.cxx.

◆ setLocalParams() [1/2]

bool AlignParam::setLocalParams ( const TGeoMatrix &  m)

set global delta params from the local delta matrix

Definition at line 171 of file AlignParam.cxx.

◆ setLocalParams() [2/2]

bool AlignParam::setLocalParams ( double  x,
double  y,
double  z,
double  psi,
double  theta,
double  phi 
)

================ methods for setting global delta params from local delta

set global delta params from the local delta params

Set the global delta transformation by passing the parameters for the local delta transformation (3 shifts and 3 angles). In case that the TGeo was not initialized or not closed, returns false and the object parameters are not set.

Definition at line 156 of file AlignParam.cxx.

◆ setLocalRotation() [1/2]

bool AlignParam::setLocalRotation ( const TGeoMatrix &  m)

set the global delta rotation from rotation part of local delta matrix

Set the global delta transformation by passing the matrix of the local delta transformation and taking its rotational part In case that the TGeo was not initialized or not closed, returns false and the object parameters are not set.

Definition at line 440 of file AlignParam.cxx.

◆ setLocalRotation() [2/2]

bool AlignParam::setLocalRotation ( double  psi,
double  theta,
double  phi 
)

set global delta rotation from the local delta rotation

Set the global delta transformation by passing the three angles giving the rotation in the local reference system of the alignable volume (known by TGeo geometry). In case that the TGeo was not initialized or not closed, returns false and the object parameters are not set.

Definition at line 426 of file AlignParam.cxx.

◆ setLocalTranslation() [1/2]

bool AlignParam::setLocalTranslation ( const TGeoMatrix &  m)

set the global delta transformation from translation part of local delta matrix

Set the global delta transformation by passing the matrix of the local delta transformation and taking its translational part In case that the TGeo was not initialized or not closed, returns false and the object parameters are not set.

Definition at line 413 of file AlignParam.cxx.

◆ setLocalTranslation() [2/2]

bool AlignParam::setLocalTranslation ( double  x,
double  y,
double  z 
)

set global delta translation from the local delta translation

Set the global delta transformation by passing the three shifts giving the translation in the local reference system of the alignable volume (known by TGeo geometry). In case that the TGeo was not initialized or not closed, returns false and the object parameters are not set.

Definition at line 397 of file AlignParam.cxx.

◆ setMatrixRotation()

void AlignParam::setMatrixRotation ( double  psi,
double  theta,
double  phi,
TGeoHMatrix &  dest 
) const
protected

apply rotation to matrix

Definition at line 70 of file AlignParam.cxx.

◆ setMatrixTranslation()

void AlignParam::setMatrixTranslation ( double  x,
double  y,
double  z,
TGeoHMatrix &  dest 
) const
protected

apply translation to matrix

Definition at line 389 of file AlignParam.cxx.

◆ setRotation() [1/2]

bool AlignParam::setRotation ( const TGeoMatrix &  m)

set the rotation parameters extracting them from the matrix passed as argument

Definition at line 95 of file AlignParam.cxx.

◆ setRotation() [2/2]

void AlignParam::setRotation ( double  psi,
double  theta,
double  phi 
)

set global delta rotations angles in radian

set global delta rotations angles in radian

Definition at line 363 of file AlignParam.cxx.

◆ setSymName()

void o2::detectors::AlignParam::setSymName ( const char m)
inline

set symbolic name of the volume

Definition at line 64 of file AlignParam.h.

◆ setTranslation() [1/2]

void AlignParam::setTranslation ( const TGeoMatrix &  m)

set translation from the matrix of global delta

set the translation parameters extracting them from the matrix passed as argument

Definition at line 79 of file AlignParam.cxx.

◆ setTranslation() [2/2]

void AlignParam::setTranslation ( double  x,
double  y,
double  z 
)

set global delta displacements in cm

set global delta displacements in cm

Definition at line 372 of file AlignParam.cxx.


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