CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/SimG4Core/Geometry/interface/DDG4SolidConverter.h

Go to the documentation of this file.
00001 #ifndef SimG4Core_DDG4SolidConverter_h
00002 #define SimG4Core_DDG4SolidConverter_h
00003 
00004 #include "DetectorDescription/Core/interface/DDSolidShapes.h"
00005 
00006 #include <map>
00007 #include <vector>
00008 
00009 class G4VSolid;
00010 class DDSolid;
00011 
00012 class DDG4SolidConverter
00013 {
00014 public:
00015     DDG4SolidConverter();
00016     ~DDG4SolidConverter();
00017     typedef G4VSolid * (*FNPTR) (const DDSolid &); // pointer to function
00018     G4VSolid * convert(const DDSolid &);  
00019 private:  
00020     /* foreach supported solid add a static conversion routine ,
00021        register this method in the convDispatch_-map */    
00022     static G4VSolid * box(const DDSolid &);
00023     static G4VSolid * tubs(const DDSolid &);
00024     static G4VSolid * trap(const DDSolid &);
00025     static G4VSolid * cons(const DDSolid &);
00026     static G4VSolid * reflected(const DDSolid &);
00027     static G4VSolid * unionsolid(const DDSolid &);
00028     static G4VSolid * subtraction(const DDSolid &);
00029     static G4VSolid * intersection(const DDSolid &);
00030     static G4VSolid * shapeless(const DDSolid &);
00031     static G4VSolid * polycone_rz(const DDSolid &);
00032     static G4VSolid * polycone_rrz(const DDSolid &);
00033     static G4VSolid * polyhedra_rz(const DDSolid &);
00034     static G4VSolid * polyhedra_rrz(const DDSolid &);
00035     static G4VSolid * torus(const DDSolid &);
00036     static G4VSolid * pseudotrap(const DDSolid &);
00037     static G4VSolid * trunctubs(const DDSolid &);
00038     static G4VSolid * sphere(const DDSolid &);
00039     static G4VSolid * orb(const DDSolid &);
00040     static G4VSolid * ellipsoid(const DDSolid &);
00041     static G4VSolid * ellipticaltube(const DDSolid &);
00042     static G4VSolid * para(const DDSolid &);
00043     static const std::vector<double>* par_;
00044     std::map<DDSolidShape,FNPTR> convDispatch_;
00045 };
00046 
00047 #endif