133 pc.
defineSet(
"extCons",
"ExternalConstraints",0,0) ;
135 pc.
defineInt(
"randProtoData",
"PrototypeData",0,0) ;
136 pc.
defineInt(
"verboseGen",
"Verbose",0,0) ;
137 pc.
defineInt(
"extendedGen",
"Extended",0,0) ;
138 pc.
defineInt(
"binGenData",
"Binned",0,0) ;
143 pc.
defineMutex(
"ExternalConstraints",
"FitOptions") ;
149 throw std::string(
"RooMCStudy::RooMCStudy() Error in parsing arguments passed to contructor") ;
174 cPars->
add(*cParsTmp) ;
191 allConstraints.
add(*constraints) ;
197 if (allConstraints.
getSize()>0) {
198 _constrPdf =
new RooProdPdf(
"mcs_constr_prod",
"RooMCStudy constraints product",allConstraints) ;
201 consPars.
add(*cPars) ;
205 consPars.
add(*cparams) ;
213 coutI(Generation) <<
"RooMCStudy::RooMCStudy: INFO have pdf with constraints, will generate parameters from constraint pdf for each experiment" << endl ;
243 oocoutW(
_fitModel,Generation) <<
"RooMCStudy::RooMCStudy: WARNING Using generator option 'e' (Poisson distribution of #events) together " << endl
244 <<
" with a prototype dataset implies incomplete sampling or oversampling of proto data." << endl
245 <<
" Use option \"r\" to randomize prototype dataset order and thus to randomize" << endl
246 <<
" the set of over/undersampled prototype events for each generation cycle." << endl ;
302 list<RooAbsMCStudyModule*>::iterator iter ;
304 Bool_t ok = (*iter)->doInitializeInstance(*
this) ;
306 oocoutE(
_fitModel,Generation) <<
"RooMCStudy::ctor: removing study module " << (*iter)->GetName() <<
" from analysis chain because initialization failed" << endl ;
331 const RooArgSet& dependents,
const char* genOptions,
332 const char* fitOptions,
const RooDataSet* genProtoData,
334 TNamed(
"mcstudy",
"mcstudy"),
336 _genProtoData(genProtoData),
339 _constrGenContext(0),
340 _dependents(dependents),
341 _allDependents(dependents),
346 _fitOptions(fitOptions),
347 _canAddFitResults(
kTRUE),
348 _perExptGenParams(0),
360 oocoutE(
_fitModel,Generation) <<
"RooMCStudy::RooMCStudy: WARNING Using generator option 'e' (Poisson distribution of #events) together " << endl
361 <<
" with a prototype dataset implies incomplete sampling or oversampling of proto data." << endl
362 <<
" Use option \"r\" to randomize prototype dataset order and thus to randomize" << endl
363 <<
" the set of over/undersampled prototype events for each generation cycle." << endl ;
407 list<RooAbsMCStudyModule*>::iterator iter ;
409 Bool_t ok = (*iter)->doInitializeInstance(*
this) ;
411 oocoutE(
_fitModel,Generation) <<
"RooMCStudy::ctor: removing study module " << (*iter)->GetName() <<
" from analysis chain because initialization failed" << endl ;
474 list<RooAbsMCStudyModule*>::iterator iter ;
476 (*iter)->initializeRun(nSamples) ;
479 Int_t prescale = nSamples>100 ?
Int_t(nSamples/100) : 1 ;
483 if (nSamples%prescale==0) {
495 Int_t nEvt(nEvtPerSample) ;
513 list<RooAbsMCStudyModule*>::iterator iter2 ;
515 (*iter2)->processBeforeGen(nSamples) ;
539 oocoutI(
_fitModel,Generation) <<
"RooMCStudy: (Re)randomizing event order in prototype dataset (Nevt=" << nEvt <<
")" << endl ;
545 coutP(Generation) <<
"RooMCStudy: now generating " << nEvt <<
" events" << endl ;
558 }
else if (asciiFilePat) {
561 char asciiFile[1024] ;
562 snprintf(asciiFile,1024,asciiFilePat,nSamples) ;
570 existingData =
kTRUE ;
572 oocoutW(
_fitModel,Generation) <<
"RooMCStudy::run: WARNING: Sample #" << nSamples <<
" not loaded, skipping" << endl ;
581 list<RooAbsMCStudyModule*>::iterator iter3 ;
583 (*iter3)->processBetweenGenAndFit(nSamples) ;
590 (*iter3)->processAfterFit(nSamples) ;
594 if (doGenerate && asciiFilePat && *asciiFilePat) {
595 char asciiFile[1024] ;
596 snprintf(asciiFile,1024,asciiFilePat,nSamples) ;
599 unbinnedData->
write(asciiFile) ;
601 coutE(InputArguments) <<
"RooMCStudy::run(" <<
GetName() <<
") ERROR: ASCII writing of binned datasets is not supported" << endl ;
616 RooDataSet* auxData = (*iter)->finalizeRun() ;
667 return run(
kTRUE,
kTRUE,nSamples,nEvtPerSample,keepGenData,asciiFilePat) ;
687 return run(
kTRUE,
kFALSE,nSamples,nEvtPerSample,keepGenData,asciiFilePat) ;
778 fitOptList.
Add(&save) ;
780 fitOptList.
Add(&condo) ;
783 fitOptList.
Add(&plevel) ;
807 fr =
doFit(genSample) ;
835 fr =
doFit(genSample) ;
859 if (userSaveRequest) {
883 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::addFitResult: ERROR cannot add fit results in current state" << endl ;
917 const auto par =
static_cast<RooRealVar*
>(*it);
922 TString name(par->GetName()), title(par->GetTitle()) ;
923 name.Append(
"pull") ;
926 if (!par->hasError(
false)) {
927 coutW(Generation) <<
"Fit parameter '" << par->GetName() <<
"' does not have an error."
928 " A pull distribution cannot be generated. This might be caused by the parameter being constant or"
929 " because the fits were not run." << std::endl;
947 static_cast<RooAbsReal*
>((*_genInitParams)[index]) :
951 coutW(Generation) <<
"The fit parameter '" << par->GetName() <<
"' is not in the model that was used to generate toy data. "
952 "The parameter '" << genParOrig->GetName() <<
"'=" << genParOrig->getVal() <<
" was found at the same position in the generator model."
953 " It will be used to compute pulls."
954 "\nIf this is not desired, the parameters of the generator model need to be renamed or reordered." << std::endl;
959 std::unique_ptr<RooAbsReal> genPar(
static_cast<RooAbsReal*
>(genParOrig->Clone(
"truth")));
964 coutE(Generation) <<
"Cannot generate pull distribution for the fit parameter '" << par->
GetName() <<
"'."
965 "\nNo similar parameter was found in the set of parameters that were used to generate toy data." << std::endl;
1005 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitParams: ERROR, invalid sample number: " << sampleNum << endl ;
1023 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitResult: ERROR, invalid sample number: " << sampleNum << endl ;
1032 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::fitResult: ERROR, no fit result saved for sample "
1033 << sampleNum <<
", did you use the 'r; fit option?" << endl ;
1048 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::genData() ERROR, generated data was not saved" << endl ;
1054 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::genData() ERROR, invalid sample number: " << sampleNum << endl ;
1101 oocoutE(
_fitModel,InputArguments) <<
"RooMCStudy::plotParam: ERROR: no parameter defined with name " << paramName << endl ;
1106 return plotParam(*param,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1186 RooPlot* frame =
plotParam(*evar_rrv,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1230 name.Append(
"pull") ; title.
Append(
" Pull") ;
1240 pc.
defineInt(
"fitGauss",
"FitGauss",0,0) ;
1250 coutF(Plotting) <<
"No pull distribution for the parameter '" << param.
GetName() <<
"'. Check logs for errors." << std::endl;
1256 RooRealVar pullMean(
"pullMean",
"Mean of pull",0,-10,10) ;
1257 RooRealVar pullSigma(
"pullSigma",
"Width of pull",1,0.1,5) ;
1259 "exp(-0.5*(@0-@1)*(@0-@1)/(@2*@2))",
1262 pullGauss.
plotOn(frame) ;
1313 frameCmdList.
Add(&range) ;
1315 frameCmdList.
Add(&autor) ;
1317 frame = param.
frame(frameCmdList) ;
1385 name.Append(
"pull") ; title.
Append(
" Pull") ;
1393 coutF(Plotting) <<
"No pull distribution for the parameter '" << param.
GetName() <<
"'. Check logs for errors." << std::endl;
1398 RooRealVar pullMean(
"pullMean",
"Mean of pull",0,lo,
hi) ;
1399 RooRealVar pullSigma(
"pullSigma",
"Width of pull",1,0,5) ;
1401 "exp(-0.5*(@0-@1)*(@0-@1)/(@2*@2))",
1404 pullGauss.
plotOn(frame) ;
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
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...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
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
void setAttribAll(const Text_t *name, Bool_t value=kTRUE)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
virtual Bool_t changeObservableName(const char *from, const char *to)
virtual Double_t sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
virtual void attach(const RooArgSet ¶ms)
Interface to attach given parameters to object in this context.
virtual RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
Bool_t doInitializeInstance(RooMCStudy &)
Store reference to RooMCStudy object that this module relates to and call internal module initializat...
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Interface function to create a generator context from a p.d.f.
virtual RooDataHist * generateBinned(const RooArgSet &whatVars, Double_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none()) const
As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,...
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
virtual RooPlot * paramOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Add a box with parameter values (and errors) to the specified frame.
virtual RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, Bool_t stripDisconnected=kTRUE) const
This helper function finds and collects all constraints terms of all component p.d....
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, Bool_t resample=kFALSE) const
Return lookup table with randomized order for nProto prototype events.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooAbsArg * createFundamental(const char *newname=0) const
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.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
RooLinkedList & subArgs()
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
void allowUndefined(Bool_t flag=kTRUE)
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
Bool_t defineSet(const char *name, const char *argName, Int_t setNum, const RooArgSet *set=0)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
RooArgSet * getSet(const char *name, RooArgSet *set=0)
Return RooArgSet property registered with name 'name'.
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
The RooDataHist is a container class to hold N-dimensional binned data.
RooDataSet is a container class to hold unbinned data.
virtual const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)
Add a column with the values of the given (function) argument to this dataset.
Bool_t 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=0)
Read given list of ascii files, and construct a data set, using the given ArgList as structure defini...
Bool_t merge(RooDataSet *data1, RooDataSet *data2=0, RooDataSet *data3=0, RooDataSet *data4=0, RooDataSet *data5=0, RooDataSet *data6=0)
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0) override
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
RooErrorVar is an auxilary class that represents the error of a RooRealVar as a seperate object.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Double_t minNll() const
Return minimized -log(L) value.
const RooArgList & floatParsFinal() const
Return list of floarting parameters after fit.
Int_t status() const
Return MINUIT status code.
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
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.
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
virtual void Add(TObject *arg)
RooMCStudy is a helper class to facilitate Monte Carlo studies such as 'goodness-of-fit' studies,...
RooPlot * plotNLL(const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Plot the distribution of the -log(L) values on a newly created frame.
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.
Bool_t addFitResult(const RooFitResult &fr)
Utility function to add fit result from external fit to this RooMCStudy and process its results throu...
Bool_t run(Bool_t generate, Bool_t fit, Int_t nSamples, Int_t nEvtPerSample, Bool_t keepGenData, const char *asciiFilePat)
Run engine method.
RooMCStudy(const RooAbsPdf &model, const RooArgSet &observables, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Construct Monte Carlo Study Manager.
std::list< RooAbsMCStudyModule * > _modList
RooAbsGenContext * _constrGenContext
RooFitResult * refit(RooAbsData *genSample=0)
Redo fit on 'current' toy sample, or if genSample is not NULL do fit on given sample instead.
Bool_t fitSample(RooAbsData *genSample)
Internal method.
const RooDataSet * _genProtoData
const RooFitResult * fitResult(Int_t sampleNum) const
Return the RooFitResult of the fit with the given run number.
RooPlot * plotError(const RooRealVar ¶m, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Plot the distribution of the fit errors for the specified parameter on a newly created frame.
RooAbsGenContext * _genContext
RooArgSet * _fitInitParams
RooPlot * makeFrameAndPlotCmd(const RooRealVar ¶m, RooLinkedList &cmdList, Bool_t symRange=kFALSE) const
Internal function.
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
RooAbsData * genData(Int_t sampleNum) const
Return the given generated dataset.
RooArgSet * _genInitParams
const RooDataSet & fitParDataSet()
Return a RooDataSet containing the post-fit parameters of each toy cycle.
RooPlot * plotParamOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Plot the distribution of fitted values of a parameter.
RooLinkedList _fitOptList
Bool_t generate(Int_t nSamples, Int_t nEvtPerSample=0, Bool_t keepGenData=kFALSE, const char *asciiFilePat=0)
Generate 'nSamples' samples of 'nEvtPerSample' events.
void resetFitParams()
Reset all fit parameters to the initial model parameters at the time of the RooMCStudy constructor.
Bool_t generateAndFit(Int_t nSamples, Int_t nEvtPerSample=0, Bool_t keepGenData=kFALSE, const char *asciiFilePat=0)
Generate and fit 'nSamples' samples of 'nEvtPerSample' events.
Bool_t fit(Int_t nSamples, const char *asciiFilePat)
Fit 'nSamples' datasets, which are read from ASCII files.
RooPlot * plotParam(const RooRealVar ¶m, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Plot the distribution of the fitted value of the given parameter on a newly created frame.
void addModule(RooAbsMCStudyModule &module)
Insert given RooMCStudy add-on module to the processing chain of this MCStudy object.
RooFitResult * doFit(RooAbsData *genSample)
Internal function. Performs actual fit according to specifications.
RooPlot * plotPull(const RooRealVar ¶m, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Plot the distribution of pull values 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.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
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.
void setBins(Int_t nBins, const char *name=0)
Create a uniform binning under name 'name' for this variable.
RooErrorVar * errorVar() const
Return a RooAbsRealLValue representing the error associated with this variable.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Add(TObject *obj)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
void ToLower()
Change string to lower-case.
const char * Data() const
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
RooCmdArg AutoSymRange(const RooAbsData &data, Double_t marginFactor=0.1)
RooCmdArg AutoRange(const RooAbsData &data, Double_t marginFactor=0.1)
RooCmdArg Bins(Int_t nbin)
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg ConditionalObservables(Args_t &&... argsOrArgSet)
Create a RooCmdArg to declare conditional observables.
RooCmdArg Minos(Bool_t flag=kTRUE)
RooCmdArg Range(const char *rangeName, Bool_t adjustNorm=kTRUE)
RooCmdArg FitOptions(const char *opts)
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.