30  RooRealVar meanG(
"meanG",
"meanG", 100., 0., 3000.);
 
   32  RooGaussian gauss(
"gauss", 
"gauss", E, meanG, sigmaG);
 
   34  RooRealVar pol1(
"pol1", 
"Constant of the polynomial", 1, -10, 10);
 
   37  RooRealVar yieldSig(
"yieldSig", 
"yieldSig", 1, 0, 1.E4);
 
   38  RooRealVar yieldBkg(
"yieldBkg", 
"yieldBkg", 1, 0, 1.E4);
 
   44  std::cout << 
"The proto model before customisation:" << std::endl;
 
   50  sample[
"Sample1"] = 1;
 
   51  sample[
"Sample2"] = 2;
 
   52  sample[
"Sample3"] = 3;
 
   66  RooCustomizer cust(model, sample, newLeafs, &allCustomiserNodes);
 
   67  cust.splitArg(meanG, sample);
 
   77  RooFormulaVar yield1(
"yieldSig_Sample1", 
"Signal yield in the first sample", 
"M/3.360779", mass);
 
   78  RooFormulaVar yield2(
"yieldSig_Sample2", 
"Signal yield in the second sample", 
"M/2", mass);
 
   79  allCustomiserNodes.
add(yield1);
 
   80  allCustomiserNodes.
add(yield2);
 
   83  cust.splitArg(yieldSig, sample);
 
   87  auto pdf1 = cust.build(
"Sample1");
 
   88  auto pdf2 = cust.build(
"Sample2");
 
   89  auto pdf3 = cust.build(
"Sample3");
 
   92  std::cout << 
"\nPDF 1 with a yield depending on M:" << std::endl;
 
   94  std::cout << 
"\nPDF 2 with a yield depending on M:" << std::endl;
 
   96  std::cout << 
"\nPDF 3 with a free yield:" << std::endl;
 
   99  std::cout << 
"\nThe following leafs have been created automatically while customising:" << std::endl;
 
  104  auto& meanG1 = 
static_cast<RooRealVar&
>(allCustomiserNodes[
"meanG_Sample1"]);
 
  106  auto& meanG2 = 
static_cast<RooRealVar&
>(allCustomiserNodes[
"meanG_Sample2"]);
 
  109  std::cout << 
"\nThe following leafs have been used while customising" 
  110    << 
"\n\t(partial overlap with the set of automatically created leaves." 
  111    << 
"\n\ta new customiser for a different PDF could reuse them if necessary.):" << std::endl;
 
  112  allCustomiserNodes.
Print(
"V");
 
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
 
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
 
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
RooCategory is an object to represent discrete states.
 
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
 
RooPolynomial implements a polynomial p.d.f of the form.
 
RooRealVar represents a variable that can be changed from the outside.
 
void setVal(double value) override
Set value of variable to 'value'.
 
constexpr Double_t E()
Base of natural log: .