RooFactoryWSTool is a clase like TTree::MakeClass() that generates skeleton code for RooAbsPdf and RooAbsReal functions given a list of input parameter names. The factory can also compile the generated code on the fly, and on request also immediate instantiate objects.
virtual | ~RooFactoryWSTool() |
void | TObject::AbstractMethod(const char* method) const |
RooAddPdf* | add(const char* objName, const char* specList, Bool_t recursiveCoefs = kFALSE) |
RooAddition* | addfunc(const char* objName, const char* specList) |
RooRealSumPdf* | amplAdd(const char* objName, const char* specList) |
virtual void | TObject::AppendPad(Option_t* option = "") |
static RooAbsArg& | as_ARG(UInt_t idx) |
static RooCategory& | as_CAT(UInt_t idx) |
static RooAbsCategory& | as_CATFUNC(UInt_t idx) |
static RooAbsCategoryLValue& | as_CATLV(UInt_t idx) |
static RooAbsData& | as_DATA(UInt_t idx) |
static RooDataHist& | as_DHIST(UInt_t idx) |
static Double_t | as_DOUBLE(UInt_t idx) |
static Double_t | as_DOUBLE(UInt_t idx, Double_t defVal) |
static RooDataSet& | as_DSET(UInt_t idx) |
static RooAbsReal& | as_FUNC(UInt_t idx) |
static Int_t | as_INT(UInt_t idx) |
static Int_t | as_INT(UInt_t idx, Int_t defVal) |
static RooArgList | as_LIST(UInt_t idx) |
static TObject& | as_OBJ(UInt_t idx) |
static RooAbsPdf& | as_PDF(UInt_t idx) |
static RooResolutionModel& | as_RMODEL(UInt_t idx) |
static RooArgSet | as_SET(UInt_t idx) |
static const char* | as_STRING(UInt_t idx) |
static RooRealVar& | as_VAR(UInt_t idx) |
static RooAbsRealLValue& | as_VARLV(UInt_t idx) |
RooAbsArg& | asARG(const char*) |
RooCategory& | asCAT(const char*) |
RooAbsCategory& | asCATFUNC(const char*) |
RooAbsCategoryLValue& | asCATLV(const char*) |
RooAbsData& | asDATA(const char*) |
RooDataHist& | asDHIST(const char*) |
Double_t | asDOUBLE(const char*) |
RooDataSet& | asDSET(const char*) |
RooAbsReal& | asFUNC(const char*) |
Int_t | asINT(const char*) |
RooArgList | asLIST(const char*) |
TObject& | asOBJ(const char*) |
RooAbsPdf& | asPDF(const char*) |
RooResolutionModel& | asRMODEL(const char*) |
RooArgSet | asSET(const char*) |
const char* | asSTRING(const char*) |
RooRealVar& | asVAR(const char*) |
RooAbsRealLValue& | asVARLV(const char*) |
const char* | autoClassNamePostFix() const |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
RooAbsArg* | createArg(const char* className, const char* objName, const char* varList) |
RooCategory* | createCategory(const char* name, const char* stateNameList = 0) |
RooRealVar* | createVariable(const char* name, Double_t xmin, Double_t xmax) |
vector<string> | ctorArgs(const char* className) |
virtual Int_t | RooPrintable::defaultPrintContents(Option_t* opt) const |
static ostream& | RooPrintable::defaultPrintStream(ostream* os = 0) |
virtual RooPrintable::StyleOption | RooPrintable::defaultPrintStyle(Option_t* opt) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
void | logError() |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
static void | RooPrintable::nameFieldLength(Int_t newLen) |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
RooFactoryWSTool& | operator=(const RooFactoryWSTool&) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
virtual void | RooPrintable::printAddress(ostream& os) const |
virtual void | RooPrintable::printArgs(ostream& os) const |
virtual void | RooPrintable::printClassName(ostream& os) const |
virtual void | RooPrintable::printExtras(ostream& os) const |
virtual void | RooPrintable::printMultiline(ostream& os, Int_t contents, Bool_t verbose = kFALSE, TString indent = "") const |
virtual void | RooPrintable::printName(ostream& os) const |
virtual void | RooPrintable::printStream(ostream& os, Int_t contents, RooPrintable::StyleOption style, TString indent = "") const |
virtual void | RooPrintable::printTitle(ostream& os) const |
virtual void | RooPrintable::printTree(ostream& os, TString indent = "") const |
virtual void | RooPrintable::printValue(ostream& os) const |
RooAbsArg* | process(const char* expr) |
string | processExpression(const char* expr) |
RooProdPdf* | prod(const char* objName, const char* pdfList) |
RooProduct* | prodfunc(const char* objName, const char* pdfList) |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
static void | registerSpecial(const char* typeName, RooFactoryWSTool::IFace* iface) |
void | TObject::ResetBit(UInt_t f) |
RooFactoryWSTool(RooWorkspace& ws) | |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | setAutoClassNamePostFix(const char* pfix) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp) const |
RooSimultaneous* | simul(const char* objName, const char* indexCat, const char* pdfMap) |
virtual Int_t | TNamed::Sizeof() const |
vector<string> | splitFunctionArgs(const char* funcExpr) |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
RooWorkspace& | ws() |
static void | checkIndex(UInt_t index) |
Bool_t | checkSyntax(const char* arg) |
void | clearError() |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
Int_t | errorCount() |
static map<string,RooFactoryWSTool::IFace*>& | hooks() |
void | TObject::MakeZombie() |
static RooFactoryWSTool* | of() |
string | processAliasExpression(const char* arg) |
string | processCompositeExpression(const char* arg) |
string | processCreateArg(string& func, vector<string>& args) |
string | processCreateVar(string& func, vector<string>& args) |
string | processListExpression(const char* arg) |
string | processMetaArg(string& func, vector<string>& args) |
string | processSingleExpression(const char* arg) |
TClass* | resolveClassName(const char* className) |
RooFactoryWSTool(const RooFactoryWSTool&) | |
string | varTag(string& func, vector<string>& args) |
vector<string> | _args | |
string | _autoClassPostFix | |
stack<string> | _autoNamePrefix | |
Int_t | _errorCount | Error counter for a given expression processing |
static map<string,RooFactoryWSTool::IFace*>* | _hooks | |
static Int_t | RooPrintable::_nameLength | |
static RooFactoryWSTool* | _of | |
map<string,string> | _typeAliases | |
RooWorkspace* | _ws | ! Associated workspace |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
Low-level factory interface for creating a RooRealVar with a given range and initial value
Low-level factory interface for creating a RooCategory with a given list of state names. The State name list can be of the form 'name1,name2,name3' or of the form 'name1=id1,name2=id2,name3=id3'
Low-level factory interface for creating a RooAbsPdf of a given class with a given list of input variables The variable list varList should be of the form "a,b,c" where the interpretation of the argument is dependent on the p.d.f. Set and List arguments can be passed by substituting a single argument with the form (a,b,c), i.e. one can set varList to "x,(a0,a1,a2)" to pass a RooAbsReal and a RooArgSet as arguments.
Process high-level object creation syntax Accepted forms of syntax are Creating variables x[-10,10] - Create variable x with given range and put it in workspace x[3,-10,10] - Create variable x with given range and initial value and put it in workspace x[3] - Create variable x with given constant value <numeric literal> - Numeric literal expressions (0.5, -3 etc..) are converted to a RooConst(<numeric literal>) where ever a RooAbsReal or RooAbsArg argument is expected Creating categories c[lep,kao,nt1,nt2] - Create category c with given state names tag[B0=1,B0bar=-1] - Create category tag with given state names and index assignments Creating functions and p.d.f.s MyPdf::g(x,m,s) - Create p.d.f or function of type MyPdf with name g with argument x,m,s Interpretation and number of arguments are mapped to the constructor arguments of the class (after the name and title). MyPdf(x,m,s) - As above, but with an implicitly defined (unique) object name Creating sets and lists (to be used as inputs above) {a,b,c} - Create RooArgSet or RooArgList (as determined by context) from given contents Objects that are not created, are assumed to exist in the workspace Object creation expressions as shown above can be nested, e.g. one can do RooGaussian::g(x[-10,10],m[0],3) to create a p.d.f and its variables in one go. This nesting can be applied recursively e.g. SUM::model( f[0.5,0,1] * RooGaussian::g( x[-10,10], m[0], 3] ), RooChebychev::c( x, {a0[0.1],a1[0.2],a2[-0.3]} )) creates the sum of a Gaussian and a Chebychev and all its variables A seperate series of operator meta-type exists to simplify the construction of composite expressions meta-types in all capitals (SUM) create p.d.f.s, meta types in lower case (sum) create functions. SUM::name(f1*pdf1,f2*pdf2,pdf3] -- Create sum p.d.f name with value f1*pdf1+f2*pdf2+(1-f1-f2)*pdf3 RSUM::name(f1*pdf1,f2*pdf2,pdf3] -- Create recursive sum p.d.f. name with value f1*pdf1 + (1-f1)(f2*pdf2 + (1-f2)pdf3) ASUM::name(f1*amp1,f2*amp2,amp3] -- Create sum p.d.f. name with value f1*amp1+f2*amp2+(1-f1-f2)*amp3 where amplX are amplitudes of type RooAbsReal sum::name(a1,a2,a3] -- Create sum function with value a1+a2+a3 sum::name(a1*b1,a2*b2,a3*b 3] -- Create sum function with value a1*b1+a2*b2+a3*b3 PROD::name(pdf1,pdf2] -- Create product of p.d.f with 'name' with given input p.d.fs PROD::name(pdf1|x,pdf2] -- Create product of conditional p.d.f. pdf1 given x and pdf2 prod::name(a,b,c] -- Create production function with value a*b*c SIMUL::name(cat,a=pdf1,b=pdf2] -- Create simultaneous p.d.f index category cat. Make pdf1 to state a, pdf2 to state b EXPR::name('expr',var,...] -- Create an generic p.d.f that interprets the given expression expr::name('expr',var,...] -- Create an generic function that interprets the given expression The functionality of high level object creation tools like RooSimWSTool, RooCustomizer and RooClassFactory is also interfaced through meta-types in the factory Interface to RooSimWSTool SIMCLONE::name( modelPdf, $ParamSplit(...), $ParamSplitConstrained(...), $Restrict(...) ] -- Clone-and-customize modelPdf according to ParamSplit and ParamSplitConstrained() specifications and return a RooSimultaneous p.d.f. of all built clones MSIMCLONE::name( masterIndex, $AddPdf(mstate1, modelPdf1, $ParamSplit(...)), $AddPdf(mstate2,modelPdf2),...) ] -- Clone-and-customize multiple models (modelPdf1,modelPdf2) according to ParamSplit and ParamSplitConstrained() specifications and return a RooSimultaneous p.d.f. of all built clones, using the specified master index to map prototype p.d.f.s to master states Interface to RooCustomizer EDIT::name( orig, substNode=origNode), ... ] -- Create a clone of input object orig, with the specified replacements operations executed EDIT::name( orig, origNode=$REMOVE(), ... ] -- Create clone of input removing term origNode from all PROD() terms that contained it EDIT::name( orig, origNode=$REMOVE(prodname,...), ... ] -- As above, but restrict removal of origNode to PROD term(s) prodname,... Interface to RooClassFactory CEXPR::name('expr',var,...] -- Create an custom compiled p.d.f that evaluates the given expression cexpr::name('expr',var,...] -- Create an custom compiled function that evaluates the given expression $MetaType(...) - Meta argument that does not result in construction of an object but is used logically organize input arguments in certain operator p.d.f. constructions. The defined meta arguments are context dependent. The only meta argument that is defined globally is $Alias(typeName,aliasName) to define aliases for type names. For the definition of meta arguments in operator p.d.f.s see the definitions below
Process a single high-level expression or list of expressions. The returned string a the reduced expression where all inline object creations have been executed and substituted with the name of the created object e.g. 'RooGaussian::g(x,m,s)' --> 'g' '{x(-10,10),s} --> '{x,s}'
Process a single composite expression e.g. 'A=RooGaussian::g[x,m,s]' --> 'A=g' e.g. 'f[0,1]*RooGaussian::g[x,m,s]' --> 'f*g' e.g. 'RooGaussian::g(x,y,s)|x' --> g|x' e.g. '$MetaArg(RooGaussian::g[x,m,s],blah)' --> '$MetaArg(g,blah)'
Process a single high-level expression. The returned string a the reduced expression where all inline object creations have been executed and substituted with the name of the created object e.g. 'RooGaussian::g(x,m,s)' --> 'g' e.g. 'x[-10,10]' --> 'x'
Glue function between high-level syntax and low-level factory call to createVariable: Process a parsed call to create a variable named 'func' If initial token is non-numeric, a RooCategory will be created, and the args are interpreted as either state names or 'name=id' assignments. Otherwise a RooRealvar is created and the arg list is interpreted as follows: If list has two args, these are interpreted as xmin,xmax If list has three args, these are interpreted as xinit,xmin,xmax If list has one arg, this is interpreted as xinit and the variable is set as constant
Glue function between high-level syntax and low-level factory call to createArg: Process a parsed call to create a p.d.f named func The func arg is interpreted as ClassName::ObjectName and the arglist is passed verbatim to createArg. The received arglist is expected to be fully reduced (i.e. all inline object creations must have been compiled)
Perform basic syntax on given factory expression. If function returns true syntax errors are found.
CINT constructor interface, return constructor string argument #idx as RooAbsReal reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooAbsRealLValue reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooRealVar reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooResolutionModel reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooAbsCategory reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooAbsCategoryLValue reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooCategory reference found in workspace
CINT constructor interface, return constructor string argument #idx as RooArgList of objects found in workspace
CINT constructor interface, return constructor string argument #idx as RooAbsData object found in workspace
CINT constructor interface, return constructor string argument #idx as RooDataHist object found in workspace
CINT constructor interface, return constructor string argument #idx as RooDataSet object found in workspace
Register foreign special objects in factory
--- Internal stuff that must be public so that CINT can access it --- CINT constructor interface
{ checkIndex(idx) ; return of()->asSTRING(of()->_args[idx].c_str()) ; }
{ checkIndex(idx) ; return of()->asDOUBLE(of()->_args[idx].c_str()) ; }