![]() |
Advanced Programming Concepts 2014 23-27 June 2014 MPI Munich, Germany School web site Refactoring session web page |
geant4.10.00.p01 |
contains Geant4 code, version 10.0-patch01 |
work10APC | contains Geant4 libraries (precompiled on SL6 with gcc 4.4.7) and the test executables you will create in the exercise |
parametersAPC | contains "original" and "improved" Aij parameters for the calculation of photoelectric cross sections |
dataAPC | contains experimental data for validation; you will place the cross sections calculated by the test here |
test | contains the test code to be used in the refactoring process |
rwork | contains R scripts for data analysis |
setup10APC.csh setup10APC.sh |
defines some environmental variables needed for the test |
![]() |
We could investigate the use
of some of the techniques described in the
book "Working Effectively with Legacy Code" to make the calculation of
the photoelectric cross section testable. As physicists, we perceive a "bad smell": we want to be able to know the cross sections used in our simulation and to compare them with experimental data without creating unnecessary objects that have no relation with a cross section. We decide to refactor (reengineer) the code and make the photoelectric cross section testable. |