Use reco::formulaEvaluator instead of TFormula? #17
Replies: 3 comments 6 replies
-
Good point. I was thinking about the consistency of JSON-format evaluator and the CMSSW-code in that context as well. There were some issues in the past with reco::formulaEvaluator not giving the same result as TFormula, e.g. cms-sw/cmssw#21851 |
Beta Was this translation helpful? Give feedback.
-
Let me paste the readme section here for convenience:
At least that answers the question I had in https://github.com/nsmith-/correctionlib/blob/51331ef9f101ede5ba830fc0fab3756c7030432f/src/correction.cc#L65 so indeed now there are at least three reasons to drop TFormula:
It would be interesting to know how fast |
Beta Was this translation helpful? Give feedback.
-
This project looks promising: https://github.com/yhirose/cpp-peglib |
Beta Was this translation helpful? Give feedback.
-
From what I understood in CMSSW the
reco::formulaEvaluator
(from cms-sw/cmssw#11516 ) is preferred because it is thread-safe and faster than TFormula, and it's easy to include (almost standalone, and minimal public interface), so it may also be the better choice here (I'm using it in bamboo because the jet corrector classes rely on it, so I can prepare a PR - in the long run it may be worth asking for it to be released outside CMSSW if this option is taken).Beta Was this translation helpful? Give feedback.
All reactions