Logo ROOT  
Reference Guide
rf409_NumPyPandasToRooFit Namespace Reference

Functions

 print_histogram_output (histogram_output)

Variables

 _
 arrays = data.to_numpy()
 bin_edges
 bins = [np.linspace(-10, 10, 21)]
 c = ROOT.TCanvas("rf409_NumPyPandasToRooFit", "rf409_NumPyPandasToRooFit", 800, 400)
 column
 counts
 data = gauss.generate(ROOT.RooArgSet(x), 10000)
 datahist = data.binnedClone()
 datahist_new_1 = ROOT.RooDataHist.from_numpy(counts, [x])
 datahist_new_2 = ROOT.RooDataHist.from_numpy(counts, [x], bins=bins)
 datahist_new_3 = ROOT.RooDataHist.from_numpy(counts, [x], bins=bins, ranges=ranges)
 df = data.to_pandas()
 fit_result = gauss.fitTo(data, PrintLevel=-1, Save=True)
 gauss = ROOT.RooGaussian("gauss", "gaussian PDF", x, mean, sigma)
 mean = ROOT.RooRealVar("mean", "mean of gaussian", 1, -10, 10)
int n_events = 10000
 range
list ranges = [(-10, 10)]
 sigma = ROOT.RooRealVar("sigma", "width of gaussian", 1, 0.1, 10)
 x = ROOT.RooRealVar("x", "x", -10, 10)
 x_arr = np.random.normal(-1.0, 1.0, (n_events,))
 xframe = x.frame(Title="Gaussian pdf")

Function Documentation

◆ print_histogram_output()

rf409_NumPyPandasToRooFit.print_histogram_output ( histogram_output)

Definition at line 98 of file rf409_NumPyPandasToRooFit.py.

Variable Documentation

◆ _

rf409_NumPyPandasToRooFit._
protected

Definition at line 142 of file rf409_NumPyPandasToRooFit.py.

◆ arrays

rf409_NumPyPandasToRooFit.arrays = data.to_numpy()

Definition at line 41 of file rf409_NumPyPandasToRooFit.py.

◆ bin_edges

rf409_NumPyPandasToRooFit.bin_edges

Definition at line 112 of file rf409_NumPyPandasToRooFit.py.

◆ bins

list rf409_NumPyPandasToRooFit.bins = [np.linspace(-10, 10, 21)]

Definition at line 56 of file rf409_NumPyPandasToRooFit.py.

◆ c

rf409_NumPyPandasToRooFit.c = ROOT.TCanvas("rf409_NumPyPandasToRooFit", "rf409_NumPyPandasToRooFit", 800, 400)

Definition at line 89 of file rf409_NumPyPandasToRooFit.py.

◆ column

rf409_NumPyPandasToRooFit.column

Definition at line 56 of file rf409_NumPyPandasToRooFit.py.

◆ counts

rf409_NumPyPandasToRooFit.counts

Definition at line 112 of file rf409_NumPyPandasToRooFit.py.

◆ data

rf409_NumPyPandasToRooFit.data = gauss.generate(ROOT.RooArgSet(x), 10000)

Definition at line 37 of file rf409_NumPyPandasToRooFit.py.

◆ datahist

rf409_NumPyPandasToRooFit.datahist = data.binnedClone()

Definition at line 105 of file rf409_NumPyPandasToRooFit.py.

◆ datahist_new_1

rf409_NumPyPandasToRooFit.datahist_new_1 = ROOT.RooDataHist.from_numpy(counts, [x])

Definition at line 132 of file rf409_NumPyPandasToRooFit.py.

◆ datahist_new_2

rf409_NumPyPandasToRooFit.datahist_new_2 = ROOT.RooDataHist.from_numpy(counts, [x], bins=bins)

Definition at line 143 of file rf409_NumPyPandasToRooFit.py.

◆ datahist_new_3

rf409_NumPyPandasToRooFit.datahist_new_3 = ROOT.RooDataHist.from_numpy(counts, [x], bins=bins, ranges=ranges)

Definition at line 155 of file rf409_NumPyPandasToRooFit.py.

◆ df

rf409_NumPyPandasToRooFit.df = data.to_pandas()

Definition at line 48 of file rf409_NumPyPandasToRooFit.py.

◆ fit_result

rf409_NumPyPandasToRooFit.fit_result = gauss.fitTo(data, PrintLevel=-1, Save=True)

Definition at line 80 of file rf409_NumPyPandasToRooFit.py.

◆ gauss

rf409_NumPyPandasToRooFit.gauss = ROOT.RooGaussian("gauss", "gaussian PDF", x, mean, sigma)

Definition at line 34 of file rf409_NumPyPandasToRooFit.py.

◆ mean

rf409_NumPyPandasToRooFit.mean = ROOT.RooRealVar("mean", "mean of gaussian", 1, -10, 10)

Definition at line 32 of file rf409_NumPyPandasToRooFit.py.

◆ n_events

int rf409_NumPyPandasToRooFit.n_events = 10000

Definition at line 22 of file rf409_NumPyPandasToRooFit.py.

◆ range

rf409_NumPyPandasToRooFit.range

Definition at line 154 of file rf409_NumPyPandasToRooFit.py.

◆ ranges

list rf409_NumPyPandasToRooFit.ranges = [(-10, 10)]

Definition at line 153 of file rf409_NumPyPandasToRooFit.py.

◆ sigma

rf409_NumPyPandasToRooFit.sigma = ROOT.RooRealVar("sigma", "width of gaussian", 1, 0.1, 10)

Definition at line 33 of file rf409_NumPyPandasToRooFit.py.

◆ x

rf409_NumPyPandasToRooFit.x = ROOT.RooRealVar("x", "x", -10, 10)

Definition at line 29 of file rf409_NumPyPandasToRooFit.py.

◆ x_arr

rf409_NumPyPandasToRooFit.x_arr = np.random.normal(-1.0, 1.0, (n_events,))

Definition at line 72 of file rf409_NumPyPandasToRooFit.py.

◆ xframe

rf409_NumPyPandasToRooFit.xframe = x.frame(Title="Gaussian pdf")

Definition at line 84 of file rf409_NumPyPandasToRooFit.py.