CMS 3D CMS Logo

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