Accessing pt, eta, phi, mass directly
Each time the pt, eta, phi or mass of an object is used, a ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D > is first constructed, and the Pt(), Eta(), Phi() or M() method of that object is then called. It seems like quite an overhead.
Some work is needed to make using e.g. jet.pt
instead of jet.p4.Pt()
work for collections which have systematic variations whose p4
is recomputed on the fly.
Even if the compiler optimises it away, it would make the generated code easier to read and debug...