Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:22

0001 #ifndef SimG4Core_DDG4Builder_h
0002 #define SimG4Core_DDG4Builder_h
0003 
0004 #include "SimG4Core/Geometry/interface/DDG4DispContainer.h"
0005 #include "SimG4Core/Geometry/interface/G4LogicalVolumeToDDLogicalPartMap.h"
0006 
0007 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0008 #include "DetectorDescription/Core/interface/DDMaterial.h"
0009 #include "DetectorDescription/Core/interface/DDSolid.h"
0010 
0011 #include <map>
0012 #include <string>
0013 #include <vector>
0014 
0015 class DDG4SolidConverter;
0016 class G4LogicalVolume;
0017 class G4VPhysicalVolume;
0018 class G4Material;
0019 class G4VSolid;
0020 class DDCompactView;
0021 class SensitiveDetectorCatalog;
0022 
0023 class DDG4Builder {
0024 public:
0025   DDG4Builder(const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, bool check);
0026   ~DDG4Builder();
0027   G4LogicalVolume *BuildGeometry(SensitiveDetectorCatalog &);
0028 
0029 private:
0030   G4VSolid *convertSolid(const DDSolid &dSolid);
0031   G4LogicalVolume *convertLV(const DDLogicalPart &dLogical);
0032   G4Material *convertMaterial(const DDMaterial &dMaterial);
0033   int getInt(const std::string &s, const DDLogicalPart &dLogical);
0034   double getDouble(const std::string &s, const DDLogicalPart &dLogical);
0035 
0036   DDG4SolidConverter *solidConverter_;
0037   std::map<DDMaterial, G4Material *> mats_;
0038   std::map<DDSolid, G4VSolid *> sols_;
0039   std::map<DDLogicalPart, G4LogicalVolume *> logs_;
0040 
0041   const DDCompactView *compactView_;
0042   G4LogicalVolumeToDDLogicalPartMap &map_;
0043   DDG4DispContainer *theVectorOfDDG4Dispatchables_;
0044   bool check_;
0045 };
0046 
0047 #endif