CbmRoot
Loading...
Searching...
No Matches
cbm::bba::AlignmentBody Class Reference

alignment body accessor and property handler More...

#include <CbmBbaAlignmentBody.h>

Public Member Functions

 AlignmentBody ()=default
 Default constructor.
 
 AlignmentBody (double shiftX, double shiftY, double shiftZ, double rotX, double rotY, double rotZ)
 Constructor with individual parameters for alignment bodies not associated with a geo node (no pre-existing alignment possible)
 
 AlignmentBody (const std::string nodePath)
 Constructor.
 
 ~AlignmentBody ()=default
 Destructor.
 
bool IsValid () const
 
bool CreateFromGeoNode (const std::string nodePath)
 
void ActivateParameters (const std::array< bool, NofParameters > &isParActive)
 
bool IsParameterActive (int i) const
 
void SetParameters (double shiftX=0., double shiftY=0., double shiftZ=0., double rotX=0., double rotY=0., double rotZ=0.)
 
const std::string & GetNodePath () const
 Get the full path to the node in the ROOT geometry.
 
const TGeoHMatrix & GetGlobalTransform () const
 Get the transformation of the aligment body to the glaobal coordinates.
 
std::array< double, 3 > ApplyAlignmentToHit (const std::array< double, 3 > hit) const
 Apply the alignment to hit: return = fHitTransform * hit.
 
std::array< double, 3 > ApplyInverseAlignmentToHit (const std::array< double, 3 > hit) const
 Apply the inverse alignment to hit: return = fHitTransform^{-1} * hit.
 
const std::array< double, NofParameters > & GetParameters () const
 Get the alignment parameters.
 
void GetParameters (double *par) const
 
const std::array< double, NofParameters > & GetInitialParameters () const
 Get the initial alignment parameters.
 
const TGeoHMatrix & GetAlignmentMatrix () const
 Get the transformation matrix of the alignment body.
 
const TGeoHMatrix & GetHitTransform () const
 Get the transformation of the initially aligned {x,y,z} to the newly aligned {x,y,z} in the global coordinates.
 
void SetStatistics (long statistics)
 Set the statistics for the alignment body.
 
void IncrementStatistics (int increment)
 Increment the statistics for the alignment body.
 
long GetStatistics () const
 Get the statistics for the alignment body.
 
int GetTrackingStation () const
 Get the Tracking Station index.
 
void SetTrackingStation (int station)
 Set the Tracking Station index.
 

Static Public Attributes

static constexpr int NofParameters = 6
 number of alignment parameters
 

Private Member Functions

 ClassDefNV (AlignmentBody, 0)
 

Private Attributes

int fTrackingStation {-1}
 
bool fIsValid {false}
 flag indicating if the alignment body is valid
 
std::string fNodePath {}
 full path to the node in the root geometry
 
std::array< double, NofParametersfPar {0.}
 alignment parameters: shiftX, shiftY, shiftZ, rotX, rotY, rotZ
 
std::array< bool, NofParametersfIsParActive {false}
 flags for the parameters to be aligned
 
std::array< double, NofParametersfPar0 {0.}
 initial alignment parameters
 
TGeoHMatrix fAlignment
 transformation matrix of the alignment body. Corresponds to the fPar values.
 
TGeoHMatrix fGlobal
 global transformation matrix of the alignment body
 
TGeoHMatrix fGlobalInv
 inverse of the global transformation matrix
 
TGeoHMatrix fGlobalNominal
 nominal global transformation matrix, without (pre-)alignment
 
TGeoHMatrix fHitTransform
 
long fStatistics {0}
 additional information
 

Detailed Description

alignment body accessor and property handler

it represents one TGeoNode in the ROOT geometry

The alignment body is a class that represents an alignable component of the detector. It contains the transformation matrices and manages the transformation of the hits associated with the alignment body. There are six alignment parameters:

  • shiftX, shiftY, shiftZ [cm]: translations in the X, Y, and Z directions
  • rotX, rotY, rotZ [grad]: extrinsic rotations around the X, Y, and Z axes

