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

This class encapsulates all information for the statistical interpretation of one experiment.

It can be combined with other channels (e.g. for the combination of multiple experiments, or to constrain nuisance parameters with information obtained in a control region). A channel contains one or more samples which describe the contribution from different processes to this measurement.

Definition at line 30 of file Channel.h.

Public Member Functions

 Channel ()
 
 Channel (const Channel &other)
 
 Channel (std::string Name, std::string InputFile="")
 
void AddAdditionalData (const RooStats::HistFactory::Data &data)
 add additional data object
 
void AddSample (RooStats::HistFactory::Sample sample)
 
bool CheckHistograms () const
 
void CollectHistograms ()
 
std::vector< RooStats::HistFactory::Data > & GetAdditionalData ()
 retrieve vector of additional data objects
 
RooStats::HistFactory::DataGetData ()
 get data object
 
std::string GetHistoPath () const
 get path to histograms in input file
 
std::string GetInputFile () const
 get name of input file
 
std::string GetName () const
 get name of channel
 
std::vector< RooStats::HistFactory::Sample > & GetSamples ()
 get vector of samples for this channel
 
const std::vector< RooStats::HistFactory::Sample > & GetSamples () const
 
HistFactory::StatErrorConfigGetStatErrorConfig ()
 get information about threshold for statistical uncertainties and constraint term
 
const HistFactory::StatErrorConfigGetStatErrorConfig () const
 
void Print (std::ostream &=std::cout)
 
void PrintXML (std::string Directory, std::string Prefix="")
 
void SetData (const RooStats::HistFactory::Data &data)
 set data object
 
void SetData (double Val)
 
void SetData (std::string HistoName, std::string InputFile, std::string HistoPath="")
 
void SetData (TH1 *hData)
 
void SetHistoPath (const std::string &file)
 set path for histograms in input file
 
void SetInputFile (const std::string &file)
 set name of input file containing histograms
 
void SetName (const std::string &Name)
 set name of channel
 
void SetStatErrorConfig (double RelErrorThreshold, Constraint::Type ConstraintType)
 
void SetStatErrorConfig (double RelErrorThreshold, std::string ConstraintType)
 
void SetStatErrorConfig (RooStats::HistFactory::StatErrorConfig Config)
 define treatment of statistical uncertainties
 

Protected Member Functions

TH1GetHistogram (std::string InputFile, std::string HistoPath, std::string HistoName, std::map< std::string, std::unique_ptr< TFile > > &lsof)
 Open a file and copy a histogram.
 

Protected Attributes

std::vector< RooStats::HistFactory::DatafAdditionalData
 One can add additional datasets These are simply added to the xml under a different name.
 
HistFactory::Data fData
 
std::string fHistoPath
 
std::string fInputFile
 
std::string fName
 
std::vector< RooStats::HistFactory::SamplefSamples
 
HistFactory::StatErrorConfig fStatErrorConfig
 

Friends

class Measurement
 

#include <RooStats/HistFactory/Channel.h>

Constructor & Destructor Documentation

◆ Channel() [1/3]

RooStats::HistFactory::Channel::Channel ( )

Definition at line 35 of file Channel.cxx.

◆ Channel() [2/3]

RooStats::HistFactory::Channel::Channel ( const Channel other)

Definition at line 41 of file Channel.cxx.

◆ Channel() [3/3]

RooStats::HistFactory::Channel::Channel ( std::string  Name,
std::string  InputFile = "" 
)

Definition at line 52 of file Channel.cxx.

Member Function Documentation

◆ AddAdditionalData()

void RooStats::HistFactory::Channel::AddAdditionalData ( const RooStats::HistFactory::Data data)
inline

add additional data object

Definition at line 62 of file Channel.h.

◆ AddSample()

void RooStats::HistFactory::Channel::AddSample ( RooStats::HistFactory::Sample  sample)

Definition at line 67 of file Channel.cxx.

◆ CheckHistograms()

bool RooStats::HistFactory::Channel::CheckHistograms ( ) const

Definition at line 332 of file Channel.cxx.

◆ CollectHistograms()

void RooStats::HistFactory::Channel::CollectHistograms ( )

Definition at line 218 of file Channel.cxx.

◆ GetAdditionalData()

std::vector< RooStats::HistFactory::Data > & RooStats::HistFactory::Channel::GetAdditionalData ( )
inline

retrieve vector of additional data objects

Definition at line 64 of file Channel.h.

◆ GetData()

RooStats::HistFactory::Data & RooStats::HistFactory::Channel::GetData ( )
inline

get data object

Definition at line 59 of file Channel.h.

◆ GetHistogram()

TH1 * RooStats::HistFactory::Channel::GetHistogram ( std::string  InputFile,
std::string  HistoPath,
std::string  HistoName,
std::map< std::string, std::unique_ptr< TFile > > &  lsof 
)
protected

Open a file and copy a histogram.

Parameters
InputFileFile where the histogram resides.
HistoPathPath of the histogram in the file.
HistoNameName of the histogram to retrieve.
lsofList of open files. Helps to prevent opening and closing a file hundreds of times.

