#include <map>
{
TH1 *hh_1 = makeTH1(
"hh1", 0, 3);
TH1 *hh_2 = makeTH1(
"hh2", -3, 1);
TH1 *hh_3 = makeTH1(
"hh3", +3, 4);
RooCategory c(
"c",
"c", {{
"SampleA",0}, {
"SampleB",1}, {
"SampleC",2}});
dh->Print();
std::map<std::string, TH1 *> hmap;
hmap["SampleA"] = hh_1;
hmap["SampleB"] = hh_2;
hmap["SampleC"] = hh_3;
ds.Print();
ds2.Print();
ds3.Print();
icat.defineType("State0", 0);
icat.defineType("State1", 1);
ds4.Print();
std::unique_ptr<RooAbsData> dsA{ds2.reduce({
x,
y},
"z<-5")};
std::unique_ptr<RooAbsData> dsB{ds2.reduce({
x,
y},
"abs(z)<5")};
std::unique_ptr<RooAbsData> dsC{ds2.reduce({
x,
y},
"z>5")};
}
{
for (int i = 0; i < 1000; i++) {
}
return hh;
}
{
tree->Branch(
"x", px,
"x/D");
tree->Branch(
"y", py,
"y/D");
tree->Branch(
"z", pz,
"z/D");
tree->Branch(
"i", pi,
"i/I");
for (int i = 0; i < 100; i++) {
*pi = i % 3;
}
}
R__EXTERN TRandom * gRandom
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
void Print(const char *="") const override
Print contents.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
Variable that can be changed from the outside.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
A TTree represents a columnar dataset.
RooCmdArg Index(RooCategory &icat)
RooCmdArg Import(const char *state, TH1 &histo)
RooCmdArg Cut(const char *cutSpec)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooDataHist::dh[c,x] = 300 bins (2964 weights)
RooDataHist::dh[c,x] = 300 bins (2964 weights)
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #7 because y cannot accommodate the value 13.3845
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #8 because y cannot accommodate the value 11.1861
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #12 because y cannot accommodate the value 13.7009
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping event #14 because y cannot accommodate the value -10.6852
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds) Skipping ...
[#0] WARNING:DataHandling -- RooTreeDataStore::loadValues(ds) Ignored 35 out-of-range events
RooDataSet::ds[x,y] = 65 entries
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds2) Skipping event #7 because y cannot accommodate the value 13.3845
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds2) Skipping event #8 because y cannot accommodate the value 11.1861
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds2) Skipping event #12 because y cannot accommodate the value 13.7009
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds2) Skipping event #14 because y cannot accommodate the value -10.6852
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds2) Skipping ...
[#0] WARNING:DataHandling -- RooTreeDataStore::loadValues(ds2) Ignored 36 out-of-range events
RooDataSet::ds2[x,y,z] = 26 entries
[#1] INFO:DataHandling -- RooAbsReal::attachToTree(i) TTree Int_t branch i will be converted to double precision.
RooDataSet::ds3[i,x] = 100 entries
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds4) Skipping event #2 because i cannot accommodate the value 0
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds4) Skipping event #5 because i cannot accommodate the value 0
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds4) Skipping event #8 because i cannot accommodate the value 0
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds4) Skipping event #11 because i cannot accommodate the value 0
[#1] INFO:DataHandling -- RooTreeDataStore::loadValues(ds4) Skipping ...
[#0] WARNING:DataHandling -- RooTreeDataStore::loadValues(ds4) Ignored 33 out-of-range events
RooDataSet::ds4[i,x] = 67 entries
RooDataSet::dsABC[x,y,c] = 26 entries