CMS 3D CMS Logo

DDTransform.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_CORE_DDTRANSFORM_H
2 #define DETECTOR_DESCRIPTION_CORE_DDTRANSFORM_H
3 
7 #include <memory>
8 
9 class DDRotation;
10 
11 std::ostream &operator<<(std::ostream &, const DDRotation &);
12 
14 
18 DDRotation DDrot(const DDName &name, std::unique_ptr<DDRotationMatrix> rot);
19 
20 std::unique_ptr<DDRotation> DDrotPtr(const DDName &name, std::unique_ptr<DDRotationMatrix> rot);
21 
23 
25 DDRotation DDrot(const DDName &name, double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
26 
28 
32  const DDName &name, double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
33 
35 
37 
41 DDRotation DDanonymousRot(std::unique_ptr<DDRotationMatrix> rot);
42 
44 
47 std::unique_ptr<DDRotationMatrix> DDcreateRotationMatrix(
48  double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
49 
51 
57 class DDRotation : public DDBase<DDName, std::unique_ptr<DDRotationMatrix>> {
58  friend DDRotation DDrot(const DDName &, std::unique_ptr<DDRotationMatrix>);
59  friend std::unique_ptr<DDRotation> DDrotPtr(const DDName &, std::unique_ptr<DDRotationMatrix>);
60  friend DDRotation DDrotReflect(const DDName &, double, double, double, double, double, double);
61  friend DDRotation DDanonymousRot(std::unique_ptr<DDRotationMatrix>);
62 
63 public:
65  DDRotation();
66 
68 
77  DDRotation(const DDName &name);
78 
79  DDRotation(const DDName &, std::unique_ptr<DDRotationMatrix>);
81  const DDRotationMatrix &rotation() const { return rep(); }
82 
83  DDRotationMatrix &rotation() { return rep(); }
84 
85  DDRotationMatrix &matrix() { return rotation(); }
86 
87 private:
88  DDRotation(std::unique_ptr<DDRotationMatrix>);
89 };
90 
91 #endif
Definition: DDBase.h:10
DDRotation DDanonymousRot(std::unique_ptr< DDRotationMatrix > rot)
Defines a anonymous rotation or rotation-reflection matrix.
Definition: DDRotation.cc:143
std::ostream & operator<<(std::ostream &, const DDRotation &)
Definition: DDRotation.cc:21
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const DDI::rep_traits< DDName, std::unique_ptr< DDRotationMatrix > >::reference rep() const
Definition: DDBase.h:65
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
std::unique_ptr< DDRotation > DDrotPtr(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition: DDRotation.cc:72
friend DDRotation DDanonymousRot(std::unique_ptr< DDRotationMatrix >)
Defines a anonymous rotation or rotation-reflection matrix.
Definition: DDRotation.cc:143
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:57
friend std::unique_ptr< DDRotation > DDrotPtr(const DDName &, std::unique_ptr< DDRotationMatrix >)
Definition: DDRotation.cc:72
DDRotation DDrotReflect(const DDName &name, double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
Defines a rotation-reflection in the Geant3 way.
Definition: DDRotation.cc:101
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
std::unique_ptr< DDRotationMatrix > DDcreateRotationMatrix(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
create a new DDRotationMatrix in the GEANT3 style.
Definition: DDRotation.cc:120
friend DDRotation DDrotReflect(const DDName &, double, double, double, double, double, double)
Defines a rotation-reflection in the Geant3 way.
Definition: DDRotation.cc:101
const DDRotationMatrix & rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:81
DDRotation()
refers to the unit-rotation (no rotation at all)
Definition: DDRotation.cc:40
DDRotationMatrix & rotation()
Definition: DDTransform.h:83
friend DDRotation DDrot(const DDName &, std::unique_ptr< DDRotationMatrix >)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:67
DDRotationMatrix & matrix()
Definition: DDTransform.h:85