44 RooCmdArg processImportItem(std::pair<std::string const, T*>
const& item) {
45 return Import(item.first.c_str(), *item.second) ;
49 RooCmdArg processLinkItem(std::pair<std::string const, T*>
const& item) {
50 return Link(item.first.c_str(), *item.second) ;
53 RooCmdArg processSliceItem(std::pair<RooCategory * const, std::string>
const& item) {
54 return Slice(*item.first, item.second.c_str());
57 template<
class Map_t,
class Func_t>
60 for (
auto const& item : map) {
61 container.addArg(func(item)) ;
63 container.setProcessRecArgs(
true,
false) ;
69 namespace Experimental {
72 static std::string batchMode =
"off";
77 return RooCmdArg(
"ParallelGradientOptions",enable,chainFactor,orderStrategy,0,0,0,0,0) ;}
79 return RooCmdArg(
"ParallelDescentOptions",enable,numSplits,splitStrategy,0,0,0,0,0) ;}
92 return processMap(
"SliceCatMany", processSliceItem, arg);
103 RooCmdArg out{
"ProjData",binData,0,0,0,0,0,
nullptr,&projData};
104 out.setSet(0, projSet);
108 bool binData) {
return RooCmdArg(
"ProjData",binData,0,0,0,0,0,0,&projData) ; }
113 RooCmdArg Range(
const char* rangeName,
bool adjustNorm) {
return RooCmdArg(
"RangeWithName",adjustNorm,0,0,0,rangeName,0,0,0) ; }
114 RooCmdArg Range(
double lo,
double hi,
bool adjustNorm){
return RooCmdArg(
"Range",adjustNorm,0,lo,
hi,0,0,0,0) ; }
125 RooCmdArg AddTo(
const char*
name,
double wgtSel,
double wgtOther) {
return RooCmdArg(
"AddTo",0,0,wgtSel,wgtOther,
name,0,0,0) ; }
128 RooCmdArg VisualizeError(
const RooFitResult& fitres,
double Z,
bool EVmethod) {
return RooCmdArg(
"VisualizeError",EVmethod,0,Z,0,0,0,&fitres,0) ; }
130 {
return RooCmdArg(
"VisualizeError",EVmethod,0,Z,0,0,0,&fitres,0,0,0,¶m) ; }
137 {
return RooCmdArg(
"Normalization",scaleType,0,scaleFactor,0,0,0,0,0) ; }
144 RooCmdArg Binning(
int nBins,
double xlo,
double xhi) {
return RooCmdArg(
"BinningSpec",nBins,0,xlo,xhi,0,0,0,0) ;}
162 return processMap(
"ImportDataHistSliceMany", processImportItem<RooDataHist>, arg);
165 return processMap(
"ImportHistoSliceMany", processImportItem<TH1>, arg);
172 return RooCmdArg(
"WeightVarName",reinterpretAsWeight,0,0,0,
name,0,0,0) ;
180 RooCmdArg StoreError(
const RooArgSet& aset) {
return RooCmdArg(
"StoreError",0,0,0,0,0,0,0,0,0,0,&aset) ; }
181 RooCmdArg StoreAsymError(
const RooArgSet& aset) {
return RooCmdArg(
"StoreAsymError",0,0,0,0,0,0,0,0,0,0,&aset) ; }
182 RooCmdArg OwnLinked() {
return RooCmdArg(
"OwnLinked",1,0,0,0,0,0,0,0,0,0,0) ; }
185 return processMap(
"ImportDataSliceMany", processImportItem<RooDataSet>, arg);
188 return processMap(
"LinkDataSliceMany", processLinkItem<RooAbsData>, arg);
200 std::string lower = batchMode;
201 std::transform(lower.begin(), lower.end(), lower.begin(), [](
unsigned char c){ return std::tolower(c); });
209 else throw std::runtime_error(
"Only supported string values for BatchMode() are \"off\", \"cpu\", or \"cuda\".");
264 std::stringstream errorMsg;
265 errorMsg <<
"RooFit::Constrain(): you passed the argument \"" << param->
GetName()
266 <<
"\", but it's not a RooRealVar!"
267 <<
" You can only constrain parameters, which must be RooRealVars.";
269 throw std::invalid_argument(errorMsg.str().c_str());
272 return RooCmdArg(
"Constrain",0,0,0,0,0,0,0,0,0,0,¶ms);
276 RooCmdArg ExternalConstraints(
const RooArgSet& cpdfs) {
return RooCmdArg(
"ExternalConstraints",0,0,0,0,0,0,
nullptr,
nullptr,0,0,&cpdfs) ; }
282 oocoutI(
nullptr,
InputArguments) <<
"The deprecated RooFit::CloneData(" << flag <<
") option passed to createNLL() is ignored." << std::endl;
283 return RooCmdArg(
"CloneData",flag,0,0,0,0,0,0,0) ;
289 std::string lower =
mode;
290 std::transform(lower.begin(), lower.end(), lower.begin(), [](
unsigned char c){ return std::tolower(c); });
295 return RooCmdArg(
"OffsetLikelihood",
static_cast<int>(modeVal));
305 RooCmdArg Layout(
double xmin,
double xmax,
double ymin) {
return RooCmdArg(
"Layout",
Int_t(
ymin*10000),0,
xmin,
xmax,0,0,0,0) ; }
317 RooCmdArg Conditional(
const RooArgSet& pdfSet,
const RooArgSet& depSet,
bool depsAreCond) {
return RooCmdArg(
"Conditional",depsAreCond,0,0,0,0,0,0,0,0,0,&pdfSet,&depSet) ; } ;
321 {
return RooCmdArg(
"PrototypeData",randomizeOrder,resample,0,0,0,0,&protoData,0) ; }
332 RooCmdArg YVar(
const RooAbsRealLValue& var,
const RooCmdArg& arg) {
return RooCmdArg(
"YVar",0,0,0,0,0,0,&var,0,&arg) ; }
333 RooCmdArg ZVar(
const RooAbsRealLValue& var,
const RooCmdArg& arg) {
return RooCmdArg(
"ZVar",0,0,0,0,0,0,&var,0,&arg) ; }
345 RooCmdArg IntegratedObservables(
const RooArgSet& intObs) {
return RooCmdArg(
"IntObs",0,0,0,0,0,0,0,0,0,0,&intObs,0) ; } ;
413 RooCmdArg SplitParamConstrained(
const char* varname,
const char* catname,
const char* rsname) {
return RooCmdArg(
"SplitParamConstrained",0,0,0,0,varname,catname,0,0,0,rsname) ; }
414 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
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 value
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
A space to attach TBranches.
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...
void addArg(const RooCmdArg &arg)
Utility function to add nested RooCmdArg to payload of this RooCmdArg.
static const RooCmdArg & none()
Return reference to null argument.
void setSet(Int_t idx, const RooArgSet &set)
void setProcessRecArgs(bool flag, bool prefix=true)
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 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.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg AutoRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg FitGauss(bool flag=true)
RooCmdArg FrameBins(Int_t nbins)
RooCmdArg ClassName(const char *name)
RooCmdArg FitModel(RooAbsPdf &pdf)
RooCmdArg LatexStyle(bool flag=true)
RooCmdArg VerbatimName(bool flag=true)
RooCmdArg IntegratedObservables(const RooArgSet &intObs)
RooCmdArg OutputStream(std::ostream &os)
RooCmdArg Topic(Int_t topic)
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 FitOptions(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 TagName(const char *name)
RooCmdArg BaseClassName(const char *name)
RooCmdArg IntrinsicBinning(bool flag=true)
RooCmdArg Restrict(const char *catName, const char *stateNameList)
RooCmdArg TLatexStyle(bool flag=true)
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 RenameAllVariables(const char *suffix)
RooCmdArg ShowConstants(bool flag=true)
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 SelectVars(const RooArgSet &vars)
RooCmdArg AutoBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg FrameRange(double xlo, double xhi)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
RooCmdArg LatexTableStyle(bool flag=true)
RooCmdArg RenameAllVariablesExcept(const char *suffix, const char *exceptionList)
RooCmdArg Scaling(bool flag)
RooConstVar & RooConst(double val)
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 Silence(bool flag=true)
RooCmdArg NoRecursion(bool flag=true)
RooCmdArg AxisLabel(const char *name)
RooCmdArg Sibling(const RooAbsCollection &sibling)
RooCmdArg Binned(bool flag=true)
RooCmdArg SplitParamConstrained(const char *varname, const char *catname, const char *rsname)
RooCmdArg What(const char *str)
RooCmdArg RenameConflictNodes(const char *suffix, bool renameOrigNodes=false)
RooCmdArg AutoSymRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg Bins(Int_t nbin)
RooCmdArg Embedded(bool flag=true)
RooCmdArg OutputFile(const char *fileName)
RooCmdArg AutoSymBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg Layout(double xmin, double xmax=0.99, double ymin=0.95)
RooCmdArg ImportFromFile(const char *fname, const char *tname)
RooCmdArg StoreAsymError(const RooArgSet &aset)
RooCmdArg Weight(double wgt)
RooCmdArg Index(RooCategory &icat)
RooCmdArg StoreError(const RooArgSet &aset)
RooCmdArg Link(const char *state, RooAbsData &data)
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
RooCmdArg Import(const char *state, TH1 &histo)
RooCmdArg InitialHesse(bool flag=true)
RooCmdArg IntegrateBins(double precision)
Integrate the PDF over bins. Improves accuracy for binned fits. Switch off using 0....
RooCmdArg MaxCalls(int n)
RooCmdArg SplitRange(bool flag=true)
RooCmdArg AsymptoticError(bool flag)
RooCmdArg PrefitDataFraction(double data_ratio=0.0)
RooCmdArg Offset(std::string const &mode)
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg GlobalObservablesTag(const char *tagName)
RooCmdArg Minimizer(const char *type, const char *alg=nullptr)
RooCmdArg Hesse(bool flag=true)
RooCmdArg Save(bool flag=true)
RooCmdArg Integrate(bool flag)
RooCmdArg SumW2Error(bool flag)
RooCmdArg GlobalObservablesSource(const char *sourceName)
RooCmdArg SumCoefRange(const char *rangeName)
RooCmdArg PrintEvalErrors(Int_t numErrors)
RooCmdArg Optimize(Int_t flag=2)
RooCmdArg Parallelize(int nWorkers)
RooCmdArg EvalErrorWall(bool flag)
RooCmdArg DataError(Int_t)
RooCmdArg Warnings(bool flag=true)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg Minos(bool flag=true)
RooCmdArg ModularL(bool flag=false)
RooCmdArg TimingAnalysis(bool timingAnalysis)
RooCmdArg NumCPU(Int_t nCPU, Int_t interleave=0)
RooCmdArg CloneData(bool flag)
RooCmdArg RecoverFromUndefinedRegions(double strength)
When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leav...
RooCmdArg Verbose(bool flag=true)
RooCmdArg BatchMode(std::string const &batchMode="cpu")
RooCmdArg Extended(bool flag=true)
RooCmdArg ProtoData(const RooDataSet &protoData, bool randomizeOrder=false, bool resample=false)
RooCmdArg AutoBinned(bool flag=true)
RooCmdArg Asimov(bool flag=true)
RooCmdArg NumEvents(Int_t numEvents)
RooCmdArg GenBinned(const char *tag)
RooCmdArg ExpectedData(bool flag=true)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg ProjectionRange(const char *rangeName)
RooCmdArg FillColor(Color_t color)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg ProjWData(const RooAbsData &projData, bool binData=false)
RooCmdArg Precision(double prec)
RooCmdArg EvalErrorValue(double value)
RooCmdArg NormRange(const char *rangeNameList)
RooCmdArg DrawOption(const char *opt)
RooCmdArg Project(const RooArgSet &projSet)
RooCmdArg FillStyle(Style_t style)
RooCmdArg Range(const char *rangeName, bool adjustNorm=true)
RooCmdArg Invisible(bool inv=true)
RooCmdArg MarkerStyle(Style_t style)
RooCmdArg LineWidth(Width_t width)
RooCmdArg Normalization(double scaleFactor)
RooCmdArg VisualizeError(const RooDataSet ¶mData, double Z=1)
RooCmdArg Slice(const RooArgSet &sliceSet)
RooCmdArg AddTo(const char *name, double wgtSel=1.0, double wgtOther=1.0)
RooCmdArg CutRange(const char *rangeName)
RooCmdArg XErrorSize(double width)
RooCmdArg MarkerSize(Size_t size)
RooCmdArg Rescale(double factor)
RooCmdArg Cut(const char *cutSpec)
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)
RooConstVar & C(double value)
RooCmdArg ParallelGradientOptions(bool enable=true, int orderStrategy=0, int chainFactor=1)
Configuration options for parallel minimization with multiprocessing library.
RooCmdArg ParallelDescentOptions(bool enable=false, int splitStrategy=0, int numSplits=4)
std::string & defaultBatchMode()
Get a handle on the default BatchMode option that is used when creating likelihoods.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg BootStrapData(const RooDataSet &dset)
RooCmdArg ShowName(bool flag)
RooCmdArg ShowError(bool flag)
OffsetMode
For setting the offset mode with the Offset() command argument to RooAbsPdf::fitTo()
BatchModeOption
For setting the batch mode flag with the BatchMode() command argument to RooAbsPdf::fitTo()
RooCmdArg ShowValue(bool flag)
RooCmdArg ShowAsymError(bool flag)
RooCmdArg ShowUnit(bool flag)
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Wrap an object into a TObject. Sometimes needed to avoid reinterpret_cast or enable RTTI.