8 #ifndef ROODATAGENERATOR_H
9 #define ROODATAGENERATOR_H
15 #include "RooArgSet.h"
16 #include "RooConstVar.h"
17 #include "RooDataSet.h"
18 #include "RooGaussian.h"
19 #include "RooGlobalFunc.h"
20 #include "RooProdPdf.h"
21 #include "RooRandom.h"
22 #include "RooRealVar.h"
34 :
fMin(mean - 6 * sigma)
35 ,
fMax(mean + 6 * sigma)
81 , fX(
"x",
"x", fOpt.fX.fMin, fOpt.fX.fMax)
82 , fY(
"y",
"y", fOpt.fY.fMin, fOpt.fY.fMax)
83 , fZ(
"z",
"z", fOpt.fZ.fMin, fOpt.fZ.fMax)
84 , fT(
"t",
"t", static_cast<double>(tStart), static_cast<double>(tStart + 1))
85 , fTErr(
"tErr",
"tErr", fOpt.fTErr.fMin, fOpt.fTErr.fMax)
86 , fMeanT(
"mu_t",
"mean of t-distribution", (static_cast<double>(tStart) + static_cast<double>(tStart + 1)) / 2)
87 , fSigmaT(
"fSigmaT",
"width of t-distribution", 0.1)
88 , fGaussX(
"fGaussX",
"gaussian PDF", fX, RooFit::RooConst(fOpt.fX.fMean), RooFit::RooConst(fOpt.fX.fSigma))
89 , fGaussY(
"fGaussY",
"gaussian PDF", fY, RooFit::RooConst(fOpt.fY.fMean), RooFit::RooConst(fOpt.fY.fSigma))
90 , fGaussZ(
"fGaussZ",
"gaussian PDF", fZ, RooFit::RooConst(fOpt.fZ.fMean), RooFit::RooConst(fOpt.fZ.fSigma))
91 , fGaussT(
"fGaussT",
"gaussian PDF", fT, fMeanT, fSigmaT)
92 , fGaussTErr(
"fGaussTErr",
95 RooFit::RooConst((fTErr.getMin() + fTErr.getMax()) / 2),
96 RooFit::RooConst(fOpt.fTErr.fSigma))
97 , fModel(
"fGaussXyzt_ter",
98 "fGaussX*fGaussY*fGaussZ*fGaussT*fGaussTErr",
99 RooArgList(fGaussX, fGaussY, fGaussZ, fGaussT, fGaussTErr))
102 RooRandom::randomGenerator()->SetSeed(TDatime().GetTime());
112 fT.setRange(static_cast<double>(ti), static_cast<double>(ti + 1));
113 fMeanT.setVal(static_cast<double>(ti + 0.5));
114 return fModel.generate(RooArgSet(fX, fY, fZ, fT, fTErr), n);
133 RooGaussian fGaussTErr;
MultiVariatePDF(const PDFConfig &opt, unsigned int tStart=0)
void Set(const RdmVarParameters &x, const RdmVarParameters &y, const RdmVarParameters &z, const RdmVarParameters &terr)
RooDataSet * GetGeneratedData(unsigned int n, unsigned int ti)
RdmVarParameters(double mean, double sigma)
MultiVariatePDF operator=(const MultiVariatePDF &)=delete
RdmVarParameters(double min, double max, double mean, double sigma)
MultiVariatePDF(unsigned int tStart=0)