File indexing completed on 2024-04-06 12:05:24
0001 #ifndef DETECTOR_DESCRIPTION_CORE_DDTRANSFORM_H
0002 #define DETECTOR_DESCRIPTION_CORE_DDTRANSFORM_H
0003
0004 #include "DetectorDescription/Core/interface/DDBase.h"
0005 #include "DetectorDescription/Core/interface/DDName.h"
0006 #include "DetectorDescription/Core/interface/DDRotationMatrix.h"
0007 #include <memory>
0008
0009 class DDRotation;
0010
0011 std::ostream &operator<<(std::ostream &, const DDRotation &);
0012
0013
0014
0015
0016
0017
0018 DDRotation DDrot(const DDName &name, std::unique_ptr<DDRotationMatrix> rot);
0019
0020 std::unique_ptr<DDRotation> DDrotPtr(const DDName &name, std::unique_ptr<DDRotationMatrix> rot);
0021
0022
0023
0024
0025 DDRotation DDrot(const DDName &name, double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
0026
0027
0028
0029
0030
0031 DDRotation DDrotReflect(
0032 const DDName &name, double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
0033
0034 DDRotation DDrotReflect(const DDName &name, DDRotationMatrix *rot);
0035
0036
0037
0038
0039
0040
0041 DDRotation DDanonymousRot(std::unique_ptr<DDRotationMatrix> rot);
0042
0043
0044
0045
0046
0047 std::unique_ptr<DDRotationMatrix> DDcreateRotationMatrix(
0048 double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ);
0049
0050
0051
0052
0053
0054
0055
0056
0057 class DDRotation : public DDBase<DDName, std::unique_ptr<DDRotationMatrix>> {
0058 friend DDRotation DDrot(const DDName &, std::unique_ptr<DDRotationMatrix>);
0059 friend std::unique_ptr<DDRotation> DDrotPtr(const DDName &, std::unique_ptr<DDRotationMatrix>);
0060 friend DDRotation DDrotReflect(const DDName &, double, double, double, double, double, double);
0061 friend DDRotation DDanonymousRot(std::unique_ptr<DDRotationMatrix>);
0062
0063 public:
0064
0065 DDRotation();
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077 DDRotation(const DDName &name);
0078
0079 DDRotation(const DDName &, std::unique_ptr<DDRotationMatrix>);
0080
0081 const DDRotationMatrix &rotation() const { return rep(); }
0082
0083 DDRotationMatrix &rotation() { return rep(); }
0084
0085 DDRotationMatrix &matrix() { return rotation(); }
0086
0087 private:
0088 DDRotation(std::unique_ptr<DDRotationMatrix>);
0089 };
0090
0091 #endif