22 #include "TGeoMatrix.h"
26 using namespace DD4hep;
27 using namespace DD4hep::Alignments;
31 : translation(c.translation), pivot(c.pivot), rotation(c.rotation), flags(c.flags)
64 for(
size_t i=0; i<res.length(); ++i)
65 if ( res[i]==
'\n' ) res[i] =
' ';
78 : delta(copy.delta), worldTrafo(copy.worldTrafo), worldDelta(copy.worldDelta),
79 detectorTrafo(copy.detectorTrafo),
80 nodes(copy.nodes), trToWorld(copy.trToWorld), detector(copy.detector),
81 placement(copy.placement), flag(copy.flag), magic(
magic_word())
93 if (
this != © ) {
110 return s << str.str();
116 Double_t master_point[3] = { 0, 0, 0 }, local_point[3] = { local.X(), local.Y(), local.Z() };
117 worldTrafo.LocalToMaster(local_point, master_point);
118 global.SetCoordinates(master_point);
124 Double_t master_point[3] = { 0, 0, 0 }, local_point[3] = { local.X(), local.Y(), local.Z() };
125 worldTrafo.LocalToMaster(local_point, master_point);
126 global.SetCoordinates(master_point);
138 Double_t master_point[3] = { global.X(), global.Y(), global.Z() }, local_point[3] = { 0, 0, 0 };
139 worldTrafo.MasterToLocal(master_point, local_point);
140 local.SetCoordinates(local_point);
146 Double_t master_point[3] = { global.X(), global.Y(), global.Z() }, local_point[3] = { 0, 0, 0 };
147 worldTrafo.MasterToLocal(master_point, local_point);
148 local.SetCoordinates(local_point);
159 Double_t master_point[3] = { 0, 0, 0 }, local_point[3] = { local.X(), local.Y(), local.Z() };
161 global.SetCoordinates(master_point);
167 Double_t master_point[3] = { 0, 0, 0 }, local_point[3] = { local.X(), local.Y(), local.Z() };
169 global.SetCoordinates(master_point);
181 Double_t master_point[3] = { global.X(), global.Y(), global.Z() }, local_point[3] = { 0, 0, 0 };
183 local.SetCoordinates(local_point);
190 Double_t master_point[3] = { global.X(), global.Y(), global.Z() }, local_point[3] = { 0, 0, 0 };
192 local.SetCoordinates(local_point);
210 #include "DD4hep/BasicGrammar_inl.h"
BitMask flag
Flag to remember internally calculated quatities.
TGeoHMatrix detectorTrafo
Intermediate buffer to store the transformation to the parent detector element.
std::ostream & operator<<(std::ostream &os, const DetType &t)
void detectorToLocal(const Position &detector, Position &local) const
Transformation from detector element coordinates to the local placed volume coordinates.
static void decrement(T *)
Decrement count according to type information.
void worldToLocal(const Position &global, Position &local) const
Transformation from world coordinates of the local placed volume coordinates.
AlignmentData()
Standard constructor.
void clear()
Reset information to identity.
AlignmentData & operator=(const AlignmentData ©)
Assignment operator necessary due to copy constructor.
Main handle class to hold an alignment object.
NodeList nodes
The list of TGeoNodes (physical placements)
Alignment nominal() const
Access the ideal/nominal alignment/placement matrix.
DetElement detector
Reference to the next hosting detector element.
ROOT::Math::RotationZYX RotationZYX
Delta delta
Alignment changes.
const Transform3D & localToWorld() const
Access the currently applied alignment/placement matrix.
#define DD4HEP_DEFINE_PARSER_GRAMMAR(x, func)
Class describing an condition to re-adjust an alignment.
ROOT::Math::XYZVector Position
static void increment(T *)
Increment count according to type information.
Transform3D trToWorld
Transformation from volume to the world.
PlacedVolume placement
The subdetector placement corresponding to the actual detector element's volume.
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.
int eval_none(T *, const std::string &)
unsigned long long int magic_word()
Access to the magic word, which is protecting some objects against memory corruptions.
TGeoHMatrix worldTrafo
Intermediate buffer to store the transformation to the world coordination system. ...
Delta & operator=(const Delta &c)
Assignment operator.
~Delta()
Default destructor.
#define DD4HEP_DEFINE_CONDITIONS_TYPE_DUMMY(x)
virtual ~AlignmentData()
Default destructor.