45 RooCmdArg processImportItem(std::pair<std::string const, T*>
const& item) {
46 return Import(item.first.c_str(), *item.second) ;
50 RooCmdArg processLinkItem(std::pair<std::string const, T*>
const& item) {
51 return Link(item.first.c_str(), *item.second) ;
54 RooCmdArg processSliceItem(std::pair<RooCategory * const, std::string>
const& item) {
55 return Slice(*item.first, item.second.c_str());
58 template<
class Map_t,
class Func_t>
61 for (
auto const& item : map) {
62 container.addArg(func(item)) ;
64 container.setProcessRecArgs(
true,
false) ;
77 return processMap(
"SliceCatMany", processSliceItem, arg);
84 Bool_t binData) {
return RooCmdArg(
"ProjData",binData,0,0,0,0,0,&projSet,&projData) ; }
89 Bool_t binData) {
return RooCmdArg(
"ProjData",binData,0,0,0,0,0,0,&projData) ; }
95 RooCmdArg Range(
Double_t lo,
Double_t hi,
Bool_t adjustNorm){
return RooCmdArg(
"Range",adjustNorm,0,lo,
hi,0,0,0,0) ; }
106 RooCmdArg AddTo(
const char*
name,
double wgtSel,
double wgtOther) {
return RooCmdArg(
"AddTo",0,0,wgtSel,wgtOther,
name,0,0,0) ; }
109 RooCmdArg VisualizeError(
const RooFitResult& fitres,
Double_t Z,
Bool_t EVmethod) {
return RooCmdArg(
"VisualizeError",EVmethod,0,Z,0,0,0,&fitres,0) ; }
111 {
return RooCmdArg(
"VisualizeError",EVmethod,0,Z,0,0,0,&fitres,0,0,0,¶m) ; }
121 {
return RooCmdArg(
"Normalization",scaleType,0,scaleFactor,0,0,0,0,0) ; }
128 RooCmdArg Binning(
int nBins,
double xlo,
double xhi) {
return RooCmdArg(
"BinningSpec",nBins,0,xlo,xhi,0,0,0,0) ;}
146 return processMap(
"ImportDataHistSliceMany", processImportItem<RooDataHist>, arg);
149 return processMap(
"ImportHistoSliceMany", processImportItem<TH1>, arg);
161 RooCmdArg StoreError(
const RooArgSet& aset) {
return RooCmdArg(
"StoreError",0,0,0,0,0,0,0,0,0,0,&aset) ; }
163 RooCmdArg StoreAsymError(
const RooArgSet& aset) {
return RooCmdArg(
"StoreAsymError",0,0,0,0,0,0,0,0,0,0,&aset) ; }
165 RooCmdArg OwnLinked() {
return RooCmdArg(
"OwnLinked",1,0,0,0,0,0,0,0,0,0,0) ; }
168 return processMap(
"ImportDataSliceMany", processImportItem<RooDataSet>, arg);
171 return processMap(
"LinkDataSliceMany", processLinkItem<RooAbsData>, arg);
180 std::string lower = batchMode;
181 std::transform(lower.begin(), lower.end(), lower.begin(), [](
unsigned char c){ return std::tolower(c); });
189 else throw std::runtime_error(
"Only supported string values for BatchMode() are \"off\", \"cpu\", or \"cuda\".");
190 return RooCmdArg(
"BatchMode",
static_cast<int>(mode));
222 <<
"RooFit::FitOptions(const char* opts) will be removed in ROOT v628!\n"
223 <<
"Please migrate to the RooCmdArg-based fit configuration.\n"
224 <<
"The former character flags map to RooFit command arguments as follows:\n"
225 <<
" 'h' : RooFit::Hesse()\n"
226 <<
" 'm' : RooFit::Minos()\n"
227 <<
" 'o' : RooFit::Optimize(1)\n"
228 <<
" 'r' : RooFit::Save()\n"
229 <<
" 't' : RooFit::Timer()\n"
230 <<
" 'v' : RooFit::Verbose()\n"
231 <<
" '0' : RooFit::Strategy(0)\n"
232 <<
"You can alternatively silence this warning by using RooFitLegacy::FitOptions(const char*),\n"
233 <<
"but this will get removed in ROOT v6.28 as well.\n";
250 RooCmdArg Constrain(
const RooArgSet& params) {
return RooCmdArg(
"Constrain",0,0,0,0,0,0,0,0,0,0,¶ms) ; }
254 RooCmdArg ExternalConstraints(
const RooArgSet& cpdfs) {
return RooCmdArg(
"ExternalConstraints",0,0,0,0,0,0,&cpdfs,0,0,0,&cpdfs) ; }
271 RooCmdArg Layout(
Double_t xmin,
Double_t xmax,
Double_t ymin) {
return RooCmdArg(
"Layout",
Int_t(
ymin*10000),0,
xmin,
xmax,0,0,0,0) ; }
280 RooCmdArg Conditional(
const RooArgSet& pdfSet,
const RooArgSet& depSet,
Bool_t depsAreCond) {
return RooCmdArg(
"Conditional",depsAreCond,0,0,0,0,0,0,0,0,0,&pdfSet,&depSet) ; } ;
293 {
return RooCmdArg(
"PrototypeData",randomizeOrder,resample,0,0,0,0,&protoData,0) ; }
304 RooCmdArg YVar(
const RooAbsRealLValue& var,
const RooCmdArg& arg) {
return RooCmdArg(
"YVar",0,0,0,0,0,0,&var,0,&arg) ; }
305 RooCmdArg ZVar(
const RooAbsRealLValue& var,
const RooCmdArg& arg) {
return RooCmdArg(
"ZVar",0,0,0,0,0,0,&var,0,&arg) ; }
317 RooCmdArg IntegratedObservables(
const RooArgSet& intObs) {
return RooCmdArg(
"IntObs",0,0,0,0,0,0,0,0,0,0,&intObs,0) ; } ;
386 RooCmdArg SplitParamConstrained(
const char* varname,
const char* catname,
const char* rsname) {
return RooCmdArg(
"SplitParamConstrained",0,0,0,0,varname,catname,0,0,0,rsname) ; }
387 RooCmdArg SplitParamConstrained(
const RooRealVar& var,
const RooAbsCategory& cat,
const char* rsname) {
return RooCmdArg(
"SplitParamConstrained",0,0,0,0,var.
GetName(),cat.
GetName(),0,0,0,rsname) ; }
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
include TDocParser_001 C image html pict1_TDocParser_001 png width
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCategory is an object to represent discrete states.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
static T const & take(T &&obj)
void addArg(const RooCmdArg &arg)
Utility function to add nested RooCmdArg to payload of this RooCmdArg.
void setProcessRecArgs(Bool_t flag, Bool_t prefix=kTRUE)
RooConstVar represent a constant real-valued object.
The RooDataHist is a container class to hold N-dimensional binned data.
RooDataSet is a container class to hold unbinned data.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
static RooConstVar & value(Double_t value)
Return a constant value object with given value.
RooRealVar represents a variable that can be changed from the outside.
TH1 is the base class of all histogram classes in ROOT.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
RooCmdArg Scaling(Bool_t flag)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg FrameBins(Int_t nbins)
RooCmdArg NoRecursion(Bool_t flag=kTRUE)
RooCmdArg TLatexStyle(Bool_t flag=kTRUE)
RooCmdArg ClassName(const char *name)
RooCmdArg Binned(Bool_t flag=kTRUE)
RooCmdArg FitModel(RooAbsPdf &pdf)
RooCmdArg RecycleConflictNodes(Bool_t flag=kTRUE)
RooCmdArg IntegratedObservables(const RooArgSet &intObs)
RooCmdArg OutputStream(std::ostream &os)
RooCmdArg Topic(Int_t topic)
RooCmdArg Embedded(Bool_t flag=kTRUE)
RooCmdArg ShowConstants(Bool_t flag=kTRUE)
RooCmdArg Parameters(const RooArgSet ¶ms)
RooCmdArg NumIntConfig(const RooNumIntConfig &cfg)
RooCmdArg ScanParameters(Int_t nbins, Int_t intOrder)
RooCmdArg Label(const char *str)
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg TagName(const char *name)
RooCmdArg AutoSymBinning(Int_t nbins=100, Double_t marginFactor=0.1)
RooCmdArg BaseClassName(const char *name)
RooCmdArg Restrict(const char *catName, const char *stateNameList)
RooCmdArg FrameRange(Double_t xlo, Double_t xhi)
RooCmdArg MultiArg(const RooCmdArg &arg1, const RooCmdArg &arg2, 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())
RooCmdArg IntrinsicBinning(Bool_t flag=kTRUE)
RooCmdArg RenameAllVariables(const char *suffix)
RooCmdArg FitGauss(Bool_t flag=kTRUE)
RooCmdArg RenameConflictNodes(const char *suffix, Bool_t renameOrigNodes=kFALSE)
RooCmdArg RenameVariable(const char *inputName, const char *outputName)
RooCmdArg Color(Color_t color)
RooCmdArg FixedPrecision(Int_t ndigit=2)
RooCmdArg AutoPrecision(Int_t ndigit=2)
RooCmdArg Title(const char *name)
RooCmdArg RenameAllNodes(const char *suffix)
RooCmdArg SplitParam(const char *varname, const char *catname)
RooCmdArg Rename(const char *suffix)
RooCmdArg Format(const char *format, Int_t sigDigit)
RooCmdArg SupNormSet(const RooArgSet &nset)
RooCmdArg Layout(Double_t xmin, Double_t xmax=0.99, Double_t ymin=0.95)
RooCmdArg SelectVars(const RooArgSet &vars)
RooCmdArg Silence(Bool_t flag=kTRUE)
RooCmdArg LatexTableStyle(Bool_t flag=kTRUE)
RooConstVar & RooConst(Double_t val)
RooCmdArg RenameAllVariablesExcept(const char *suffix, const char *exceptionList)
RooCmdArg VerbatimName(Bool_t flag=kTRUE)
RooCmdArg Columns(Int_t ncol)
RooCmdArg EventRange(Int_t nStart, Int_t nStop)
RooCmdArg 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())
RooCmdArg ObjectName(const char *name)
RooCmdArg AutoSymRange(const RooAbsData &data, Double_t marginFactor=0.1)
RooCmdArg AxisLabel(const char *name)
RooCmdArg Sibling(const RooAbsCollection &sibling)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, Bool_t depsAreCond=kFALSE)
RooCmdArg SplitParamConstrained(const char *varname, const char *catname, const char *rsname)
RooCmdArg AutoRange(const RooAbsData &data, Double_t marginFactor=0.1)
RooCmdArg What(const char *str)
RooCmdArg AutoBinning(Int_t nbins=100, Double_t marginFactor=0.1)
RooCmdArg Bins(Int_t nbin)
RooCmdArg OutputFile(const char *fileName)
RooCmdArg LatexStyle(Bool_t flag=kTRUE)
RooCmdArg WeightVar(const char *name, Bool_t reinterpretAsWeight=kFALSE)
RooCmdArg ImportFromFile(const char *fname, const char *tname)
RooCmdArg StoreAsymError(const RooArgSet &aset)
RooCmdArg Index(RooCategory &icat)
RooCmdArg Weight(Double_t wgt)
RooCmdArg StoreError(const RooArgSet &aset)
RooCmdArg Link(const char *state, RooAbsData &data)
RooCmdArg Import(const char *state, TH1 &histo)
RooCmdArg IntegrateBins(double precision)
Integrate the PDF over bins. Improves accuracy for binned fits. Switch off using 0....
RooCmdArg EvalErrorWall(Bool_t flag)
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg GlobalObservablesTag(const char *tagName)
RooCmdArg Strategy(Int_t code)
RooCmdArg Warnings(Bool_t flag=kTRUE)
RooCmdArg Integrate(Bool_t flag)
RooCmdArg SumW2Error(Bool_t flag)
RooCmdArg Extended(Bool_t flag=kTRUE)
RooCmdArg GlobalObservablesSource(const char *sourceName)
RooCmdArg SumCoefRange(const char *rangeName)
RooCmdArg SplitRange(Bool_t flag=kTRUE)
RooCmdArg PrintEvalErrors(Int_t numErrors)
RooCmdArg Optimize(Int_t flag=2)
RooCmdArg Hesse(Bool_t flag=kTRUE)
RooCmdArg InitialHesse(Bool_t flag=kTRUE)
RooCmdArg DataError(Int_t)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg CloneData(Bool_t flag)
RooCmdArg FitOptions(const char *opts) R__DEPRECATED(6
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg NumCPU(Int_t nCPU, Int_t interleave=0)
RooCmdArg RecoverFromUndefinedRegions(double strength)
When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leav...
RooCmdArg BatchMode(std::string const &batchMode="cpu")
RooCmdArg Verbose(Bool_t flag=kTRUE)
RooCmdArg PrefitDataFraction(Double_t data_ratio=0.0)
RooCmdArg AsymptoticError(Bool_t flag)
RooCmdArg Offset(Bool_t flag=kTRUE)
RooCmdArg Minimizer(const char *type, const char *alg=0)
RooCmdArg Minos(Bool_t flag=kTRUE)
RooCmdArg ProtoData(const RooDataSet &protoData, Bool_t randomizeOrder=kFALSE, Bool_t resample=kFALSE)
RooCmdArg Asimov(Bool_t flag=kTRUE)
RooCmdArg AutoBinned(Bool_t flag=kTRUE)
RooCmdArg NumEvents(Int_t numEvents)
RooCmdArg GenBinned(const char *tag)
RooCmdArg ExpectedData(Bool_t flag=kTRUE)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg VisualizeError(const RooDataSet ¶mData, Double_t Z=1)
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg ProjWData(const RooAbsData &projData, Bool_t binData=kFALSE)
RooCmdArg ProjectionRange(const char *rangeName)
RooCmdArg FillColor(Color_t color)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg NormRange(const char *rangeNameList)
RooCmdArg DrawOption(const char *opt)
RooCmdArg Project(const RooArgSet &projSet)
RooCmdArg FillStyle(Style_t style)
RooCmdArg EvalErrorValue(Double_t value)
RooCmdArg Rescale(Double_t factor)
RooCmdArg Invisible(bool inv=true)
RooCmdArg MarkerStyle(Style_t style)
RooCmdArg LineWidth(Width_t width)
RooCmdArg Slice(const RooArgSet &sliceSet)
RooCmdArg AddTo(const char *name, double wgtSel=1.0, double wgtOther=1.0)
RooCmdArg CutRange(const char *rangeName)
RooCmdArg MarkerSize(Size_t size)
RooCmdArg Precision(Double_t prec)
RooCmdArg Cut(const char *cutSpec)
RooCmdArg Range(const char *rangeName, Bool_t adjustNorm=kTRUE)
RooCmdArg XErrorSize(Double_t width)
RooCmdArg Normalization(Double_t scaleFactor)
RooCmdArg Efficiency(const RooCategory &cat)
RooCmdArg LineColor(Color_t color)
RooCmdArg Name(const char *name)
RooCmdArg LineStyle(Style_t style)
RooCmdArg Asymmetry(const RooCategory &cat)
RooCmdArg FitOptions(const char *opts)
RooConstVar & C(Double_t value)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg BootStrapData(const RooDataSet &dset)
RooCmdArg ShowUnit(Bool_t flag)
BatchModeOption
For setting the batch mode flag with the BatchMode() command argument to RooAbsPdf::fitTo();.
RooCmdArg ShowValue(Bool_t flag)
RooCmdArg ShowName(Bool_t flag)
RooCmdArg ShowError(Bool_t flag)
RooCmdArg ShowAsymError(Bool_t flag)
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Wrap an object into a TObject. Sometimes needed to avoid reinterpret_cast or enable RTTI.