Newer
Older
Markus Frank
committed
Geant4Converter& Geant4Converter::create(DetElement top) {
Geant4GeometryInfo& geo = this->init();
Markus Frank
committed
collect(top, geo);
// We do not have to handle defines etc.
// All positions and the like are not really named.
// Hence, start creating the G4 objects for materials, solids and log volumes.
Material mat = m_lcdd.material("Argon");
mat = m_lcdd.material("Silicon");
//m_outputLevel = WARNING;
handle(this, geo.volumes, &Geant4Converter::collectVolume);
handle(this, geo.solids, &Geant4Converter::handleSolid);
printout(m_outputLevel, "Geant4Converter", "++ Handled %ld solids.", geo.solids.size());
handleRefs(this, geo.vis, &Geant4Converter::handleVis);
printout(m_outputLevel, "Geant4Converter", "++ Handled %ld visualization attributes.", geo.vis.size());
handleMap(this, geo.limits, &Geant4Converter::handleLimitSet);
printout(m_outputLevel, "Geant4Converter", "++ Handled %ld limit sets.", geo.limits.size());
handleMap(this, geo.regions, &Geant4Converter::handleRegion);
printout(m_outputLevel, "Geant4Converter", "++ Handled %ld regions.", geo.regions.size());
handle(this, geo.volumes, &Geant4Converter::handleVolume);
printout(m_outputLevel, "Geant4Converter", "++ Handled %ld volumes.", geo.volumes.size());
handleRMap(this, *m_data, &Geant4Converter::handleAssembly);
// Now place all this stuff appropriately
handleRMap(this, *m_data, &Geant4Converter::handlePlacement);
//==================== Fields
handleProperties(m_lcdd.properties());
//handleMap(this, geo.sensitives, &Geant4Converter::printSensitive);
//handleRMap(this, *m_data, &Geant4Converter::printPlacement);
geo.setWorld(top.placement().ptr());
geo.valid = true;
printout(INFO, "Geant4Converter", "+++ Successfully converted geometry to Geant4.");
Markus Frank
committed
return *this;