Hello All!
I am making some cuts based on variables stored in a NTuple.
I pass the TNtuple to a function which takes it as TNtuple * in.
In the function:
_input = (TNtuple *) in->CloneTree();
formula = tmp.c_str();
where tmp is passed in from a script
TSQLResult * q = _input->Query(formula, _1dselection);
in _1dselection are several requirements of the branches of the NTuple, no problem there. IN formula I have
max(fabs(lep1eta),fabs(lep2eta))
and I get the error
Error in TTreeFormula::Compile: Bad numerical expression : “fabs(lep1eta)”
what is wrong. I have TMath.h header!
There is a lot of passing and pointing going on here so I have no idea if that is the problem and I have not been too explicit about that, but I thought the solution might be obvious to some; my questions usually have simple solutions.
Thanks,
gabe