47 bool generateAndFit(
Int_t nSamples,
Int_t nEvtPerSample=0,
bool keepGenData=
false,
const char* asciiFilePat=
nullptr) ;
48 bool generate(
Int_t nSamples,
Int_t nEvtPerSample=0,
bool keepGenData=
false,
const char* asciiFilePat=
nullptr) ;
49 bool fit(
Int_t nSamples,
const char* asciiFilePat) ;
101 bool run(
bool generate,
bool fit,
Int_t nSamples,
Int_t nEvtPerSample,
bool keepGenData,
const char* asciiFilePat) ;
#define ClassDefOverride(name, id)
Abstract base class for binned and unbinned datasets.
Abstract base class for generator contexts of RooAbsPdf objects.
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
Abstract interface for all probability density functions.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Named container for two doubles, two integers two object points and three string pointers that can be...
RooDataSet is a container class to hold unbinned data.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooMCStudy is a helper class to facilitate Monte Carlo studies such as 'goodness-of-fit' studies,...
bool addFitResult(const RooFitResult &fr)
Utility function to add fit result from external fit to this RooMCStudy and process its results throu...
RooAbsData * _genSample
Currently generated sample.
RooPlot * makeFrameAndPlotCmd(const RooRealVar ¶m, RooLinkedList &cmdList, bool symRange=false) const
Internal function.
RooArgSet _projDeps
List of projected dependents in fit.
RooArgSet _genParams
List of actual generator parameters.
const RooArgSet * fitParams(Int_t sampleNum) const
Return an argset with the fit parameters for the given sample number.
void calcPulls()
Calculate the pulls for all fit parameters in the fit results data set, and add them to that dataset.
RooPlot * plotPull(const RooRealVar ¶m, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of pull values for the specified parameter on a newly created frame.
RooArgSet _dependents
List of dependents.
bool _verboseGen
Verbose generation?
std::list< RooAbsMCStudyModule * > _modList
List of additional study modules ;.
std::unique_ptr< RooDataSet > _genParData
RooArgSet _genInitParams
List of original generator parameters.
bool fitSample(RooAbsData *genSample)
Internal method.
std::unique_ptr< RooDataSet > _fitParData
bool generate(Int_t nSamples, Int_t nEvtPerSample=0, bool keepGenData=false, const char *asciiFilePat=nullptr)
Generate 'nSamples' samples of 'nEvtPerSample' events.
RooPlot * plotParamOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of fitted values of a parameter.
const RooDataSet * _genProtoData
Generator prototype data set.
bool _canAddFitResults
Allow adding of external fit results?
const RooFitResult * fitResult(Int_t sampleNum) const
Return the RooFitResult of the fit with the given run number.
RooFit::OwningPtr< RooFitResult > doFit(RooAbsData *genSample)
Internal function. Performs actual fit according to specifications.
std::unique_ptr< RooAbsGenContext > _constrGenContext
Generator context for constraints p.d.f.
bool _perExptGenParams
Do generation parameter change per event?
bool _silence
Silent running mode?
RooArgSet _fitParams
List of actual fit parameters.
std::unique_ptr< RooAbsGenContext > _genContext
Generator context.
RooPlot * plotNLL(const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of the -log(L) values on a newly created frame.
RooFit::OwningPtr< RooFitResult > refit(RooAbsData *genSample=nullptr)
Redo fit on 'current' toy sample, or if genSample is not nullptr do fit on given sample instead.
RooAbsData * genData(Int_t sampleNum) const
Return the given generated dataset.
const RooDataSet * genParDataSet() const
Return dataset with generator parameters for each toy.
void RecursiveRemove(TObject *obj) override
If one of the TObject we have a referenced to is deleted, remove the reference.
RooAbsPdf * _genModel
Generator model.
const RooDataSet & fitParDataSet()
Return a RooDataSet containing the post-fit parameters of each toy cycle.
std::unique_ptr< RooRealVar > _nllVar
RooLinkedList _fitOptList
std::unique_ptr< RooAbsPdf > _constrPdf
Constraints p.d.f.
RooArgSet _allDependents
List of generate + prototype dependents.
bool run(bool generate, bool fit, Int_t nSamples, Int_t nEvtPerSample, bool keepGenData, const char *asciiFilePat)
Run engine method.
void resetFitParams()
Reset all fit parameters to the initial model parameters at the time of the RooMCStudy constructor.
RooAbsPdf * _fitModel
Fit model.
bool fit(Int_t nSamples, const char *asciiFilePat)
Fit 'nSamples' datasets, which are read from ASCII files.
bool generateAndFit(Int_t nSamples, Int_t nEvtPerSample=0, bool keepGenData=false, const char *asciiFilePat=nullptr)
Generate and fit 'nSamples' samples of 'nEvtPerSample' events.
void addModule(RooAbsMCStudyModule &module)
Insert given RooMCStudy add-on module to the processing chain of this MCStudy object.
RooArgSet _fitInitParams
List of initial values of fit parameters.
RooMCStudy(const RooMCStudy &)
RooPlot * plotParam(const RooRealVar ¶m, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of the fitted value of the given parameter on a newly created frame.
std::unique_ptr< RooRealVar > _ngenVar
RooPlot * plotError(const RooRealVar ¶m, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of the fit errors for the specified parameter on a newly created frame.
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooRealVar represents a variable that can be changed from the outside.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...