CMS 3D CMS Logo

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

#include <DDDWorld.h>

Public Member Functions

 DDDWorld (const DDCompactView *pDD, const cms::DDCompactView *pDD4hep, SensitiveDetectorCatalog &, int verb, bool cuts, bool pcut)
 
 DDDWorld (const DDCompactView *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check)
 
G4VPhysicalVolume * GetWorldVolume () const
 
 ~DDDWorld ()
 

Private Attributes

G4VPhysicalVolume * m_world
 

Detailed Description

Definition at line 14 of file DDDWorld.h.

Constructor & Destructor Documentation

◆ DDDWorld() [1/2]

DDDWorld::DDDWorld ( const DDCompactView pDD,
const cms::DDCompactView pDD4hep,
SensitiveDetectorCatalog catalog,
int  verb,
bool  cuts,
bool  pcut 
)

Definition at line 23 of file DDDWorld.cc.

References cms::DDG4Builder::BuildGeometry(), DDG4Builder::BuildGeometry(), validate_alignment_devdb10_cfg::catalog, cms::DDCompactView::detector(), and cms::DDDetector::specpars().

28  {
29  LogVerbatim("SimG4CoreApplication") << "+++ DDDWorld: initialisation of Geant4 geometry";
30  if (nullptr != pDD4hep) {
31  // DD4hep
32  const cms::DDDetector *det = pDD4hep->detector();
33  dd4hep::sim::Geant4GeometryMaps::VolumeMap lvMap;
34 
35  cms::DDG4Builder theBuilder(pDD4hep, lvMap, false);
36  m_world = theBuilder.BuildGeometry(catalog);
37  LogVerbatim("SimG4CoreApplication") << "DDDWorld: DD4hep worldLV: " << m_world->GetName();
38  if (cuts) {
39  DDG4ProductionCuts pcuts(&det->specpars(), &lvMap, verb, pcut);
40  }
41  catalog.printMe();
42  } else {
43  // old DDD code
45 
46  DDG4Builder theBuilder(pDD, lvMap, false);
47  G4LogicalVolume *world = theBuilder.BuildGeometry(catalog);
48  LogVerbatim("SimG4CoreApplication") << "DDDWorld: DDD worldLV: " << world->GetName();
49  m_world = new G4PVPlacement(nullptr, G4ThreeVector(), world, "DDDWorld", nullptr, false, 0);
50  if (cuts) {
51  DDG4ProductionCuts pcuts(&lvMap, verb, pcut);
52  }
53  }
54  LogVerbatim("SimG4CoreApplication") << "DDDWorld: initialisation of Geant4 geometry is done.";
55 }
Log< level::Info, true > LogVerbatim
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
dd4hep::SpecParRegistry const & specpars() const
Definition: DDDetector.h:21

◆ DDDWorld() [2/2]

DDDWorld::DDDWorld ( const DDCompactView cpv,
G4LogicalVolumeToDDLogicalPartMap lvmap,
SensitiveDetectorCatalog catalog,
bool  check 
)

Definition at line 57 of file DDDWorld.cc.

References DDG4Builder::BuildGeometry(), validate_alignment_devdb10_cfg::catalog, and edm::check().

60  {
61  LogVerbatim("SimG4CoreApplication") << "DDDWorld: initialization of Geant4 geometry";
62  DDG4Builder theBuilder(cpv, lvmap, check);
63 
64  G4LogicalVolume *world = theBuilder.BuildGeometry(catalog);
65 
66  m_world = new G4PVPlacement(nullptr, G4ThreeVector(), world, "DDDWorld", nullptr, false, 0);
67  LogVerbatim("SimG4CoreApplication") << "DDDWorld: initialization of Geant4 geometry is done.";
68 }
Log< level::Info, true > LogVerbatim
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27

◆ ~DDDWorld()

DDDWorld::~DDDWorld ( )

Definition at line 70 of file DDDWorld.cc.

70 {}

Member Function Documentation

◆ GetWorldVolume()

G4VPhysicalVolume* DDDWorld::GetWorldVolume ( ) const
inline

Definition at line 24 of file DDDWorld.h.

References m_world.

Referenced by RunManagerMTWorker::initializeG4(), and GeometryProducer::makeGeom().

24 { return m_world; }
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27

Member Data Documentation

◆ m_world

G4VPhysicalVolume* DDDWorld::m_world
private

Definition at line 27 of file DDDWorld.h.

Referenced by GetWorldVolume().