Function RMGNavigationTools::FindPhysicalVolume¶
Function Documentation¶
-
std::set<G4VPhysicalVolume*> RMGNavigationTools::FindPhysicalVolume(std::string name, std::string copy_nr = ".*")¶
Finds physical volumes matching the given regex name and copy number.
Searches the global
G4PhysicalVolumeStorefor physical volumes whose names and copy numbers match the given regex usingstd::regex_matchwith default options. If an exact name and copy number is provided, it will return a set only consisting of the one matching physical volume.- Parameters:
name – regular expression for the physical volume name.
copy_nr – regular expression for the copy number (default is “.*” to match any copy number).
- Returns:
A set of pointers to the matching physical volumes, empty if no match is found.