Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooStats::HistFactory::HistFactoryNavigation Class Reference

Definition at line 20 of file HistFactoryNavigation.h.

Public Member Functions

 HistFactoryNavigation (const std::string &File, const std::string &WorkspaceName="combined", const std::string &ModelConfigName="ModelConfig")
 
 HistFactoryNavigation (ModelConfig *mc)
 Initialze based on an already-created HistFactory Model.
 
 HistFactoryNavigation (RooAbsPdf *model, RooArgSet *observables)
 
virtual ~HistFactoryNavigation ()
 
void DrawChannel (const std::string &channel, RooDataSet *data=NULL)
 Draw a stack of the channel, and include data if the pointer is supplied.
 
double GetBinValue (int bin, const std::string &channel)
 The value of the ith bin for the total in that channel.
 
double GetBinValue (int bin, const std::string &channel, const std::string &sample)
 The value of the ith bin for that sample and channel

 
TH1GetChannelHist (const std::string &channel, const std::string &name="")
 Get the total channel histogram for this channel.
 
RooAbsPdfGetChannelPdf (const std::string &channel)
 
std::vector< std::string > GetChannelSampleList (const std::string &channel)
 
THStackGetChannelStack (const std::string &channel, const std::string &name="")
 Get a stack of all samples in a channel.
 
RooAbsRealGetConstraintTerm (const std::string &parameter)
 Get the constraint term for a given systematic (alpha or gamma)
 
double GetConstraintUncertainty (const std::string &parameter)
 Get the uncertainty based on the constraint term for a given systematic.
 
TH1GetDataHist (RooDataSet *data, const std::string &channel, const std::string &name="")
 Get a histogram from the dataset for this channel.
 
int GetMaxBinToPrint () const
 
int GetMinBinToPrint () const
 
RooAbsPdfGetModel () const
 Get the model for this channel.
 
RooArgSetGetObservableSet (const std::string &channel)
 Get the set of observables for a given channel.
 
TH1GetSampleHist (const std::string &channel, const std::string &sample, const std::string &name="")
 The (current) histogram for that sample This includes all parameters and interpolation.
 
void PrintChannelParameters (const std::string &channel, bool IncludeConstantParams=false)
 Print parameters that effect a particular channel.
 
void PrintDataSet (RooDataSet *data, const std::string &channel="")
 Print a "HistFactory style" RooDataSet in a readable way.
 
void PrintModelAndData (RooDataSet *data)
 Print the model and the data, comparing channel by channel.
 
void PrintParameters (bool IncludeConstantParams=false)
 Print the current values and errors of pdf parameters.
 
void PrintSampleComponents (const std::string &channel, const std::string &sample)
 Print the different components that make up a sample (NormFactors, Statistical Uncertainties, Interpolation, etc)
 
void PrintSampleParameters (const std::string &channel, const std::string &sample, bool IncludeConstantParams=false)
 Print parameters that effect a particular sample.
 
void PrintState ()
 Should pretty print all channels and the current values

 
void PrintState (const std::string &channel)
 Should pretty print this and the current values.
 
void ReplaceNode (const std::string &ToReplace, RooAbsArg *ReplaceWith)
 Find a node in the pdf and replace it with a new node These nodes can be functions, pdf's, RooRealVar's, etc Will do minimial checking to make sure the replacement makes sense.
 
RooAbsRealSampleFunction (const std::string &channel, const std::string &sample)
 Get the RooAbsReal function for a given sample in a given channel.
 
void SetConstant (const std::string &regExpr=".*", bool constant=true)
 
void SetMaxBinToPrint (int max)
 
void SetMinBinToPrint (int min)
 
RooRealVarvar (const std::string &varName) const
 

Protected Member Functions

void _GetNodes (ModelConfig *mc)
 Fetch the node information for the pdf in question, and save it in the varous collections in this class.
 
void _GetNodes (RooAbsPdf *model, const RooArgSet *observables)
 
