CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
DDDWorld Class Reference

#include <DDDWorld.h>

Public Member Functions

 DDDWorld (const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check=false)
 
const G4VPhysicalVolume * GetWorldVolume () const
 
G4VPhysicalVolume * GetWorldVolumeForWorker () const
 
 ~DDDWorld ()
 

Static Public Member Functions

static void SetAsWorld (G4VPhysicalVolume *pv)
 
static void WorkerSetAsWorld (G4VPhysicalVolume *pv)
 

Private Attributes

G4VPhysicalVolume * m_world
 

Detailed Description

Definition at line 10 of file DDDWorld.h.

Constructor & Destructor Documentation

DDDWorld::DDDWorld ( const DDCompactView cpv,
G4LogicalVolumeToDDLogicalPartMap map,
SensitiveDetectorCatalog catalog,
bool  check = false 
)

Definition at line 13 of file DDDWorld.cc.

References DDGeometryReturnType::logicalVolume(), DDGeometryReturnType::lvToDDLPMap(), and DDGeometryReturnType::sdCatalog().

16  {
17 
18  std::unique_ptr<DDG4Builder> theBuilder(new DDG4Builder(cpv, check));
19 
20  DDGeometryReturnType ret = theBuilder->BuildGeometry();
21  G4LogicalVolume * world = ret.logicalVolume();
22 
23  m_world = new G4PVPlacement(nullptr,G4ThreeVector(),world,"DDDWorld",nullptr,false,0);
25  map = ret.lvToDDLPMap();
26  catalog = ret.sdCatalog();
27 }
static void SetAsWorld(G4VPhysicalVolume *pv)
Definition: DDDWorld.cc:31
G4LogicalVolume * logicalVolume() const
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
SensitiveDetectorCatalog sdCatalog() const
G4LogicalVolumeToDDLogicalPartMap lvToDDLPMap() const
def check(config)
Definition: trackerTree.py:14
DDDWorld::~DDDWorld ( )

Definition at line 29 of file DDDWorld.cc.

29 {}

Member Function Documentation

const G4VPhysicalVolume* DDDWorld::GetWorldVolume ( ) const
inline

Definition at line 18 of file DDDWorld.h.

References m_world.

Referenced by RunManager::initG4().

18 { return m_world; }
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
G4VPhysicalVolume* DDDWorld::GetWorldVolumeForWorker ( ) const
inline

Definition at line 24 of file DDDWorld.h.

References m_world.

Referenced by RunManagerMTWorker::initializeThread().

24 { return m_world; }
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
void DDDWorld::SetAsWorld ( G4VPhysicalVolume *  pv)
static

Definition at line 31 of file DDDWorld.cc.

31  {
32  G4RunManagerKernel * kernel = G4RunManagerKernel::GetRunManagerKernel();
33  if(kernel) kernel->DefineWorldVolume(pv);
34  else edm::LogError("SimG4CoreGeometry") << "No G4RunManagerKernel?";
35  edm::LogInfo("SimG4CoreGeometry") << " World volume defined ";
36 }
def pv(vc)
Definition: MetAnalyzer.py:6
void DDDWorld::WorkerSetAsWorld ( G4VPhysicalVolume *  pv)
static

Definition at line 38 of file DDDWorld.cc.

Referenced by RunManagerMTWorker::initializeThread().

38  {
39  G4RunManagerKernel * kernel = G4RunManagerKernel::GetRunManagerKernel();
40  if(kernel) {
41  kernel->WorkerDefineWorldVolume(pv);
42  // The following does not get done in WorkerDefineWorldVolume()
43  // because we don't use G4MTRunManager
44  G4TransportationManager* transM = G4TransportationManager::GetTransportationManager();
45  transM->SetWorldForTracking(pv);
46  }
47  else edm::LogError("SimG4CoreGeometry") << "No G4RunManagerKernel?";
48  edm::LogInfo("SimG4CoreGeometry") << " World volume defined (for worker) ";
49 }
def pv(vc)
Definition: MetAnalyzer.py:6

Member Data Documentation

G4VPhysicalVolume* DDDWorld::m_world
private

Definition at line 27 of file DDDWorld.h.

Referenced by GetWorldVolume(), and GetWorldVolumeForWorker().