GENIEMC/GENIE_2_8 — pull request #28 by bcoopers (2014-10-27 15:51:26+00:00)
Title: Changes suggested in code review

Addressing Costas's issues first (the red from the PDF):

> Lots and lots of hardcoded numbers would make reweighing this model impossible.
Numbers no longer hardcoded. Everything moved to config files.

> ...Seems unlikely that Getf1p1h Getf1p1h is all that is needed by that more complex set of models.
Interface no longer exists. Now an enum specifying which interaction type to use.

> The classes with an `I' at the end of their names are pure abstract interface class and should have no implementation.
No more implementation in these classes.

> ...The BBA03, BBA05 and BBA07 form factors models should not be modified
These classes are no longer modified.

> ... setup a new class (deriving from ELFormFactorsModelI) which is a composite one and contains an instance of the original BBA?? model as a private data member.
Done.

> ... Why is there a separate UseTransverseEnhancement flag that we need to turn on if we use genie::EffectiveSF/Default
Resolved in the meeting. These are two separate and independent models which can be turned on separately- indeed TE has been used independently of ESF for some time. No action taken.

Addressing specific comments from the meeting (paraphrased):

> Add comments in front of all methods/functions
Done.

> Generalize Transverse Enhancement in case of updated nucleus dependent models. Remove arbitrary hard-coded A>=12 checks from before.
Done. A new config file is sufficient for new parameterizations of any and all nuclei as long as they take the same functional form.

> Make constants equivalent to those appearing in paper (ie too many decimal places in my original code)
Done.

> Don't log the momentum picked from the momentum distribution every time it is selected in INFO. Move to DEBUG.
Done.

> Include example and references to papers in config files.
Done. Since all constants are moved to config files these serve as good examples.

Other changes:

FermiMover.cxx has been cleaned up considerably. Emit2ndNucleonFromSrc is called only if a second nucleon is to be emitted- the complicated logic from before has been moved to the individual model calculations of EN where they make more sense.

Added a utility file to parse and read Pdg dependent values from log files. Since TE and ESF both make use of such values this seemed useful to prevent code duplication.

Added the possibility to turn off recoiling nucleons for ESF, as was done in FGMBodekRitchie.

Things not changed:

> Memory leak in EffectiveSF.cxx
I wasn't looking closely. All my memory is cleaned up in the destructor of the class. I do not think the memory leak is originating from my changes.

> Pauli blocking?
Pauli blocking is independent of the model, since superscaling knows nothing about Pauli blocking, and it must be applied separately. Arie thinks that something more sophisticated should be used (he recommended Paschos) but it is not related to the superscaling changes.