File indexing completed on 2024-04-06 12:14:28
0001 #ifndef EcalAlgo_DDEcalEndcapTrap_h
0002 #define EcalAlgo_DDEcalEndcapTrap_h
0003
0004 #include <vector>
0005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0006 #include "DetectorDescription/Core/interface/DDRotationMatrix.h"
0007 #include "DetectorDescription/Core/interface/DDTranslation.h"
0008
0009
0010
0011 class DDEcalEndcapTrap {
0012 public:
0013 DDEcalEndcapTrap(const int hand, const double front, const double rear, const double length);
0014 DDEcalEndcapTrap() = delete;
0015
0016 void rotate(const DDRotationMatrix& rot);
0017 void rotate(const DDTranslation& frontCentre, const DDTranslation& rearCentre);
0018 void translate(const DDTranslation& trans);
0019
0020 void rotateX(const double angle);
0021 void rotateY(const double angle);
0022 void translate();
0023 void moveto(const DDTranslation& frontCentre, const DDTranslation& rearCentre);
0024 double elevationAngle(const DDTranslation& trans);
0025 double polarAngle(const DDTranslation& trans);
0026 double elevationAngle();
0027 double polarAngle();
0028 DDTranslation cornerPos(const int icorner);
0029 void cornerPos(const int icorner, const DDTranslation& cc);
0030 DDTranslation centrePos();
0031 DDTranslation fcentrePos();
0032 DDTranslation rcentrePos();
0033 void calculateCorners();
0034 void calculateCentres();
0035 DDRotationMatrix rotation() { return m_rotation; }
0036 void print();
0037
0038 private:
0039 DDRotationMatrix m_rotation;
0040 DDTranslation m_translation;
0041
0042 double m_centre[4];
0043 double m_fcentre[4];
0044 double m_rcentre[4];
0045 double m_corners[25];
0046 double m_front;
0047 double m_rear;
0048 double m_length;
0049
0050 int m_hand;
0051 int m_update;
0052 };
0053
0054 #endif