126 pc.
defineSet(
"condObs",
"ProjectedObservables",0,
nullptr) ;
127 pc.
defineObject(
"protoData",
"PrototypeData",0,
nullptr) ;
128 pc.
defineSet(
"cPars",
"Constrain",0,
nullptr) ;
129 pc.
defineSet(
"extCons",
"ExternalConstraints",0,
nullptr) ;
131 pc.
defineInt(
"randProtoData",
"PrototypeData",0,0) ;
132 pc.
defineInt(
"verboseGen",
"Verbose",0,0) ;
133 pc.
defineInt(
"extendedGen",
"Extended",0,0) ;
134 pc.
defineInt(
"binGenData",
"Binned",0,0) ;
141 throw std::string(
"RooMCStudy::RooMCStudy() Error in parsing arguments passed to constructor") ;
166 cPars->
add(*cParsTmp) ;
181 if (std::unique_ptr<RooArgSet> constraints{model.
getAllConstraints(observables,*cPars,
true)}) {
182 allConstraints.
add(*constraints) ;
187 if (!allConstraints.
empty()) {
188 _constrPdf = std::make_unique<RooProdPdf>(
"mcs_constr_prod",
"RooMCStudy constraints product",allConstraints);
191 consPars.
add(*cPars) ;
197 consPars.
add(cparams) ;
203 coutI(Generation) <<
"RooMCStudy::RooMCStudy: INFO have pdf with constraints, will generate parameters from constraint pdf for each experiment" << endl ;
215 if (
auto condObs = pc.
getSet(
"condObs",
nullptr)) {
225 oocoutW(
_fitModel,Generation) <<
"RooMCStudy::RooMCStudy: WARNING Using generator option 'e' (Poisson distribution of #events) together " << endl
226 <<
" with a prototype dataset implies incomplete sampling or oversampling of proto data." << endl
227 <<
" Use option \"r\" to randomize prototype dataset order and thus to randomize" << endl
228 <<
" the set of over/undersampled prototype events for each generation cycle." << endl ;
246 _nllVar = std::make_unique<RooRealVar>(
"NLL",
"-log(Likelihood)",0);
249 _ngenVar = std::make_unique<RooRealVar>(
"ngen",
"number of generated events",0);
266 _fitParData = std::make_unique<RooDataSet>(fpdName,
"Fit Parameters DataSet",tmp2);
280 list<RooAbsMCStudyModule*>::iterator iter ;
282 bool ok = (*iter)->doInitializeInstance(*
this) ;
284 oocoutE(
_fitModel,Generation) <<
"RooMCStudy::ctor: removing study module " << (*iter)->GetName() <<
" from analysis chain because initialization failed" << endl ;
335 list<RooAbsMCStudyModule*>::iterator iter ;
337 (*iter)->initializeRun(nSamples) ;
340 Int_t prescale = nSamples>100 ?
Int_t(nSamples/100) : 1 ;
344 if (nSamples%prescale==0) {
353 bool existingData = false ;
356 Int_t nEvt(nEvtPerSample) ;
372 list<RooAbsMCStudyModule*>::iterator iter2 ;
374 (*iter2)->processBeforeGen(nSamples) ;
398 oocoutI(
_fitModel,Generation) <<
"RooMCStudy: (Re)randomizing event order in prototype dataset (Nevt=" << nEvt <<
")" << endl ;
404 coutP(Generation) <<
"RooMCStudy: now generating " << nEvt <<
" events" << endl ;
417 }
else if (asciiFilePat) {
420 char asciiFile[1024] ;
421 snprintf(asciiFile,1024,asciiFilePat,nSamples) ;
429 existingData = true ;
431 oocoutW(
_fitModel,Generation) <<
"RooMCStudy::run: WARNING: Sample #" << nSamples <<
" not loaded, skipping" << endl ;
440 list<RooAbsMCStudyModule*>::iterator iter3 ;
442 (*iter3)->processBetweenGenAndFit(nSamples) ;
449 (*iter3)->processAfterFit(nSamples) ;
453 if (doGenerate && asciiFilePat && *asciiFilePat) {
454 char asciiFile[1024] ;
455 snprintf(asciiFile,1024,asciiFilePat,nSamples) ;
458 unbinnedData->
write(asciiFile) ;
460 coutE(InputArguments) <<
"RooMCStudy::run(" <<
GetName() <<
") ERROR: ASCII writing of binned datasets is not supported" << endl ;
475 if (
RooDataSet* auxData = (*iter)->finalizeRun()) {
484 _genParData->changeObservableName(arg->GetName(),(std::string(arg->GetName()) +
"_gen").c_str());
521 return run(
true,
true,nSamples,nEvtPerSample,keepGenData,asciiFilePat) ;
541 return run(
true,
false,nSamples,nEvtPerSample,keepGenData,asciiFilePat) ;
559 return run(
false,
true,nSamples,0,
false,asciiFilePat) ;
576 for(
auto * gset : static_range_cast<RooAbsData*>(dataSetList)) {
580 return run(
false,
true,nSamples,0,
true,
nullptr) ;
602 std::unique_ptr<RooDataHist> ownedDataHist;
607 ownedDataHist = std::make_unique<RooDataHist>(genSample->
GetName(),genSample->
GetTitle(),depList,*genSample) ;
608 data = ownedDataHist.get();
618 fitOptList.Add(&save) ;
620 fitOptList.Add(&condo) ;
622 fitOptList.Add(&plevel) ;
638 std::unique_ptr<RooFitResult> fr;
640 fr = std::unique_ptr<RooFitResult>{
doFit(genSample)};
666 std::unique_ptr<RooFitResult> fr;
668 fr = std::unique_ptr<RooFitResult>{
doFit(genSample)};
669 ok = (fr->status()==0) ;
676 _nllVar->setVal(fr->minNll()) ;
707 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::addFitResult: ERROR cannot add fit results in current state" << endl ;
715 bool ok = (fr.
status()==0) ;
741 const auto par =
static_cast<RooRealVar*
>(*it);
742 _fitParData->addColumn(*std::unique_ptr<RooErrorVar>{par->errorVar()});
744 TString name(par->GetName()), title(par->GetTitle()) ;
745 name.Append(
"pull") ;
748 if (!par->hasError(
false)) {
749 coutW(Generation) <<
"Fit parameter '" << par->GetName() <<
"' does not have an error."
750 " A pull distribution cannot be generated. This might be caused by the parameter being constant or"
751 " because the fits were not run." << std::endl;
773 coutW(Generation) <<
"The fit parameter '" << par->GetName() <<
"' is not in the model that was used to generate toy data. "
774 "The parameter '" << genParOrig->GetName() <<
"'=" << genParOrig->getVal() <<
" was found at the same position in the generator model."
775 " It will be used to compute pulls."
776 "\nIf this is not desired, the parameters of the generator model need to be renamed or reordered." << std::endl;
781 std::unique_ptr<RooAbsReal> genPar(
static_cast<RooAbsReal*
>(genParOrig->Clone(
"truth")));
786 coutE(Generation) <<
"Cannot generate pull distribution for the fit parameter '" << par->GetName() <<
"'."
787 "\nNo similar parameter was found in the set of parameters that were used to generate toy data." << std::endl;
826 if (sampleNum<0 || sampleNum>=
_fitParData->numEntries()) {
827 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitParams: ERROR, invalid sample number: " << sampleNum << endl ;
845 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitResult: ERROR, invalid sample number: " << sampleNum << endl ;
854 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitResult: ERROR, no fit result saved for sample "
855 << sampleNum <<
", did you use the 'r; fit option?" << endl ;
870 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::genData() ERROR, generated data was not saved" << endl ;
876 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::genData() ERROR, invalid sample number: " << sampleNum << endl ;
897 _fitParData->plotOn(frame,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
923 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::plotParam: ERROR: no parameter defined with name " << paramName << endl ;
928 return plotParam(*param,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1006 std::unique_ptr<RooErrorVar> evar{param.
errorVar()};
1027 const std::string plotVarName = plotVar->
GetName();
1029 ws.
factory(
"Gaussian::pullGauss(" + plotVarName +
", pullMean[0.0, -10.0, 10.0], pullSigma[1.0, 0.1, 5.0])");
1036 pullGauss.
plotOn(&frame) ;
1042 const int sigDigits = 2;
1043 const char * options =
"ELU";
1044 std::stringstream ss;
1045 ss <<
"Fit parameters:\n"
1046 <<
"#mu: " << *std::unique_ptr<TString>{pullMean.
format(sigDigits, options)}
1047 <<
"\n#sigma: " << *std::unique_ptr<TString>{pullSigma.
format(sigDigits, options)};
1110 name.Append(
"pull") ; title.
Append(
" Pull") ;
1120 pc.
defineInt(
"fitGauss",
"FitGauss",0,0) ;
1123 bool fitGauss=pc.
getInt(
"fitGauss") ;
1127 const bool success =
_fitParData->plotOn(frame,cmdList) ;
1130 coutF(Plotting) <<
"No pull distribution for the parameter '" << param.
GetName() <<
"'. Check logs for errors." << std::endl;
1189 frameCmdList.
Add(&range) ;
1191 frameCmdList.
Add(&autoRange) ;
1193 frame = param.
frame(frameCmdList) ;
1229 std::unique_ptr<RooErrorVar> evar{param.
errorVar()};
1260 name.Append(
"pull") ; title.
Append(
" Pull") ;
1268 coutF(Plotting) <<
"No pull distribution for the parameter '" << param.
GetName() <<
"'. Check logs for errors." << std::endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void setAttribAll(const Text_t *name, bool value=true)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
const_iterator end() const
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
Storage_t::size_type size() const
const_iterator begin() const
RooAbsArg * find(const char *name) const
Find object with given name in list.
Abstract base class for binned and unbinned datasets.
virtual double sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual const RooArgSet * get() const
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
bool doInitializeInstance(RooMCStudy &)
Initializer method called upon attachment to given RooMCStudy object.
Abstract interface for all probability density functions.
virtual double expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, bool resample=false) const
Return lookup table with randomized order for nProto prototype events.
RooPlot * plotOn(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={}, const RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
virtual RooPlot * paramOn(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={})
Add a box with parameter values (and errors) to the specified frame.
RooFit::OwningPtr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Fit PDF to given dataset.
RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, bool stripDisconnected=true, bool removeConstraintsFromPdf=false) const
This helper function finds and collects all constraints terms of all component p.d....
virtual RooFit::OwningPtr< RooDataHist > generateBinned(const RooArgSet &whatVars, double nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}) const
As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,...
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false) const
Interface function to create a generator context from a p.d.f.
void setConstant(bool value=true)
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={}) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
Abstract base class for objects that represent a real value and implements functionality common to al...
RooFit::OwningPtr< RooAbsArg > createFundamental(const char *newname=nullptr) const override
Create a RooRealVar fundamental object with our properties.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
Named container for two doubles, two integers two object points and three string pointers that can be...
RooLinkedList const & subArgs() const
Return list of sub-arguments in this RooCmdArg.
TObject * Clone(const char *newName=nullptr) const override
Make a clone of an object using the Streamer facility.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
static void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
bool ok(bool verbose) const
Return true of parsing was successful.
bool defineObject(const char *name, const char *argName, int setNum, const TObject *obj=nullptr, bool isArray=false)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
TObject * getObject(const char *name, TObject *obj=nullptr) const
Return TObject property registered with name 'name'.
RooDataSet is a container class to hold unbinned data.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
bool write(const char *filename) const
Write the contents of this dataset to an ASCII file with the specified name.
static RooDataSet * read(const char *filename, const RooArgList &variables, const char *opts="", const char *commonPath="", const char *indexCatName=nullptr)
Read data from a text file and create a dataset from it.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
const RooArgList & floatParsFinal() const
Return list of floating parameters after fit.
Int_t status() const
Return MINUIT status code.
double minNll() const
Return minimized -log(L) value.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TObject * At(int index) const
Return object stored in sequential position given by index.
void RecursiveRemove(TObject *obj) override
If one of the TObject we have a referenced to is deleted, remove the reference.
void Delete(Option_t *o=nullptr) override
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
TObject * FindObject(const char *name) const override
Return pointer to object with given name.
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.
RooMCStudy(const RooAbsPdf &model, const RooArgSet &observables, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Construct Monte Carlo Study Manager.
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.
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.
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.
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
RooAbsRealLValue * getPlotVar() const
void createInternalPlotVarClone()
Replaces the pointer to the plot variable with a pointer to a clone of the plot variable that is owne...
RooPullVar represents the pull of a measurement w.r.t.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
RooRealVar represents a variable that can be changed from the outside.
RooErrorVar * errorVar() const
Return a RooAbsRealLValue representing the error associated with this variable.
TString * format(const RooCmdArg &formatArg) const
Format contents of RooRealVar for pretty printing on RooPlot parameter boxes.
void setBins(Int_t nBins, const char *name=nullptr)
Create a uniform binning under name 'name' for this variable.
Persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
RooFactoryWSTool & factory()
Return instance to factory tool.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
TString & Append(const char *cs)
RooCmdArg AutoRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg Label(const char *str)
RooCmdArg AutoSymRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg Bins(Int_t nbin)
RooCmdArg Layout(double xmin, double xmax=0.99, double ymin=0.95)
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg Save(bool flag=true)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg Minos(bool flag=true)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg ConditionalObservables(Args_t &&... argsOrArgSet)
Create a RooCmdArg to declare conditional observables.
RooCmdArg Range(const char *rangeName, bool adjustNorm=true)
OwningPtr< T > owningPtr(std::unique_ptr< T > &&ptr)
Internal helper to turn a std::unique_ptr<T> into an OwningPtr.
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...