Variables | |
| d = model.generate({x}, 50) | |
| f = ROOT.RooRealVar("f", "f", 0.5, 0.0, 1.0) | |
| fconstext = ROOT.RooGaussian("fconstext", "fconstext", f, 0.2, 0.1) | |
| fconstraint = ROOT.RooGaussian("fconstraint", "fconstraint", f, 0.8, 0.1) | |
| gauss = ROOT.RooGaussian("gauss", "gauss(x,m,s)", x, m, s) | |
| m = ROOT.RooRealVar("m", "m", 0, -10, 10) | |
| model = ROOT.RooAddPdf("model", "model", [gauss, poly], [f]) | |
| modelc = ROOT.RooProdPdf("modelc", "model with constraint", [model, fconstraint]) | |
| poly = ROOT.RooPolynomial("poly", "poly(x)", x) | |
| r1 = model.fitTo(d, Save=True, PrintLevel=-1) | |
| r2 = modelc.fitTo(d, Constrain={f}, Save=True, PrintLevel=-1) | |
| r3 = model.fitTo(d, ExternalConstraints={fconstext}, Save=True, PrintLevel=-1) | |
| s = ROOT.RooRealVar("s", "s", 2, 0.1, 10) | |
| x = ROOT.RooRealVar("x", "x", -10, 10) | |
| rf604_constraints.d = model.generate({x}, 50) |
Definition at line 33 of file rf604_constraints.py.
| rf604_constraints.f = ROOT.RooRealVar("f", "f", 0.5, 0.0, 1.0) |
Definition at line 29 of file rf604_constraints.py.
| rf604_constraints.fconstext = ROOT.RooGaussian("fconstext", "fconstext", f, 0.2, 0.1) |
Definition at line 62 of file rf604_constraints.py.
| rf604_constraints.fconstraint = ROOT.RooGaussian("fconstraint", "fconstraint", f, 0.8, 0.1) |
Definition at line 40 of file rf604_constraints.py.
Definition at line 23 of file rf604_constraints.py.
| rf604_constraints.m = ROOT.RooRealVar("m", "m", 0, -10, 10) |
Definition at line 21 of file rf604_constraints.py.
Definition at line 30 of file rf604_constraints.py.
| rf604_constraints.modelc = ROOT.RooProdPdf("modelc", "model with constraint", [model, fconstraint]) |
Definition at line 49 of file rf604_constraints.py.
| rf604_constraints.poly = ROOT.RooPolynomial("poly", "poly(x)", x) |
Definition at line 26 of file rf604_constraints.py.
Definition at line 52 of file rf604_constraints.py.
Definition at line 55 of file rf604_constraints.py.
Definition at line 65 of file rf604_constraints.py.
| rf604_constraints.s = ROOT.RooRealVar("s", "s", 2, 0.1, 10) |
Definition at line 22 of file rf604_constraints.py.
| rf604_constraints.x = ROOT.RooRealVar("x", "x", -10, 10) |
Definition at line 19 of file rf604_constraints.py.