Disable sanity check for non-optical MaterialPropertiesTable?

In the CDMS detector response simulation, we make use of the G4CMP library, which itself makes use of a non-optical MaterialPropertiesTable to carry some information about phonon sensors. This works very well in Geant4 10.07.p04, but now we are migrating to Geant4 11.3.2 and I’m getting a job abort:

CDMSZipConstruction::AddLatticeSurfaces Zip top Zip/MaskEnvTop bottom Zip/MaskEnvBottom
 voltage 100 V
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : mat202
      issued by : G4MaterialPropertiesTable::GetConstProperty()
Constant Material Property SURFACEROUGHNESS not found.
*** Fatal Exception *** core dump ***
 **** Track information is not available at this moment
 **** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***

(the first two lines are our internal debugging output). The “SURFACEROUGHNESS” query reported in the message does not appear anywhere in the geometry builder code. I notice that in G4MaterialPropertiesIndex.hh, kSURFACEROUGHNESS is the first real entry in enum G4MaterialConstPropertyIndex.

I presume that there is some code which is “validating” the created MaterialPropertiesTable, and assuming that it is only ever used for optical properties, and never ever used by user applications or other libraries for non-optical purposes :frowning: Is there some sort of flag that we can set when we create a new MaterialPropertiesTable (or maybe when we attach it to a non-optical subclass of {{G4SurfaceProperty}}) to disable this checking?


Geant4 Version: 11.3.2
Operating System: Ubuntu 24 (via Apptainer)
Compiler/Version: GCC 13.3.0
CMake Version:

This is my own fault. In our code, I’m doing a loop over the list of known const-property names, without testing whether the given name is filled or not. That was fine in G4 10, but not in G4 11. I need to add a {{if ConstPropertyExists()} test inside my loop.

Sorry for the noise.