The position and orientation of the alignment body in the global coordinate system is defined by a global transformation matrix fGlobal. The alignment correction itself is represented by the matrix fAlignment, which is constructed from the alignment parameters.

To transform initially aligned {x,y,z} hits to the newly aligned {x,y,z} in global coordinates, the transformation

\[ HitTransform \]

is defined as:

\[ HitTransform = GlobalNominal \cdot A \cdot (GlobalNominal \cdot A_{0})^{-1} \]

where:

  • \[ GlobalNominal \]

    is the nominal global transformation of the node (without pre-existing alignment)
  • \[ A \]

    is the new alignment (replacing

    \[ A_{0} \]

    )
  • \[ A_{0} \]

    is the initial pre-alignment of the node

The matices GlobalNominal and A0 are calculated from the ROOT geometry as follows: The local to global transformation

\[ Global \]

for the geo node is defined as:

\[ Global = GlobalNominal \cdot A_{0} = GlobalMother \cdot (LocalNominal \cdot A_{0}) \]

where:

  • GlobalMother is the sequence of transformations upstream the node in the ROOT geometry
  • LocalNominal is the default node transformation matrix (w/o alignment)

Definition at line 47 of file CbmBbaAlignmentBody.h.

Constructor & Destructor Documentation

◆ AlignmentBody() [1/3]

cbm::bba::AlignmentBody::AlignmentBody ( )
default

Default constructor.

Referenced by ClassDefNV().

◆ AlignmentBody() [2/3]

cbm::bba::AlignmentBody::AlignmentBody ( double shiftX,
double shiftY,
double shiftZ,
double rotX,
double rotY,
double rotZ )
explicit

Constructor with individual parameters for alignment bodies not associated with a geo node (no pre-existing alignment possible)

Parameters
sixindividual parameters: shiftX, shiftY, shiftZ, rotX, rotY, rotZ

Definition at line 31 of file CbmBbaAlignmentBody.cxx.

References fAlignment, fGlobal, fGlobalInv, fGlobalNominal, fHitTransform, and fIsValid.

◆ AlignmentBody() [3/3]

cbm::bba::AlignmentBody::AlignmentBody ( const std::string nodePath)

Constructor.

Parameters
nodePathfull path to the node in the ROOT geometry

Definition at line 59 of file CbmBbaAlignmentBody.cxx.

References CreateFromGeoNode().

◆ ~AlignmentBody()

cbm::bba::AlignmentBody::~AlignmentBody ( )
default

Destructor.

Member Function Documentation

◆ ActivateParameters()

void cbm::bba::AlignmentBody::ActivateParameters ( const std::array< bool, NofParameters > & isParActive)

Definition at line 148 of file CbmBbaAlignmentBody.cxx.

References fIsParActive.

◆ ApplyAlignmentToHit()

std::array< double, 3 > cbm::bba::AlignmentBody::ApplyAlignmentToHit ( const std::array< double, 3 > hit) const

Apply the alignment to hit: return = fHitTransform * hit.

Definition at line 177 of file CbmBbaAlignmentBody.cxx.

References fHitTransform.

◆ ApplyInverseAlignmentToHit()

std::array< double, 3 > cbm::bba::AlignmentBody::ApplyInverseAlignmentToHit ( const std::array< double, 3 > hit) const

Apply the inverse alignment to hit: return = fHitTransform^{-1} * hit.

Definition at line 186 of file CbmBbaAlignmentBody.cxx.

References fHitTransform.

◆ ClassDefNV()

cbm::bba::AlignmentBody::ClassDefNV ( AlignmentBody ,
0  )
private

References AlignmentBody().

◆ CreateFromGeoNode()

bool cbm::bba::AlignmentBody::CreateFromGeoNode ( const std::string nodePath)

