void rf102_dataimport()
{
RooPlot *frame =
x.
frame(Title(
"Imported TH1 with Poisson error bars"));
gauss.fitTo(
dh, PrintLevel(-1));
gauss.plotOn(frame);
RooPlot *
frame2 =
x.frame(Title(
"Imported TH1 with internal errors"));
{
std::ofstream
outstream(
"rf102_testData.txt");
}
std::cout << "\n-----------------------\nReading data from ASCII\n";
"D");
std::cout << "\nOriginal data, line 20:\n";
std::cout << "\nRead-back data, line 20:\n";
TCanvas *
c =
new TCanvas(
"rf102_dataimport",
"rf102_dataimport", 1000, 800);
gPad->SetLeftMargin(0.15);
gPad->SetLeftMargin(0.15);
frame2->GetYaxis()->SetTitleOffset(1.4);
gPad->SetLeftMargin(0.15);
frame3->GetYaxis()->SetTitleOffset(1.4);
gPad->SetLeftMargin(0.15);
frame4->GetYaxis()->SetTitleOffset(1.4);
gPad->SetLeftMargin(0.15);
frame4->GetYaxis()->SetTitleOffset(1.4);
}
{
for (int i = 0; i < 100; i++) {
}
}
{
for (int i = 0; i < 100; i++) {
*py =
trnd.Uniform() * 30 - 15;
}
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
static RooDataSet * read(const char *filename, const RooArgList &variables, const char *opts="", const char *commonPath="", const char *indexCatName=nullptr)
Read data from a text file and create a dataset from it.
Plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
Variable that can be changed from the outside.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
Random number generator class based on M.
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg MarkerStyle(Style_t style)
RooCmdArg MarkerColor(TColorNumber color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
[#1] INFO:Fitting -- RooAbsPdf::fitTo(gauss_over_gauss_Int[x]) fixing normalization set for coefficient determination to observables in data
[#1] INFO:Fitting -- using CPU computation library compiled with -mavx512
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_gauss_over_gauss_Int[x]_dh) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #0 because y cannot accommodate the value 14.424
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #3 because y cannot accommodate the value -12.0022
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #5 because y cannot accommodate the value 13.8261
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #6 because y cannot accommodate the value -14.9925
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping ...
[#0] WARNING:DataHandling -- RooTreeDataStore::loadValues(ds) Ignored 36 out-of-range events
-----------------------
Reading data from ASCII
[#1] INFO:DataHandling -- RooDataSet::read: reading file rf102_testData.txt
[#1] INFO:DataHandling -- RooDataSet::read: read 64 events (ignored 0 out of range events)
DataStore dataset (rf102_testData.txt)
Contains 64 entries
Observables:
1) x = 0.0174204 L(-10 - 10) "x"
2) y = 9.46654 L(-10 - 10) "y"
3) blindState = Normal(idx = 0)
"Blinding State"
Original data, line 20:
1) RooRealVar:: x = -0.79919
2) RooRealVar:: y = 0.0106407
Read-back data, line 20:
1) RooRealVar:: x = -0.79919
2) RooRealVar:: y = 0.0106407
3) RooCategory:: blindState = Normal(idx = 0)
RooDataSet::ds[x,y] = 64 entries