CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Geometry/EcalCommonData/interface/DDEcalEndcapTrap.h

Go to the documentation of this file.
00001 #ifndef EcalAlgo_DDEcalEndcapTrap_h
00002 #define EcalAlgo_DDEcalEndcapTrap_h
00003 
00004 #include <vector>
00005 #include "DetectorDescription/Base/interface/DDTypes.h"
00006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00007 #include "DetectorDescription/Base/interface/DDTypes.h"
00008 #include "DetectorDescription/Base/interface/DDutils.h"
00009 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00010 #include "DetectorDescription/Core/interface/DDSolid.h"
00011 #include "DetectorDescription/Core/interface/DDMaterial.h"
00012 #include "DetectorDescription/Core/interface/DDName.h"
00013 #include "DetectorDescription/Core/interface/DDCurrentNamespace.h"
00014 #include "DetectorDescription/Core/interface/DDSplit.h"
00015 #include "CLHEP/Units/GlobalPhysicalConstants.h"
00016 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00017 #include <CLHEP/Geometry/Point3D.h>
00018 #include <CLHEP/Geometry/Plane3D.h>
00019 #include <CLHEP/Geometry/Vector3D.h>
00020 #include <CLHEP/Geometry/Transform3D.h>
00021 #include <CLHEP/Vector/EulerAngles.h>
00022 
00023 // Define Endcap Supercrystal class
00024 
00025 class DDEcalEndcapTrap {
00026 
00027    public:
00028       DDEcalEndcapTrap( const int hand,
00029                         const double front , 
00030                         const double rear  ,
00031                         const double length  ) ;
00032 
00033       //  virtual ~DDEcalEndcapTrap();
00034 
00035       void rotate( const DDRotationMatrix rot ) ;
00036       void rotate( const DDTranslation frontCentre,
00037                    const DDTranslation rearCentre ) ;
00038       void translate( const DDTranslation trans ) ;
00039 
00040   //  void rotate();
00041 
00042       void rotateX( const double angle ) ;
00043       void rotateY( const double angle ) ;
00044       void translate();
00045       void moveto( const DDTranslation frontCentre,
00046                    const DDTranslation rearCentre  );
00047       double elevationAngle( const DDTranslation trans );
00048       double polarAngle(     const DDTranslation trans);
00049       double elevationAngle();
00050       double polarAngle();
00051       DDTranslation cornerPos( const int icorner );
00052       void cornerPos( const int           icorner ,
00053                       const DDTranslation cc)         ;
00054       DDTranslation centrePos();
00055       DDTranslation fcentrePos();
00056       DDTranslation rcentrePos();
00057       void calculateCorners();
00058       void calculateCentres();
00059       DDRotationMatrix rotation() {return m_rotation;}
00060       void print();
00061   
00062 
00063  private:
00064       DDEcalEndcapTrap(); // forbid default constructor
00065 
00066       double m_front;
00067       double m_rear;
00068       double m_length;
00069       int m_hand;
00070       DDRotationMatrix m_rotation;
00071       DDTranslation m_translation;
00072 
00073       double m_centre[4];
00074       double m_fcentre[4];
00075       double m_rcentre[4];
00076       double m_corners[25];
00077 
00078       int m_update;
00079 };
00080 
00081 #endif