std::map< std::string, RooAbsReal * > GetSampleFunctionMap (const std::string &channel)
 Get a map of sample names to their functions for a particular channel.
 
TH1MakeHistFromRooFunction (RooAbsReal *func, RooArgList vars, std::string name="Hist")
 Make a histogram from a funciton Edit so it can take a RooArgSet of parameters.
 
void PrintMultiDimHist (TH1 *hist, int bin_print_width)
 Print a histogram's contents to the screen void PrettyPrintHistogram(TH1* hist);.
 
void SetPrintWidths (const std::string &channel)
 Set the title and bin widths.
 

Private Member Functions

RooArgSet _GetAllProducts (RooProduct *node)
 Recursively get all products of products.
 
RooAbsArgfindChild (const std::string &name, RooAbsReal *parent) const
 Internal method implementation of finding a daughter node from a parent node (looping over all generations)
 

Private Attributes

int _bin_print_width
 
int _label_print_width
 
int _maxBinToPrint
 
int _minBinToPrint
 
std::vector< std::string > fChannelNameVec
 The list of channels.
 
std::map< std::string, RooArgSet * > fChannelObservMap
 Map of channel names to their set of ovservables.
 
std::map< std::string, RooAbsPdf * > fChannelPdfMap
 Map of channel names to their full pdf's.
 
std::map< std::string, std::map< std::string, RooAbsReal * > > fChannelSampleFunctionMap
 Map of Map of Channel, Sample names to Function Nodes Used by doing: fChannelSampleFunctionMap["MyChannel"]["MySample"].
 
std::map< std::string, RooAbsPdf * > fChannelSumNodeMap
 Map of channel names to pdf without constraint.
 
RooAbsPdffModel
 The HistFactory Pdf Pointer.
 
RooArgSetfObservables
 The observables.
 

#include <RooStats/HistFactory/HistFactoryNavigation.h>

Constructor & Destructor Documentation

◆ HistFactoryNavigation() [1/3]

RooStats::HistFactory::HistFactoryNavigation::HistFactoryNavigation ( ModelConfig mc)

Initialze based on an already-created HistFactory Model.

Definition at line 33 of file HistFactoryNavigation.cxx.

◆ HistFactoryNavigation() [2/3]

RooStats::HistFactory::HistFactoryNavigation::HistFactoryNavigation ( const std::string &  File,
const std::string &  WorkspaceName = "combined",
const std::string &  ModelConfigName = "ModelConfig" 
)

Definition at line 77 of file HistFactoryNavigation.cxx.

◆ HistFactoryNavigation() [3/3]

RooStats::HistFactory::HistFactoryNavigation::HistFactoryNavigation ( RooAbsPdf model,
RooArgSet observables 
)

Definition at line 143 of file HistFactoryNavigation.cxx.

◆ ~HistFactoryNavigation()

virtual RooStats::HistFactory::HistFactoryNavigation::~HistFactoryNavigation ( )
inlinevirtual

Definition at line 31 of file HistFactoryNavigation.h.

Member Function Documentation

◆ _GetAllProducts()

RooArgSet RooStats::HistFactory::HistFactoryNavigation::_GetAllProducts ( RooProduct node)
private

Recursively get all products of products.

Definition at line 730 of file HistFactoryNavigation.cxx.

◆ _GetNodes() [1/2]

void RooStats::HistFactory::HistFactoryNavigation::_GetNodes ( ModelConfig mc)
protected

Fetch the node information for the pdf in question, and save it in the varous collections in this class.

Definition at line 1238 of file HistFactoryNavigation.cxx.

◆ _GetNodes() [2/2]

void RooStats::HistFactory::HistFactoryNavigation::_GetNodes ( RooAbsPdf model,
const RooArgSet observables 
)
protected

Definition at line 763 of file HistFactoryNavigation.cxx.

◆ DrawChannel()

void RooStats::HistFactory::HistFactoryNavigation::DrawChannel ( const std::string &  channel,
RooDataSet data = NULL 
)

