#include #include #include #include #include #include #include using namespace RAT; using namespace std; void GeoSolidCollectionFactory::Construct( DBLinkPtr table, const bool checkOverlaps ) { const string name = table->GetIndex(); const vector solids = table->GetSArray( "solids" ); DB* db = DB::Get(); G4Material* material = G4Material::GetMaterial( table->GetS( "material" ) ); for( size_t iSolid = 0; iSolid < solids.size(); iSolid++ ) { G4VSolid* solid = GeoSolid::ConstructSolid( name + ::to_string( iSolid ) + "_solid", db->GetLink( "SOLID", solids[iSolid] ) ); G4LogicalVolume* logicalVolume = BuildVolume( name + ::to_string( iSolid ), table, solid, material ); PlaceVolume( name + ::to_string( iSolid ), table, logicalVolume, checkOverlaps ); } }