Hi,
p[1] and p[2] are just some location and scaling parameter , rescaling a landau(x) in a landau( ( x - p[1] )/p[2]), so p[1] is not exactly the landau MPV. See ROOT: TMath Namespace Reference
p[0] is instead a normalization parameter which corresponds to the area under the curve, since landau(x) is a normalized function (its integral is 1).
mu is a location parameter and correspond approximately to the most probable value and sigma is a scale parameter (not the sigma of the full distribution which is not defined)
root [1] gROOT->GetFunction("landau")->Print();
Formula based function: landau
landau : landau Ndim= 1, Npar= 3, Number= 400
Formula expression:
[Constant]*TMath::Landau(x,[MPV],[Sigma],false)
then, I think I can approximate the MPV…
Ps. I can’t understand the difference bewenn landau and landaun
In the same way the expression "landau" is a substitute for [0]*[TMath](https://root.cern/root/html534/TMath.html)::[Landau](https://root.cern/root/html534/TMath.html#TMath:Landau)(x,[1],[2],[kFALSE](https://root.cern/root/html534/ListOfTypes.html#Bool_t)) to obtain a standard normalized landau, use "landaun" instead of "landau" the expression "landaun" is a substitute for [0]*[TMath](https://root.cern/root/html534/TMath.html)::[Landau](https://root.cern/root/html534/TMath.html#TMath:Landau)(x,[1],[2],[kTRUE](https://root.cern/root/html534/ListOfTypes.html#Bool_t)) WARNING: landau and landaun are mutually exclusive in the same expression.
ie. what is the diffence between false and true in the formua?
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:80:20: error: use of undeclared identifier 'p0'
f1.SetParametrs(p0,p1,p2);
^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:80:23: error: use of undeclared identifier 'p1'
f1.SetParametrs(p0,p1,p2);
^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:80:26: error: use of undeclared identifier 'p2'
f1.SetParametrs(p0,p1,p2);
^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:143:7: error: no member named 'SetParametrs' in 'TF1'
f2.SetParametrs(p0,p1,p2);
~~ ^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:143:20: error: use of undeclared identifier 'p0'
f2.SetParametrs(p0,p1,p2);
^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:143:23: error: use of undeclared identifier 'p1'
f2.SetParametrs(p0,p1,p2);
^
/data_collamaf/DataFausto/Muon_Collider/III_anno/Tesi/Simulazioni_per_tesi/LEMMA_R=075_d=2cm_gaussian300um/Circolari/Energia_depositata/Be_1.5mm/simlemmaev.cpp:143:26: error: use of undeclared identifier 'p2'
f2.SetParametrs(p0,p1,p2);
It is SetParameters and not SetParametrs and then you have to define or use directly the values for the 3 parameters of the Landau that you are using to make the figure above !
Hi, TF1::GetMaximumX it is a function based on the Brent 1d minimisation method. See ROOT: ROOT::Math::BrentMinimizer1D Class Reference.
The numerical uncertainty of the result is controlled, by the epsilon parameter, i.e. it will be smaller than epsilon when using a large value for maxiter (maximum number of iterations).
There is always some numerical uncertainty in every calculation done. This can be controlled and kept small, but cannot be less than the double numerical precision ( ~ 1.E-16).
Hi,
Which value ? The actual uncertainty of a calculation ? No, there is not something implemented in ROOT, since it can be difficult and very tricky. You can just use the provided epsilon as a rough upper estimation. But why do you need that precise value ? Normally other uncertainties (e.g. statistical in estimating your function parameters) are much larger