Suggestions by Cristiano
Taken from https://indico.cern.ch/event/1397617/#preview:4945616:
https://git.km3net.de/opensource/gseagen/-/blob/master/src/tools/gGeometry/gPlotGeo.C?ref_type=heads
non-uniform code style (spacing)
commented line 103
string constants repeated, better check on pointers
The syntax is not derived from string constants
avoid calls to system ("rm... or wrap them
Syntax not derived from string constants, large commented block
Line 295 mistyped comment
avoid calls to system ("rm... or wrap them
Syntax not derived from string constants, large commented block
string constants repeated
The syntax is not derived from string constants
Repeated calls to trigonometric functions
string constants repeated
https://git.km3net.de/opensource/gseagen/-/blob/master/src/tools/SeaNuDrivers/GAstro.cxx?ref_type=heads, https://git.km3net.de/opensource/gseagen/-/blob/master/src/tools/SeaNuDrivers/GAstro.h?ref_type=heads
why not replace pointers with references?
string constants repeated
non-uniform spacing style
https://git.km3net.de/opensource/gseagen/-/blob/master/src/tools/SeaNuDrivers/GGenerateEvent.cxx
avoid calls to system
special handling should be taken out of the method and placed in an isolated method call
Line 309, Br80 if(AtomicMass.find(1000350800) == AtomicMass.end()){ AtomicMass.insert(map<int, double>::value_type(1000350800,79.9185293)); ElementName.insert(map<int, string>::value_type(1000350800,"Br")); }
Lines 454-456 repeated fGenPar->RhoSR * MassFrac[iComp]
PropagationTau: line 1289 why not put tau mass explicitly? (but the comment is OK)
DistToCan: the computation could be optimized by avoiding repeated multiplications. Difficult to follow the implementation without a geometrical sketch.
WriteTracks: use switch instead of if chain