ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
mathcoreCDF.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_math
3
/// \notebook
4
/// Example describing how to use the different cumulative distribution functions in ROOT.
5
/// The macro shows four of them with
6
/// respect to their two variables. In order to run the macro type:
7
///
8
/// ~~~{.cpp}
9
/// root [0] .x mathcoreCDF.C
10
/// ~~~
11
///
12
/// \macro_image
13
/// \macro_code
14
///
15
/// \author Lorenzo Moneta
16
17
#include "
TSystem.h
"
18
#include "
TF2.h
"
19
#include "
TCanvas.h
"
20
21
void
mathcoreCDF(){
22
23
TF2
*f1a =
new
TF2
(
"f1a"
,
"ROOT::Math::breitwigner_cdf_c(x, y)"
,-10,10,0,10);
24
TF2
*f2a =
new
TF2
(
"f2a"
,
"ROOT::Math::cauchy_cdf(x,y)"
,0,20, 0,20);
25
TF2
*f3a =
new
TF2
(
"f3a"
,
"ROOT::Math::normal_cdf(x,y)"
,-10,10,0,5);
26
TF2
*f4a =
new
TF2
(
"f4a"
,
"ROOT::Math::exponential_cdf_c(x,y)"
,0,10,0,5);
27
28
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"c1"
,800,650);
29
30
c1
->Divide(2,2);
31
c1
->cd(1); f1a->
SetLineWidth
(1);
32
f1a->
Draw
(
"surf1"
);
33
c1
->cd(2); f2a->
SetLineWidth
(1);
34
f2a->
Draw
(
"surf1"
);
35
c1
->cd(3); f3a->
SetLineWidth
(1);
36
f3a->
Draw
(
"surf1"
);
37
c1
->cd(4); f4a->
SetLineWidth
(1);
38
f4a->
Draw
(
"surf1"
);
39
}
TCanvas.h
TF2.h
TSystem.h
TAttLine::SetLineWidth
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition
TAttLine.h:43
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TF2
A 2-Dim function with parameters.
Definition
TF2.h:29
TF2::Draw
void Draw(Option_t *option="") override
Draw this function with its current attributes.
Definition
TF2.cxx:259
c1
return c1
Definition
legend1.C:41
tutorials
math
mathcoreCDF.C
ROOT v6-32 - Reference Guide Generated on Fri Jul 19 2024 14:12:12 (GVA Time) using Doxygen 1.9.8