diff --git a/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx b/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx index 3e97ae23600afe0426ec99427236e4f6ce62a528..b6b1d0f9a233c1852b14e69898016d0bfbcbec8c 100644 --- a/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx +++ b/GeoModelVisualization/VP1GeometrySystems/src/VP1GeometrySystem.cxx @@ -1126,11 +1126,17 @@ double VP1GeometrySystem::Imp::inclusiveMass(const PVConstLink& pv) { GeoVolumeCursor av(pv); while (!av.atEnd()) { - mass += inclusiveMass(av.getVolume()); - mass -= volume(av.getVolume())*density; + std::string materialName=av.getVolume()->getLogVol()->getMaterial()->getName(); + + if (QString(materialName.c_str()).endsWith("Ether") || QString(materialName.c_str()).endsWith("HyperUranium")) { + // Do nothing. These are not real volumes. + } + else { + double delta = inclusiveMass(av.getVolume()) - (volume(av.getVolume())*density); + mass += delta; + } av.next(); } - return mass; } diff --git a/GeoModelVisualization/VP1GeometrySystems/src/settings_interactions_form.ui b/GeoModelVisualization/VP1GeometrySystems/src/settings_interactions_form.ui index 7ebd63257a292f3e7c4792101c2f59e044a80359..16ab476e81a2b8f3bcc070df28f4b14164033208 100644 --- a/GeoModelVisualization/VP1GeometrySystems/src/settings_interactions_form.ui +++ b/GeoModelVisualization/VP1GeometrySystems/src/settings_interactions_form.ui @@ -77,7 +77,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the case where either the selected volume or one its daugthers (or daughters daughters, etc.), is defined as a boolean volume, this might not give an entirely accurate result.</p></body></html></string> </property> <property name="text"> - <string>Mass (unreliable)</string> + <string>Mass (slow!)</string> </property> </widget> </item>