CMS 3D CMS Logo

DDG4SolidConverter.h
Go to the documentation of this file.
1 #ifndef SimG4Core_DDG4SolidConverter_h
2 #define SimG4Core_DDG4SolidConverter_h
3 
5 
6 #include "G4RotationMatrix.hh"
7 
8 #include <map>
9 #include <vector>
10 
11 class G4VSolid;
12 class DDSolid;
13 
15 public:
18  typedef G4VSolid *(*FNPTR)(const DDSolid &); // pointer to function
19  G4VSolid *convert(const DDSolid &);
20 
21 private:
22  /* foreach supported solid add a static conversion routine ,
23  register this method in the convDispatch_-map */
24  static G4VSolid *box(const DDSolid &);
25  static G4VSolid *tubs(const DDSolid &);
26  static G4VSolid *cuttubs(const DDSolid &);
27  static G4VSolid *trap(const DDSolid &);
28  static G4VSolid *cons(const DDSolid &);
29  static G4VSolid *unionsolid(const DDSolid &);
30  static G4VSolid *subtraction(const DDSolid &);
31  static G4VSolid *intersection(const DDSolid &);
32  static G4VSolid *shapeless(const DDSolid &);
33  static G4VSolid *polycone_rz(const DDSolid &);
34  static G4VSolid *polycone_rrz(const DDSolid &);
35  static G4VSolid *polyhedra_rz(const DDSolid &);
36  static G4VSolid *polyhedra_rrz(const DDSolid &);
37  static G4VSolid *extrudedpolygon(const DDSolid &);
38  static G4VSolid *pseudotrap(const DDSolid &s);
39  static G4VSolid *torus(const DDSolid &);
40  static G4VSolid *trunctubs(const DDSolid &);
41  static G4VSolid *sphere(const DDSolid &);
42  static G4VSolid *ellipticaltube(const DDSolid &);
43  static const std::vector<double> *par_;
44  std::map<DDSolidShape, FNPTR> convDispatch_;
45 
46  static G4RotationMatrix *rot;
47 
48  friend class testTruncTubs;
49  friend class testPseudoTrap;
50 };
51 
52 #endif
DDSolidShapes.h
DDG4SolidConverter::polycone_rrz
static G4VSolid * polycone_rrz(const DDSolid &)
Definition: DDG4SolidConverter.cc:150
DDG4SolidConverter::cons
static G4VSolid * cons(const DDSolid &)
Definition: DDG4SolidConverter.cc:106
DDG4SolidConverter::rot
static G4RotationMatrix * rot
Definition: DDG4SolidConverter.h:46
DDG4SolidConverter::trap
static G4VSolid * trap(const DDSolid &)
Definition: DDG4SolidConverter.cc:89
DDG4SolidConverter::convDispatch_
std::map< DDSolidShape, FNPTR > convDispatch_
Definition: DDG4SolidConverter.h:44
DDG4SolidConverter::ellipticaltube
static G4VSolid * ellipticaltube(const DDSolid &)
Definition: DDG4SolidConverter.cc:502
DDG4SolidConverter::pseudotrap
static G4VSolid * pseudotrap(const DDSolid &s)
Definition: DDG4SolidConverter.cc:332
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DDG4SolidConverter::par_
static const std::vector< double > * par_
Definition: DDG4SolidConverter.h:43
DDG4SolidConverter::shapeless
static G4VSolid * shapeless(const DDSolid &)
DDG4SolidConverter::subtraction
static G4VSolid * subtraction(const DDSolid &)
Definition: DDG4SolidConverter.cc:294
DDG4SolidConverter::polycone_rz
static G4VSolid * polycone_rz(const DDSolid &)
Definition: DDG4SolidConverter.cc:119
DDG4SolidConverter::box
static G4VSolid * box(const DDSolid &)
Definition: DDG4SolidConverter.cc:59
DDG4SolidConverter::testPseudoTrap
friend class testPseudoTrap
Definition: DDG4SolidConverter.h:49
DDG4SolidConverter::DDG4SolidConverter
DDG4SolidConverter()
Definition: DDG4SolidConverter.cc:13
DDG4SolidConverter::tubs
static G4VSolid * tubs(const DDSolid &)
Definition: DDG4SolidConverter.cc:65
DDG4SolidConverter::~DDG4SolidConverter
~DDG4SolidConverter()
Definition: DDG4SolidConverter.cc:36
DDG4SolidConverter::convert
G4VSolid * convert(const DDSolid &)
Definition: DDG4SolidConverter.cc:38
DDG4SolidConverter::sphere
static G4VSolid * sphere(const DDSolid &)
Definition: DDG4SolidConverter.cc:489
DDG4SolidConverter::unionsolid
static G4VSolid * unionsolid(const DDSolid &)
Definition: DDG4SolidConverter.cc:271
DDG4SolidConverter::intersection
static G4VSolid * intersection(const DDSolid &)
Definition: DDG4SolidConverter.cc:313
DDG4SolidConverter::extrudedpolygon
static G4VSolid * extrudedpolygon(const DDSolid &)
Definition: DDG4SolidConverter.cc:241
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDG4SolidConverter::trunctubs
static G4VSolid * trunctubs(const DDSolid &)
Definition: DDG4SolidConverter.cc:408
DDG4SolidConverter::cuttubs
static G4VSolid * cuttubs(const DDSolid &)
Definition: DDG4SolidConverter.cc:76
DDG4SolidConverter::testTruncTubs
friend class testTruncTubs
Definition: DDG4SolidConverter.h:48
DDG4SolidConverter::torus
static G4VSolid * torus(const DDSolid &)
Definition: DDG4SolidConverter.cc:260
DDG4SolidConverter::polyhedra_rz
static G4VSolid * polyhedra_rz(const DDSolid &)
Definition: DDG4SolidConverter.cc:188
DDG4SolidConverter::polyhedra_rrz
static G4VSolid * polyhedra_rrz(const DDSolid &)
Definition: DDG4SolidConverter.cc:211
DDG4SolidConverter
Definition: DDG4SolidConverter.h:14