#include <HLFactory.h>
Inheritance diagram for RooStats::HLFactory:
Public Member Functions | |
HLFactory (const char *name, const char *fileName=0, bool isVerbose=false) | |
Constructor. | |
HLFactory (const char *name, RooWorkspace *externalWs, bool isVerbose=false) | |
Constructor with external RooWorkspace. | |
HLFactory () | |
Default Constructor. | |
~HLFactory () | |
Default Destructor. | |
int | AddChannel (const char *label, const char *SigBkgPdfName, const char *BkgPdfName=0, const char *datasetName=0) |
Add channel for the combination. | |
void | DumpCfg (const char *) |
Dump the Workspace content as configuration file. | |
RooAbsPdf * | GetTotSigBkgPdf () |
Get the combined signal plus background pdf. | |
RooAbsPdf * | GetTotBkgPdf () |
Get the combined background pdf. | |
RooDataSet * | GetTotDataSet () |
Get the combined dataset. | |
RooCategory * | GetTotCategory () |
Get the combined dataset. | |
RooWorkspace * | GetWs () |
Get the RooWorkspace containing the models and variables. | |
int | ProcessCard (const char *filename) |
Process a configuration file. | |
HLFactory (const char *name, const char *fileName=0, bool isVerbose=false) | |
Constructor. | |
HLFactory (const char *name, RooWorkspace *externalWs, bool isVerbose=false) | |
Constructor with external RooWorkspace. | |
HLFactory () | |
Default Constructor. | |
~HLFactory () | |
Default Destructor. | |
int | AddChannel (const char *label, const char *SigBkgPdfName, const char *BkgPdfName=0, const char *datasetName=0) |
Add channel for the combination. | |
void | DumpCfg (const char *) |
Dump the Workspace content as configuration file. | |
RooAbsPdf * | GetTotSigBkgPdf () |
Get the combined signal plus background pdf. | |
RooAbsPdf * | GetTotBkgPdf () |
Get the combined background pdf. | |
RooDataSet * | GetTotDataSet () |
Get the combined dataset. | |
RooCategory * | GetTotCategory () |
Get the combined dataset. | |
RooWorkspace * | GetWs () |
Get the RooWorkspace containing the models and variables. | |
int | ProcessCard (const char *filename) |
Process a configuration file. | |
Private Member Functions | |
void | fCreateCategory () |
Create the category for the combinations. | |
bool | fNamesListsConsistent () |
Check the lenght of the lists. | |
int | fReadFile (const char *fileName, bool is_included=false) |
Read the actual cfg file. | |
int | fParseLine (TString &line) |
Parse a single line an puts the content in the RooWorkSpace. | |
void | fCreateCategory () |
Create the category for the combinations. | |
bool | fNamesListsConsistent () |
Check the lenght of the lists. | |
int | fReadFile (const char *fileName, bool is_included=false) |
Read the actual cfg file. | |
int | fParseLine (TString &line) |
Parse a single line an puts the content in the RooWorkSpace. | |
Private Attributes | |
RooCategory * | fComboCat |
The category of the combination. | |
RooAbsPdf * | fComboBkgPdf |
The background model combination. | |
RooAbsPdf * | fComboSigBkgPdf |
The signal plus background model combination. | |
RooDataSet * | fComboDataset |
The datasets combination. | |
bool | fCombinationDone |
Flag to keep trace of the status of the combination. | |
TList | fSigBkgPdfNames |
List of channels names to combine for the signal plus background pdfs. | |
TList | fBkgPdfNames |
List of channels names to combine for the background pdfs. | |
TList | fDatasetsNames |
List of channels names to combine for the datasets. | |
TList | fLabelsNames |
List of channels names to combine for the datasets. | |
bool | fVerbose |
The verbosity flag. | |
int | fInclusionLevel |
Keep trace of the inclusion deepness. | |
RooWorkspace * | fWs |
The RooWorkspace containing the models and variables. | |
bool | fOwnWs |
Owns workspace. | |
RooCategory * | fComboCat |
The category of the combination. | |
RooAbsPdf * | fComboBkgPdf |
The background model combination. | |
RooAbsPdf * | fComboSigBkgPdf |
The signal plus background model combination. | |
RooDataSet * | fComboDataset |
The datasets combination. | |
RooWorkspace * | fWs |
The RooWorkspace containing the models and variables. |
Definition at line 31 of file HLFactory.h.
HLFactory::HLFactory | ( | const char * | name, | |
const char * | fileName = 0 , |
|||
bool | isVerbose = false | |||
) |
Constructor.
Definition at line 44 of file HLFactory.cxx.
References fBkgPdfNames, fDatasetsNames, fReadFile(), fSigBkgPdfNames, fWs, and TCollection::SetOwner().
HLFactory::HLFactory | ( | const char * | name, | |
RooWorkspace * | externalWs, | |||
bool | isVerbose = false | |||
) |
Constructor with external RooWorkspace.
Definition at line 73 of file HLFactory.cxx.
References fBkgPdfNames, fDatasetsNames, fSigBkgPdfNames, fWs, and TCollection::SetOwner().
HLFactory::HLFactory | ( | ) |
Default Constructor.
Definition at line 95 of file HLFactory.cxx.
References fBkgPdfNames, fDatasetsNames, fSigBkgPdfNames, fWs, and TCollection::SetOwner().
HLFactory::~HLFactory | ( | ) |
Default Destructor.
Definition at line 115 of file HLFactory.cxx.
References fComboBkgPdf, fComboCat, fComboDataset, fComboSigBkgPdf, fOwnWs, fWs, and NULL.
RooStats::HLFactory::HLFactory | ( | const char * | name, | |
const char * | fileName = 0 , |
|||
bool | isVerbose = false | |||
) |
Constructor.
RooStats::HLFactory::HLFactory | ( | const char * | name, | |
RooWorkspace * | externalWs, | |||
bool | isVerbose = false | |||
) |
Constructor with external RooWorkspace.
RooStats::HLFactory::HLFactory | ( | ) |
Default Constructor.
RooStats::HLFactory::~HLFactory | ( | ) |
Default Destructor.
int HLFactory::AddChannel | ( | const char * | label, | |
const char * | SigBkgPdfName, | |||
const char * | BkgPdfName = 0 , |
|||
const char * | datasetName = 0 | |||
) |
Add channel for the combination.
Definition at line 132 of file HLFactory.cxx.
References TList::Add(), RooWorkspace::data(), fBkgPdfNames, fCombinationDone, fDatasetsNames, fLabelsNames, fSigBkgPdfNames, fWs, name, NULL, and RooWorkspace::pdf().
Referenced by rs602_HLFactoryCombinationexample(), and rs603_HLFactoryElaborateExample().
void RooStats::HLFactory::DumpCfg | ( | const char * | ) | [inline] |
RooAbsPdf * HLFactory::GetTotSigBkgPdf | ( | ) |
Get the combined signal plus background pdf.
Definition at line 185 of file HLFactory.cxx.
References RooAbsCollection::add(), TList::At(), fCombinationDone, fComboCat, fComboSigBkgPdf, fCreateCategory(), fNamesListsConsistent(), fSigBkgPdfNames, fWs, TNamed::GetName(), TCollection::GetSize(), TList::MakeIterator(), name, TIterator::Next(), NULL, RooWorkspace::pdf(), TObjString::String(), and title.
Referenced by rs602_HLFactoryCombinationexample(), and rs603_HLFactoryElaborateExample().
RooAbsPdf * HLFactory::GetTotBkgPdf | ( | ) |
Get the combined background pdf.
Definition at line 234 of file HLFactory.cxx.
References RooAbsCollection::add(), fBkgPdfNames, fCombinationDone, fComboBkgPdf, fComboCat, fCreateCategory(), TList::First(), fNamesListsConsistent(), fWs, TNamed::GetName(), TCollection::GetSize(), TList::MakeIterator(), name, TIterator::Next(), NULL, RooWorkspace::pdf(), TObjString::String(), and title.
RooDataSet * HLFactory::GetTotDataSet | ( | ) |
Get the combined dataset.
Definition at line 283 of file HLFactory.cxx.
References RooDataSet::addColumn(), RooDataSet::append(), RooWorkspace::data(), dummy, fCombinationDone, fComboCat, fComboDataset, fCreateCategory(), fDatasetsNames, TList::First(), fNamesListsConsistent(), fWs, TNamed::GetName(), TCollection::GetSize(), TList::MakeIterator(), TIterator::Next(), NULL, RooAbsData::Print(), RooAbsArg::Print(), RooCategory::setIndex(), and TObjString::String().
Referenced by rs603_HLFactoryElaborateExample().
RooCategory * HLFactory::GetTotCategory | ( | ) |
Get the combined dataset.
Definition at line 333 of file HLFactory.cxx.
References fCombinationDone, fComboCat, fCreateCategory(), fNamesListsConsistent(), and NULL.
Referenced by rs602_HLFactoryCombinationexample(), and rs603_HLFactoryElaborateExample().
RooWorkspace* RooStats::HLFactory::GetWs | ( | ) | [inline] |
Get the RooWorkspace containing the models and variables.
Definition at line 74 of file HLFactory.h.
References fWs.
Referenced by rs601_HLFactoryexample(), rs602_HLFactoryCombinationexample(), and rs603_HLFactoryElaborateExample().
int HLFactory::ProcessCard | ( | const char * | filename | ) |
void HLFactory::fCreateCategory | ( | ) | [private] |
Create the category for the combinations.
Definition at line 522 of file HLFactory.cxx.
References RooCategory::defineType(), fCombinationDone, fComboCat, fLabelsNames, TNamed::GetName(), TList::MakeIterator(), name, TIterator::Next(), TObjString::String(), and title.
Referenced by GetTotBkgPdf(), GetTotCategory(), GetTotDataSet(), and GetTotSigBkgPdf().
bool HLFactory::fNamesListsConsistent | ( | ) | [private] |
Check the lenght of the lists.
Definition at line 548 of file HLFactory.cxx.
References fBkgPdfNames, fDatasetsNames, fLabelsNames, fSigBkgPdfNames, and TCollection::GetEntries().
Referenced by GetTotBkgPdf(), GetTotCategory(), GetTotDataSet(), and GetTotSigBkgPdf().
int HLFactory::fReadFile | ( | const char * | fileName, | |
bool | is_included = false | |||
) | [private] |
Read the actual cfg file.
Definition at line 357 of file HLFactory.cxx.
References TObject::Error(), error, fInclusionLevel, fParseLine(), fVerbose, TNamed::GetName(), i, TObject::Info(), TString::kBoth, line, TObjArray::MakeIterator(), TString::ReadFile(), TString::Tokenize(), warning(), and TObject::Warning().
Referenced by HLFactory(), and ProcessCard().
int HLFactory::fParseLine | ( | TString & | line | ) | [private] |
Parse a single line an puts the content in the RooWorkSpace.
Definition at line 564 of file HLFactory.cxx.
References TObjArray::At(), TString::Data(), TObject::Error(), RooWorkspace::factory(), fVerbose, fWs, TObjArray::GetEntries(), RooWorkspace::import(), TObject::Info(), line, TFile::Open(), TString::ReplaceAll(), and TString::Tokenize().
Referenced by fReadFile().
int RooStats::HLFactory::AddChannel | ( | const char * | label, | |
const char * | SigBkgPdfName, | |||
const char * | BkgPdfName = 0 , |
|||
const char * | datasetName = 0 | |||
) |
Add channel for the combination.
void RooStats::HLFactory::DumpCfg | ( | const char * | ) | [inline] |
RooAbsPdf* RooStats::HLFactory::GetTotSigBkgPdf | ( | ) |
Get the combined signal plus background pdf.
RooAbsPdf* RooStats::HLFactory::GetTotBkgPdf | ( | ) |
Get the combined background pdf.
RooDataSet* RooStats::HLFactory::GetTotDataSet | ( | ) |
Get the combined dataset.
RooCategory* RooStats::HLFactory::GetTotCategory | ( | ) |
Get the combined dataset.
RooWorkspace* RooStats::HLFactory::GetWs | ( | ) | [inline] |
Get the RooWorkspace containing the models and variables.
Definition at line 74 of file HLFactory.h.
References fWs.
int RooStats::HLFactory::ProcessCard | ( | const char * | filename | ) |
Process a configuration file.
void RooStats::HLFactory::fCreateCategory | ( | ) | [private] |
Create the category for the combinations.
bool RooStats::HLFactory::fNamesListsConsistent | ( | ) | [private] |
Check the lenght of the lists.
int RooStats::HLFactory::fReadFile | ( | const char * | fileName, | |
bool | is_included = false | |||
) | [private] |
Read the actual cfg file.
int RooStats::HLFactory::fParseLine | ( | TString & | line | ) | [private] |
Parse a single line an puts the content in the RooWorkSpace.
RooCategory* RooStats::HLFactory::fComboCat [private] |
The category of the combination.
Definition at line 82 of file HLFactory.h.
Referenced by fCreateCategory(), GetTotBkgPdf(), GetTotCategory(), GetTotDataSet(), GetTotSigBkgPdf(), and ~HLFactory().
RooAbsPdf* RooStats::HLFactory::fComboBkgPdf [private] |
The background model combination.
Definition at line 85 of file HLFactory.h.
Referenced by GetTotBkgPdf(), and ~HLFactory().
RooAbsPdf* RooStats::HLFactory::fComboSigBkgPdf [private] |
The signal plus background model combination.
Definition at line 88 of file HLFactory.h.
Referenced by GetTotSigBkgPdf(), and ~HLFactory().
RooDataSet* RooStats::HLFactory::fComboDataset [private] |
The datasets combination.
Definition at line 91 of file HLFactory.h.
Referenced by GetTotDataSet(), and ~HLFactory().
bool RooStats::HLFactory::fCombinationDone [private] |
Flag to keep trace of the status of the combination.
Definition at line 94 of file HLFactory.h.
Referenced by AddChannel(), fCreateCategory(), GetTotBkgPdf(), GetTotCategory(), GetTotDataSet(), and GetTotSigBkgPdf().
TList RooStats::HLFactory::fSigBkgPdfNames [private] |
List of channels names to combine for the signal plus background pdfs.
Definition at line 103 of file HLFactory.h.
Referenced by AddChannel(), fNamesListsConsistent(), GetTotSigBkgPdf(), and HLFactory().
TList RooStats::HLFactory::fBkgPdfNames [private] |
List of channels names to combine for the background pdfs.
Definition at line 106 of file HLFactory.h.
Referenced by AddChannel(), fNamesListsConsistent(), GetTotBkgPdf(), and HLFactory().
TList RooStats::HLFactory::fDatasetsNames [private] |
List of channels names to combine for the datasets.
Definition at line 109 of file HLFactory.h.
Referenced by AddChannel(), fNamesListsConsistent(), GetTotDataSet(), and HLFactory().
TList RooStats::HLFactory::fLabelsNames [private] |
List of channels names to combine for the datasets.
Definition at line 112 of file HLFactory.h.
Referenced by AddChannel(), fCreateCategory(), and fNamesListsConsistent().
bool RooStats::HLFactory::fVerbose [private] |
The verbosity flag.
Definition at line 115 of file HLFactory.h.
Referenced by fParseLine(), and fReadFile().
int RooStats::HLFactory::fInclusionLevel [private] |
Keep trace of the inclusion deepness.
Definition at line 118 of file HLFactory.h.
Referenced by fReadFile().
RooWorkspace* RooStats::HLFactory::fWs [private] |
The RooWorkspace containing the models and variables.
Definition at line 121 of file HLFactory.h.
Referenced by AddChannel(), fParseLine(), GetTotBkgPdf(), GetTotDataSet(), GetTotSigBkgPdf(), GetWs(), HLFactory(), and ~HLFactory().
bool RooStats::HLFactory::fOwnWs [private] |
RooCategory* RooStats::HLFactory::fComboCat [private] |
RooAbsPdf* RooStats::HLFactory::fComboBkgPdf [private] |
RooAbsPdf* RooStats::HLFactory::fComboSigBkgPdf [private] |
RooDataSet* RooStats::HLFactory::fComboDataset [private] |
RooWorkspace* RooStats::HLFactory::fWs [private] |