Skip to content
Snippets Groups Projects
Commit d08dec71 authored by Michal Kreps's avatar Michal Kreps
Browse files

Backport fix for correctly setting optical photon velocity when step size is too small

parent f0d4ec9c
Branches
No related tags found
1 merge request!91LHCb optimisations of processes with optical photons
...@@ -191,6 +191,20 @@ G4VParticleChange* G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack, ...@@ -191,6 +191,20 @@ G4VParticleChange* G4OpBoundaryProcess::PostStepDoIt(const G4Track& aTrack,
theStatus = StepTooSmall; theStatus = StepTooSmall;
if(verboseLevel > 1) if(verboseLevel > 1)
BoundaryProcessVerbose(); BoundaryProcessVerbose();
// Backport from Geant4 11.0, fixes https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2438
G4MaterialPropertyVector* groupvel = nullptr;
G4MaterialPropertiesTable* aMPT = Material2->GetMaterialPropertiesTable();
if(aMPT != nullptr)
{
groupvel = aMPT->GetProperty(kGROUPVEL);
}
if(groupvel != nullptr)
{
aParticleChange.ProposeVelocity(
groupvel->Value(thePhotonMomentum, idx_groupvel));
}
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep); return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment