I propose to add a new class to ROOT that implements the Linear Template Fit as described in Eur.Phys.J.C 82 (2022) 731 [arXiv:2112.01548].

The Linear Template Fit is an analytic expression for a maximum likelihood estimator in a uni- or multi-variate parameter estimation problem. It combines a linear regression with the analytic solution of a least squares expression. The best estimator is then just obtained from a simple matrix equation. The full implementation provides comprehensive opportunities for error propagation and cross checks, and also the Quadratic Template Fit.

The algorithm can be used for precision phenomenology, like the determination of the strong coupling constant (as in the paper), for top-quark mass determinations (CMS), or multivariate problems in performance critical cases, like MC tuning. Many more applications are thinkable. The Linear Template Fit offers the very unique opportunity for statistical inference with just a very minimal set of reference predictions, namely just *n+1* for *n* free parameters, and it is therefore optimally suited for performance critical applications.

Thus, I believe, the algorithm would be useful for a broader community and would nicely complement the set of other statistics tools in ROOT.

There is a C++ implementation available on github, which has an interface to TH1D’s but uses EIGEN for matrix calculations.

For the ROOT implementation, I would suggest to re-implement the algorithm, using native ROOT linear algebra classes, and with a more user-friendly and ROOT-like user interface, and add some tutorials.