19 #if !defined(R__ALPHA) && !defined(R__SOLARIS) && !defined(R__ACC) && !defined(R__FBSD)
53 const std::type_info &
id =
typeid(pdf);
57 for (
int i = 0,
n = list.getSize(); i <
n; ++i) {
72 for (
int ic = 0, nc = cat->
numBins((
const char *)0); ic < nc; ++ic) {
76 if (catPdf != 0)
FactorizePdf(observables, *catPdf, obsTerms, constraints);
82 if (!constraints.
contains(pdf)) constraints.
add(pdf);
102 if(constraints.
getSize() == 0) {
103 oocoutW((
TObject *)0,
Eval) <<
"RooStatsUtils::MakeNuisancePdf - no constraints found on nuisance parameters in the input model" << endl;
105 }
else if(constraints.
getSize() == 1) {
121 const std::type_info &
id =
typeid(pdf);
128 for (
int i = 0,
n = list.getSize(); i <
n; ++i) {
131 if(newPdfi !=
NULL) newList.add(*newPdfi);
134 if(newList.getSize() == 0)
return NULL;
136 else if(newList.getSize() == 1)
return dynamic_cast<RooAbsPdf *>(newList.at(0)->clone(
TString::Format(
"%s_unconstrained",
137 newList.at(0)->GetName())));
161 for (
int ic = 0, nc = cat->
numBins((
const char *)
NULL); ic < nc; ++ic) {
167 if (newPdf ==
NULL) {
delete cat;
return NULL; }
168 pdfList.
add(*newPdf);
184 if(!unconstrainedPdf) {
185 oocoutE((
TObject *)
NULL,
InputArguments) <<
"RooStats::MakeUnconstrainedPdf - invalid observable list passed (observables not found in original pdf) or invalid pdf passed (without observables)" << endl;
189 return unconstrainedPdf;
204 std::map<TString, Double_t> fVarVals;
208 BranchStore(
const vector <TString> ¶ms = vector <TString>(),
double _inval = -999.) : fTree(0) {
210 for(
unsigned int i = 0;i<params.size();i++)
211 fVarVals[params[i]] = _inval;
216 for(std::map<TString, Double_t>::iterator it = fVarVals.begin();it!=fVarVals.end();it++) {
217 TBranch *br = fTree->GetBranch( it->first );
223 void AssignToTTree(
TTree &myTree) {
225 for(std::map<TString, Double_t>::iterator it = fVarVals.begin();it!=fVarVals.end();it++) {
226 const TString& name = it->first;
231 for(std::map<TString, Double_t>::iterator it = fVarVals.begin();it!=fVarVals.end();it++) {
232 const TString& name = it->first;
233 fVarVals[
name] = fInval;
240 return new BranchStore;
260 return new BranchStore(V);
265 bs->AssignToTTree(myTree);
302 for (
int i = 0; i< l.
getSize(); ++i) {
virtual TObject * clone(const char *newname=0) const =0
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
TIterator * serverIterator() const
Bool_t hasError(Bool_t allowZero=kTRUE) const
RooAbsPdf * MakeNuisancePdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name)
RooProdPdf is an efficient implementation of a product of PDFs of the form.
virtual Int_t Fill()
Fill all branches.
const RooAbsCategoryLValue & indexCat() const
Bool_t contains(const RooAbsArg &var) const
TTree * GetAsTTree(TString name, TString desc, const RooDataSet &data)
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
Iterator abstract base class.
void FactorizePdf(const RooArgSet &observables, RooAbsPdf &pdf, RooArgList &obsTerms, RooArgList &constraints)
RooAbsArg * first() const
RooAbsPdf * StripConstraints(RooAbsPdf &pdf, const RooArgSet &observables)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
std::map< std::string, std::string >::const_iterator iter
TIterator * createIterator(Bool_t dir=kIterForward) const
std::vector< std::vector< double > > Data
NamespaceImp(RooStats) using namespace std
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooRealVar represents a fundamental (non-derived) real valued object.
RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name=NULL)
Bool_t hasAsymError(Bool_t allowZero=kTRUE) const
virtual Int_t numBins(const char *rangeName) const
Returm the number of fit bins ( = number of types )
virtual Int_t numEntries() const
BranchStore * CreateBranchStore(const RooDataSet &data)
void SetName(const char *name)
Change (i.e.
void PrintListContent(const RooArgList &l, std::ostream &os=std::cout)
virtual const char * GetName() const
Returns name of object.
RooDataSet is a container class to hold unbinned data.
Double_t getAsymErrorHi() const
void UseNLLOffset(bool on)
const RooArgSet * GetObservables() const
get RooArgSet for observables (return NULL if not existing)
virtual void ResetAddress()
Reset the address of the branch.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual void printName(std::ostream &os) const
Return collection name.
Mother of all ROOT objects.
virtual Int_t Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="")
Create one branch for each element in the collection.
Double_t getAsymErrorLo() const
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
void FillTree(TTree &myTree, const RooDataSet &data)
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set category to i-th fit bin, which is the i-th registered state.
virtual TObject * Next()=0
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
virtual const char * getLabel() const
Return label string of current state.
A TTree object has a header with a name and a title.
RooLinkedListIter iterator(Bool_t dir=kIterForward) const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
const RooArgList & pdfList() const
A TTree is a list of TBranches.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
RooLinkedListIter is the TIterator implementation for RooLinkedList.
Double_t getError() const
virtual Double_t getValV(const RooArgSet *nset=0) const
Return value of variable.