Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:28

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