For the CDMS detector simulation, we have leveraged the functionality of optical physics, especially surfaces, surface properties, and material properties, as part of our own simulation of the detector response. As such, we have, for instance, a material properties table attached to G4_Al with the following entries:
// Electronic properties of superconducting aluminum film
mpt->AddConstProperty("gapEnergy", 173.715e-6*eV); // Single QP Delta
mpt->AddConstProperty("phononLifetime", 242*ps);
mpt->AddConstProperty("phononLifetimeSlope", 0.29); // Unitless dtau/dE
mpt->AddConstProperty("vSound", 3.26*km/s);
with
G4Material* mat = ... "G4_Al" ...;
mat->SetMaterialPropertiesTable(mpt);
This has been working fine for a long time. Very recently, we added some true optical-physics support for our aluminum films, so the “mpt” code above now also includes code like
G4MaterialPropertyVector* REALR = ....;
mpt->AddProperty("REALRINDEX", REALR);
With those changes (adding regular optical properties to the same G4MaterialPropertiesTable
instance), my detector simulation jobs are now failing with
*** G4Exception : mat202
issued by : G4MaterialPropertiesTable::GetConstProperty()
Constant Material Property Index -1 not found.
*** Fatal Exception *** core dump ***
Is it not allowed to have a mix of optical and non-optical properties defined in the same table?