Definition at line 61 of file CbmBbaAlignmentBody.cxx.

References fAlignment, fGlobal, fGlobalInv, fGlobalNominal, fHitTransform, fIsValid, and fNodePath.

Referenced by AlignmentBody().

◆ GetAlignmentMatrix()

const TGeoHMatrix & cbm::bba::AlignmentBody::GetAlignmentMatrix ( ) const
inline

Get the transformation matrix of the alignment body.

Definition at line 96 of file CbmBbaAlignmentBody.h.

References fAlignment.

◆ GetGlobalTransform()

const TGeoHMatrix & cbm::bba::AlignmentBody::GetGlobalTransform ( ) const
inline

Get the transformation of the aligment body to the glaobal coordinates.

Definition at line 79 of file CbmBbaAlignmentBody.h.

References fGlobal.

◆ GetHitTransform()

const TGeoHMatrix & cbm::bba::AlignmentBody::GetHitTransform ( ) const
inline

Get the transformation of the initially aligned {x,y,z} to the newly aligned {x,y,z} in the global coordinates.

Definition at line 100 of file CbmBbaAlignmentBody.h.

References fHitTransform.

◆ GetInitialParameters()

const std::array< double, NofParameters > & cbm::bba::AlignmentBody::GetInitialParameters ( ) const
inline

Get the initial alignment parameters.

Definition at line 93 of file CbmBbaAlignmentBody.h.

References fPar0.

◆ GetNodePath()

const std::string & cbm::bba::AlignmentBody::GetNodePath ( ) const
inline

Get the full path to the node in the ROOT geometry.

Definition at line 76 of file CbmBbaAlignmentBody.h.

References fNodePath.

◆ GetParameters() [1/2]

const std::array< double, NofParameters > & cbm::bba::AlignmentBody::GetParameters ( ) const
inline

Get the alignment parameters.

Definition at line 88 of file CbmBbaAlignmentBody.h.

References fPar.

◆ GetParameters() [2/2]

void cbm::bba::AlignmentBody::GetParameters ( double * par) const

Definition at line 196 of file CbmBbaAlignmentBody.cxx.

References fPar, and NofParameters.

◆ GetStatistics()

long cbm::bba::AlignmentBody::GetStatistics ( ) const
inline

Get the statistics for the alignment body.

Definition at line 109 of file CbmBbaAlignmentBody.h.

References fStatistics.

◆ GetTrackingStation()

int cbm::bba::AlignmentBody::GetTrackingStation ( ) const
inline

Get the Tracking Station index.

Definition at line 112 of file CbmBbaAlignmentBody.h.

References fTrackingStation.

◆ IncrementStatistics()

void cbm::bba::AlignmentBody::IncrementStatistics ( int increment)
inline

Increment the statistics for the alignment body.

Definition at line 106 of file CbmBbaAlignmentBody.h.

References fStatistics.

◆ IsParameterActive()

bool cbm::bba::AlignmentBody::IsParameterActive ( int i) const
inline

Definition at line 70 of file CbmBbaAlignmentBody.h.

References fIsParActive.

◆ IsValid()

bool cbm::bba::AlignmentBody::IsValid ( ) const
inline

Definition at line 64 of file CbmBbaAlignmentBody.h.

References fIsValid.

◆ SetParameters()

void cbm::bba::AlignmentBody::SetParameters ( double shiftX = 0.,
double shiftY = 0.,
double shiftZ = 0.,
double rotX = 0.,
double rotY = 0.,
double rotZ = 0. )

Definition at line 154 of file CbmBbaAlignmentBody.cxx.

References fAlignment, fGlobalInv, fGlobalNominal, fHitTransform, and fPar.

◆ SetStatistics()

void cbm::bba::AlignmentBody::SetStatistics ( long statistics)
inline

Set the statistics for the alignment body.

Definition at line 103 of file CbmBbaAlignmentBody.h.

