Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpWLS.cc,v 1.8 2006/06/29 21:08:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4OpWLS.cc,v 1.9 2007/10/30 03:53:36 gum Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Optical Photon WaveLength Shifting (WLS) Class Implementation
|
||||
@@ -120,6 +120,25 @@ G4OpWLS::PostStepDoIt(const G4Track& aTrack, const G4Step& aStep)
|
||||
|
||||
G4int NumPhotons = 1;
|
||||
|
||||
if (aMaterialPropertiesTable->ConstPropertyExists("WLSMEANNUMBERPHOTONS")) {
|
||||
|
||||
G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
|
||||
GetConstProperty("WLSMEANNUMBERPHOTONS");
|
||||
|
||||
NumPhotons = G4int(G4Poisson(MeanNumberOfPhotons));
|
||||
|
||||
if (NumPhotons <= 0) {
|
||||
|
||||
// return unchanged particle and no secondaries
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
|
||||
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
aParticleChange.SetNumberOfSecondaries(NumPhotons);
|
||||
|
||||
G4int materialIndex = aMaterial->GetIndex();
|
||||
|
||||
Reference in New Issue
Block a user