I use ROOT 5.22.
I am trying to copy a TTree applying a selection using the method TTree::CopyTree.
The string parsing of the selection works perfectly, but i cannot use for example the functions present in the ROOT::Math::VectorUtils namespace and i get a “Error in TTreeFormula::Compile: Bad numerical expression”.
Currently TTreeFormula (and hence TTree::Draw) can only use function and member functions that takes simple numerical object (i.e. no pointer to or reference to objects).
thanks for your fast feedback.
Indeed, I am interested in the function ROOT::Math::VectorUtil::Phi_mpi_pi, whose signature is double Phi_mpi_pi(double phi).
I think that my problem lies in the way in which I call the symbol and not in the arguments.
What do you think?
thank you for the hint: it works fine now.
As a side remark, for a compiled C++ program, I managed to exploit this namespace including the header math/GenVector.h and adding a -l GenVector to the gcc command line.