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,
19  std::unique_ptr<DDRotationMatrix> rot );
20 
21 std::unique_ptr<DDRotation> DDrotPtr( const DDName & name,
22  std::unique_ptr<DDRotationMatrix> rot );
23 
25 
27 DDRotation DDrot( const DDName & name,
28  double thetaX, double phiX,
29  double thetaY, double phiY,
30  double thetaZ, double phiZ );
31 
32 
34 
38  double thetaX, double phiX,
39  double thetaY, double phiY,
40  double thetaZ, double phiZ );
41 
44 
46 
50 DDRotation DDanonymousRot( std::unique_ptr<DDRotationMatrix> rot );
51 
53 
56 std::unique_ptr<DDRotationMatrix>
57 DDcreateRotationMatrix( double thetaX, double phiX,
58  double thetaY, double phiY,
59  double thetaZ, double phiZ );
60 
62 
68 class DDRotation : public DDBase< DDName, std::unique_ptr<DDRotationMatrix >>
69 {
70  friend DDRotation DDrot( const DDName &, std::unique_ptr<DDRotationMatrix> );
71  friend std::unique_ptr<DDRotation> DDrotPtr( const DDName &, std::unique_ptr<DDRotationMatrix> );
72  friend DDRotation DDrotReflect( const DDName&, double, double, double, double, double, double );
73  friend DDRotation DDanonymousRot( std::unique_ptr<DDRotationMatrix> );
74 
75  public:
77  DDRotation();
78 
80 
89  DDRotation( const DDName & name );
90 
91  DDRotation( const DDName & , std::unique_ptr< DDRotationMatrix > );
93  const DDRotationMatrix& rotation() const { return rep(); }
94 
95  DDRotationMatrix& rotation() { return rep(); }
96 
97  DDRotationMatrix& matrix() { return rotation(); }
98 
99 private:
100 
101  DDRotation( std::unique_ptr<DDRotationMatrix> );
102 };
103 
104 #endif
Definition: DDBase.h:10
DDRotation DDanonymousRot(std::unique_ptr< DDRotationMatrix > rot)
Defines a anonymous rotation or rotation-reflection matrix.
Definition: DDRotation.cc:177
std::ostream & operator<<(std::ostream &, const DDRotation &)
Definition: DDRotation.cc:21
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
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:87
friend DDRotation DDanonymousRot(std::unique_ptr< DDRotationMatrix >)
Defines a anonymous rotation or rotation-reflection matrix.
Definition: DDRotation.cc:177
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
const DDI::rep_traits< DDName, std::unique_ptr< DDRotationMatrix > >::reference rep() const
Definition: DDBase.h:80
friend std::unique_ptr< DDRotation > DDrotPtr(const DDName &, std::unique_ptr< DDRotationMatrix >)
Definition: DDRotation.cc:87
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:124
DDRotation DDrot(const DDName &name, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:80
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:149
friend DDRotation DDrotReflect(const DDName &, double, double, double, double, double, double)
Defines a rotation-reflection in the Geant3 way.
Definition: DDRotation.cc:124
const DDRotationMatrix & rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:93
DDRotation()
refers to the unit-rotation (no rotation at all)
Definition: DDRotation.cc:43
DDRotationMatrix & rotation()
Definition: DDTransform.h:95
friend DDRotation DDrot(const DDName &, std::unique_ptr< DDRotationMatrix >)
Definition of a uniquely identifiable rotation matrix named by DDName name.
Definition: DDRotation.cc:80
DDRotationMatrix & matrix()
Definition: DDTransform.h:97