DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
GlobalDetectorAlignment.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 DDALIGN_GLOBALDETECTORALIGNMENT_H
14 #define DDALIGN_GLOBALDETECTORALIGNMENT_H
15 
16 // Framework include files
17 #include <DD4hep/DetElement.h>
18 #include <DD4hep/GlobalAlignment.h>
19 
20 // Forward declarations
21 class TGeoHMatrix;
22 
24 namespace dd4hep {
25 
27  namespace align {
28 
30 
36  protected:
37  public:
43  static bool debug();
45  static bool debug(bool value);
47  void collectNodes(std::vector<PlacedVolume>& nodes);
49  GlobalAlignment alignment() const;
51  std::vector<GlobalAlignment>& volumeAlignments();
53  const std::vector<GlobalAlignment>& volumeAlignments() const;
54 
56  GlobalAlignment align(const Position& pos, bool check = false, double overlap = 0.001);
59  GlobalAlignment align(const RotationZYX& rot, bool check = false, double overlap = 0.001);
61  GlobalAlignment align(const Position& pos, const RotationZYX& rot, bool check = false, double overlap = 0.001);
63  GlobalAlignment align(const Transform3D& tr, bool check = false, double overlap = 0.001);
65  GlobalAlignment align(TGeoHMatrix* matrix, bool check = false, double overlap = 0.001);
66 
68  GlobalAlignment align(const std::string& volume_path, const Position& pos, bool check = false, double overlap = 0.001);
71  GlobalAlignment align(const std::string& volume_path, const RotationZYX& rot, bool check = false, double overlap = 0.001);
73  GlobalAlignment align(const std::string& volume_path, const Position& pos, const RotationZYX& rot, bool check = false, double overlap = 0.001);
75  GlobalAlignment align(const std::string& volume_path, const Transform3D& tr, bool check = false, double overlap = 0.001);
77  GlobalAlignment align(const std::string& volume_path, TGeoHMatrix* matrix, bool check = false, double overlap = 0.001);
78  };
79 
80  } /* End namespace align */
81 } /* End namespace dd4hep */
82 #endif // DDALIGN_GLOBALDETECTORALIGNMENT_H
dd4hep::align::GlobalDetectorAlignment::volumeAlignments
std::vector< GlobalAlignment > & volumeAlignments()
Alignment entries for lower level volumes, which are NOT attached to daughter DetElements.
Definition: GlobalDetectorAlignment.cpp:214
dd4hep::align::GlobalDetectorAlignment
GlobalDetectorAlignment. DetElement Handle supporting alignment operations.
Definition: GlobalDetectorAlignment.h:35
GlobalAlignment.h
dd4hep::align::GlobalDetectorAlignment::debug
static bool debug()
Access debugging flag.
Definition: GlobalDetectorAlignment.cpp:192
dd4hep::align::GlobalAlignment
Main handle class to hold a TGeo alignment object of type TGeoPhysicalNode.
Definition: GlobalAlignment.h:38
dd4hep::align::GlobalDetectorAlignment::alignment
GlobalAlignment alignment() const
Access to the alignment block.
Definition: GlobalDetectorAlignment.cpp:209
dd4hep::DetElement::check
void check(bool condition, const std::string &msg) const
Internal assert function to check conditions.
Definition: DetElement.cpp:251
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::align::GlobalDetectorAlignment::align
GlobalAlignment align(const Position &pos, bool check=false, double overlap=0.001)
Align the PhysicalNode of the placement of the detector element (translation only)
Definition: GlobalDetectorAlignment.cpp:226
dd4hep::Transform3D
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:117
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::align::GlobalDetectorAlignment::GlobalDetectorAlignment
GlobalDetectorAlignment(DetElement e)
Initializing constructor.
Definition: GlobalDetectorAlignment.cpp:180
DetElement.h
dd4hep::align::GlobalDetectorAlignment::collectNodes
void collectNodes(std::vector< PlacedVolume > &nodes)
Collect all placements from the detector element up to the world volume.
Definition: GlobalDetectorAlignment.cpp:204
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::RotationZYX
ROOT::Math::RotationZYX RotationZYX
Definition: Objects.h:105