ATLAS Offline Software
|
Element: a node in a hierarchy of alignment frames. More...
#include <Element.h>
Public Types | |
enum | ParameterClass { ParameterClass::NOMINAL, ParameterClass::CORRECTION } |
using | ParameterVector = ElementModel::ParameterVector |
using | ipar_t = ElementModel::ipar_t |
using | daughterVec_t = std::vector< std::unique_ptr< Element > > |
using | VectorSetRef = ElementModel::VectorSetRef |
Public Member Functions | |
Element (std::unique_ptr< ElementModel > deformationModel) | |
Element ()=delete | |
Element (const Element &)=delete | |
Element & | operator= (const Element &)=delete |
double | getParameter (ParameterClass iclass, ipar_t ipar) const |
void | setParameter (ParameterClass iclass, ipar_t ipar, double value) |
void | setParametersFromMap (ParameterClass iclass, const std::map< std::string, double > &values) |
void | transform (ParameterClass iclass, const VectorSetRef &local) const |
void | transformToFrame (ParameterClass iclass, const VectorSetRef &local, const Element *frame) const |
void | cacheTransforms () |
void | setAsapId (const std::string &asapId) |
const std::string & | asapId () const |
Element * | addDaughter (std::unique_ptr< Element > daughter) |
const Element * | mother () const |
Element * | mother () |
void | traverseTree (const std::function< void(Element &)> &callback) |
Private Member Functions | |
ParameterVector & | parameterVector (ParameterClass iclass) |
const ParameterVector & | parameterVector (ParameterClass iclass) const |
Private Attributes | |
std::unique_ptr< ElementModel > | m_deformationModel |
ParameterVector | m_nominalPar |
ParameterVector | m_correctedPar |
daughterVec_t | m_daughters |
Element * | m_mother {nullptr} |
std::string | m_asapId {""} |
Element: a node in a hierarchy of alignment frames.
The class Element is the building block for chaining alignment transformations in various coordinate systems.
Each Element has attached to it a local coordinate system. The transformation of a point in local coordinates from this Element frame to the higher-level coordinate system is achieved with the method transform. The transform method applies rigid transformation (rotations, translation) and possibly deformations.
The Elements are organized in a tree structure, representing the hierarchy of coordinate systems. Traversal of the tree may be achieved using the mother and daughter pointers, or with the method traverseTree, which applies the user-provided function to all the daughers and grand-daughters of this Element.
In this context, it is interesting to call the transform methods iteratively on all the mothers. This is achieved by the method transformToFrame.
The transformation method is handled by an external class ElementModel, which, by sub-classing, provides the deformation model of this Element. The ElementModel must be set in the constructor.
The ElementModel is parameterized by an array of model parameters, whose meaning is known only to the used ElementModel implementation. The model parameters are members of this class, and are provided in two forms: the NOMINAL parameters (meant to represent the nominal geometry), and the CORRECTION parameters (meant to represent the actually measured parameters). The choice of one or the other of the two forms is possible using the ParameterClass argument of the transform method.
using NswAsBuilt::Element::daughterVec_t = std::vector<std::unique_ptr<Element> > |
|
strong |
Element::Element | ( | std::unique_ptr< ElementModel > | deformationModel | ) |
Definition at line 11 of file Element.cxx.
|
delete |
Definition at line 92 of file Element.cxx.
|
inline |
void Element::cacheTransforms | ( | ) |
Definition at line 51 of file Element.cxx.
double Element::getParameter | ( | ParameterClass | iclass, |
ipar_t | ipar | ||
) | const |
Definition at line 59 of file Element.cxx.
|
inline |
|
private |
Definition at line 19 of file Element.cxx.
|
private |
Definition at line 26 of file Element.cxx.
|
inline |
void Element::setParameter | ( | ParameterClass | iclass, |
ipar_t | ipar, | ||
double | value | ||
) |
Definition at line 70 of file Element.cxx.
void Element::setParametersFromMap | ( | ParameterClass | iclass, |
const std::map< std::string, double > & | values | ||
) |
Definition at line 82 of file Element.cxx.
void Element::transform | ( | ParameterClass | iclass, |
const VectorSetRef & | local | ||
) | const |
Definition at line 33 of file Element.cxx.
void Element::transformToFrame | ( | ParameterClass | iclass, |
const VectorSetRef & | local, | ||
const Element * | frame | ||
) | const |
Definition at line 104 of file Element.cxx.
|
private |
|
private |
|
private |
|
private |