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

Definition at line 28 of file DDDWorld.cc.

28 {}

Member Function Documentation

const G4VPhysicalVolume* DDDWorld::GetWorldVolume ( ) const
inline

Definition at line 16 of file DDDWorld.h.

References m_world.

Referenced by RunManager::initG4().

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

Definition at line 22 of file DDDWorld.h.

References m_world.

Referenced by RunManagerMTWorker::initializeThread(), and GeometryProducer::produce().

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

Definition at line 30 of file DDDWorld.cc.

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

Definition at line 39 of file DDDWorld.cc.

Referenced by RunManagerMTWorker::initializeThread().

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

Member Data Documentation

G4VPhysicalVolume* DDDWorld::m_world
private

Definition at line 25 of file DDDWorld.h.

Referenced by GetWorldVolume(), and GetWorldVolumeForWorker().