Geant4 EM Physics Code Review Weekly Phone Meeting¶
Date: December 13, 2013 at 10.00 AM US CDT (Fermilab local time)
Place: 1-866-740-1260 (ReadyTalk line) (Host : Krzysztof)
Soon Yung Jun
(Summary by Krzysztof)
Soon has profiled Geant4 10, here is the link to the top page:
(the csv files are "siblings" to the "leaf count" pages: prof_big_functions_leaf_count_list_01.html pages)
Krzysztof and Soon looked at the G4UrbanMscModel code and some simple profiler call
graphs related to 50 GeV electrons trying to understand where the cache misses may
occur and where the CPU may be consumed the most.
The top functions are:
|G4UrbanMscModel::ComputeTruePathLengthLimit(G4Track const&, double&)||0.0110354|
|G4UrbanMscModel::SampleScattering(CLHEP::Hep3Vector const&, double)||0.0044305|
G4PhysicsVector::Value() is called quite often according to the call graphs
although not present in the class code itself.
(G4UrbanMscModel inherits from G4VMscModel which is a G4VEmModel)
G4UrbanMscModel::ComputeTruePathLengthLimit with called by it ComputeGeomPathLength contribute
about 20% of time spent in G4PhysicsVector::Value()
We also noted calls to CLHEP::MTwistEngine::flat()
Several smaller functions
void G4UrbanMscModel::StartTracking(G4Track* track)
G4double G4UrbanMscModel::SimpleScattering(G4double xmeanth,G4double x2meanth)
may be candidates for inlining
(a side comment: given the large fraction of time spent in G4PhysicsVector::Value() of 6-9%
it may be worth revisiting the helper class G4xyd mentioned at
Krzysztof will continue to look at G4UrbanMscModel and related classes.
Soon will look at G4VMultipleScatteringProcess classes.
Next meeting: December 20th