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 *, G4LogicalVolumeToDDLogicalPartMap &, SensitiveDetectorCatalog &, bool check)
 
 DDDWorld (const DDCompactView *pDD, const cms::DDCompactView *pDD4hep, SensitiveDetectorCatalog &, int verb, bool cuts, bool pcut)
 
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.

28  {
29  LogVerbatim("SimG4CoreApplication") << "+++ DDDWorld: initialisation of Geant4 geometry";
30  if (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: worldLV: " << m_world->GetName();
38  if (cuts) {
39  DDG4ProductionCuts pcuts(&det->specpars(), &lvMap, verb, pcut);
40  }
41  catalog.printMe();
42  } else {
43  // old DD code
45 
46  DDG4Builder theBuilder(pDD, lvMap, false);
47  G4LogicalVolume *world = theBuilder.BuildGeometry(catalog);
48  LogVerbatim("SimG4CoreApplication") << "DDDWorld: 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 }

References cms::DDG4Builder::BuildGeometry(), DDG4Builder::BuildGeometry(), getEcalConditions_orcoffint2r_cff::catalog, L1TMuonDQMOffline_cfi::cuts, cms::DDCompactView::detector(), and cms::DDDetector::specpars().

◆ DDDWorld() [2/2]

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

Definition at line 57 of file DDDWorld.cc.

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 }

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

◆ ~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.

24 { return m_world; }

References m_world.

Referenced by RunManager::initG4(), RunManagerMTWorker::initializeG4(), and GeometryProducer::produce().

Member Data Documentation

◆ m_world

G4VPhysicalVolume* DDDWorld::m_world
private

Definition at line 27 of file DDDWorld.h.

Referenced by GetWorldVolume().

cms::DDDetector::specpars
dd4hep::SpecParRegistry const & specpars() const
Definition: DDDetector.h:21
getEcalConditions_orcoffint2r_cff.catalog
catalog
Definition: getEcalConditions_orcoffint2r_cff.py:40
DDMapper< G4LogicalVolume *, DDLogicalPart >
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
DDDWorld::m_world
G4VPhysicalVolume * m_world
Definition: DDDWorld.h:27
DDG4ProductionCuts
Definition: DDG4ProductionCuts.h:15
cms::DDG4Builder
Definition: DD4hep_DDG4Builder.h:23
DDG4Builder
Definition: DDG4Builder.h:23
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
cms::DDDetector
Definition: DDDetector.h:12
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
cms::DDCompactView::detector
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34