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.
Base class for add-on modules to RooMCStudy that can perform additional calculations on each generate...
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...
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.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Helper class to facilitate Monte Carlo studies such as 'goodness-of-fit' studies, that involve fittin...
bool addFitResult(const RooFitResult &fr)
Utility function to add fit result from external fit to this RooMCStudy and process its results throu...
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.
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.
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.
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.
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.
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?
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.
RooArgSet _fitParams
List of actual fit parameters.
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.
std::unique_ptr< RooAbsGenContext > _genContext
Generator context.
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.
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.
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 &)
std::unique_ptr< RooRealVar > _ngenVar
Plot frame and a container for graphics objects within that frame.
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...