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) | |
Initialize based on an already-created HistFactory Model. | |
HistFactoryNavigation (RooAbsPdf *model, RooArgSet *observables) | |
virtual | ~HistFactoryNavigation () |
void | DrawChannel (const std::string &channel, RooDataSet *data=nullptr) |
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
| |
TH1 * | GetChannelHist (const std::string &channel, const std::string &name="") |
Get the total channel histogram for this channel. | |
RooAbsPdf * | GetChannelPdf (const std::string &channel) |
std::vector< std::string > | GetChannelSampleList (const std::string &channel) |
THStack * | GetChannelStack (const std::string &channel, const std::string &name="") |
Get a stack of all samples in a channel. | |
RooAbsReal * | GetConstraintTerm (const std::string ¶meter) |
Get the constraint term for a given systematic (alpha or gamma) | |
double | GetConstraintUncertainty (const std::string ¶meter) |
Get the uncertainty based on the constraint term for a given systematic. | |
TH1 * | GetDataHist (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 |
RooAbsPdf * | GetModel () const |
Get the model for this channel. | |
RooArgSet * | GetObservableSet (const std::string &channel) |
Get the set of observables for a given channel. | |
TH1 * | 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. | |
virtual TClass * | IsA () const |
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 minimal checking to make sure the replacement makes sense. | |
RooAbsReal * | SampleFunction (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 ®Expr=".*", bool constant=true) |
void | SetMaxBinToPrint (int max) |
void | SetMinBinToPrint (int min) |
virtual void | Streamer (TBuffer &) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
RooRealVar * | var (const std::string &varName) const |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Protected Member Functions | |
void | _GetNodes (ModelConfig *mc) |
Fetch the node information for the pdf in question, and save it in the various 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. | |
TH1 * | MakeHistFromRooFunction (RooAbsReal *func, RooArgList vars, std::string name="Hist") |
Make a histogram from a function 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. | |
RooAbsArg * | findChild (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. | |
RooAbsPdf * | fModel |
The HistFactory Pdf Pointer. | |
RooArgSet * | fObservables |
The observables. | |
#include <RooStats/HistFactory/HistFactoryNavigation.h>
RooStats::HistFactory::HistFactoryNavigation::HistFactoryNavigation | ( | ModelConfig * | mc | ) |
Initialize based on an already-created HistFactory Model.
Definition at line 33 of file HistFactoryNavigation.cxx.
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.
RooStats::HistFactory::HistFactoryNavigation::HistFactoryNavigation | ( | RooAbsPdf * | model, |
RooArgSet * | observables | ||
) |
Definition at line 143 of file HistFactoryNavigation.cxx.
|
inlinevirtual |
Definition at line 31 of file HistFactoryNavigation.h.
|
private |
Recursively get all products of products.
Definition at line 720 of file HistFactoryNavigation.cxx.
|
protected |
Fetch the node information for the pdf in question, and save it in the various collections in this class.
Definition at line 1179 of file HistFactoryNavigation.cxx.
|
protected |
Definition at line 746 of file HistFactoryNavigation.cxx.
|
static |
|
static |
|
inlinestaticconstexpr |
Definition at line 198 of file HistFactoryNavigation.h.
|
inlinestatic |
Definition at line 198 of file HistFactoryNavigation.h.
void RooStats::HistFactory::HistFactoryNavigation::DrawChannel | ( | const std::string & | channel, |
RooDataSet * | data = nullptr |
||
) |
Draw a stack of the channel, and include data if the pointer is supplied.
Definition at line 704 of file HistFactoryNavigation.cxx.
|
private |
Internal method implementation of finding a daughter node from a parent node (looping over all generations)
Definition at line 857 of file HistFactoryNavigation.cxx.
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 452 of file HistFactoryNavigation.cxx.
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 463 of file HistFactoryNavigation.cxx.
TH1 * RooStats::HistFactory::HistFactoryNavigation::GetChannelHist | ( | const std::string & | channel, |
const std::string & | name = "" |
||
) |
Get the total channel histogram for this channel.
Definition at line 547 of file HistFactoryNavigation.cxx.
RooAbsPdf * RooStats::HistFactory::HistFactoryNavigation::GetChannelPdf | ( | const std::string & | channel | ) |
Definition at line 197 of file HistFactoryNavigation.cxx.
std::vector< std::string > RooStats::HistFactory::HistFactoryNavigation::GetChannelSampleList | ( | const std::string & | channel | ) |
Definition at line 593 of file HistFactoryNavigation.cxx.
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 608 of file HistFactoryNavigation.cxx.
RooAbsReal * RooStats::HistFactory::HistFactoryNavigation::GetConstraintTerm | ( | const std::string & | parameter | ) |
Get the constraint term for a given systematic (alpha or gamma)
Definition at line 904 of file HistFactoryNavigation.cxx.
double RooStats::HistFactory::HistFactoryNavigation::GetConstraintUncertainty | ( | const std::string & | parameter | ) |
Get the uncertainty based on the constraint term for a given systematic.
Definition at line 936 of file HistFactoryNavigation.cxx.
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 629 of file HistFactoryNavigation.cxx.
|
inline |
Definition at line 103 of file HistFactoryNavigation.h.
|
inline |
Definition at line 106 of file HistFactoryNavigation.h.
|
inline |
Get the model for this channel.
Definition at line 109 of file HistFactoryNavigation.h.
RooArgSet * RooStats::HistFactory::HistFactoryNavigation::GetObservableSet | ( | const std::string & | channel | ) |
Get the set of observables for a given channel.
Definition at line 514 of file HistFactoryNavigation.cxx.
|
protected |
Get a map of sample names to their functions for a particular channel.
Definition at line 475 of file HistFactoryNavigation.cxx.
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 529 of file HistFactoryNavigation.cxx.
|
inlinevirtual |
Definition at line 198 of file HistFactoryNavigation.h.
|
protected |
Make a histogram from a function Edit so it can take a RooArgSet of parameters.
Definition at line 1132 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::PrintChannelParameters | ( | const std::string & | channel, |
bool | IncludeConstantParams = false |
||
) |
Print parameters that effect a particular channel.
Definition at line 383 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::PrintDataSet | ( | RooDataSet * | data, |
const std::string & | channel = "" |
||
) |
Print a "HistFactory style" RooDataSet in a readable way.
Definition at line 301 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::PrintModelAndData | ( | RooDataSet * | data | ) |
Print the model and the data, comparing channel by channel.
Definition at line 338 of file HistFactoryNavigation.cxx.
|
protected |
Print a histogram's contents to the screen void PrettyPrintHistogram(TH1* hist);.
Definition at line 174 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::PrintParameters | ( | bool | IncludeConstantParams = false | ) |
Print the current values and errors of pdf parameters.
Definition at line 354 of file HistFactoryNavigation.cxx.
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 1049 of file HistFactoryNavigation.cxx.
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 417 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::PrintState | ( | ) |
Should pretty print all channels and the current values
Definition at line 277 of file HistFactoryNavigation.cxx.
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.
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 minimal checking to make sure the replacement makes sense.
Definition at line 1005 of file HistFactoryNavigation.cxx.
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 490 of file HistFactoryNavigation.cxx.
void RooStats::HistFactory::HistFactoryNavigation::SetConstant | ( | const std::string & | regExpr = ".*" , |
bool | constant = true |
||
) |
Definition at line 1186 of file HistFactoryNavigation.cxx.
|
inline |
Definition at line 102 of file HistFactoryNavigation.h.
|
inline |
Definition at line 105 of file HistFactoryNavigation.h.
|
protected |
Set the title and bin widths.
Definition at line 285 of file HistFactoryNavigation.cxx.
|
virtual |
|
inline |
Definition at line 198 of file HistFactoryNavigation.h.
RooRealVar * RooStats::HistFactory::HistFactoryNavigation::var | ( | const std::string & | varName | ) | const |
Definition at line 1226 of file HistFactoryNavigation.cxx.
|
private |
Definition at line 171 of file HistFactoryNavigation.h.
|
private |
Definition at line 170 of file HistFactoryNavigation.h.
|
private |
Definition at line 168 of file HistFactoryNavigation.h.
|
private |
Definition at line 167 of file HistFactoryNavigation.h.
|
private |
The list of channels.
Definition at line 174 of file HistFactoryNavigation.h.
|
private |
Map of channel names to their set of ovservables.
Definition at line 183 of file HistFactoryNavigation.h.
|
private |
Map of channel names to their full pdf's.
Definition at line 177 of file HistFactoryNavigation.h.
|
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.
|
private |
Map of channel names to pdf without constraint.
Definition at line 180 of file HistFactoryNavigation.h.
|
private |
The HistFactory Pdf Pointer.
Definition at line 162 of file HistFactoryNavigation.h.
|
private |
The observables.
Definition at line 165 of file HistFactoryNavigation.h.