29TH1 *makeTH1(
const char *
name,
double mean,
double sigma);
38 TH1 *hh_1 = makeTH1(
"hh1", 0, 3);
39 TH1 *hh_2 = makeTH1(
"hh2", -3, 1);
40 TH1 *hh_3 = makeTH1(
"hh3", +3, 4);
46 RooCategory c(
"c",
"c", {{
"SampleA",0}, {
"SampleB",1}, {
"SampleC",2}});
54 std::map<std::string, TH1 *> hmap;
55 hmap[
"SampleA"] = hh_1;
56 hmap[
"SampleB"] = hh_2;
57 hmap[
"SampleC"] = hh_3;
88 icat.defineType(
"State0", 0);
89 icat.defineType(
"State1", 1);
100 std::unique_ptr<RooAbsData> dsA{ds2.reduce({
x,
y},
"z<-5")};
101 std::unique_ptr<RooAbsData> dsB{ds2.reduce({
x,
y},
"abs(z)<5")};
102 std::unique_ptr<RooAbsData> dsC{ds2.reduce({
x,
y},
"z>5")};
111TH1 *makeTH1(
const char *
name,
double mean,
double sigma)
116 for (
int i = 0;
i < 1000;
i++) {
131 tree->Branch(
"x", px,
"x/D");
132 tree->Branch(
"y",
py,
"y/D");
133 tree->Branch(
"z", pz,
"z/D");
134 tree->Branch(
"i", pi,
"i/I");
135 for (
int i = 0;
i < 100;
i++) {
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.
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.
A TTree represents a columnar dataset.
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...