References fStatistics.

◆ SetTrackingStation()

void cbm::bba::AlignmentBody::SetTrackingStation ( int station)
inline

Set the Tracking Station index.

Definition at line 115 of file CbmBbaAlignmentBody.h.

References fTrackingStation.

Member Data Documentation

◆ fAlignment

TGeoHMatrix cbm::bba::AlignmentBody::fAlignment
private

transformation matrix of the alignment body. Corresponds to the fPar values.

Definition at line 131 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), CreateFromGeoNode(), GetAlignmentMatrix(), and SetParameters().

◆ fGlobal

TGeoHMatrix cbm::bba::AlignmentBody::fGlobal
private

global transformation matrix of the alignment body

Definition at line 133 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), CreateFromGeoNode(), and GetGlobalTransform().

◆ fGlobalInv

TGeoHMatrix cbm::bba::AlignmentBody::fGlobalInv
private

inverse of the global transformation matrix

Definition at line 134 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), CreateFromGeoNode(), and SetParameters().

◆ fGlobalNominal

TGeoHMatrix cbm::bba::AlignmentBody::fGlobalNominal
private

nominal global transformation matrix, without (pre-)alignment

Definition at line 135 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), CreateFromGeoNode(), and SetParameters().

◆ fHitTransform

TGeoHMatrix cbm::bba::AlignmentBody::fHitTransform
private

transformation of the global hit {x,y,z} to the newly aligned {x,y,z} in global coordinates fGlobalTransform * fAlignment * (fGlobalTransform)^{-1} TODO

Definition at line 137 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), ApplyAlignmentToHit(), ApplyInverseAlignmentToHit(), CreateFromGeoNode(), GetHitTransform(), and SetParameters().

◆ fIsParActive

std::array<bool, NofParameters> cbm::bba::AlignmentBody::fIsParActive {false}
private

flags for the parameters to be aligned

Definition at line 126 of file CbmBbaAlignmentBody.h.

Referenced by ActivateParameters(), and IsParameterActive().

◆ fIsValid

bool cbm::bba::AlignmentBody::fIsValid {false}
private

flag indicating if the alignment body is valid

Definition at line 120 of file CbmBbaAlignmentBody.h.

Referenced by AlignmentBody(), CreateFromGeoNode(), and IsValid().

◆ fNodePath

std::string cbm::bba::AlignmentBody::fNodePath {}
private

full path to the node in the root geometry

Definition at line 122 of file CbmBbaAlignmentBody.h.

Referenced by CreateFromGeoNode(), and GetNodePath().

◆ fPar

std::array<double, NofParameters> cbm::bba::AlignmentBody::fPar {0.}
private

alignment parameters: shiftX, shiftY, shiftZ, rotX, rotY, rotZ

Definition at line 124 of file CbmBbaAlignmentBody.h.

Referenced by GetParameters(), GetParameters(), and SetParameters().

◆ fPar0

std::array<double, NofParameters> cbm::bba::AlignmentBody::fPar0 {0.}
private

initial alignment parameters

Definition at line 129 of file CbmBbaAlignmentBody.h.

Referenced by GetInitialParameters().

◆ fStatistics

long cbm::bba::AlignmentBody::fStatistics {0}
private

additional information

statistics for the alignment body

Definition at line 143 of file CbmBbaAlignmentBody.h.

Referenced by GetStatistics(), IncrementStatistics(), and SetStatistics().

◆ fTrackingStation

int cbm::bba::AlignmentBody::fTrackingStation {-1}
private

Definition at line 119 of file CbmBbaAlignmentBody.h.

Referenced by GetTrackingStation(), and SetTrackingStation().

◆ NofParameters

int cbm::bba::AlignmentBody::NofParameters = 6
staticconstexpr

number of alignment parameters

Definition at line 62 of file CbmBbaAlignmentBody.h.

Referenced by GetParameters().


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