Draw a stack of the channel, and include data if the pointer is supplied.

Definition at line 714 of file HistFactoryNavigation.cxx.

◆ findChild()

RooAbsArg * RooStats::HistFactory::HistFactoryNavigation::findChild ( const std::string &  name,
RooAbsReal parent 
) const
private

Internal method implementation of finding a daughter node from a parent node (looping over all generations)

Definition at line 890 of file HistFactoryNavigation.cxx.

◆ GetBinValue() [1/2]

double RooStats::HistFactory::HistFactoryNavigation::GetBinValue ( int  bin,
const std::string &  channel 
)

The value of the ith bin for the total in that channel.

Definition at line 476 of file HistFactoryNavigation.cxx.

◆ GetBinValue() [2/2]

double RooStats::HistFactory::HistFactoryNavigation::GetBinValue ( int  bin,
const std::string &  channel,
const std::string &  sample 
)

The value of the ith bin for that sample and channel


Definition at line 489 of file HistFactoryNavigation.cxx.

◆ GetChannelHist()

TH1 * RooStats::HistFactory::HistFactoryNavigation::GetChannelHist ( const std::string &  channel,
const std::string &  name = "" 
)

Get the total channel histogram for this channel.

Definition at line 575 of file HistFactoryNavigation.cxx.

◆ GetChannelPdf()

RooAbsPdf * RooStats::HistFactory::HistFactoryNavigation::GetChannelPdf ( const std::string &  channel)

Definition at line 197 of file HistFactoryNavigation.cxx.

◆ GetChannelSampleList()

std::vector< std::string > RooStats::HistFactory::HistFactoryNavigation::GetChannelSampleList ( const std::string &  channel)

Definition at line 620 of file HistFactoryNavigation.cxx.

◆ GetChannelStack()

THStack * RooStats::HistFactory::HistFactoryNavigation::GetChannelStack ( const std::string &  channel,
const std::string &  name = "" 
)

Get a stack of all samples in a channel.

Definition at line 635 of file HistFactoryNavigation.cxx.

◆ GetConstraintTerm()

RooAbsReal * RooStats::HistFactory::HistFactoryNavigation::GetConstraintTerm ( const std::string &  parameter)

Get the constraint term for a given systematic (alpha or gamma)

Definition at line 946 of file HistFactoryNavigation.cxx.

◆ GetConstraintUncertainty()

double RooStats::HistFactory::HistFactoryNavigation::GetConstraintUncertainty ( const std::string &  parameter)

Get the uncertainty based on the constraint term for a given systematic.

Definition at line 978 of file HistFactoryNavigation.cxx.

◆ GetDataHist()

TH1 * RooStats::HistFactory::HistFactoryNavigation::GetDataHist ( RooDataSet data,
const std::string &  channel,
const std::string &  name = "" 
)

Get a histogram from the dataset for this channel.

Definition at line 656 of file HistFactoryNavigation.cxx.

◆ GetMaxBinToPrint()

int RooStats::HistFactory::HistFactoryNavigation::GetMaxBinToPrint ( ) const
inline

Definition at line 103 of file HistFactoryNavigation.h.

◆ GetMinBinToPrint()

int RooStats::HistFactory::HistFactoryNavigation::GetMinBinToPrint ( ) const
inline

Definition at line 106 of file HistFactoryNavigation.h.

◆ GetModel()

RooAbsPdf * RooStats::HistFactory::HistFactoryNavigation::GetModel ( ) const
inline

Get the model for this channel.

Definition at line 109 of file HistFactoryNavigation.h.

◆ GetObservableSet()

RooArgSet * RooStats::HistFactory::HistFactoryNavigation::GetObservableSet ( const std::string &  channel)

Get the set of observables for a given channel.

Definition at line 542 of file HistFactoryNavigation.cxx.

◆ GetSampleFunctionMap()

std::map< std::string, RooAbsReal * > RooStats::HistFactory::HistFactoryNavigation::GetSampleFunctionMap ( const std::string &  channel)
protected

