Logo ROOT  
Reference Guide
RooStats::HistFactory::HistFactoryNavigation Class Reference

Definition at line 18 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. More...
 
 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. More...
 
double GetBinValue (int bin, const std::string &channel)
 The value of the ith bin for the total in that channel. More...
 
double GetBinValue (int bin, const std::string &channel, const std::string &sample)
 The value of the ith bin for that sample and channel
 More...
 
TH1GetChannelHist (const std::string &channel, const std::string &name="")
 Get the total channel histogram for this channel. More...
 
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. More...
 
RooAbsRealGetConstraintTerm (const std::string &parameter)
 Get the constraint term for a given systematic (alpha or gamma) More...
 
double GetConstraintUncertainty (const std::string &parameter)
 Get the uncertainty based on the constraint term for a given systematic. More...
 
TH1GetDataHist (RooDataSet *data, const std::string &channel, const std::string &name="")
 Get a histogram from the dataset for this channel. More...
 
int GetMaxBinToPrint () const
 
int GetMinBinToPrint () const
 
RooAbsPdfGetModel () const
 Get the model for this channel. More...
 
RooArgSetGetObservableSet (const std::string &channel)
 Get the set of observables for a given channel. More...
 
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. More...
 
void PrintChannelParameters (const std::string &channel, bool IncludeConstantParams=false)
 Print parameters that effect a particular channel. More...
 
void PrintDataSet (RooDataSet *data, const std::string &channel="")
 Print a "HistFactory style" RooDataSet in a readable way. More...
 
void PrintModelAndData (RooDataSet *data)
 Print the model and the data, comparing channel by channel. More...
 
void PrintParameters (bool IncludeConstantParams=false)
 Print the current values and errors of pdf parameters. More...
 
void PrintSampleComponents (const std::string &channel, const std::string &sample)
 Print the different components that make up a sample (NormFactors, Statistical Uncertainties, Interpolation, etc) More...
 
void PrintSampleParameters (const std::string &channel, const std::string &sample, bool IncludeConstantParams=false)
 Print parameters that effect a particular sample. More...
 
void PrintState ()
 Should pretty print all channels and the current values
 More...
 
void PrintState (const std::string &channel)
 Should pretty print this and the current values. More...
 
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. More...
 
RooAbsRealSampleFunction (const std::string &channel, const std::string &sample)
 Get the RooAbsReal function for a given sample in a given channel. More...
 
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. More...
 
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. More...
 
TH1MakeHistFromRooFunction (RooAbsReal *func, RooArgList vars, std::string name="Hist")
 Make a histogram from a funciton Edit so it can take a RooArgSet of parameters. More...
 
void PrintMultiDimHist (TH1 *hist, int bin_print_width)
 Print a histogram's contents to the screen void PrettyPrintHistogram(TH1* hist);. More...
 
void SetPrintWidths (const std::string &channel)
 Set the title and bin widths. More...
 

Private Member Functions

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

Private Attributes

int _bin_print_width
 
int _label_print_width
 
int _maxBinToPrint
 
int _minBinToPrint
 
std::vector< std::string > fChannelNameVec
 The list of channels. More...
 
std::map< std::string, RooArgSet * > fChannelObservMap
 Map of channel names to their set of ovservables. More...
 
std::map< std::string, RooAbsPdf * > fChannelPdfMap
 Map of channel names to their full pdf's. More...
 
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"]. More...
 
std::map< std::string, RooAbsPdf * > fChannelSumNodeMap
 Map of channel names to pdf without constraint. More...
 
RooAbsPdffModel
 The HistFactory Pdf Pointer. More...
 
RooArgSetfObservables
 The observables. More...
 

#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 35 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 79 of file HistFactoryNavigation.cxx.

◆ HistFactoryNavigation() [3/3]

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

Definition at line 145 of file HistFactoryNavigation.cxx.

◆ ~HistFactoryNavigation()

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

Definition at line 30 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 732 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 1242 of file HistFactoryNavigation.cxx.

◆ _GetNodes() [2/2]

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

Definition at line 765 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 716 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 894 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 478 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 491 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 577 of file HistFactoryNavigation.cxx.

◆ GetChannelPdf()

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

Definition at line 199 of file HistFactoryNavigation.cxx.

◆ GetChannelSampleList()

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

Definition at line 622 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 637 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 950 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 982 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 658 of file HistFactoryNavigation.cxx.

◆ GetMaxBinToPrint()

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

Definition at line 102 of file HistFactoryNavigation.h.

◆ GetMinBinToPrint()

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

Definition at line 105 of file HistFactoryNavigation.h.

◆ GetModel()

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

Get the model for this channel.

Definition at line 108 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 544 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 505 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 559 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 1195 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 394 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 305 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 343 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 176 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 360 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 1088 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 435 of file HistFactoryNavigation.cxx.

◆ PrintState() [1/2]

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

Should pretty print all channels and the current values


Definition at line 281 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 221 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 1051 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 520 of file HistFactoryNavigation.cxx.

◆ SetConstant()

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

Definition at line 1249 of file HistFactoryNavigation.cxx.

◆ SetMaxBinToPrint()

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

Definition at line 101 of file HistFactoryNavigation.h.

◆ SetMinBinToPrint()

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

Definition at line 104 of file HistFactoryNavigation.h.

◆ SetPrintWidths()

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

Set the title and bin widths.

Definition at line 289 of file HistFactoryNavigation.cxx.

◆ var()

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

Definition at line 1290 of file HistFactoryNavigation.cxx.

Member Data Documentation

◆ _bin_print_width

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

Definition at line 170 of file HistFactoryNavigation.h.

◆ _label_print_width

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

Definition at line 169 of file HistFactoryNavigation.h.

◆ _maxBinToPrint

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

Definition at line 167 of file HistFactoryNavigation.h.

◆ _minBinToPrint

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

Definition at line 166 of file HistFactoryNavigation.h.

◆ fChannelNameVec

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

The list of channels.

Definition at line 173 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 182 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 176 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 186 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 179 of file HistFactoryNavigation.h.

◆ fModel

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

The HistFactory Pdf Pointer.

Definition at line 161 of file HistFactoryNavigation.h.

◆ fObservables

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

The observables.

Definition at line 164 of file HistFactoryNavigation.h.

Libraries for RooStats::HistFactory::HistFactoryNavigation:
[legend]

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