CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Geometry/CaloGeometry/interface/EcalTrapezoidParameters.h

Go to the documentation of this file.
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 
00066 class EcalTrapezoidParameters
00067 {
00068       // ---------- friend classes and functions ---------------
00069    public:
00070       // ---------- constants, enums and typedefs --------------
00071 
00072       typedef std::vector<HepGeom::Point3D<double> > VertexList ;
00073 
00074       // ---------- Constructors and destructor ----------------
00075 
00076       EcalTrapezoidParameters( double aHalfLengthXNegZLoY , // bl1, A/2
00077                                double aHalfLengthXPosZLoY , // bl2, a/2
00078                                double aHalfLengthXPosZHiY , // tl2, b/2
00079                                double aHalfLengthYNegZ    , // h1,  H/2
00080                                double aHalfLengthYPosZ    , // h2,  h/2
00081                                double aHalfLengthZ        , // dz,  L/2
00082                                double aAngleAD            , // alfa1
00083                                double aCoord15X           , // x15
00084                                double aCoord15Y             // y15
00085          ) ;
00086 
00087       //virtual ~EcalTrapezoidParameters() ;
00088 
00089       // ---------- member functions ---------------------------
00090       // ---------- const member functions ---------------------
00091 
00092       // GEANT parameters, in order
00093       double dz()    const ;
00094       double theta() const ;
00095       double phi()   const ;
00096       double h1()    const ;
00097       double bl1()   const ;
00098       double tl1()   const ;
00099       double alp1()  const ;
00100       double h2()    const ;
00101       double bl2()   const ;
00102       double tl2()   const ;
00103       double alp2()  const ;
00104 
00105       // everything else
00106       double x15()   const ;
00107       double y15()   const ;
00108       double hAa()   const ;
00109       double hBb()   const ;
00110       double hCc()   const ;
00111       double hDd()   const ;
00112       double a1()    const ;
00113       double a4()    const ;
00114 
00115       double L()     const ;
00116       double a()     const ;
00117       double b()     const ;
00118       double c()     const ;
00119       double d()     const ;
00120       double h()     const ;
00121       double A()     const ;
00122       double B()     const ;
00123       double C()     const ;
00124       double D()     const ;
00125       double H()     const ;
00126 
00127       VertexList vertexList() const ; // order is as in picture above: index=vtx-1
00128 
00129       // ---------- static member functions --------------------
00130    protected:
00131       // ---------- protected member functions -----------------
00132       // ---------- protected const member functions -----------
00133    private:
00134       // ---------- Constructors and destructor ----------------
00135       EcalTrapezoidParameters();
00136       EcalTrapezoidParameters( const EcalTrapezoidParameters& ); // stop default
00137 
00138       // ---------- assignment operator(s) ---------------------
00139       const EcalTrapezoidParameters& operator=( const EcalTrapezoidParameters& ); // stop default
00140 
00141       // ---------- private member functions -------------------
00142       // ---------- private const member functions -------------
00143       // ---------- data members -------------------------------
00144 
00145       double m_dz, m_th, m_ph, m_h1, m_bl1, m_tl1, m_alp1, 
00146                                m_h2, m_bl2, m_tl2, m_alp2 ;
00147       double m_a1, m_hAa, m_x15, m_y15 ;
00148       double m_a4, m_hBb, m_hCc, m_hDd ;
00149       double m_L, m_a, m_b, m_c, m_d, m_h, m_A, m_B, m_C, m_D, m_H ;
00150 
00151       // ---------- static data members ------------------------
00152 };
00153 
00154 // inline function definitions
00155 
00156 #endif /* ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H */