Get a map of sample names to their functions for a particular channel.

Definition at line 503 of file HistFactoryNavigation.cxx.

◆ GetSampleHist()

TH1 * RooStats::HistFactory::HistFactoryNavigation::GetSampleHist ( const std::string &  channel,
const std::string &  sample,
const std::string &  name = "" 
)

The (current) histogram for that sample This includes all parameters and interpolation.

Definition at line 557 of file HistFactoryNavigation.cxx.

◆ MakeHistFromRooFunction()

TH1 * RooStats::HistFactory::HistFactoryNavigation::MakeHistFromRooFunction ( RooAbsReal func,
RooArgList  vars,
std::string  name = "Hist" 
)
protected

Make a histogram from a funciton Edit so it can take a RooArgSet of parameters.

Definition at line 1191 of file HistFactoryNavigation.cxx.

◆ PrintChannelParameters()

void RooStats::HistFactory::HistFactoryNavigation::PrintChannelParameters ( const std::string &  channel,
bool  IncludeConstantParams = false 
)

Print parameters that effect a particular channel.

Definition at line 392 of file HistFactoryNavigation.cxx.

◆ PrintDataSet()

void RooStats::HistFactory::HistFactoryNavigation::PrintDataSet ( RooDataSet data,
const std::string &  channel = "" 
)

Print a "HistFactory style" RooDataSet in a readable way.

Definition at line 303 of file HistFactoryNavigation.cxx.

◆ PrintModelAndData()

void RooStats::HistFactory::HistFactoryNavigation::PrintModelAndData ( RooDataSet data)

Print the model and the data, comparing channel by channel.

Definition at line 341 of file HistFactoryNavigation.cxx.

◆ PrintMultiDimHist()

void RooStats::HistFactory::HistFactoryNavigation::PrintMultiDimHist ( TH1 hist,
int  bin_print_width 
)
protected

Print a histogram's contents to the screen void PrettyPrintHistogram(TH1* hist);.

Definition at line 174 of file HistFactoryNavigation.cxx.

◆ PrintParameters()

void RooStats::HistFactory::HistFactoryNavigation::PrintParameters ( bool  IncludeConstantParams = false)

Print the current values and errors of pdf parameters.

Definition at line 358 of file HistFactoryNavigation.cxx.

◆ PrintSampleComponents()

void RooStats::HistFactory::HistFactoryNavigation::PrintSampleComponents ( const std::string &  channel,
const std::string &  sample 
)

Print the different components that make up a sample (NormFactors, Statistical Uncertainties, Interpolation, etc)

Definition at line 1084 of file HistFactoryNavigation.cxx.

◆ PrintSampleParameters()

void RooStats::HistFactory::HistFactoryNavigation::PrintSampleParameters ( const std::string &  channel,
const std::string &  sample,
bool  IncludeConstantParams = false 
)

Print parameters that effect a particular sample.

Definition at line 433 of file HistFactoryNavigation.cxx.

◆ PrintState() [1/2]

void RooStats::HistFactory::HistFactoryNavigation::PrintState ( )

Should pretty print all channels and the current values


Definition at line 279 of file HistFactoryNavigation.cxx.

◆ PrintState() [2/2]

void RooStats::HistFactory::HistFactoryNavigation::PrintState ( const std::string &  channel)

Should pretty print this and the current values.

Definition at line 219 of file HistFactoryNavigation.cxx.

◆ ReplaceNode()

void RooStats::HistFactory::HistFactoryNavigation::ReplaceNode ( const std::string &  ToReplace,
RooAbsArg ReplaceWith 
)

Find a node in the pdf and replace it with a new node These nodes can be functions, pdf's, RooRealVar's, etc Will do minimial checking to make sure the replacement makes sense.

Definition at line 1047 of file HistFactoryNavigation.cxx.

◆ SampleFunction()

