CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDDWorld.cc
Go to the documentation of this file.
3 
6 
7 #include "G4RunManagerKernel.hh"
8 #include "G4PVPlacement.hh"
9 
10 using namespace edm;
11 
15  bool check) {
16 
17  std::auto_ptr<DDG4Builder> theBuilder(new DDG4Builder(cpv, check));
18 
19  DDGeometryReturnType ret = theBuilder->BuildGeometry();
20  G4LogicalVolume * world = ret.logicalVolume();
21 
22  m_world = new G4PVPlacement(0,G4ThreeVector(),world,"DDDWorld",0,false,0);
23  SetAsWorld(m_world);
24  map = ret.lvToDDLPMap();
25  catalog = ret.sdCatalog();
26 }
27 
29 
30 void DDDWorld::SetAsWorld(G4VPhysicalVolume * pv) {
31  G4RunManagerKernel * kernel = G4RunManagerKernel::GetRunManagerKernel();
32  if (kernel != 0) kernel->DefineWorldVolume(pv);
33  edm::LogInfo("SimG4CoreGeometry") << " World volume defined ";
34 }
35 
void SetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:30
type of data representation of DDCompactView
Definition: DDCompactView.h:77
G4LogicalVolume * logicalVolume() const
~DDDWorld()
Definition: DDDWorld.cc:28
static void check(Principal const &p, std::string const &id, edm::ModuleCallingContext const *mcc)
DDDWorld(const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check=false)
Definition: DDDWorld.cc:12
SensitiveDetectorCatalog sdCatalog() const
G4LogicalVolumeToDDLogicalPartMap lvToDDLPMap() const