I have a problem using ROOT::Math::VectorUtil. I am trying to use it in a Root Macro and I think all the right header files are loaded, because some functions of ROOT::Math::VectorUtil work, but I get error messages when I try to use the template methods. For example:

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D >* x = new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D >(1.,12.4,3.0,5.7);
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D >* y = new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D >(0.1,0.124,0.3,0.57);

double A = ROOT::Math::VectorUtil::Angle(*x, *y);

The Angle-function works fine, but:

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D > vb2 = ROOT::Math::VectorUtil::boostX(x, 0.8 );

gives me error messages that boostX is not defined in this scope.
So apparently I do not know how to use these template-functions. If anyone can give me a hand, that would be great.

Thank you,


This template function has not been defined in the dictionary, so it cannot be used in an interactive macro. If you needed I can add it there. However, if you compile your macro with ACLIC it should work,

Best Regards


Actually, looking at the “${ROOTSYS}/include/Math/GenVector/VectorUtil.h” file, I can see that all “Rotate*” and “boost*” templates are hidden from CINT.

BTW. There exist several “ROOT::Math::Boost*” classes (and a “ROOT::Math::LorentzRotation”) which are accessible from CINT so maybe you can rephrase your problem so that it uses methods that are now available for CINT (unless you want to go for an ACLiC compiled solution, in which you can use anything right now).