Does MaterialPropertiesTable treat a zero value as missing?

We are using surface properties in our simulation to control reflection, absorption and transmission with our own processes. For consistency with G4, we set our own “const” parameters in a G4MaterialProperitiesTable with our own names and values.

I have discovered that DumpTable() generates annoying and misleading warning messages for the cases where we’ve set parameters with legitimate values of zero:

33: absProb

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : mat202
      issued by : G4MaterialPropertiesTable::DumpTable()
No Material Constant Property.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

34: reflProb
1
35: specProb

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : mat202
      issued by : G4MaterialPropertiesTable::DumpTable()
No Material Constant Property.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

36: absMinK

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : mat202
      issued by : G4MaterialPropertiesTable::DumpTable()
No Material Constant Property.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

37: filmThickness
0.0006
38: filmAbsorption
0.64
39: subgapAbsorption
0.375
40: gapEnergy
1.73715e-10
41: phononLifetime
0.242
42: phononLifetimeSlope
0.29
43: vSound
0.00326

The three warnings above (which more annoyingly don’t include the property name string in the message!) are misleading. The property name and value were correctly added to the table using AddConstProperty(), it just happens that for those three (“absProb”, “specProb”, and “absMinK”), the desired value is 0.

I’m seeing these warnings with G4 10.6 and 10.7, and we are not going to be moving up to G4 11 for a while (since the required changes break backward compatibility, and are far too extensive and complex to reliably support #if G4VERSION blocks).

G4MaterialPropertiesTable.cc:415 indeed checks for zero value and throws the warning:

Does MaterialPropertiesTable treat a zero value as missing?

A material constant property with value 0 should work fine. That is, when your process asks for the value, 0.0 is returned. (As far as I know.)

As you note, in version 10.7 and earlier, there is an incorrect warning message printed with DumpTable. This is corrected in version 11.

Thanks, Daren! It’s only in the DumpTable(), which is why I never noticed this before.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.