Definition at line 462 of file Channel.cxx.

◆ GetHistoPath()

std::string RooStats::HistFactory::Channel::GetHistoPath ( ) const
inline

get path to histograms in input file

Definition at line 51 of file Channel.h.

◆ GetInputFile()

std::string RooStats::HistFactory::Channel::GetInputFile ( ) const
inline

get name of input file

Definition at line 47 of file Channel.h.

◆ GetName()

std::string RooStats::HistFactory::Channel::GetName ( ) const
inline

get name of channel

Definition at line 43 of file Channel.h.

◆ GetSamples() [1/2]

std::vector< RooStats::HistFactory::Sample > & RooStats::HistFactory::Channel::GetSamples ( )
inline

get vector of samples for this channel

Definition at line 76 of file Channel.h.

◆ GetSamples() [2/2]

const std::vector< RooStats::HistFactory::Sample > & RooStats::HistFactory::Channel::GetSamples ( ) const
inline

Definition at line 77 of file Channel.h.

◆ GetStatErrorConfig() [1/2]

HistFactory::StatErrorConfig & RooStats::HistFactory::Channel::GetStatErrorConfig ( )
inline

get information about threshold for statistical uncertainties and constraint term

Definition at line 71 of file Channel.h.

◆ GetStatErrorConfig() [2/2]

const HistFactory::StatErrorConfig & RooStats::HistFactory::Channel::GetStatErrorConfig ( ) const
inline

Definition at line 72 of file Channel.h.

◆ Print()

void RooStats::HistFactory::Channel::Print ( std::ostream &  stream = std::cout)

Definition at line 75 of file Channel.cxx.

◆ PrintXML()

void RooStats::HistFactory::Channel::PrintXML ( std::string  Directory,
std::string  Prefix = "" 
)

Definition at line 105 of file Channel.cxx.

◆ SetData() [1/4]

void RooStats::HistFactory::Channel::SetData ( const RooStats::HistFactory::Data data)
inline

set data object

Definition at line 54 of file Channel.h.

◆ SetData() [2/4]

void RooStats::HistFactory::Channel::SetData ( double  Val)

Definition at line 182 of file Channel.cxx.

◆ SetData() [3/4]

void RooStats::HistFactory::Channel::SetData ( std::string  HistoName,
std::string  InputFile,
std::string  HistoPath = "" 
)

Definition at line 165 of file Channel.cxx.

◆ SetData() [4/4]

void RooStats::HistFactory::Channel::SetData ( TH1 hData)

Definition at line 177 of file Channel.cxx.

◆ SetHistoPath()

void RooStats::HistFactory::Channel::SetHistoPath ( const std::string &  file)
inline

set path for histograms in input file

Definition at line 49 of file Channel.h.

◆ SetInputFile()

void RooStats::HistFactory::Channel::SetInputFile ( const std::string &  file)
inline

set name of input file containing histograms

Definition at line 45 of file Channel.h.

◆ SetName()

void RooStats::HistFactory::Channel::SetName ( const std::string &  Name)
inline

set name of channel

Definition at line 41 of file Channel.h.

◆ SetStatErrorConfig() [1/3]

void RooStats::HistFactory::Channel::SetStatErrorConfig ( double  RelErrorThreshold,
Constraint::Type  ConstraintType 
)

Definition at line 202 of file Channel.cxx.

◆ SetStatErrorConfig() [2/3]

void RooStats::HistFactory::Channel::SetStatErrorConfig ( double  RelErrorThreshold,
std::string  ConstraintType 
)

Definition at line 209 of file Channel.cxx.

◆ SetStatErrorConfig() [3/3]

void RooStats::HistFactory::Channel::SetStatErrorConfig ( RooStats::HistFactory::StatErrorConfig  Config)
inline

define treatment of statistical uncertainties

Definition at line 69 of file Channel.h.

Friends And Related Symbol Documentation

◆ Measurement

friend class Measurement
friend

Definition at line 34 of file Channel.h.

Member Data Documentation

◆ fAdditionalData

std::vector<RooStats::HistFactory::Data> RooStats::HistFactory::Channel::fAdditionalData
protected

One can add additional datasets These are simply added to the xml under a different name.

Definition at line 95 of file Channel.h.

◆ fData

HistFactory::Data RooStats::HistFactory::Channel::fData
protected

Definition at line 91 of file Channel.h.

◆ fHistoPath

std::string RooStats::HistFactory::Channel::fHistoPath
protected

Definition at line 89 of file Channel.h.

◆ fInputFile

std::string RooStats::HistFactory::Channel::fInputFile
protected

Definition at line 88 of file Channel.h.

◆ fName

std::string RooStats::HistFactory::Channel::fName
protected

Definition at line 87 of file Channel.h.

◆ fSamples

std::vector< RooStats::HistFactory::Sample > RooStats::HistFactory::Channel::fSamples
protected

Definition at line 99 of file Channel.h.

◆ fStatErrorConfig

HistFactory::StatErrorConfig RooStats::HistFactory::Channel::fStatErrorConfig
protected

Definition at line 97 of file Channel.h.

Libraries for RooStats::HistFactory::Channel:

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