DDSolidShape

DDSolidShapesName

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
#ifndef DETECTOR_DESCRIPTION_CORE_DD_SOLID_SHAPES_H
#define DETECTOR_DESCRIPTION_CORE_DD_SOLID_SHAPES_H

#include <iosfwd>

enum class DDSolidShape {
  dd_not_init = 0,
  ddbox = 1,
  ddtubs = 2,
  ddtrap = 3,
  ddcons = 4,
  ddpolycone_rz = 5,
  ddpolyhedra_rz = 6,
  ddpolycone_rrz = 7,
  ddpolyhedra_rrz = 8,
  ddtorus = 9,
  ddunion = 10,
  ddsubtraction = 11,
  ddintersection = 12,
  ddshapeless = 13,
  ddpseudotrap = 14,
  ddtrunctubs = 15,
  ddsphere = 16,
  ddellipticaltube = 17,
  ddcuttubs = 18,
  ddextrudedpolygon = 19,
  ddassembly = 20,
};

std::ostream& operator<<(std::ostream& os, const DDSolidShape s);

struct DDSolidShapesName {
  static const char* const name(DDSolidShape s) {
    static const char* const _names[] = {"Solid not initialized",
                                         "Box",
                                         "Tube(section)",
                                         "Trapezoid",
                                         "Cone(section)",
                                         "Polycone_rz",
                                         "Polyhedra_rz",
                                         "Polycone_rrz",
                                         "Polyhedra_rrz",
                                         "Torus",
                                         "UnionSolid",
                                         "SubtractionSolid",
                                         "IntersectionSolid",
                                         "ShapelessSolid",
                                         "PseudoTrapezoid",
                                         "TruncatedTube(section)",
                                         "Sphere(section)",
                                         "EllipticalTube",
                                         "CutTubs",
                                         "ExtrudedPolygon",
                                         "Assembly"};

    return _names[static_cast<int>(s)];
  }
};

#endif