CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTrapezoidParameters.h
Go to the documentation of this file.
1 #if !defined(ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H)
2 #define ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H
3 // -*- C++ -*-
4 //
5 // Package: EcalCommonData
6 // Module: EcalTrapezoidParameters
7 //
8 // Description: Dimensionally, all you need to know about a trapezoid
9 //
10 // Usage:
11 // This class exists because there are many lengths and
12 // angles of interest in a trapezoidal polyhedron,
13 // and it makes more sense to put them in one place.
14 //
15 //
16 // Our naming convention is as follows: lower case abcdh at +Z
17 // upper case ABCDH at -Z
18 // L = full length in Z
19 // a1, a4 = angles at vertices 1,4
20 // hXx = perp distance between X, x
21 // (x15,y15) = coord of v5 wrt v1
22 // B
23 // 6____________________________________________________________________ 7
24 // \ /\ /
25 // \ | /
26 // \ hBb b /
27 // \ 2 _____\/__________________________ 3 /
28 // \ \ /\ / /
29 // \ \ | / /
30 // \ \ | / /
31 // \ \ | / /
32 // D \ d \ h / c / C Y
33 // \ \ | / / ^
34 // \ \ a1 | / / |
35 // \ \______\/__/ / |
36 // \ 1/\ a 4 / |
37 // \ | / |_____ X
38 // \ | / /
39 // \ y15=hAa / /
40 // \ | a4 / /
41 // \__\/___________/ Z (out of page)
42 // 5 | | A 8
43 // --->|x15|<----
44 //
45 //
46 // Specifying the minimal parameters for a GEANT TRAP
47 // requires 9 numbers, *NOT* 11 as used in GEANT or DDD.
48 //
49 // We choose the following 9:
50 // L/2, a/2, b/2, h/2, a1, A/2, H/2, hAa, x15
51 // In GEANT these correspond to
52 // dz, bl2, tl2, h2, -, bl1, h1, -, -
53 //
54 // Author: Brian K. Heltsley
55 // Created: Wed Aug 12 09:25:08 EDT 1998
56 // system include files
57 
58 // user include files
59 
60 #include <vector>
61 #include <CLHEP/Geometry/Point3D.h>
62 
63 // forward declarations
64 
65 
67 {
68  // ---------- friend classes and functions ---------------
69  public:
70  // ---------- constants, enums and typedefs --------------
71 
72  typedef std::vector<HepGeom::Point3D<double> > VertexList ;
73 
74  // ---------- Constructors and destructor ----------------
75 
76  EcalTrapezoidParameters( double aHalfLengthXNegZLoY , // bl1, A/2
77  double aHalfLengthXPosZLoY , // bl2, a/2
78  double aHalfLengthXPosZHiY , // tl2, b/2
79  double aHalfLengthYNegZ , // h1, H/2
80  double aHalfLengthYPosZ , // h2, h/2
81  double aHalfLengthZ , // dz, L/2
82  double aAngleAD , // alfa1
83  double aCoord15X , // x15
84  double aCoord15Y // y15
85  ) ;
86 
87  //virtual ~EcalTrapezoidParameters() ;
88 
89  // ---------- member functions ---------------------------
90  // ---------- const member functions ---------------------
91 
92  // GEANT parameters, in order
93  double dz() const ;
94  double theta() const ;
95  double phi() const ;
96  double h1() const ;
97  double bl1() const ;
98  double tl1() const ;
99  double alp1() const ;
100  double h2() const ;
101  double bl2() const ;
102  double tl2() const ;
103  double alp2() const ;
104 
105  // everything else
106  double x15() const ;
107  double y15() const ;
108  double hAa() const ;
109  double hBb() const ;
110  double hCc() const ;
111  double hDd() const ;
112  double a1() const ;
113  double a4() const ;
114 
115  double L() const ;
116  double a() const ;
117  double b() const ;
118  double c() const ;
119  double d() const ;
120  double h() const ;
121  double A() const ;
122  double B() const ;
123  double C() const ;
124  double D() const ;
125  double H() const ;
126 
127  VertexList vertexList() const ; // order is as in picture above: index=vtx-1
128 
129  // ---------- static member functions --------------------
130  protected:
131  // ---------- protected member functions -----------------
132  // ---------- protected const member functions -----------
133  private:
134  // ---------- Constructors and destructor ----------------
136  EcalTrapezoidParameters( const EcalTrapezoidParameters& ); // stop default
137 
138  // ---------- assignment operator(s) ---------------------
139  const EcalTrapezoidParameters& operator=( const EcalTrapezoidParameters& ); // stop default
140 
141  // ---------- private member functions -------------------
142  // ---------- private const member functions -------------
143  // ---------- data members -------------------------------
144 
145  double m_dz, m_th, m_ph, m_h1, m_bl1, m_tl1, m_alp1,
146  m_h2, m_bl2, m_tl2, m_alp2 ;
147  double m_a1, m_hAa, m_x15, m_y15 ;
148  double m_a4, m_hBb, m_hCc, m_hDd ;
149  double m_L, m_a, m_b, m_c, m_d, m_h, m_A, m_B, m_C, m_D, m_H ;
150 
151  // ---------- static data members ------------------------
152 };
153 
154 // inline function definitions
155 
156 #endif /* ECALCOMMONDATA_ECALTRAPEZOIDPARAMETERS_H */
std::vector< HepGeom::Point3D< double > > VertexList
const EcalTrapezoidParameters & operator=(const EcalTrapezoidParameters &)