13 #ifndef DD4HEP_ALIGMENTS_ALIGNMENTDATA_H
14 #define DD4HEP_ALIGMENTS_ALIGNMENTDATA_H
22 #include "TGeoMatrix.h"
28 namespace Alignments {
40 class AlignmentCondition;
183 void localToWorld(
const Double_t local[3], Double_t global[3])
const;
194 void worldToLocal(
const Double_t global[3], Double_t local[3])
const;
351 template <
typename T>
inline
355 template <
typename T>
inline
PlacedVolume placement() const
Access the placement of this node.
bool hasRotation() const
Access flags: Check if the delta operation contains a rotation.
AlignmentData::NodeList NodeList
Forward definition of the nodelist leading to the world.
BitMask flag
Flag to remember internally calculated quatities.
AlignmentDecorator(Q q)
Special constructors.
Handle class holding a placed volume (also called physical volume)
TGeoHMatrix detectorTrafo
Intermediate buffer to store the transformation to the parent detector element.
Position detectorToLocal(const Double_t det[3]) const
Transformation from detector element coordinates to the local placed volume coordinates.
Delta(const Position &tr, const Translation3D &piv, const RotationZYX &rot)
Initializing constructor.
Ref_t condition
Reference to the original condition object (May not be present!)
Position localToWorld(const Double_t local[3]) const
Transformation from local coordinates of the placed volume to the world system.
void detectorToLocal(const Position &detector, Position &local) const
Transformation from detector element coordinates to the local placed volume coordinates.
~AlignmentDecorator()
Default destructor.
const TGeoHMatrix & detectorTransformation() const
Create cached matrix to transform to detector coordinates.
TGeoHMatrix worldDelta
Delta transformation to the world coordination system.
bool isValid() const
Check the validity of the object held by the handle.
unsigned int BitMask
Forward declaration of the utility bit mask.
ReferenceBitMask< BitMask > MaskManipulator
Forward declaration of the utility mask manipulator.
bool hasPivot() const
Access flags: Check if the delta operation contains a pivot.
bool checkFlag(unsigned int mask) const
Check a given flag.
void worldToLocal(const Position &global, Position &local) const
Transformation from world coordinates of the local placed volume coordinates.
Delta()=default
Default constructor.
AlignmentData()
Standard constructor.
void clear()
Reset information to identity.
void setFlag(unsigned int mask)
Check a given flag.
AlignmentData & operator=(const AlignmentData ©)
Assignment operator necessary due to copy constructor.
Main handle class to hold an alignment object.
void worldToLocal(const Double_t global[3], Double_t local[3]) const
Transformation from world coordinates of the local placed volume coordinates.
Alignments::Delta Delta
Forward definition of the alignment delta data.
DetElement detector() const
Access to the DetElement node.
NodeList nodes
The list of TGeoNodes (physical placements)
Alignment nominal() const
Access the ideal/nominal alignment/placement matrix.
Data structure to manipulate a bitmask held by reference and represented by an integer.
Delta(const Position &tr, const RotationZYX &rot)
Initializing constructor.
DD4hep::Geometry::DetElement DetElement
void setDelta(const Delta &del)
Set the delta alignment information.
void worldToLocal(const Position &global, Position &local) const
Transformation from world coordinates of the local placed volume coordinates.
DetElement detector
Reference to the next hosting detector element.
void localToDetector(const Double_t local[3], Double_t det[3]) const
Transformation from local coordinates of the placed volume to the detector system.
Position localToDetector(const Double_t local[3]) const
Transformation from local coordinates of the placed volume to the world system.
unsigned int magic
Magic word to verify object if necessary.
ROOT::Math::RotationZYX RotationZYX
Delta delta
Alignment changes.
std::vector< PlacedVolume > NodeList
Forward definition of the nodelist leading to the world.
void setDeltaPivot(const Translation3D &pivot, const RotationZYX &rotation)
Set the delta alignment if only a single rotation around a pivot point.
const TGeoHMatrix & worldTransformation() const
Create cached matrix to transform to world coordinates.
const Alignment & nominal() const
Access the currently applied alignment/placement matrix (mother to daughter)
const Transform3D & localToWorld() const
Access the currently applied alignment/placement matrix.
Delta(const Translation3D &piv, const RotationZYX &rot)
Initializing constructor.
const TGeoHMatrix & detectorTransformation() const
Access the alignment/placement matrix with respect to the world.
void setDelta(const RotationZYX &rotation)
Set the delta alignment if only a single rotation.
Class describing an condition to re-adjust an alignment.
ROOT::Math::XYZVector Position
void localToDetector(const Position &local, Position &det) const
Transformation from local coordinates of the placed volume to the detector system.
void localToWorld(const Double_t local[3], Double_t global[3]) const
Transformation from local coordinates of the placed volume to the world system.
AlignmentData::Delta Delta
Forward definition of the alignment delta data.
const Transform3D & localToWorld() const
Access the alignment/placement matrix with respect to the world.
void setDelta(const Position &translation, RotationZYX &rotation)
Set the delta alignment as a composite of a translation and a rotation.
Geometry::PlacedVolume PlacedVolume
Forward definition of the geometry placement.
const AlignmentData & data() const
Data accessor.
Delta(const RotationZYX &rot)
Initializing constructor.
void setDelta(const Position &translation)
Set the delta alignment if only a single translation.
ROOT::Math::Translation3D Translation3D
void localToWorld(const Position &local, Position &global) const
Transformation from local coordinates of the placed volume to the world system.
Delta(const Position &tr)
Initializing constructor.
const Delta & delta() const
Access the currently applied correction matrix (delta) (mother to daughter)
Transform3D trToWorld
Transformation from volume to the world.
AlignmentData::PlacedVolume PlacedVolume
Forward definition of the geometry placement.
PlacedVolume detectorPlacement() const
Access the placement of the DetElement node.
void detectorToLocal(const Position &det, Position &local) const
Transformation from world coordinates of the local placed volume coordinates.
AlignmentDecorator()
Default constructor.
ROOT::Math::Transform3D Transform3D
AlignmentData & data()
Data accessor for decorator.
const TGeoHMatrix & worldTransformation() const
Create cached matrix to transform to world coordinates.
bool hasTranslation() const
Access flags: Check if the delta operation contains a translation.
bool hasCondition() const
Accessor if a conditions object is behind.
PlacedVolume placement
The subdetector placement corresponding to the actual detector element's volume.
void detectorToLocal(const Double_t det[3], Double_t local[3]) const
Transformation from world coordinates of the local placed volume coordinates.
Derived condition data-object definition.
void localToDetector(const Position &local, Position &detector) const
Transformation from local coordinates of the placed volume to the detector system.
Position worldToLocal(const Double_t global[3]) const
Transformation from local coordinates of the placed volume to the world system.
void setDeltaPivot(const Position &translation, const Translation3D &pivot, const RotationZYX &rotation)
Set the delta alignment if a translation and a rotation around pivot.
TGeoHMatrix worldTrafo
Intermediate buffer to store the transformation to the world coordination system. ...
Delta & operator=(const Delta &c)
Assignment operator.
~Delta()
Default destructor.
virtual ~AlignmentData()
Default destructor.