00001 #ifndef SimG4Core_DDG4Builder_h 00002 #define SimG4Core_DDG4Builder_h 00003 00004 #include "SimG4Core/Geometry/interface/DDGeometryReturnType.h" 00005 #include "SimG4Core/Notification/interface/DDG4DispContainer.h" 00006 00007 #include "DetectorDescription/Core/interface/DDLogicalPart.h" 00008 #include "DetectorDescription/Core/interface/DDMaterial.h" 00009 #include "DetectorDescription/Core/interface/DDSolid.h" 00010 00011 #include <map> 00012 #include <vector> 00013 #include <string> 00014 00015 #include "boost/signals.hpp" 00016 00017 struct DDPosData; 00018 class DDG4SolidConverter; 00019 class G4LogicalVolume; 00020 class G4VPhysicalVolume; 00021 class G4Material; 00022 class G4VSolid; 00023 class DDCompactView; 00024 00025 class DDG4Builder { 00026 00027 public: 00028 DDG4Builder(const DDCompactView*, bool check=false); 00029 ~DDG4Builder(); 00030 DDGeometryReturnType BuildGeometry(); 00031 static DDG4DispContainer * theVectorOfDDG4Dispatchables(); 00032 00033 protected: 00034 G4VSolid * convertSolid(const DDSolid & dSolid); 00035 G4LogicalVolume * convertLV(const DDLogicalPart & dLogical); 00036 G4Material * convertMaterial(const DDMaterial & dMaterial); 00037 int getInt(const std::string & s, const DDLogicalPart & dLogical); 00038 double getDouble(const std::string & s, const DDLogicalPart & dLogical); 00039 00040 protected: 00041 DDG4SolidConverter* solidConverter_; 00042 std::map<DDMaterial,G4Material*> mats_; 00043 std::map<DDSolid,G4VSolid*> sols_; 00044 std::map<DDLogicalPart,G4LogicalVolume*> logs_; 00045 00046 private: 00047 const DDCompactView* compactView; 00048 static DDG4DispContainer* theVectorOfDDG4Dispatchables_; 00049 G4LogicalVolumeToDDLogicalPartMap map_; 00050 bool check_; 00051 }; 00052 00053 #endif