CaloTowers speedup (rebase of #1404)

This is a rebase of #1404 by @VinInn. I cleaned up the history as requested by @slava77 and removed one auto statement, to avoid deliberately breaking PFRootEvent. PFRootEvent itself, as agreed (I think) still will be moved out from release, but will not be deliberately broken.