RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same structure but different leaf servers (parameters or dependents) RooCustomizer supports two kinds of modifications: -> replace(leaf_arg,repl_arg) replaces each occurence of leaf_arg with repl_arg in the composite pdf. -> split(split_arg) is used when building multiple clones of the same prototype. Each occurrence of split_arg is replaceed with a clone of split_arg named split_arg_[MCstate], where [MCstate] is the name of the 'master category state' that indexes the clones to be built. [Example] Splitting is particularly useful when building simultaneous fits to subsets of the data sample with different background properties. In such a case, the user builds a single prototype PDF representing the structure of the signal and background and splits the dataset into categories with different background properties. Using RooCustomizer a PDF for each subfit can be constructed from the prototype that has same structure and signal parameters, but different instances of the background parameters: e.g. RooExponential bg("bg","background",x,alpha) ; RooGaussian sig("sig","signal",x,mean,sigma) ; RooAddPdf pdf("pdf","pdf",sig,bg,sigfrac) ; RooDataSet data("data","dataset",RooArgSet(x,runblock),...) RooCategory runblock("runblock","run block") ; runblock.defineType("run1") ; runblock.defineType("run2") ; RooArgSet splitLeafs RooCustomizer cust(pdf,runblock,splitLeafs) cust.split(alpha,runblock) RooAbsPdf* pdf_run1 = cust.build("run1") ; RooAbsPdf* pdf_run2 = cust.build("run2") ; RooSimultaneous simpdf("simpdf","simpdf",RooArgSet(*pdf_run1,*pdf_run2)) If the master category state is a super category, leafs may be split by any subset of that master category. E.g. if the master category is 'A x B', leafs may be split by A, B or AxB. In addition to replacing leaf nodes, RooCustomizer clones all branch nodes that depend directly or indirectly on modified leaf nodes, so that the input pdf is untouched by each build operation. The customizer owns all the branch nodes including the returned top level node, so the customizer should live as longs as the cloned composites are needed. Any leaf nodes that are created by the customizer will be put into the leaf list that is passed into the customizers constructor (splitLeafs in the above example. The list owner is responsible for deleting these leaf nodes after the customizer is deleted. [Advanced techniques] By default the customizer clones the prototype leaf node when splitting a leaf, but the user can feed pre-defined split leafs in leaf list. These leafs must have the name <split_leaf>_<splitcat_label> to be picked up. The list of pre-supplied leafs may be partial, any missing split leafs will be auto generated. Another common construction is to have two prototype PDFs, each to be customized by a separate customizer instance, that share parameters. To ensure that the customized clones also share their respective split leafs, i.e. PDF1(x,y;A) and PDF2(z,A) ---> PDF1_run1(x,y,A_run1) and PDF2_run1(x,y,A_run1) PDF1_run2(x,y,A_run2) and PDF2_run2(x,y,A_run2) feed the same split leaf list into both customizers. In that case the second customizer will pick up the split leafs instantiated by the first customizer and the link between the two PDFs is retained
RooCustomizer(const RooAbsArg& pdf, const char* name) | |
RooCustomizer(const RooAbsArg& pdf, const RooAbsCategoryLValue& masterCat, RooArgSet& splitLeafListOwned, RooArgSet* splitLeafListAll = 0) | |
virtual | ~RooCustomizer() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
RooAbsArg* | build(Bool_t verbose = kFALSE) |
RooAbsArg* | build(const char* masterCatState, Bool_t verbose = kFALSE) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
const RooArgSet& | cloneBranchList() const |
const RooArgSet& | cloneLeafList() const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
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 |
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() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static 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) |
TNamed& | TNamed::operator=(const TNamed& rhs) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* options = 0) const |
virtual void | RooPrintable::printAddress(ostream& os) const |
virtual void | printArgs(ostream& os) const |
virtual void | printClassName(ostream& os) const |
virtual void | RooPrintable::printExtras(ostream& os) const |
virtual void | printMultiline(ostream& os, Int_t content, Bool_t verbose = kFALSE, TString indent = "") const |
virtual void | printName(ostream& os) const |
virtual void | RooPrintable::printStream(ostream& os, Int_t contents, RooPrintable::StyleOption style, TString indent = "") const |
virtual void | printTitle(ostream& os) const |
virtual void | RooPrintable::printTree(ostream& os, TString indent = "") const |
virtual void | RooPrintable::printValue(ostream& os) const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | replaceArg(const RooAbsArg& orig, const RooAbsArg& subst) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | setCloneBranchSet(RooArgSet& cloneBranchSet) |
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) |
void | setOwning(Bool_t flag) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp) |
virtual Int_t | TNamed::Sizeof() const |
void | splitArg(const RooAbsArg& arg, const RooAbsCategory& splitCat) |
void | splitArgs(const RooArgSet& argSet, const RooAbsCategory& splitCat) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& 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 |
RooCustomizer(const RooCustomizer&) | |
RooAbsArg* | doBuild(const char* masterCatState, Bool_t verbose) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | initialize() |
void | TObject::MakeZombie() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; | ||
enum RooPrintable::ContentsOption { | kName | |
kClassName | ||
kValue | ||
kArgs | ||
kExtras | ||
kAddress | ||
kTitle | ||
kCollectionHeader | ||
}; | ||
enum RooPrintable::StyleOption { | kInline | |
kSingleLine | ||
kStandard | ||
kVerbose | ||
kTreeStructure | ||
}; |
RooArgSet* | _cloneBranchList | Pointer to list of cloned branches used |
RooArgSet* | _cloneNodeListAll | List of all cloned nodes |
RooArgSet* | _cloneNodeListOwned | List of owned cloned nodes |
RooArgSet | _internalCloneBranchList | List of branches of internal clone |
RooArgSet | _masterBranchList | List of branch nodes |
TIterator* | _masterBranchListIter | Iterator over branch list |
RooAbsCategoryLValue* | _masterCat | Pointer to input master category |
RooArgSet | _masterLeafList | List of leaf nodes |
TIterator* | _masterLeafListIter | Iterator over leaf list |
RooAbsArg* | _masterPdf | Pointer to input p.d.f |
TString | _name | Name of this object |
static Int_t | RooPrintable::_nameLength | |
Bool_t | _owning | If true we own all created components |
TList | _replaceArgList | List of RooAbsArgs to be replaced |
TList | _replaceSubList | List of replacement RooAbsArgs |
TList | _splitArgList | List of RooAbsArgs to be split |
TList | _splitCatList | List of categories to be used for above splits |
Bool_t | _sterile | If true we do not have as associated master category |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
Constructor with a prototype and masterCat index category. Customizers created by this constructor offer offer both the replaceArg() and splitArg() functionality. All nodes created in the customization process are added to the splitLeafs set. If the customizer is owning, the splitLeafs set will become owner of all created objects by the customizer
Sterile Constructor. Customizers created by this constructor offer only the replace() method. The supplied 'name' is used as suffix for any cloned branch nodes
Split all arguments in 'set' into individualized clones for each defined state of 'splitCat'. The 'splitCats' category must be subset of or equal to the master category supplied in the customizer constructor. Splitting is only available on customizers created with a master index category
Split all argument 'arg' into individualized clones for each defined state of 'splitCat'. The 'splitCats' category must be subset of or equal to the master category supplied in the customizer constructor. Splitting is only available on customizers created with a master index category
Replace any occurence of arg 'orig' with arg 'subst'
Build a clone of the prototype executing all registered 'replace' rules If verbose is set a message is printed for each leaf or branch node modification. The returned head node owns all cloned branch nodes that were created in the cloning proces
Build a clone of the prototype executing all registered 'replace' rules and 'split' rules for the masterCat state named 'masterCatState'. If verbose is set a message is printed for each leaf or branch node modification. The returned composite arg is owned by the customizer. This function cannot be called on customizer build with the sterile constructor.
Back-end implementation of the p.d.f building functionality
Print arguments of customizer, i.e. input p.d.f and input master category (if any)
Print customizer configuration details
Install the input RooArgSet as container in which all cloned branches will be stored
Constructors, assignment etc