LArG4::EC::EnergyCalculator review, stage 1
Review of the LArG4::EC::EnergyCalculator
class started.
LArG4::EC::EnergyCalculator
class is bloated (more than 100Kb in a single .cc file, the header being about 20Kb), contains lots of weakly related data, and should be reviewed. The review would make easier further class development in anticipation of HiLum runs and also could result in performance improvements. The first stage of review includes:
- High voltage-related code was extracted from
EnergyCalculator
to a separateHVHelper
class. - Gap adjustment-related code was moved to a separate file.
- Barrette-related code was moved to a separate file.
- Some static data and functions became
EnergyCalculator
members.
The merge request contains no significant changes of algorithms and thus should reproduce the old behavior, excluding INFO printout, which was slightly reduced and was made more informative and correct.
Further steps of the review should include:
- Extract fieldmap-related code to a separate class (similar to HV stuff).
- Extract barrette-related code to a separate class, probably derivative from
EnergyCalculator
. - Check if any other parts of
EnergyCalculator
could also be separated. - Pay some attention to performance optimization.
Edited by Andrei Sukharev