Problem 2056

Summary: Cerenkov and scintillation GetNumPhotons() incorrect
Product: Geant4 Reporter: Daren Sawkey <daren.sawkey>
Component: processes/opticalAssignee: Daren Sawkey <daren.sawkey>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 10.4   
Hardware: All   
OS: All   

Description Daren Sawkey 2018-04-11 23:44:49 CEST
The G4Cerenkov and G4Scintillation processes have methods GetNumPhotons() that return the number of optical photons created in a step. When crossing from a material in which optical photons are produced to a material in which they are not, this value is not reset to 0.

It appears that for G4Scintillation, setting fNumPhotons to 0 at the beginning of PostStepDoIt() solves the problem. It's not yet clear to me what happens with G4Cerenkov.
Comment 1 Daren Sawkey 2018-09-20 18:36:53 CEST
Fixed.