00001 #if !defined(ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H) 00002 #define ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H 00003 // -*- C++ -*- 00004 // 00005 // Package: EcalCommonData 00006 // Module: EcalTrapezoidParameters 00007 // 00008 // Description: Dimensionally, all you need to know about a trapezoid 00009 // 00010 // Usage: 00011 // This class exists because there are many lengths and 00012 // angles of interest in a trapezoidal polyhedron, 00013 // and it makes more sense to put them in one place. 00014 // 00015 // 00016 // Our naming convention is as follows: lower case abcdh at +Z 00017 // upper case ABCDH at -Z 00018 // L = full length in Z 00019 // a1, a4 = angles at vertices 1,4 00020 // hXx = perp distance between X, x 00021 // (x15,y15) = coord of v5 wrt v1 00022 // B 00023 // 6____________________________________________________________________ 7 00024 // \ /\ / 00025 // \ | / 00026 // \ hBb b / 00027 // \ 2 _____\/__________________________ 3 / 00028 // \ \ /\ / / 00029 // \ \ | / / 00030 // \ \ | / / 00031 // \ \ | / / 00032 // D \ d \ h / c / C Y 00033 // \ \ | / / ^ 00034 // \ \ a1 | / / | 00035 // \ \______\/__/ / | 00036 // \ 1/\ a 4 / | 00037 // \ | / |_____ X 00038 // \ | / / 00039 // \ y15=hAa / / 00040 // \ | a4 / / 00041 // \__\/___________/ Z (out of page) 00042 // 5 | | A 8 00043 // --->|x15|<---- 00044 // 00045 // 00046 // Specifying the minimal parameters for a GEANT TRAP 00047 // requires 9 numbers, *NOT* 11 as used in GEANT or DDD. 00048 // 00049 // We choose the following 9: 00050 // L/2, a/2, b/2, h/2, a1, A/2, H/2, hAa, x15 00051 // In GEANT these correspond to 00052 // dz, bl2, tl2, h2, -, bl1, h1, -, - 00053 // 00054 // Author: Brian K. Heltsley 00055 // Created: Wed Aug 12 09:25:08 EDT 1998 00056 // system include files 00057 00058 // user include files 00059 00060 #include <vector> 00061 #include <CLHEP/Geometry/Point3D.h> 00062 00063 // forward declarations 00064 00065 template class std::vector<HepPoint3D> ; 00066 00067 class EcalTrapezoidParameters 00068 { 00069 // ---------- friend classes and functions --------------- 00070 public: 00071 // ---------- constants, enums and typedefs -------------- 00072 00073 typedef std::vector<HepPoint3D> VertexList ; 00074 00075 // ---------- Constructors and destructor ---------------- 00076 00077 EcalTrapezoidParameters( double aHalfLengthXNegZLoY , // bl1, A/2 00078 double aHalfLengthXPosZLoY , // bl2, a/2 00079 double aHalfLengthXPosZHiY , // tl2, b/2 00080 double aHalfLengthYNegZ , // h1, H/2 00081 double aHalfLengthYPosZ , // h2, h/2 00082 double aHalfLengthZ , // dz, L/2 00083 double aAngleAD , // alfa1 00084 double aCoord15X , // x15 00085 double aCoord15Y // y15 00086 ) ; 00087 00088 //virtual ~EcalTrapezoidParameters() ; 00089 00090 // ---------- member functions --------------------------- 00091 // ---------- const member functions --------------------- 00092 00093 // GEANT parameters, in order 00094 double dz() const ; 00095 double theta() const ; 00096 double phi() const ; 00097 double h1() const ; 00098 double bl1() const ; 00099 double tl1() const ; 00100 double alp1() const ; 00101 double h2() const ; 00102 double bl2() const ; 00103 double tl2() const ; 00104 double alp2() const ; 00105 00106 // everything else 00107 double x15() const ; 00108 double y15() const ; 00109 double hAa() const ; 00110 double hBb() const ; 00111 double hCc() const ; 00112 double hDd() const ; 00113 double a1() const ; 00114 double a4() const ; 00115 00116 double L() const ; 00117 double a() const ; 00118 double b() const ; 00119 double c() const ; 00120 double d() const ; 00121 double h() const ; 00122 double A() const ; 00123 double B() const ; 00124 double C() const ; 00125 double D() const ; 00126 double H() const ; 00127 00128 VertexList vertexList() const ; // order is as in picture above: index=vtx-1 00129 00130 // ---------- static member functions -------------------- 00131 protected: 00132 // ---------- protected member functions ----------------- 00133 // ---------- protected const member functions ----------- 00134 private: 00135 // ---------- Constructors and destructor ---------------- 00136 EcalTrapezoidParameters(); 00137 EcalTrapezoidParameters( const EcalTrapezoidParameters& ); // stop default 00138 00139 // ---------- assignment operator(s) --------------------- 00140 const EcalTrapezoidParameters& operator=( const EcalTrapezoidParameters& ); // stop default 00141 00142 // ---------- private member functions ------------------- 00143 // ---------- private const member functions ------------- 00144 // ---------- data members ------------------------------- 00145 00146 double m_dz, m_th, m_ph, m_h1, m_bl1, m_tl1, m_alp1, 00147 m_h2, m_bl2, m_tl2, m_alp2 ; 00148 double m_a1, m_hAa, m_x15, m_y15 ; 00149 double m_a4, m_hBb, m_hCc, m_hDd ; 00150 double m_L, m_a, m_b, m_c, m_d, m_h, m_A, m_B, m_C, m_D, m_H ; 00151 00152 // ---------- static data members ------------------------ 00153 }; 00154 00155 // inline function definitions 00156 00157 #endif /* ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H */