Function RMGOutputTools::is_within_surface_safety¶
Function Documentation¶
-
bool RMGOutputTools::is_within_surface_safety(const G4VPhysicalVolume *pv, const G4ThreeVector &position, double safety, bool is_distance_check_germanium_only = false)¶
Check if any surface is closer than a given safety distance.
More efficient than distance_to_surface when only a threshold check is needed, as it can exit early as soon as any surface is found closer than the safety.
- Parameters:
pv – The physical volume to check.
position – The position to evaluate.
safety – The safety distance threshold.
is_distance_check_germanium_only – when true, only daughters registered as Germanium detectors are considered in daughter-surface checks.
- Returns:
true if any surface (parent or daughters) is within the safety distance.