57 :
TNamed(Name, Title), fLumi(1.0), fLumiRelErr(.10), fBinLow(0), fBinHigh(1)
79 cxcoutWHF <<
"Warning: Setting parameter: " << param <<
" to constant, but it is already listed as constant. "
80 <<
"You may ignore this warning." << std::endl;
96 <<
" to: " <<
value << std::endl;
100 cxcoutIHF <<
"Setting parameter: " << param <<
" value to " <<
value << std::endl;
154 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
169 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
198 for (
unsigned int i = 0; i <
fPOI.size(); ++i) {
199 stream <<
fPOI.at(i);
205 stream <<
"Constant Params: ";
213 stream <<
"Preprocess Functions: ";
221 stream <<
"Channels:" << std::endl;
222 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
240 bool exists = dir !=
nullptr;
257 cxcoutPHF <<
"Printing XML Files for measurement: " <<
GetName() << std::endl;
265 if (!
xml.is_open()) {
271 xml <<
"<!--" << std::endl;
272 xml <<
"This xml file created automatically on: " << std::endl;
289 xml <<
"-->" << std::endl;
292 xml <<
"<!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'>" << std::endl << std::endl;
315 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
316 xml <<
" <Input>" <<
"./";
325 xml <<
" <Measurement Name=\"" <<
GetName() <<
"\" "
326 <<
"Lumi=\"" <<
fLumi <<
"\" "
331 <<
"ExportOnly=\"" << (
fExportOnly ? std::string(
"True") : std::string(
"False")) <<
"\" "
332 <<
" >" << std::endl;
336 for (
unsigned int i = 0; i <
fPOI.size(); ++i) {
342 xml <<
"</POI> " << std::endl;
346 xml <<
" <ParamSetting Const=\"True\">";
353 xml <<
"</ParamSetting>" << std::endl;
357 std::map<std::string, double>::iterator
ConstrItr;
361 xml <<
"<ConstraintTerm Type=\"Gamma\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
362 <<
"</ConstraintTerm>" << std::endl;
366 xml <<
"<ConstraintTerm Type=\"Uniform\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
367 <<
"</ConstraintTerm>" << std::endl;
371 xml <<
"<ConstraintTerm Type=\"LogNormal\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">"
372 <<
ConstrItr->first <<
"</ConstraintTerm>" << std::endl;
376 xml <<
"<ConstraintTerm Type=\"NoSyst\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
377 <<
"</ConstraintTerm>" << std::endl;
381 xml <<
" </Measurement> " << std::endl << std::endl;
384 xml <<
"</Combination>" << std::endl;
391 std::string prefix = std::string(
GetName()) +
"_";
393 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
397 cxcoutPHF <<
"Finished printing XML files" << std::endl;
433 cxcoutEHF <<
"Measurement.writeToFile(): Channel: " <<
chanName <<
" has uninitialized histogram pointers"
449 cxcoutEHF <<
"Error: Cannot create channel " << (
chanName +
"_hists") << std::endl;
490 cxcoutEHF <<
"Error: Directory " <<
sampName <<
" not created properly" << std::endl;
562 cxcoutPHF <<
"Saved all histograms" << std::endl;
567 cxcoutPHF <<
"Saved Measurement" << std::endl;
575 std::string path = dir->
GetPath();
577 if (path.find(
':') != std::string::npos) {
578 size_t index = path.find(
':');
579 path.replace(0,
index + 1,
"");
611 chan.CollectHistograms();
626 : fName(
other.fName),
627 fInputFile(
other.fInputFile),
628 fHistoName(
other.fHistoName),
629 fHistoPath(
other.fHistoPath),
630 fChannelName(
other.fChannelName),
632 fOverallSysList(
other.fOverallSysList),
633 fNormFactorList(
other.fNormFactorList),
634 fHistoSysList(
other.fHistoSysList),
635 fHistoFactorList(
other.fHistoFactorList),
636 fShapeSysList(
other.fShapeSysList),
637 fShapeFactorList(
other.fShapeFactorList),
639 fStatError(
other.fStatError),
640 fNormalizeByTheory(
other.fNormalizeByTheory),
641 fStatErrorActivate(
other.fStatErrorActivate),
642 fhNominal(
other.fhNominal)
644 if (
other.fhCountingHist) {
673 if (
other.fhCountingHist) {
687 fNormalizeByTheory(
true),
688 fStatErrorActivate(
false)
762 stream <<
"\t \t \t \t "
764 <<
"\t HistoAddress: "
790 xml <<
" <Sample Name=\"" <<
fName <<
"\" "
794 <<
" NormalizeByTheory=\"" << (
fNormalizeByTheory ? std::string(
"True") : std::string(
"False")) <<
"\" "
887 xml <<
" </Sample>" << std::endl;
1058 stream <<
"\t Channel Name: " <<
fName <<
"\t InputFile: " <<
fInputFile << std::endl;
1060 stream <<
"\t Data:" << std::endl;
1063 stream <<
"\t statErrorConfig:" << std::endl;
1068 stream <<
"\t Samples: " << std::endl;
1069 for (
unsigned int i = 0; i <
fSamples.size(); ++i) {
1074 stream <<
"\t End of Channel " <<
fName << std::endl;
1090 xml <<
"<!--" << std::endl;
1091 xml <<
"This xml file created automatically on: " << std::endl;
1099 xml <<
"-->" << std::endl;
1102 xml <<
"<!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'> " << std::endl << std::endl;
1105 xml <<
" <Channel Name=\"" <<
fName <<
"\" InputFile=\"" <<
fInputFile <<
"\" >" << std::endl << std::endl;
1121 xml << std::endl << std::endl;
1125 xml <<
" </Channel> " << std::endl;
1128 cxcoutPHF <<
"Finished printing XML files" << std::endl;
1159 hData->SetBinContent(1, val);
1187 std::map<std::string, std::unique_ptr<TFile>>
fileHandles;
1197 if (!
data.GetInputFile().empty()) {
1208 cxcoutDHF <<
"Collecting Nominal Histogram" << std::endl;
1214 if (
sample.GetStatError().GetUseHisto()) {
1216 sample.GetStatError().GetHistoPath(),
1277 cxcoutEHF <<
"Error: Data Histogram for channel " <<
GetName() <<
" is nullptr." << std::endl;
1287 if (
sample.GetHisto() ==
nullptr) {
1288 cxcoutEHF <<
"Error: Nominal Histogram for sample " <<
sample.GetName() <<
" is nullptr." << std::endl;
1304 <<
" in Channel = " <<
GetName() <<
" has negative entries in bin numbers = ";
1311 std::cout << std::endl;
1316 if (
sample.GetStatError().GetUseHisto()) {
1317 if (
sample.GetStatError().GetErrorHist() ==
nullptr) {
1318 cxcoutEHF <<
"Error: Statistical Error Histogram for sample " <<
sample.GetName() <<
" is nullptr."
1329 if (
histoSys.GetHistoLow() ==
nullptr) {
1330 cxcoutEHF <<
"Error: HistoSyst Low for Systematic " <<
histoSys.GetName() <<
" in sample "
1331 <<
sample.GetName() <<
" is nullptr." << std::endl;
1334 if (
histoSys.GetHistoHigh() ==
nullptr) {
1335 cxcoutEHF <<
"Error: HistoSyst High for Systematic " <<
histoSys.GetName() <<
" in sample "
1336 <<
sample.GetName() <<
" is nullptr." << std::endl;
1349 <<
sample.GetName() <<
" is nullptr." << std::endl;
1354 <<
sample.GetName() <<
" is nullptr." << std::endl;
1365 if (
shapeSys.GetErrorHist() ==
nullptr) {
1366 cxcoutEHF <<
"Error: HistoSyst High for Systematic " <<
shapeSys.GetName() <<
" in sample "
1367 <<
sample.GetName() <<
" is nullptr." << std::endl;
1384 std::map<std::string, std::unique_ptr<TFile>> &
lsof)
1400 if (dir ==
nullptr) {
1408 if (key ==
nullptr) {
1414 std::unique_ptr<TH1> hist(key->ReadObject<
TH1>());
1422 TH1 *ptr =
static_cast<TH1 *
>(hist->Clone());
1425 std::cerr <<
"Not all necessary info are set to access the input file. Check your config" << std::endl;
1431 std::cout <<
"Found Histogram: " <<
HistoName " at address: " << ptr <<
" with integral " << ptr->
Integral()
1432 <<
" and mean " << ptr->
GetMean() << std::endl;
1463 <<
"\t HistoAddress: " <<
GetHisto() << std::endl;
1493 xml <<
" /> " << std::endl << std::endl;
1506 std::stringstream
dst;
1507 for (
char ch :
src) {
1509 case '&':
dst <<
"&";
break;
1510 case '\'':
dst <<
"'";
break;
1511 case '"':
dst <<
""";
break;
1512 case '<':
dst <<
"<";
break;
1513 case '>':
dst <<
">";
break;
1514 default:
dst << ch;
break;
1523 std::string
const &dependents)
1524 : fName(
name), fExpression(expression), fDependents(dependents)
1541 xml <<
"<Function Name=\"" <<
fName <<
"\" "
1587 std::string param =
itr->first;
1588 double val =
itr->second;
1593 std::cout <<
"Error: Trying to set variable: " << var
1594 <<
" to a specific value in creation of asimov dataset: " <<
fName
1595 <<
" but this variable doesn't appear to exist in the workspace" << std::endl;
1600 double inRange = var->
inRange(val,
nullptr);
1602 std::cout <<
"Error: Attempting to set variable: " << var <<
" to value: " << val <<
", however it appears"
1603 <<
" that this is not withn the variable's range: "
1604 <<
"[" << var->
getMin() <<
", " << var->
getMax() <<
"]" << std::endl;
1609 std::cout <<
"Configuring Asimov Dataset: Setting " << param <<
" = " << val << std::endl;
1619 std::string param =
itr->first;
1620 bool isConstant =
itr->second;
1625 std::cout <<
"Error: Trying to set variable: " << var <<
" constant in creation of asimov dataset: " <<
fName
1626 <<
" but this variable doesn't appear to exist in the workspace" << std::endl;
1630 std::cout <<
"Configuring Asimov Dataset: Setting " << param <<
" to constant " << std::endl;
1681 return static_cast<TH1 *
>(
h->Clone());
1704 return fHist.release();
1722 std::cout <<
"Error: Given empty name for ConstraintType" << std::endl;
1726 else if (Name ==
"Gaussian" || Name ==
"Gauss") {
1730 else if (Name ==
"Poisson" || Name ==
"Pois") {
1735 std::cout <<
"Error: Unknown name given for Constraint Type: " << Name << std::endl;
1744 stream <<
"\t \t Name: " <<
fName <<
"\t Val: " <<
fVal <<
"\t Low: " <<
fLow <<
"\t High: " <<
fHigh << std::endl;
1749 xml <<
" <NormFactor Name=\"" <<
GetName() <<
"\" "
1750 <<
" Val=\"" <<
GetVal() <<
"\" "
1751 <<
" High=\"" <<
GetHigh() <<
"\" "
1752 <<
" Low=\"" <<
GetLow() <<
"\" "
1753 <<
" /> " << std::endl;
1759 stream <<
"\t \t Name: " <<
fName <<
"\t Low: " <<
fLow <<
"\t High: " <<
fHigh << std::endl;
1764 xml <<
" <OverallSys Name=\"" <<
GetName() <<
"\" "
1765 <<
" High=\"" <<
GetHigh() <<
"\" "
1766 <<
" Low=\"" <<
GetLow() <<
"\" "
1767 <<
" /> " << std::endl;
1773 : fName(Name), fhLow(nullptr), fhHigh(nullptr)
1798 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" HistoLow is nullptr"
1809 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" HistoHigh is nullptr"
1823 xml <<
" <HistoSys Name=\"" <<
GetName() <<
"\" "
1831 <<
" /> " << std::endl;
1849 xml <<
" <ShapeSys Name=\"" <<
GetName() <<
"\" "
1854 <<
" /> " << std::endl;
1861 if (histError ==
nullptr) {
1862 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" ErrorHist is nullptr"
1878 xml <<
" <HistoFactor Name=\"" <<
GetName() <<
"\" "
1887 <<
" /> " << std::endl;
1900 stream <<
"\t \t Name: " <<
fName << std::endl;
1909 stream <<
"\t \t ( Constant ): " << std::endl;
1919 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" InitialShape is nullptr"
1934 xml <<
" <ShapeFactor Name=\"" <<
GetName() <<
"\" ";
1940 xml <<
" /> " << std::endl;
1959 <<
"/> " << std::endl
1974 xml <<
" <StatError Activate=\"" << (
GetActivate() ? std::string(
"True") : std::string(
"False")) <<
"\" "
1978 <<
" /> " << std::endl;
1991 std::cout <<
"Error: Stat Error error hist is nullptr" << std::endl;
2006 fInputFileLow{
oth.fInputFileLow},
2007 fHistoNameLow{
oth.fHistoNameLow},
2008 fHistoPathLow{
oth.fHistoPathLow},
2009 fInputFileHigh{
oth.fInputFileHigh},
2010 fHistoNameHigh{
oth.fHistoNameHigh},
2011 fHistoPathHigh{
oth.fHistoPathHigh},
2016 fhLow->SetDirectory(
nullptr);
2018 fhHigh->SetDirectory(
nullptr);
2032 fhLow.reset(
oth.fhLow ?
static_cast<TH1 *
>(
oth.fhLow->Clone()) :
nullptr);
2033 fhHigh.reset(
oth.fhHigh ?
static_cast<TH1 *
>(
oth.fhHigh->Clone()) :
nullptr);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TSystem * gSystem
void setConstant(bool value=true)
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
bool inRange(const char *name) const override
Check if current value is inside range with given name.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
std::map< std::string, double > fParamValsToSet
void ConfigureWorkspace(RooWorkspace *)
std::map< std::string, bool > fParamsToFix
This class encapsulates all information for the statistical interpretation of one experiment.
std::vector< RooStats::HistFactory::Sample > fSamples
std::vector< RooStats::HistFactory::Data > fAdditionalData
One can add additional datasets These are simply added to the xml under a different name.
void Print(std::ostream &=std::cout)
HistFactory::StatErrorConfig fStatErrorConfig
void SetData(const RooStats::HistFactory::Data &data)
set data object
void AddSample(RooStats::HistFactory::Sample sample)
bool CheckHistograms() const
TH1 * GetHistogram(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.
void SetStatErrorConfig(double RelErrorThreshold, Constraint::Type ConstraintType)
void PrintXML(std::string const &directory, std::string const &prefix="") const
std::vector< RooStats::HistFactory::Sample > & GetSamples()
get vector of samples for this channel
std::string GetName() const
get name of channel
void Print(std::ostream &=std::cout)
std::string const & GetInputFile() const
void PrintXML(std::ostream &) const
void SetInputFile(const std::string &InputFile)
void SetHistoPath(const std::string &HistoPath)
void writeToFile(std::string FileName, std::string DirName)
std::string const & GetHistoName() const
void SetHistoName(const std::string &HistoName)
std::string const & GetHistoPath() const
std::string const & GetName() const
Internal class wrapping an histogram and managing its content.
HistRef(TH1 *h=nullptr)
constructor - use gives away ownerhip of the given pointer
HistRef & operator=(const HistRef &other)
assignment operator (delete previous contained histogram)
void SetObject(TH1 *h)
set the object - user gives away the ownerhisp
std::unique_ptr< TH1 > fHist
pointer to contained histogram
static TH1 * CopyObject(const TH1 *h)
TH1 * ReleaseObject()
Release ownership of object.
Configuration for an *un*constrained, coherent shape variation of affected samples.
void PrintXML(std::ostream &) const override
Configuration for a constrained, coherent shape variation of affected samples.
void PrintXML(std::ostream &) const override
////////////////////////////////////////////////////////////////////////////////////////////Base clas...
void SetInputFileHigh(const std::string &InputFileHigh)
std::unique_ptr< TH1 > fhHigh
void SetHistoHigh(TH1 *High)
void SetName(const std::string &Name)
std::string fHistoPathHigh
virtual void writeToFile(const std::string &FileName, const std::string &DirName)
std::string fInputFileLow
void SetHistoPathHigh(const std::string &HistoPathHigh)
HistogramUncertaintyBase()
std::string fHistoPathLow
const std::string & GetName() const
void SetInputFileLow(const std::string &InputFileLow)
const TH1 * GetHistoHigh() const
const std::string & GetHistoNameHigh() const
std::string fHistoNameLow
std::string fHistoNameHigh
const std::string & GetHistoNameLow() const
std::string fInputFileHigh
void SetHistoNameHigh(const std::string &HistoNameHigh)
void SetHistoNameLow(const std::string &HistoNameLow)
virtual void Print(std::ostream &=std::cout) const
HistogramUncertaintyBase & operator=(const HistogramUncertaintyBase &oth)
const std::string & GetHistoPathLow() const
const std::string & GetInputFileHigh() const
const std::string & GetInputFileLow() const
void SetHistoPathLow(const std::string &HistoPathLow)
void SetHistoLow(TH1 *Low)
std::unique_ptr< TH1 > fhLow
const std::string & GetHistoPathHigh() const
const TH1 * GetHistoLow() const
virtual ~HistogramUncertaintyBase()
The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple R...
void writeToFile(TFile *file)
A measurement, once fully configured, can be saved into a ROOT file.
std::map< std::string, double > fUniformSyst
std::string fOutputFilePrefix
Configurables of this measurement.
void AddGammaSyst(std::string syst, double uncert)
Set constraint term for given systematic to Gamma distribution.
std::string GetDirPath(TDirectory *dir)
Return the directory's path, stripped of unnecessary prefixes.
std::map< std::string, double > fNoSyst
std::vector< RooStats::HistFactory::Channel > fChannels
Channels that make up this measurement.
void AddLogNormSyst(std::string syst, double uncert)
Set constraint term for given systematic to LogNormal distribution.
void PrintXML(std::string Directory="", std::string NewOutputPrefix="")
Print to a stream.
void SetParamValue(const std::string ¶m, double value)
Set a parameter to a specific value (And optionally fix it)
std::map< std::string, double > fGammaSyst
List of Alternate constraint terms.
std::map< std::string, double > fParamValues
Map of parameter names to initial values to be set.
void CollectHistograms()
The most common way to add histograms to channels is to have them stored in ROOT files and to give Hi...
std::vector< RooStats::HistFactory::PreprocessFunction > fFunctionObjects
List of Preprocess Function objects.
RooStats::HistFactory::Channel & GetChannel(std::string)
Get channel with given name from this measurement throws an exception in case the channel is not foun...
void AddChannel(RooStats::HistFactory::Channel chan)
add a completely configured channel
bool HasChannel(std::string)
Check if the given channel is part of this measurement.
void AddUniformSyst(std::string syst)
Set constraint term for given systematic to uniform distribution.
void PrintTree(std::ostream &=std::cout)
Print information about measurement object in tree-like structure to given stream.
Measurement()
Standard constructor.
void AddNoSyst(std::string syst)
Define given systematics to have no external constraint.
void AddConstantParam(const std::string ¶m)
Add a parameter to be set as constant (Similar to ParamSetting method below)
void AddFunctionObject(const RooStats::HistFactory::PreprocessFunction function)
add a preprocess function object
void AddPreprocessFunction(std::string name, std::string expression, std::string dependencies)
Add a preprocessed function by giving the function a name, a functional expression,...
std::vector< std::string > GetPreprocessFunctions() const
Returns a list of defined preprocess function expressions.
std::map< std::string, double > fLogNormSyst
std::vector< std::string > fPOI
std::vector< std::string > fConstantParams
List of Parameters to be set constant.
Configuration for an un- constrained overall systematic to scale sample normalisations.
std::string GetName() const
void Print(std::ostream &=std::cout) const
void PrintXML(std::ostream &) const
Configuration for a constrained overall systematic to scale sample normalisations.
void SetName(const std::string &Name)
const std::string & GetName() const
void PrintXML(std::ostream &) const
void Print(std::ostream &=std::cout) const
void Print(std::ostream &=std::cout) const
std::string GetCommand() const
void PrintXML(std::ostream &) const
std::vector< RooStats::HistFactory::ShapeFactor > fShapeFactorList
std::unique_ptr< TH1 > fhCountingHist
void AddShapeSys(std::string Name, Constraint::Type ConstraintType, std::string HistoName, std::string HistoFile, std::string HistoPath="")
void AddOverallSys(std::string Name, double Low, double High)
void writeToFile(std::string FileName, std::string DirName)
const TH1 * GetHisto() const
void SetValue(double Val)
RooStats::HistFactory::StatError fStatError
Properties.
std::vector< RooStats::HistFactory::NormFactor > fNormFactorList
void AddNormFactor(std::string const &Name, double Val, double Low, double High)
Sample & operator=(const Sample &other)
std::string fChannelName
The Name of the parent channel.
std::vector< RooStats::HistFactory::OverallSys > fOverallSysList
void SetHisto(TH1 *histo)
void Print(std::ostream &=std::cout) const
std::vector< RooStats::HistFactory::HistoSys > fHistoSysList
RooStats::HistFactory::StatError & GetStatError()
void AddHistoFactor(std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow, std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh)
std::vector< RooStats::HistFactory::ShapeFactor > & GetShapeFactorList()
std::vector< RooStats::HistFactory::HistoFactor > & GetHistoFactorList()
std::vector< RooStats::HistFactory::HistoSys > & GetHistoSysList()
std::vector< RooStats::HistFactory::HistoFactor > fHistoFactorList
std::vector< RooStats::HistFactory::ShapeSys > fShapeSysList
HistRef fhNominal
The Nominal Shape.
void AddShapeFactor(std::string Name)
std::vector< RooStats::HistFactory::ShapeSys > & GetShapeSysList()
void AddHistoSys(std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow, std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh)
void PrintXML(std::ofstream &xml) const
*Un*constrained bin-by-bin variation of affected histogram.
void PrintXML(std::ostream &) const override
const std::string & GetHistoPath() const
const TH1 * GetInitialShape() const
void SetInitialShape(TH1 *shape)
void writeToFile(const std::string &FileName, const std::string &DirName) override
void Print(std::ostream &=std::cout) const override
const std::string & GetInputFile() const
bool HasInitialShape() const
const std::string & GetHistoName() const
Constrained bin-by-bin variation of affected histogram.
std::string GetHistoPath() const
void PrintXML(std::ostream &) const override
Constraint::Type GetConstraintType() const
const TH1 * GetErrorHist() const
std::string GetHistoName() const
void writeToFile(const std::string &FileName, const std::string &DirName) override
void Print(std::ostream &=std::cout) const override
std::string GetInputFile() const
void SetErrorHist(TH1 *hError)
double fRelErrorThreshold
void PrintXML(std::ostream &) const
void SetConstraintType(Constraint::Type ConstrType)
Constraint::Type fConstraintType
double GetRelErrorThreshold() const
void SetRelErrorThreshold(double Threshold)
Constraint::Type GetConstraintType() const
void Print(std::ostream &=std::cout) const
const std::string & GetHistoPath() const
void Activate(bool IsActive=true)
void SetHistoPath(const std::string &HistoPath)
void SetInputFile(const std::string &InputFile)
const TH1 * GetErrorHist() const
void SetErrorHist(TH1 *Error)
const std::string & GetInputFile() const
void SetHistoName(const std::string &HistoName)
const std::string & GetHistoName() const
void SetUseHisto(bool UseHisto=true)
void Print(std::ostream &=std::cout) const override
void PrintXML(std::ostream &) const override
void writeToFile(const std::string &FileName, const std::string &DirName) override
Persistable container for RooFit projects.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
Bool_t cd() override
Change current directory to "this" directory.
TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE) override
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
TDirectory::TContext keeps track and restore the current directory.
Describe directory structure in memory.
virtual const char * GetPath() const
Returns the full path of the directory.
virtual TKey * GetKey(const char *, Short_t=9999) const
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
virtual void FreeDirectory(void *dirp)
Free a directory.
virtual void * OpenDirectory(const char *name)
Open a directory.
virtual int MakeDirectory(const char *name)
Make a directory.
The TTimeStamp encapsulates seconds and ns since EPOCH.
UInt_t GetDate(Bool_t inUTC=kTRUE, Int_t secOffset=0, UInt_t *year=nullptr, UInt_t *month=nullptr, UInt_t *day=nullptr) const
Return date in form of 19971224 (i.e.
Type GetType(const std::string &Name)
std::string Name(Type type)