Some member functions of RooAbsCollection that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooAbsCollection::printLatex. For example, the following code is equivalent in PyROOT:
The RooAbsCollection::printLatex() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Some member functions of RooAbsData that take a RooCmdArg as argument also support keyword arguments. This applies to RooAbsData::plotOn, RooAbsData::createHistogram, RooAbsData::reduce, RooAbsData::statOn. For example, the following code is equivalent in PyROOT:
The RooAbsData::createHistogram() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsData::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsData::reduce() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsData::statOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Some member functions of RooAbsPdf that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooAbsPdf::fitTo, RooAbsPdf::plotOn, RooAbsPdf::generate, RooAbsPdf::paramOn, RooAbsPdf::createCdf, RooAbsPdf::generateBinned, RooAbsPdf::prepareMultiGen and RooAbsPdf::createNLL. For example, the following code is equivalent in PyROOT:
The RooAbsPdf::createCdf() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::createNLL() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::fitTo() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::generate() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::generateBinned() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::paramOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsPdf::prepareMultiGen() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Some member functions of RooAbsReal that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooAbsReal::plotOn, RooAbsReal::createHistogram, RooAbsReal::chi2FitTo, RooAbsReal::createChi2, RooAbsReal::createRunningIntegral and RooAbsReal::createIntegral For example, the following code is equivalent in PyROOT:
The RooAbsReal::chi2FitTo() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsReal::createChi2() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsReal::createHistogram() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsReal::createIntegral() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsReal::createRunningIntegral() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsReal::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Some member functions of RooAbsRealLValue that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooAbsRealLValue::createHistogram and RooAbsRealLValue::frame. For example, the following code is equivalent in PyROOT:
The RooAbsRealLValue::createHistogram() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooAbsRealLValue::frame() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Pythonization of RooArgSet constructor to support implicit conversion from Python sets.
The RooBCPGenDecay constructor is pythonized with enum values.
The RooBCPEffDecay constructor is pythonized with enum values.
The RooBDecay constructor is pythonized with enum values.
The RooBMixDecay constructor is pythonized with enum values.
Constructor of RooCategory takes a map as an argument also supports python dictionaries. For example, the following code is equivalent in PyROOT:
The RooCategory constructor is pythonized for converting python dict to std::map. The instances in the dict must correspond to the template argument in std::map of the constructor.
Constructor of RooChi2Var takes a RooCmdArg as argument also supports keyword arguments.
The RooCategory constructor is pythonized for converting python dict to std::map. The keywords must correspond to the CmdArg of the constructor function.
Constructor of RooDataHist takes a RooCmdArg as argument also supports keyword arguments. For example, the following code is equivalent in PyROOT:
The RooDataHist constructor is pythonized with the command argument pythonization and for converting python dict to std::map. The keywords must correspond to the CmdArg of the constructor function. The instances in dict must correspond to the template argument in std::map of the constructor.
Create a RooDataHist from numpy arrays.
Note: The argument structure was inspired by numpy.histogramdd.
Args: hist_weights (numpy.ndarray): The multidimensional histogram bin weights. bins (list): The bin specification, where each element is either: a numpy array describing the monotonically increasing bin edges along each dimension. a scalar value for the number of bins (in this case, the corresponding item in the ranges
argument must be filled) None
for a category dimension or if you want to use the default binning of the RooFit variable variables (RooArgSet, or list/tuple of RooAbsArgs): Specification of the variables in the RooDataHist, will be forwarded to the RooDataHist constructor. Both real values and categories are supported. ranges (list): An optional list specifying the variable range limits. Each element is either: None
if a full bin edges array is given to bins
or for a category dimension a tuple with two values corresponding to the minimum and maximum values weights_squared_sum (numpy.ndarray): The sum of squared weights of the original samples that were used to fill the histogram. If the input weights are from a weighted histogram, this parameter is no longer optional. name (str): Name of the RooDataSet, None
is equivalent to an empty string. title (str): Title of the RooDataSet, None
is equivalent to an empty string.
Returns: RooDataHist
Converts the weights and bin edges of a RooDataHist to numpy arrays.
Note: The output structure was inspired by numpy.histogramdd.
Returns: weight (numpy.ndarray): The weights for each histrogram bin. bin_edges (list): A list of n_dim
arrays describing the bin edges for each dimension. For dimensions of category types, the list element is None
.
Some member functions of RooDataSet that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooDataSet() constructor and RooDataSet::plotOnXY. For example, the following code is equivalent in PyROOT:
The RooDataSet constructor is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the constructor.
Create a RooDataSet from a dictionary of numpy arrays. Args: data (dict): Dictionary with strings as keys and numpy arrays as values, to be imported into the RooDataSet. variables (RooArgSet, or list/tuple of RooAbsArgs): Specification of the variables in the RooDataSet, will be forwarded to the RooDataSet constructor. Both real values and categories are supported. name (str): Name of the RooDataSet, None
is equivalent to an empty string. title (str): Title of the RooDataSet, None
is equivalent to an empty string. weight_name (str): Key of the array in data
that will be used for the dataset weights.
Returns: RooDataSet
Create a RooDataSet from a pandas DataFrame. Args: df (pandas.DataFrame): Pandas DataFrame to import. variables (RooArgSet, or list/tuple of RooAbsArgs): Specification of the variables in the RooDataSet, will be forwarded to the RooDataSet constructor. Both real values and categories are supported. name (str): Name of the RooDataSet, None
is equivalent to an empty string. title (str): Title of the RooDataSet, None
is equivalent to an empty string. weight_name (str): Key of the array in data
that will be used for the dataset weights.
Returns: RooDataSet
The RooDataSet::plotOnXY() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Export a RooDataSet to a dictionary of numpy arrays.
Args: copy (bool): If False, the data will not be copied. Use with caution, as the numpy arrays and the RooAbsData now own the same memory. If the dataset uses a RooTreeDataStore, there will always be a copy and the copy argument is ignored.
Returns: dict: A dictionary with the variable or weight names as keys and the numpy arrays as values.
Export a RooDataSet to a pandas DataFrame.
Args:
Note: Pandas copies the data from the numpy arrays when creating a DataFrame. That's why we can disable copying in the to_numpy call.
Returns: pandas.DataFrame: A dataframe with the variable or weight names as column names and the a row for each variable or weight in the dataset.
Some constructors of classes like RooDecay, RooBDecay, RooBCPGenDecay, RooBCPEffDecay and RooBMixDecay that take an enum DecayType as argument also support keyword arguments. For example, the following code is equivalent in PyROOT:
The RooDecay constructor is pythonized with enum values.
Some member functions of RooGenFitStudy that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooGenFitStudy::setGenConfig.
The RooGenFitStudy::setGenConfig() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
Generate the importer and exporter documentation.
Write the importer and exporter documentation as LaTeX code.
Some member functions of RooMCStudy that take a RooCmdArg as argument also support keyword arguments. So far, this applies to constructor RooMCStudy(), RooMCStudy::plotParamOn, RooMCStudy::plotParam, RooMCStudy::plotNLL, RooMCStudy::plotError and RooMCStudy::plotPull. For example, the following code is equivalent in PyROOT:
The RooMCStudy constructor is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the constructor function.
The RooMCStudy::plotError() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
The RooMCStudy::plotNLL() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
The RooMCStudy::plotParam() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
The RooMCStudy::plotParamOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
The RooMCStudy::plotError() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
Some member functions of RooMsgService that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooMsgService::addStream. For example, the following code is equivalent in PyROOT:
The RooMsgService::addStream() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the function.
RooNLLVar() constructor takes a RooCmdArg as argument also supports keyword arguments.
The RooNLLVar constructor is pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the constructor function.
RooProdPdf() constructor takes a RooCmdArg as argument also supports keyword arguments. For example, the following code is equivalent in PyROOT:
The RooProdPdf constructor is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the constructor.
Return the binning of this RooRealVar as a numpy array.
Some member functions of RooSimultaneous that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooSimultaneous::plotOn. For example, the following code is equivalent in PyROOT:
The RooSimultaneous constructor that takes a map of category names to PDFs is accepting a Python dictionary in Python.
The RooSimultaneous::plotOn() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
Some member functions of RooSimWSTool that take a RooCmdArg as argument also support keyword arguments. So far, this applies to RooSimWSTool::build. For example, the following code is equivalent in PyROOT:
The RooSimWSTool::build() function is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the function.
The RooWorkspace::import function can't be used in PyROOT because import
is a reserved python keyword. For this reason, an alternative with a capitalized name is provided:
Support the C++ import()
as Import()
in python
The RooWorkspace constructor is pythonized with the command argument pythonization. The keywords must correspond to the CmdArgs of the constructor.
The RooWorkspace::import function can't be used in PyROOT because import
is a reserved python keyword. So, Import() is used and pythonized with the command argument pythonization. The keywords must correspond to the CmdArg of the import()
function.