# \#math

**URL:** https://root-forum.cern.ch/tag/math/23.md

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

---

## [Best practices for solving overdetermined systems of linear equations](https://root-forum.cern.ch/t/best-practices-for-solving-overdetermined-systems-of-linear-equations/64871)

<div class="topic-metadata">

**Author:** [@DaniilKorshkov](https://root-forum.cern.ch/u/DaniilKorshkov)\
**Replies:** 4\
**Last updated:** [May 29, 2026, 4:46pm UTC](https://root-forum.cern.ch/t/best-practices-for-solving-overdetermined-systems-of-linear-equations/64871 "2026-05-29T16:46:00Z")

</div>

ROOT Version: 6.36.04 Platform: ubuntu linux Compiler: g++ Dear ROOT users, I would like to know what would be the best practice for solving the following overdetermined system of linear equations (shown as ASCII d…

---

## [\[ROOT::Fitter\] how to use Huber loss function for linear fitting](https://root-forum.cern.ch/t/root-fitter-how-to-use-huber-loss-function-for-linear-fitting/64230)

<div class="topic-metadata">

**Author:** [@EdwinYZ](https://root-forum.cern.ch/u/EdwinYZ)\
**Replies:** 4\
**Last updated:** [October 10, 2025, 11:43am UTC](https://root-forum.cern.ch/t/root-fitter-how-to-use-huber-loss-function-for-linear-fitting/64230 "2025-10-10T11:43:19Z")

</div>

Hi, I’m using ROOT::Fit::Fitter class to do a linear regression. Here is a minimum example (using PYROOT): import ROOT import numpy as np fitter = ROOT.Fit.Fitter() func = ROOT.TF1("f1", "pol1", 0, 130) fitter.SetFunc…

---

## [TVector3::Rotate to arbitrary rotation using XYZVector](https://root-forum.cern.ch/t/tvector3-rotate-to-arbitrary-rotation-using-xyzvector/63244)

<div class="topic-metadata">

**Author:** [@cwessel](https://root-forum.cern.ch/u/cwessel)\
**Replies:** 6\
**Last updated:** [April 30, 2025, 9:45am UTC](https://root-forum.cern.ch/t/tvector3-rotate-to-arbitrary-rotation-using-xyzvector/63244 "2025-04-30T09:45:48Z")

</div>

Hi, I am trying to replace the deprecated TVector3 by Math/Vector3D, and XYZVector in particular. While with TVector3 I am able to do TVector3 a; // set a to some meaningful vector a.Rotate(someangle, someaxis); I do…

---

## [Euler angles vs. simple z-rotation: different results?](https://root-forum.cern.ch/t/euler-angles-vs-simple-z-rotation-different-results/56107)

<div class="topic-metadata">

**Author:** [@gerritzen](https://root-forum.cern.ch/u/gerritzen)\
**Replies:** 1\
**Last updated:** [August 22, 2023, 3:58pm UTC](https://root-forum.cern.ch/t/euler-angles-vs-simple-z-rotation-different-results/56107 "2023-08-22T15:58:45Z")

</div>

Hi, I was looking at the Euler angle convention used in ROOT: The so-called “x-convention,” illustrated above, is the most common definition. In this convention, the rotation given by Euler angles (phi,theta,psi), whe…

---

## [Transforming bivariate Gaussians instead of generating](https://root-forum.cern.ch/t/transforming-bivariate-gaussians-instead-of-generating/55459)

<div class="topic-metadata">

**Author:** [@Gramotey](https://root-forum.cern.ch/u/Gramotey)\
**Replies:** 10\
**Last updated:** [June 29, 2023, 9:39pm UTC](https://root-forum.cern.ch/t/transforming-bivariate-gaussians-instead-of-generating/55459 "2023-06-29T21:39:32Z")

</div>

Hello everyone - This is pretty much a math question. ROOT part is only keeping in mind we work with histograms TH2… Ok. I am generating images for pencil beam scanning proton therapy, and I represent individual beam s…

---

## [Upperlimit calculation in root by Feldman-Cousins approach](https://root-forum.cern.ch/t/upperlimit-calculation-in-root-by-feldman-cousins-approach/37092)

<div class="topic-metadata">

**Author:** [@Debashis\_sahoo](https://root-forum.cern.ch/u/Debashis_sahoo)\
**Replies:** 47\
**Last updated:** [May 9, 2023, 3:25am UTC](https://root-forum.cern.ch/t/upperlimit-calculation-in-root-by-feldman-cousins-approach/37092 "2023-05-09T03:25:30Z")

</div>

Hi, FeldmanCousins.C macro calculates upper limit on signal yield using the Feldman-Cousins approach. This follows the paper PRD V57 #7, p3873-3889. But this macro doesn’t take care of systematic uncertainty. Is it po…

---

## [When I operate this simple file,there is such a problem.I don't know how to solve it. Could someone help me?](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559)

<div class="topic-metadata">

**Author:** [@lujifei](https://root-forum.cern.ch/u/lujifei)\
**Replies:** 6\
**Last updated:** [December 1, 2022, 10:41am UTC](https://root-forum.cern.ch/t/when-i-operate-this-simple-file-there-is-such-a-problem-i-dont-know-how-to-solve-it-could-someone-help-me/52559 "2022-12-01T10:41:52Z")

</div>

---

## [How to fit TH2D histogram with TF2 function?](https://root-forum.cern.ch/t/how-to-fit-th2d-histogram-with-tf2-function/52343)

<div class="topic-metadata">

**Author:** [@SAYAN\_CHATTERJEE](https://root-forum.cern.ch/u/SAYAN_CHATTERJEE)\
**Replies:** 2\
**Last updated:** [November 15, 2022, 6:54am UTC](https://root-forum.cern.ch/t/how-to-fit-th2d-histogram-with-tf2-function/52343 "2022-11-15T06:54:52Z")

</div>

Hi Experts, I am trying to fit the TH2D histogram using TF2 functions. I could not find any good examples related to that. If you know some examples, please share them with me. It would be helpful for me. Thanks & Rega…

---

## [ROOT::Math linking in PyROOT for vector operations](https://root-forum.cern.ch/t/root-math-linking-in-pyroot-for-vector-operations/51685)

<div class="topic-metadata">

**Author:** [@Mindaugas\_Sarpis](https://root-forum.cern.ch/u/Mindaugas_Sarpis)\
**Replies:** 2\
**Last updated:** [September 26, 2022, 10:06am UTC](https://root-forum.cern.ch/t/root-math-linking-in-pyroot-for-vector-operations/51685 "2022-09-26T10:06:30Z")

</div>

I am trying to Rotate a Vector around another in a python file using root 6.26.06 I get weird linking error: IncrementalExecutor::executeFunction: symbol '\_ZN4ROOT4Math9gv\_detail47ERROR\_This\_Rotation\_Conversion\_is\_NOT\_…

---

## [Toeplitz Matrix (diagonal-constant matrix)](https://root-forum.cern.ch/t/toeplitz-matrix-diagonal-constant-matrix/49969)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 6\
**Last updated:** [May 16, 2022, 2:03am UTC](https://root-forum.cern.ch/t/toeplitz-matrix-diagonal-constant-matrix/49969 "2022-05-16T02:03:05Z")

</div>

Hello all, I want to create a Toeplitz matrix which I need to invert. Do anyone know a good way to create one? The way I have take way too many steps. Int\_t n = 3; // n x n matrix Double\_t a\[\] = {1,2,3}; TVectorD aa; a…

---

## [Gradient and FdF not used by GSLMinimizer](https://root-forum.cern.ch/t/gradient-and-fdf-not-used-by-gslminimizer/49784)

<div class="topic-metadata">

**Author:** [@jseneca](https://root-forum.cern.ch/u/jseneca)\
**Replies:** 7\
**Last updated:** [April 30, 2022, 5:51pm UTC](https://root-forum.cern.ch/t/gradient-and-fdf-not-used-by-gslminimizer/49784 "2022-04-30T17:51:56Z")

</div>

Hi all, I would like to use the BFGS2 algorithm provided by the GSL minimizer library for a multidimensional minimization. I have optimized functions which return the gradient of my function, as well as an optimized fun…

---

## [Correct linking of the ROOT::Math](https://root-forum.cern.ch/t/correct-linking-of-the-root-math/48602)

<div class="topic-metadata">

**Author:** [@terawatt](https://root-forum.cern.ch/u/terawatt)\
**Replies:** 3\
**Last updated:** [January 31, 2022, 6:46am UTC](https://root-forum.cern.ch/t/correct-linking-of-the-root-math/48602 "2022-01-31T06:46:28Z")

</div>

Hello, rooters! I’m trying to create a shared library with usage of ROOT::Math::legendre function. Compilation goes well, but when I try to call function which execute calculation with legendre, an error connected with …

---

## [Undefined reference to \`ROOT::Math::GSLMinimizer::GSLMinimizer(ROOT::Math::EGSLMinimizerType)](https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322)

<div class="topic-metadata">

**Author:** [@Zhaom](https://root-forum.cern.ch/u/Zhaom)\
**Replies:** 15\
**Last updated:** [January 12, 2022, 1:41am UTC](https://root-forum.cern.ch/t/undefined-reference-to-root-gslminimizer-root-egslminimizertype/48322 "2022-01-12T01:41:01Z")

</div>

Dear Rooters: I am try to using GSLMinimizer to do some work, when I try to compile my code with gcc, I got: \[zwang@login01 script\]$ make -f Makefile\_DoUnfolding root-config --cxx -fPIC -w -g -o DoUnfolding DoUnfoldi…

---

## [How to call Mathematica ( or alternatives) function evaluation for specific pdfs](https://root-forum.cern.ch/t/how-to-call-mathematica-or-alternatives-function-evaluation-for-specific-pdfs/48244)

<div class="topic-metadata">

**Author:** [@RENATO\_QUAGLIANI](https://root-forum.cern.ch/u/RENATO_QUAGLIANI)\
**Replies:** 5\
**Last updated:** [January 5, 2022, 5:52pm UTC](https://root-forum.cern.ch/t/how-to-call-mathematica-or-alternatives-function-evaluation-for-specific-pdfs/48244 "2022-01-05T17:52:32Z")

</div>

Dear experts, I came across a problem using the 2F1 function to evaluate analytical integrals of a function which I currently have implemented as a RooGenericPdf. After a bit of digging it turned out that inside Mathem…

---

## [Using a minimizer to sequentially optimize RDataFrame filters](https://root-forum.cern.ch/t/using-a-minimizer-to-sequentially-optimize-rdataframe-filters/47534)

<div class="topic-metadata">

**Author:** [@konrad](https://root-forum.cern.ch/u/konrad)\
**Replies:** 6\
**Last updated:** [November 16, 2021, 4:30pm UTC](https://root-forum.cern.ch/t/using-a-minimizer-to-sequentially-optimize-rdataframe-filters/47534 "2021-11-16T16:30:50Z")

</div>

Hello, I am trying to sequentially optimize some cuts on my data , using RDataFrame and ROOT::Math::Minimizer. I want to apply a cut (filter) depending on two parameters to one column of the dataframe, and use the mini…

---

## [Tilt of ellipse in bigaus](https://root-forum.cern.ch/t/tilt-of-ellipse-in-bigaus/47350)

<div class="topic-metadata">

**Author:** [@caforioroot](https://root-forum.cern.ch/u/caforioroot)\
**Replies:** 3\
**Last updated:** [October 22, 2021, 5:23pm UTC](https://root-forum.cern.ch/t/tilt-of-ellipse-in-bigaus/47350 "2021-10-22T17:23:18Z")

</div>

Hello, sorry for reopening this thread, I did not react quickly enough. I have an ellipse-shaped distribution in a 2D histogram that I want to fit with the “bigaus” function. The fit works very well, but I need the sl…

---

## [How to include Math::Interpolator?](https://root-forum.cern.ch/t/how-to-include-math-interpolator/44313)

<div class="topic-metadata">

**Author:** [@pbiel](https://root-forum.cern.ch/u/pbiel)\
**Replies:** 1\
**Last updated:** [April 7, 2021, 2:37pm UTC](https://root-forum.cern.ch/t/how-to-include-math-interpolator/44313 "2021-04-07T14:37:57Z")

</div>

Hi fellow ROOT users! I think I have an issue finding the correct Header file. Here’s what I’m trying to use: #include \<iostream\> #include "TMath.h" #include "Math/Interpolator.h" void interpolate() { std::vector\<dou…

---

## [What happened to TMatrixTRow?](https://root-forum.cern.ch/t/what-happened-to-tmatrixtrow/43726)

<div class="topic-metadata">

**Author:** [@Eddy\_Offermann](https://root-forum.cern.ch/u/Eddy_Offermann)\
**Replies:** 3\
**Last updated:** [March 2, 2021, 10:50pm UTC](https://root-forum.cern.ch/t/what-happened-to-tmatrixtrow/43726 "2021-03-02T22:50:08Z")

</div>

execution of the script { double am\[\] = {0.0,1.0,2.0,3.0}; TMatrixD m; m.Use(2,2,am); auto colval = 4.; auto rowval = 5.; TMatrixDColumn(m,1) = colval; TMatrixDRow(m,1) = rowval; m.Print(); } resu…

---

## [Boost to COM frame with LorentzBoost](https://root-forum.cern.ch/t/boost-to-com-frame-with-lorentzboost/43426)

<div class="topic-metadata">

**Author:** [@jcob](https://root-forum.cern.ch/u/jcob)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 8:58am UTC](https://root-forum.cern.ch/t/boost-to-com-frame-with-lorentzboost/43426 "2021-02-08T08:58:39Z")

</div>

Hi, I’m aware that similar questions have been asked here but they seem to be specifically about TLorentzVector which is a legacy class. With TLorentzVector it is possible to do something like this auto dstar\_lab\_…

---

## [Change in Minuit2 behaviour from 6.20.00 onwards](https://root-forum.cern.ch/t/change-in-minuit2-behaviour-from-6-20-00-onwards/40362)

<div class="topic-metadata">

**Author:** [@jdalseno](https://root-forum.cern.ch/u/jdalseno)\
**Replies:** 8\
**Last updated:** [July 14, 2020, 9:58am UTC](https://root-forum.cern.ch/t/change-in-minuit2-behaviour-from-6-20-00-onwards/40362 "2020-07-14T09:58:15Z")

</div>

I’ve noticed recently that some of my fits are starting to crash with the following error, …/root-6.22.00/math/minuit2/src/VariableMetricBuilder.cxx:272: ROOT::Minuit2::FunctionMinimum ROOT::Minuit2::VariableMetricBuild…

---

## [SVector addition operator?](https://root-forum.cern.ch/t/svector-addition-operator/38614)

<div class="topic-metadata">

**Author:** [@Dave\_Brown](https://root-forum.cern.ch/u/Dave_Brown)\
**Replies:** 4\
**Last updated:** [March 31, 2020, 12:32pm UTC](https://root-forum.cern.ch/t/svector-addition-operator/38614 "2020-03-31T12:32:53Z")

</div>

I’m using SVector and SMatrix classes to do vector algebra instead of CLHEP vectors and matrices in my new project. In general I am happy with them, but I ran into a curious problem when I wrote something like the follo…

---

## [Mathmore affects result of ROOT::Fit, Roofit results unaffected](https://root-forum.cern.ch/t/mathmore-affects-result-of-root-fit-roofit-results-unaffected/37701)

<div class="topic-metadata">

**Author:** [@kovy](https://root-forum.cern.ch/u/kovy)\
**Replies:** 1\
**Last updated:** [January 24, 2020, 4:18pm UTC](https://root-forum.cern.ch/t/mathmore-affects-result-of-root-fit-roofit-results-unaffected/37701 "2020-01-24T16:18:51Z")

</div>

Hello, I am fitting background data with polynomial + exponential model using ROOT::Fit, and I have older results of the same fit performed by Roofit. With very basic installation of ROOT, the parameters obtained with RO…

---

## [Undefined symbols for architecture x86\_64](https://root-forum.cern.ch/t/undefined-symbols-for-architecture-x86-64/33922)

<div class="topic-metadata">

**Author:** [@avenkate](https://root-forum.cern.ch/u/avenkate)\
**Replies:** 10\
**Last updated:** [May 7, 2019, 9:36am UTC](https://root-forum.cern.ch/t/undefined-symbols-for-architecture-x86-64/33922 "2019-05-07T09:36:40Z")

</div>

Dear experts, I am running ROOT 6.17/01 on MacOS Sierra v10.12.6. I am attempting to compile a .cpp file (attached) which encodes a custom fit-shape. But ROOT throws the following error: Undefined symbols for architect…

---

## [Landau distribution properties in RooFit (ROOT?)](https://root-forum.cern.ch/t/landau-distribution-properties-in-roofit-root/30296)

<div class="topic-metadata">

**Author:** [@adavid](https://root-forum.cern.ch/u/adavid)\
**Replies:** 3\
**Last updated:** [August 20, 2018, 8:00am UTC](https://root-forum.cern.ch/t/landau-distribution-properties-in-roofit-root/30296 "2018-08-20T08:00:08Z")

</div>

Continuing the discussion from Chained PDF definitions: against what would be expected from a stable distribution like the Landau, the convolution of Landau(mpv, sigma) with Landau(mpv, sigma) in RooFit is not yielding t…

---

## [TMath::Median() != his-\>GetQuantiles(1,0.5,x)](https://root-forum.cern.ch/t/tmath-median-his-getquantiles-1-0-5-x/29979)

<div class="topic-metadata">

**Author:** [@bdrum](https://root-forum.cern.ch/u/bdrum)\
**Replies:** 1\
**Last updated:** [July 26, 2018, 1:46pm UTC](https://root-forum.cern.ch/t/tmath-median-his-getquantiles-1-0-5-x/29979 "2018-07-26T13:46:23Z")

</div>

Hello Rooters! Hmmm, I’m not sure in category, sorry if I chose the wrong one. Can you help me please with some statistical stuff: I would like to get some stats units from my histogram (TH1D), but I noticed a strange…

---

## [Usage of TMath in Pyroot](https://root-forum.cern.ch/t/usage-of-tmath-in-pyroot/29367)

<div class="topic-metadata">

**Author:** [@iMi](https://root-forum.cern.ch/u/iMi)\
**Replies:** 4\
**Last updated:** [June 19, 2018, 9:49pm UTC](https://root-forum.cern.ch/t/usage-of-tmath-in-pyroot/29367 "2018-06-19T21:49:01Z")

</div>

\_ROOT Version: 6.12 \_Platform: centos 7 \_Compiler: g++ --version 4.8.5 Hello, I am looking for a translation of some cpp code : double b\_I0(double k, double L\_n, double r){ return TMath::BesselI0(2kr/L\_n); } to py…

---

## [TMath::DiLog reference](https://root-forum.cern.ch/t/tmath-dilog-reference/29342)

<div class="topic-metadata">

**Author:** [@scarrazza](https://root-forum.cern.ch/u/scarrazza)\
**Replies:** 1\
**Last updated:** [June 13, 2018, 7:02am UTC](https://root-forum.cern.ch/t/tmath-dilog-reference/29342 "2018-06-13T07:02:51Z")

</div>

Dear all, I am looking at the TMath::DiLog function translated here: https://root.cern.ch/root/htmldoc/src/TMath.cxx.html#104 but I can’t find the cernlib reference to the c coefficients evaluation. Someone has refer…

---

## [Tolerance problem in integration. Can I solve it with Functor?](https://root-forum.cern.ch/t/tolerance-problem-in-integration-can-i-solve-it-with-functor/28675)

<div class="topic-metadata">

**Author:** [@Evgeny\_Shulga](https://root-forum.cern.ch/u/Evgeny_Shulga)\
**Replies:** 3\
**Last updated:** [April 17, 2018, 6:43pm UTC](https://root-forum.cern.ch/t/tolerance-problem-in-integration-can-i-solve-it-with-functor/28675 "2018-04-17T18:43:48Z")

</div>

ROOT Version (6.10/08): Platform, compiler (Mac OSX, Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86\_64-apple-darwin17.5.0): Hello! I have a question concerning randomisation. I have a function: Double\_t…

---

## [ROOT::Math::WrappedFunction vs ROOT::Math::Functor1D](https://root-forum.cern.ch/t/root-math-wrappedfunction-vs-root-math-functor1d/27822)

<div class="topic-metadata">

**Author:** [@amarcine](https://root-forum.cern.ch/u/amarcine)\
**Replies:** 2\
**Last updated:** [February 8, 2018, 9:15pm UTC](https://root-forum.cern.ch/t/root-math-wrappedfunction-vs-root-math-functor1d/27822 "2018-02-08T21:15:51Z")

</div>

Hello, It seems to me that both classes do the same, i.e. adapt any C++ callable object or free function to ROOT::Math::IBaseFunctionOneDim interface (Functor1D additionally can adapt also a member function). However F…

---

## [IntegratorMultiDim accuracy](https://root-forum.cern.ch/t/integratormultidim-accuracy/27827)

<div class="topic-metadata">

**Author:** [@amarcine](https://root-forum.cern.ch/u/amarcine)\
**Replies:** 2\
**Last updated:** [February 6, 2018, 1:36pm UTC](https://root-forum.cern.ch/t/integratormultidim-accuracy/27827 "2018-02-06T13:36:24Z")

</div>

Hello, I was trying to learn how to use IntegratorMultiDim by calculating a volume of ball with a following macro: testIntegral.C (727 Bytes) On ROOT v6-12-04 it gives the following result: exact : 4.18879 kDEFAULT …

[Next page](https://root-forum.cern.ch/tag/math/23.md?match_all_tags=true&page=1&tags%5B%5D=math)