RooAbsReal * RooStats::HistFactory::HistFactoryNavigation::SampleFunction ( const std::string &  channel,
const std::string &  sample 
)

Get the RooAbsReal function for a given sample in a given channel.

Definition at line 518 of file HistFactoryNavigation.cxx.

◆ SetConstant()

void RooStats::HistFactory::HistFactoryNavigation::SetConstant ( const std::string &  regExpr = ".*",
bool  constant = true 
)

Definition at line 1245 of file HistFactoryNavigation.cxx.

◆ SetMaxBinToPrint()

void RooStats::HistFactory::HistFactoryNavigation::SetMaxBinToPrint ( int  max)
inline

Definition at line 102 of file HistFactoryNavigation.h.

◆ SetMinBinToPrint()

void RooStats::HistFactory::HistFactoryNavigation::SetMinBinToPrint ( int  min)
inline

Definition at line 105 of file HistFactoryNavigation.h.

◆ SetPrintWidths()

void RooStats::HistFactory::HistFactoryNavigation::SetPrintWidths ( const std::string &  channel)
protected

Set the title and bin widths.

Definition at line 287 of file HistFactoryNavigation.cxx.

◆ var()

RooRealVar * RooStats::HistFactory::HistFactoryNavigation::var ( const std::string &  varName) const

Definition at line 1286 of file HistFactoryNavigation.cxx.

Member Data Documentation

◆ _bin_print_width

int RooStats::HistFactory::HistFactoryNavigation::_bin_print_width
private

Definition at line 171 of file HistFactoryNavigation.h.

◆ _label_print_width

int RooStats::HistFactory::HistFactoryNavigation::_label_print_width
private

Definition at line 170 of file HistFactoryNavigation.h.

◆ _maxBinToPrint

int RooStats::HistFactory::HistFactoryNavigation::_maxBinToPrint
private

Definition at line 168 of file HistFactoryNavigation.h.

◆ _minBinToPrint

int RooStats::HistFactory::HistFactoryNavigation::_minBinToPrint
private

Definition at line 167 of file HistFactoryNavigation.h.

◆ fChannelNameVec

std::vector<std::string> RooStats::HistFactory::HistFactoryNavigation::fChannelNameVec
private

The list of channels.

Definition at line 174 of file HistFactoryNavigation.h.

◆ fChannelObservMap

std::map< std::string, RooArgSet*> RooStats::HistFactory::HistFactoryNavigation::fChannelObservMap
private

Map of channel names to their set of ovservables.

Definition at line 183 of file HistFactoryNavigation.h.

◆ fChannelPdfMap

std::map< std::string, RooAbsPdf* > RooStats::HistFactory::HistFactoryNavigation::fChannelPdfMap
private

Map of channel names to their full pdf's.

Definition at line 177 of file HistFactoryNavigation.h.

◆ fChannelSampleFunctionMap

std::map< std::string, std::map< std::string, RooAbsReal*> > RooStats::HistFactory::HistFactoryNavigation::fChannelSampleFunctionMap
private

Map of Map of Channel, Sample names to Function Nodes Used by doing: fChannelSampleFunctionMap["MyChannel"]["MySample"].

Definition at line 187 of file HistFactoryNavigation.h.

◆ fChannelSumNodeMap

std::map< std::string, RooAbsPdf* > RooStats::HistFactory::HistFactoryNavigation::fChannelSumNodeMap
private

Map of channel names to pdf without constraint.

Definition at line 180 of file HistFactoryNavigation.h.

◆ fModel

RooAbsPdf* RooStats::HistFactory::HistFactoryNavigation::fModel
private

The HistFactory Pdf Pointer.

Definition at line 162 of file HistFactoryNavigation.h.

◆ fObservables

RooArgSet* RooStats::HistFactory::HistFactoryNavigation::fObservables
private

The observables.

Definition at line 165 of file HistFactoryNavigation.h.

Libraries for RooStats::HistFactory::HistFactoryNavigation:

The documentation for this class was generated from the following files: