CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDSolidShapes.h
Go to the documentation of this file.
1 #ifndef DDSolidShapes_h
2 #define DDSolidShapes_h
3 
5 
17  };
18 
20 
21  static const char * name(DDSolidShape s)
22  {
23  static const char* c[] = {
24  "Solid not initialized",
25  "Box", "Tube(section)", "Trapezoid", "Cone(section)",
26  "Polycone_rz", "Polyhedra_rz",
27  "Polycone_rrz", "Polyhedra_rrz",
28  "Torus",
29  "UnionSolid", "SubtractionSolid", "IntersectionSolid",
30  "ReflectedSolid",
31  "ShapelessSolid",
32  "PseudoTrapezoid","TruncatedTube(section)",
33  "Sphere(section)", "Orb", "EllipticalTube", "Ellipsoid",
34  "Parallelepiped"
35  };
36  return c[s];
37  }
38 
39  static DDSolidShape index( const int& ind ) {
40  switch (ind) {
41  case 0:
42  return dd_not_init;
43  break;
44  case 1:
45  return ddbox;
46  break;
47  case 2:
48  return ddtubs;
49  break;
50  case 3:
51  return ddtrap;
52  break;
53  case 4:
54  return ddcons;
55  break;
56  case 5:
57  return ddpolycone_rz;
58  break;
59  case 6:
60  return ddpolyhedra_rz;
61  break;
62  case 7:
63  return ddpolycone_rrz;
64  break;
65  case 8:
66  return ddpolyhedra_rrz;
67  break;
68  case 9:
69  return ddtorus;
70  break;
71  case 10:
72  return ddunion;
73  break;
74  case 11:
75  return ddsubtraction;
76  break;
77  case 12:
78  return ddintersection;
79  break;
80  case 13:
81  return ddreflected;
82  break;
83  case 14:
84  return ddshapeless;
85  break;
86  case 15:
87  return ddpseudotrap;
88  break;
89  case 16:
90  return ddtrunctubs;
91  break;
92  case 17:
93  return ddsphere;
94  break;
95  case 18:
96  return ddorb;
97  break;
98  case 19:
99  return ddellipticaltube;
100  break;
101  case 20:
102  return ddellipsoid;
103  break;
104  case 21:
105  return ddparallelepiped;
106  break;
107  default:
108  throw cms::Exception("DDException") << "DDSolidShapes:index wrong shape";
109  break;
110  }
111  }
112 
113 };
114 
115 
116 
117 #endif
DDSolidShape
Definition: DDSolidShapes.h:6
static const char * name(DDSolidShape s)
Definition: DDSolidShapes.h:21
static DDSolidShape index(const int &ind)
Definition: DDSolidShapes.h:39