Geant4 EM Physics Code Review Weekly Phone Meeting¶
Date: January 31, 2014 at 9.15 AM US CST (Fermilab local time)
Place: 1-866-740-1260 (ReadyTalk line) (Host : Krzysztof)
Soon Yung Jun
(Summary by Krzysztof)
Andrea continued his work on
G4UniversalFluctuation::SampleFluctuations. Rewrote the main loop
factorizing out constants. This made the code more clear, but did not
bring CPU improvements. Similarly with replacing the loop wit two
branches and fetching random numbers using the array interface in
vector notation: no measurable CPU benefit with slightly less readable
code this time. Based on analysis of CMS code, the loop is executed with the
control variable equal to 0 about 70% of the time (and 1 in 30% of the cases).
Andrea also reported that the modifications proposed by John containing
removal of divisions and the bug fix accepted by Laszlo brings an improvement
of about 2% (in the unit test).
In the discussion, we agreed that one should be pregenarating random
numbers when possible; We should recommend reviewing the random number
generating code, including optimizing the array interface; Boyana
suggested adding an option to fetch the inverse of the random number
as many of them are used in division operations.
Following up on the previous finding by Soon, Krzysztof reported that
per interactions with John, it does not look like
AlongStepGetPhysicalInteractionLength in G4VEnergyLossProcess in the
case of e.g. G4eBremsstrahlung is not invoked, although there were
provisions for it still in Geant4 v9.4p04; so the finding still holds.