DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
GlobalAlignment.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_GLOBALALIGNMENT_H
14 #define DD4HEP_GLOBALALIGNMENT_H
15 
16 // Framework include files
17 #include "DD4hep/Objects.h"
18 #include "DD4hep/Volumes.h"
19 #include "DD4hep/Alignments.h"
20 #include "TGeoPhysicalNode.h"
21 
23 namespace dd4hep {
24 
26  namespace align {
27 
29 
38  class GlobalAlignment : public Handle<TGeoPhysicalNode> {
39  public:
41  GlobalAlignment() = default;
43  GlobalAlignment(TGeoPhysicalNode* p) : Handle<TGeoPhysicalNode>(p) {}
45  GlobalAlignment(const GlobalAlignment& c) = default;
47  template <typename Q> GlobalAlignment(const Handle<Q>& e)
48  : Handle<TGeoPhysicalNode>(e) {
49  }
51  GlobalAlignment(const std::string& path);
55  int numNodes() const;
57  PlacedVolume placement() const;
59  PlacedVolume motherPlacement(int level_up = 1) const;
61 
66  PlacedVolume nodePlacement(int level=-1) const;
68  Transform3D toGlobal(int level=-1) const;
70  Position toGlobal(const Position& localPoint, int level=-1) const;
72  Position globalToLocal(const Position& globalPoint, int level=-1) const;
73 
75  Transform3D toMother(int level=-1) const;
76 
78  Transform3D nominal() const;
80  Transform3D delta() const;
82  Transform3D invDelta() const;
83  };
84 
85  } /* End namespace align */
86 } /* End namespace dd4hep */
87 #endif // DD4HEP_GLOBALALIGNMENT_H
88 
Objects.h
dd4hep::align::GlobalAlignment::GlobalAlignment
GlobalAlignment(const Handle< Q > &e)
Constructor to be used when reading the already parsed object.
Definition: GlobalAlignment.h:47
Volumes.h
dd4hep::align::GlobalAlignment
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
Definition: GlobalAlignment.h:38
dd4hep::align::GlobalAlignment::toGlobal
Transform3D toGlobal(int level=-1) const
Access the currently applied alignment/placement matrix with respect to the world.
Definition: GlobalAlignment.cpp:78
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:173
Alignments.h
dd4hep::align::GlobalAlignment::motherPlacement
PlacedVolume motherPlacement(int level_up=1) const
Access the placement of the mother of this node.
Definition: GlobalAlignment.cpp:66
dd4hep::align::GlobalAlignment::numNodes
int numNodes() const
Number of nodes in this branch (=depth of the placement hierarchy from the top level volume)
Definition: GlobalAlignment.cpp:44
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::align::GlobalAlignment::nominal
Transform3D nominal() const
Access the currently applied alignment/placement matrix (mother to daughter)
Definition: GlobalAlignment.cpp:108
dd4hep::align::GlobalAlignment::GlobalAlignment
GlobalAlignment(const GlobalAlignment &c)=default
Copy constructor.
dd4hep::align::GlobalAlignment::globalToLocal
Position globalToLocal(const Position &globalPoint, int level=-1) const
Transform a point from global coordinates to local coordinates of a given level.
Definition: GlobalAlignment.cpp:93
dd4hep::align::GlobalAlignment::invDelta
Transform3D invDelta() const
Access the inverse of the currently applied correction matrix (delta) (mother to daughter)
Definition: GlobalAlignment.cpp:125
dd4hep::align::GlobalAlignment::delta
Transform3D delta() const
Access the currently applied correction matrix (delta) (mother to daughter)
Definition: GlobalAlignment.cpp:114
dd4hep::align::GlobalAlignment::toMother
Transform3D toMother(int level=-1) const
Access the currently applied alignment/placement matrix with respect to mother volume.
Definition: GlobalAlignment.cpp:102
dd4hep::align::GlobalAlignment::operator=
GlobalAlignment & operator=(const GlobalAlignment &c)=default
Assignment operator.
dd4hep::align::GlobalAlignment::placement
PlacedVolume placement() const
Access the placement of this node.
Definition: GlobalAlignment.cpp:50
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:117
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::align::GlobalAlignment::GlobalAlignment
GlobalAlignment()=default
Default constructor.
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::align::GlobalAlignment::GlobalAlignment
GlobalAlignment(TGeoPhysicalNode *p)
Default constructor.
Definition: GlobalAlignment.h:43
dd4hep::align::GlobalAlignment::nodePlacement
PlacedVolume nodePlacement(int level=-1) const
Access the placement of a node in the chain of placements for this branch.
Definition: GlobalAlignment.cpp:56