CMS 3D CMS Logo

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