Well the subject says it all. I am currently using a simple fix: Was: // GetMeanFreePath() // ----------------- // G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double , G4ForceCondition* ) { const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle(); const G4Material* aMaterial = aTrack.GetMaterial(); G4double thePhotonMomentum = aParticle->GetTotalMomentum(); G4double AttenuationLength = DBL_MAX; G4bool isOutRange; if (aMaterial->GetName() == "Water") { AttenuationLength = (*thePhysicsTable)(aMaterial->GetIndex())-> GetValue(thePhotonMomentum, isOutRange); } return AttenuationLength; } Now: // GetMeanFreePath() // ----------------- // G4double G4OpRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double , G4ForceCondition* ) { const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle(); const G4Material* aMaterial = aTrack.GetMaterial(); G4double thePhotonMomentum = aParticle->GetTotalMomentum(); G4double AttenuationLength = DBL_MAX; G4bool isOutRange; if (aMaterial->GetName() == "Water") { AttenuationLength = (*thePhysicsTable)(aMaterial->GetIndex())-> GetValue(thePhotonMomentum, isOutRange); } else{ G4MaterialPropertiesTable* pt = aMaterial->GetMaterialPropertiesTable() ; if(pt){ G4MaterialPropertyVector * pv=pt->GetProperty("RAYLEIGH"); if(pv){ AttenuationLength=pv->GetProperty(thePhotonMomentum); } } } return AttenuationLength; }
Hi Peter, can you have a look? Many greetings, Hans-Peter.