class RooStats::HybridCalculator: public RooStats::HypoTestCalculator, public TNamed


HybridCalculator class: this class is a fresh rewrite in RooStats of
	RooStatsCms/LimitCalculator developped by D. Piparo and G. Schott
Authors: D. Piparo, G. Schott - Universitaet Karlsruhe

The class is born from the need to have an implementation of the CLs
method that could take advantage from the RooFit Package.
The basic idea is the following:
- Instantiate an object specifying a signal+background model, a background model and a dataset.
- Perform toy MC experiments to know the distributions of -2lnQ
- Calculate the CLsb and CLs values as "integrals" of these distributions.

The class allows the user to input models as RooAbsPdf or TH1 object
pointers (the pdfs must be "extended": for more information please refer to
http://roofit.sourceforge.net). The dataset can be entered as a
RooTreeData or TH1 object pointer.

Unlike the TLimit Class a complete MC generation is performed at each step
and not a simple Poisson fluctuation of the contents of the bins.
Another innovation is the treatment of the nuisance parameters. The user
can input in the constructor nuisance parameters.
To include the information that we have about the nuisance parameters a prior
PDF (RooAbsPdf) should be specified

The result of the calculations is returned as a HybridResult object pointer.

see also the following interesting references:
- Alex Read, "Presentation of search results: the CLs technique" Journal of Physics G: Nucl. // Part. Phys. 28 2693-2704 (2002). http://www.iop.org/EJ/abstract/0954-3899/28/10/313/

- Alex Read, "Modified Frequentist Analysis of Search Results (The CLs Method)" CERN 2000-005 (30 May 2000)

- V. Bartsch, G.Quast, "Expected signal observability at future experiments" CMS NOTE 2005/004

- http://root.cern.ch/root/html/src/TLimit.html

Function Members (Methods)

public:
virtual~HybridCalculator()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
RooStats::HybridResult*Calculate(unsigned int nToys, bool usePriors) const
RooStats::HybridResult*Calculate(TH1& data, unsigned int nToys, bool usePriors) const
RooStats::HybridResult*Calculate(RooTreeData& data, unsigned int nToys, bool usePriors) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::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_tTObject::GetDtorOnly()
virtual RooStats::HybridResult*GetHypoTest() const
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_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
RooStats::HybridCalculatorHybridCalculator(const RooStats::HybridCalculator&)
RooStats::HybridCalculatorHybridCalculator(const char* name = 0, const char* title = 0)
RooStats::HybridCalculatorHybridCalculator(RooAbsData& data, RooAbsPdf& sb_model, RooAbsPdf& b_model, RooArgSet* nuisance_parameters, RooAbsPdf* prior_pdf)
RooStats::HybridCalculatorHybridCalculator(const char* name, const char* title, RooAbsPdf& sb_model, RooAbsPdf& b_model, RooArgList& observables, RooArgSet& nuisance_parameters, RooAbsPdf& prior_pdf)
RooStats::HybridCalculatorHybridCalculator(const char* name, const char* title, RooAbsData& data, RooAbsPdf& sb_model, RooAbsPdf& b_model, RooArgSet* nuisance_parameters, RooAbsPdf* prior_pdf)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidRooStats::HypoTestCalculator::Initialize(RooAbsData& data, RooAbsPdf& commonPdf, RooArgSet& nullParameters, RooArgSet& alternateParameters, RooArgSet* nuisanceParameters = 0, RooAbsPdf* nuisancePdf = 0)
virtual voidRooStats::HypoTestCalculator::Initialize(RooAbsData& data, RooAbsPdf& nullPdf, RooAbsPdf& alternatePdf, RooArgSet* nullParameters = 0, RooArgSet* alternateParameters = 0, RooArgSet* nuisanceParameters = 0, RooAbsPdf* nuisancePdf = 0)
virtual voidRooStats::HypoTestCalculator::Initialize(RooWorkspace& ws, const char* data, const char* commonPdf, RooArgSet& nullParameters, RooArgSet& alternateParameters, RooArgSet* nuisanceParameters = 0, const char* nuisancePdf = 0)
virtual voidRooStats::HypoTestCalculator::Initialize(RooWorkspace& ws, const char* data, const char* nullPdf, const char* alternatePdf, RooArgSet* nullParameters = 0, RooArgSet* alternateParameters = 0, RooArgSet* nuisanceParameters = 0, const char* nuisancePdf = 0)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::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)
RooStats::HybridCalculator&operator=(const RooStats::HybridCalculator&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
voidPrintMore(const char* options) const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual voidSetAlternateParameters(RooArgSet&)
virtual voidSetAlternatePdf(RooAbsPdf& pdf)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetCommonPdf(RooAbsPdf& pdf)
virtual voidSetData(const char* name)
virtual voidSetData(RooAbsData& data)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidSetNuisanceParameters(RooArgSet& params)
virtual voidSetNuisancePdf(RooAbsPdf& prior_pdf)
virtual voidSetNuisancePdf(const char* name)
virtual voidSetNullParameters(RooArgSet&)
virtual voidSetNullPdf(RooAbsPdf& pdf)
voidSetNumberOfToys(unsigned int ntoys)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetTestStatistics(int index)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
voidUseNuisance(bool on = true)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
boolDoCheckInputs() const
boolDoInitializeFromWS()
RooStats::HybridCalculatorHybridCalculator(RooWorkspace& wks, const char* data, const char* sb_model, const char* b_model, RooArgSet* nuisance_parameters, const char* prior_pdf)
RooStats::HybridCalculatorHybridCalculator(const char* name, const char* title, RooWorkspace& wks, const char* data, const char* sb_model, const char* b_model, RooArgSet* nuisance_parameters, const char* prior_pdf)
voidRunToys(vector<double>& bVals, vector<double>& sbVals, unsigned int nToys, bool usePriors) const
virtual voidSetAlternatePdf(const char* name)
virtual voidSetCommonPdf(const char* name)
virtual voidSetNullPdf(const char* name)
virtual voidSetWorkspace(RooWorkspace& ws)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
RooAbsPdf*fBModelThe pdf of the background model
TStringfBModelNamename of pdf of the background model
RooAbsData*fDatapointer to the data sets
TStringfDataNamename of the dataset in the workspace
unsigned intfNToysnumber of Toys MC
RooArgList*fObservablesCollection of the observables of the model
RooArgSet*fParametersCollection of the nuisance parameters in the model
RooAbsPdf*fPriorPdfPrior PDF of the nuisance parameters
TStringfPriorPdfNamename of pdf of the background model
RooAbsPdf*fSbModelThe pdf of the signal+background model
TStringfSbModelNamename of pdf of the signal+background model
unsigned intfTestStatisticsIdxIndex of the test statistics to use
boolfUsePriorPdfuse a prior for nuisance parameters
RooWorkspace*fWSa workspace that owns all the components to be used by the calculator

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HybridCalculator(const char* name = 0, const char* title = 0)
 constructor with name and title
 set default parameters
HybridCalculator( const char *name, const char *title, RooAbsPdf& sbModel, RooAbsPdf& bModel, RooArgList& observables, RooArgSet& nuisance_parameters, RooAbsPdf& priorPdf )
 specific HybridCalculator constructor:
 the user need to specify the models in the S+B case and B-only case,
 the list of observables of the model(s) (for MC-generation), the list of parameters
 that are marginalised and the prior distribution of those parameters
HybridCalculator(RooAbsData& data, RooAbsPdf& sb_model, RooAbsPdf& b_model, RooArgSet* nuisance_parameters, RooAbsPdf* prior_pdf)
 HybridCalculator constructor for performing hypotesis test
 the user need to specify the data set, the models in the S+B case and B-only case.
 In case of treatment of nuisance parameter, the user need to specify the
 the list of parameters  that are marginalised and the prior distribution of those parameters
HybridCalculator( const char *name, const char *title, RooAbsData & data, RooAbsPdf& sbModel, RooAbsPdf& bModel, RooArgSet* nuisance_parameters, RooAbsPdf* priorPdf )
 HybridCalculator constructor for performing hypotesis test
 the user need to specify the data set, the models in the S+B case and B-only case.
 In case of treatment of nuisance parameter, the user need to specify the
 the list of parameters  that are marginalised and the prior distribution of those parameters
HybridCalculator(RooWorkspace& wks, const char* data, const char* sb_model, const char* b_model, RooArgSet* nuisance_parameters, const char* prior_pdf)
 HybridCalculator constructor for performing hypotesis test from a Workspace
 the user need to specify the data set, the models in the S+B case and B-only case.
 In case of treatment of nuisance parameter, the user need to specify the
 the list of parameters  that are marginalised and the prior distribution of those parameters
HybridCalculator(const char* name, const char* title, RooWorkspace& wks, const char* data, const char* sb_model, const char* b_model, RooArgSet* nuisance_parameters, const char* prior_pdf)
 HybridCalculator constructor for performing hypotesis test from a Workspace
 the user need to specify the data set, the models in the S+B case and B-only case.
 In case of treatment of nuisance parameter, the user need to specify the
 the list of parameters  that are marginalised and the prior distribution of those parameters
~HybridCalculator()
 HybridCalculator destructor
if( fOwnsWorkspace && fWS) delete fWS;
void SetTestStatistics(int index)
 set the desired test statistics:
 index=1 : 2 * log( L_sb / L_b )  (DEFAULT)
 index=2 : number of generated events
 if the index is different to any of those values, the default is used
HybridResult* Calculate(TH1& data, unsigned int nToys, bool usePriors)
 first compute the test statistics for data and then prepare and run the toy-MC experiments
HybridResult* Calculate(RooTreeData& data, unsigned int nToys, bool usePriors)
 first compute the test statistics for data and then prepare and run the toy-MC experiments
HybridResult* Calculate(unsigned int nToys, bool usePriors) const
void RunToys(vector<double>& bVals, vector<double>& sbVals, unsigned int nToys, bool usePriors) const
 do the actual run-MC processing
void PrintMore(const char* options) const
 Print out some information about the input models
HybridResult* GetHypoTest() const
 perform the hypothesis test and return result of hypothesis test
bool DoInitializeFromWS()
bool DoCheckInputs() const
void SetWorkspace(RooWorkspace& ws)
 set an external workspace containing data and pdf's
 if a workspace already esists merge with existing one
 one needs to set later pdf names and data names
HybridCalculator(const char* name = 0, const char* title = 0)
 Constructor with only name and title
void SetNullPdf(const char* name)
 set the PDF for the null hypothesis (only B)
{ fBModelName = name; }
void SetAlternatePdf(const char* name )
 set a common PDF for both the null and alternate hypotheses
{ fSbModelName = name;}
void SetCommonPdf(const char* name)
{fSbModelName = name; }
void SetCommonPdf(RooAbsPdf & pdf)
 Set a common PDF for both the null and alternate
{ fSbModel = &pdf; }
void SetNullPdf(RooAbsPdf& pdf)
 Set the PDF for the alternate hypothesis ( i.e. S+B)
{ fBModel = &pdf; }
void SetAlternatePdf(RooAbsPdf& pdf)
{ fSbModel = &pdf; }
void SetData(const char* name)
 specify the name of the dataset in the workspace to be used
{ fDataName = name; }
void SetData(RooAbsData& data)
{ fData = &data; }
void SetNullParameters(RooArgSet& )
 set parameter values for the null if using a common PDF
{ }
void SetAlternateParameters(RooArgSet& )
{}
void SetNuisancePdf(RooAbsPdf & prior_pdf)
 additional methods specific for HybridCalculator
 set a  prior pdf for the nuisance parameters
void SetNuisancePdf(const char * name)
 set name of a  prior pdf for the nuisance parameters in the previously given workspace
void SetNuisanceParameters(RooArgSet& params)
 set the nuisance parameters to be marginalized
{ fParameters = &params; }
void SetNumberOfToys(unsigned int ntoys)
 set number of toy MC
{ fNToys = ntoys; }
void UseNuisance(bool on = true)
 control use of the pdf for the nuisance parameter and marginalize them
{ fUsePriorPdf = on; }

Last change: root/roostats:$Id: HybridCalculator.h 26964 2008-12-16 16:30:01Z moneta $
Last generated: 2008-12-17 08:53
Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.