The Cerenkov process causes run time crash when material is defined with RINDEX values = 1.0. (We use the same material definitions for G3 and G4 simulation - in G3 these values are allowed.) The crash happens when GetMaxValue() is called on empty G4PhysicsOrderedFreeVector. I reproduced the problem in example N06 - I've put modified ExN06DetectorConstruction.cc and G4Cerenkov.cc with a possible fix (see below) in /afs/cern.ch/user/i/ivana/public/g4cerenkov. The fix can be done in G4Cerenkov::GetAverageNumberOfPhotons(..) { // .. skipped // Check if CerenkovAngleIntegrals is not empty G4int vecLength = CerenkovAngleIntegrals->GetVectorLength(); // Max Cerenkov Angle Integral G4double CAImax; if (vecLength) CAImax = CerenkovAngleIntegrals->GetMaxValue(); G4double dp, ge; // If n(Pmax) < 1/Beta -- no photons generated if (nMax < BetaInverse || !(vecLength)) { dp = 0; ge = 0; } // .. skipped }
Problem was fixed at/around Nov. 12 2000 by adding a check on: CerenkovAngleIntegrals->IsFilledVectorExist() in method GetAverageNumberOfPhotons and return ZERO when not filled.