ATLASG-1478: Memory fixes in the energyCorrectionTool
This MR addresses most of the memory issues present in the energyCorrectionTool
After we bring the memory from:
==21023== definitely lost: 36,424 bytes in 831 blocks
==21023== indirectly lost: 505,904 bytes in 5,182 blocks
==21023== possibly lost: 147,456 bytes in 1,668 blocks
==21023== still reachable: 132,160,168 bytes in 158,254 blocks
==21023== suppressed: 100,673,551 bytes in 148,953 blocks
to
==15273== definitely lost: 3,035 bytes in 746 blocks
==15273== indirectly lost: 0 bytes in 0 blocks
==15273== possibly lost: 64,568 bytes in 655 blocks
==15273== still reachable: 138,507,072 bytes in 158,309 blocks
==15273== suppressed: 100,445,591 bytes in 151,531 blocks
The remaining ones are still being investigated