56 cxcoutWHF <<
"Warning: Setting parameter: " << param <<
" to constant, but it is already listed as constant. "
57 <<
"You may ignore this warning." << std::endl;
73 <<
" to: " <<
value << std::endl;
77 cxcoutIHF <<
"Setting parameter: " << param <<
" value to " <<
value << std::endl;
131 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
146 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
168 for (
unsigned int i = 0; i <
fPOI.size(); ++i) {
169 stream <<
fPOI.at(i);
175 stream <<
"Constant Params: ";
183 stream <<
"Preprocess Functions: ";
191 stream <<
"Channels:" << std::endl;
192 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
210 bool exists = dir !=
nullptr;
227 cxcoutPHF <<
"Printing XML Files for measurement: " <<
GetName() << std::endl;
235 if (!
xml.is_open()) {
241 xml <<
"<!--" << std::endl;
242 xml <<
"This xml file created automatically on: " << std::endl;
252 xml <<
"-->" << std::endl;
255 xml <<
"<!DOCTYPE Combination SYSTEM 'HistFactorySchema.dtd'>" << std::endl << std::endl;
272 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
273 xml <<
" <Input>" <<
"./";
282 xml <<
" <Measurement Name=\"" <<
GetName() <<
"\" "
283 <<
"Lumi=\"" <<
fLumi <<
"\" "
288 <<
"ExportOnly=\"" << (
fExportOnly ? std::string(
"True") : std::string(
"False")) <<
"\" "
289 <<
" >" << std::endl;
293 for (
unsigned int i = 0; i <
fPOI.size(); ++i) {
299 xml <<
"</POI> " << std::endl;
303 xml <<
" <ParamSetting Const=\"True\">";
310 xml <<
"</ParamSetting>" << std::endl;
314 std::map<std::string, double>::iterator
ConstrItr;
318 xml <<
"<ConstraintTerm Type=\"Gamma\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
319 <<
"</ConstraintTerm>" << std::endl;
323 xml <<
"<ConstraintTerm Type=\"Uniform\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
324 <<
"</ConstraintTerm>" << std::endl;
328 xml <<
"<ConstraintTerm Type=\"LogNormal\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">"
329 <<
ConstrItr->first <<
"</ConstraintTerm>" << std::endl;
333 xml <<
"<ConstraintTerm Type=\"NoSyst\" RelativeUncertainty=\"" <<
ConstrItr->second <<
"\">" <<
ConstrItr->first
334 <<
"</ConstraintTerm>" << std::endl;
338 xml <<
" </Measurement> " << std::endl << std::endl;
341 xml <<
"</Combination>" << std::endl;
348 std::string prefix = std::string(
GetName()) +
"_";
350 for (
unsigned int i = 0; i <
fChannels.size(); ++i) {
354 cxcoutPHF <<
"Finished printing XML files" << std::endl;
385 std::string
chanName = channel.GetName();
387 if (!channel.CheckHistograms()) {
388 cxcoutEHF <<
"Measurement.writeToFile(): Channel: " <<
chanName <<
" has uninitialized histogram pointers"
404 cxcoutEHF <<
"Error: Cannot create channel " << (
chanName +
"_hists") << std::endl;
427 cxcoutEHF <<
"Error: Directory " <<
sample.GetName() <<
" not created properly" << std::endl;
446 cxcoutPHF <<
"Saved all histograms" << std::endl;
451 cxcoutPHF <<
"Saved Measurement" << std::endl;
458 std::string path = dir->
GetPath();
460 if (path.find(
':') != std::string::npos) {
461 size_t index = path.find(
':');
462 path.replace(0,
index + 1,
"");
479 chan.CollectHistograms();
494 : fName(
other.fName),
495 fInputFile(
other.fInputFile),
496 fHistoName(
other.fHistoName),
497 fHistoPath(
other.fHistoPath),
498 fChannelName(
other.fChannelName),
500 fOverallSysList(
other.fOverallSysList),
501 fNormFactorList(
other.fNormFactorList),
502 fHistoSysList(
other.fHistoSysList),
503 fHistoFactorList(
other.fHistoFactorList),
504 fShapeSysList(
other.fShapeSysList),
505 fShapeFactorList(
other.fShapeFactorList),
507 fStatError(
other.fStatError),
508 fNormalizeByTheory(
other.fNormalizeByTheory),
509 fStatErrorActivate(
other.fStatErrorActivate),
510 fhNominal(
other.fhNominal)
512 if (
other.fhCountingHist) {
541 if (
other.fhCountingHist) {
555 fNormalizeByTheory(
true),
556 fStatErrorActivate(
false)
628 stream <<
"\t \t \t \t "
630 <<
"\t HistoAddress: "
656 xml <<
" <Sample Name=\"" <<
fName <<
"\" "
660 <<
" NormalizeByTheory=\"" << (
fNormalizeByTheory ? std::string(
"True") : std::string(
"False")) <<
"\" "
753 xml <<
" </Sample>" << std::endl;
924 stream <<
"\t Channel Name: " <<
fName <<
"\t InputFile: " <<
fInputFile << std::endl;
926 stream <<
"\t Data:" << std::endl;
929 stream <<
"\t statErrorConfig:" << std::endl;
934 stream <<
"\t Samples: " << std::endl;
935 for (
unsigned int i = 0; i <
fSamples.size(); ++i) {
940 stream <<
"\t End of Channel " <<
fName << std::endl;
956 xml <<
"<!--" << std::endl;
957 xml <<
"This xml file created automatically on: " << std::endl;
965 xml <<
"-->" << std::endl;
968 xml <<
"<!DOCTYPE Channel SYSTEM 'HistFactorySchema.dtd'> " << std::endl << std::endl;
971 xml <<
" <Channel Name=\"" <<
fName <<
"\" InputFile=\"" <<
fInputFile <<
"\" >" << std::endl << std::endl;
987 xml << std::endl << std::endl;
991 xml <<
" </Channel> " << std::endl;
994 cxcoutPHF <<
"Finished printing XML files" << std::endl;
1025 hData->SetBinContent(1, val);
1053 std::map<std::string, std::unique_ptr<TFile>>
fileHandles;
1063 if (!
data.GetInputFile().empty()) {
1071 cxcoutDHF <<
"Collecting Nominal Histogram" << std::endl;
1077 if (
sample.GetStatError().GetUseHisto()) {
1079 sample.GetStatError().GetHistoPath(),
1128 cxcoutEHF <<
"Error: Data Histogram for channel " <<
GetName() <<
" is nullptr." << std::endl;
1135 if (
sample.GetHisto() ==
nullptr) {
1136 cxcoutEHF <<
"Error: Nominal Histogram for sample " <<
sample.GetName() <<
" is nullptr." << std::endl;
1152 <<
" in Channel = " <<
GetName() <<
" has negative entries in bin numbers = ";
1159 std::cout << std::endl;
1164 if (
sample.GetStatError().GetUseHisto()) {
1165 if (
sample.GetStatError().GetErrorHist() ==
nullptr) {
1166 cxcoutEHF <<
"Error: Statistical Error Histogram for sample " <<
sample.GetName() <<
" is nullptr."
1175 if (
histoSys.GetHistoLow() ==
nullptr) {
1176 cxcoutEHF <<
"Error: HistoSyst Low for Systematic " <<
histoSys.GetName() <<
" in sample "
1177 <<
sample.GetName() <<
" is nullptr." << std::endl;
1180 if (
histoSys.GetHistoHigh() ==
nullptr) {
1181 cxcoutEHF <<
"Error: HistoSyst High for Systematic " <<
histoSys.GetName() <<
" in sample "
1182 <<
sample.GetName() <<
" is nullptr." << std::endl;
1193 <<
sample.GetName() <<
" is nullptr." << std::endl;
1198 <<
sample.GetName() <<
" is nullptr." << std::endl;
1206 if (
shapeSys.GetErrorHist() ==
nullptr) {
1207 cxcoutEHF <<
"Error: HistoSyst High for Systematic " <<
shapeSys.GetName() <<
" in sample "
1208 <<
sample.GetName() <<
" is nullptr." << std::endl;
1224 std::map<std::string, std::unique_ptr<TFile>> &
lsof)
1240 if (dir ==
nullptr) {
1248 if (key ==
nullptr) {
1254 std::unique_ptr<TH1> hist(key->ReadObject<
TH1>());
1262 TH1 *ptr =
static_cast<TH1 *
>(hist->Clone());
1265 std::cerr <<
"Not all necessary info are set to access the input file. Check your config" << std::endl;
1271 std::cout <<
"Found Histogram: " <<
HistoName " at address: " << ptr <<
" with integral " << ptr->
Integral()
1272 <<
" and mean " << ptr->
GetMean() << std::endl;
1303 <<
"\t HistoAddress: " <<
GetHisto() << std::endl;
1333 xml <<
" /> " << std::endl << std::endl;
1346 std::stringstream
dst;
1347 for (
char ch :
src) {
1349 case '&':
dst <<
"&";
break;
1350 case '\'':
dst <<
"'";
break;
1351 case '"':
dst <<
""";
break;
1352 case '<':
dst <<
"<";
break;
1353 case '>':
dst <<
">";
break;
1354 default:
dst << ch;
break;
1363 std::string
const &dependents)
1364 : fName(
name), fExpression(expression), fDependents(dependents)
1381 xml <<
"<Function Name=\"" <<
fName <<
"\" "
1427 std::string param =
itr->first;
1428 double val =
itr->second;
1433 std::cout <<
"Error: Trying to set variable: " << var
1434 <<
" to a specific value in creation of asimov dataset: " <<
fName
1435 <<
" but this variable doesn't appear to exist in the workspace" << std::endl;
1440 double inRange = var->
inRange(val,
nullptr);
1442 std::cout <<
"Error: Attempting to set variable: " << var <<
" to value: " << val <<
", however it appears"
1443 <<
" that this is not withn the variable's range: "
1444 <<
"[" << var->
getMin() <<
", " << var->
getMax() <<
"]" << std::endl;
1449 std::cout <<
"Configuring Asimov Dataset: Setting " << param <<
" = " << val << std::endl;
1462 std::cout <<
"Error: Trying to set variable: " << var <<
" constant in creation of asimov dataset: " <<
fName
1463 <<
" but this variable doesn't appear to exist in the workspace" << std::endl;
1467 std::cout <<
"Configuring Asimov Dataset: Setting " << param <<
" to constant " << std::endl;
1516 return static_cast<TH1 *
>(
h->Clone());
1539 return fHist.release();
1557 std::cout <<
"Error: Given empty name for ConstraintType" << std::endl;
1561 else if (Name ==
"Gaussian" || Name ==
"Gauss") {
1565 else if (Name ==
"Poisson" || Name ==
"Pois") {
1570 std::cout <<
"Error: Unknown name given for Constraint Type: " << Name << std::endl;
1577 stream <<
"\t \t Name: " <<
fName <<
"\t Val: " <<
fVal <<
"\t Low: " <<
fLow <<
"\t High: " <<
fHigh << std::endl;
1582 xml <<
" <NormFactor Name=\"" <<
GetName() <<
"\" "
1583 <<
" Val=\"" <<
GetVal() <<
"\" "
1584 <<
" High=\"" <<
GetHigh() <<
"\" "
1585 <<
" Low=\"" <<
GetLow() <<
"\" "
1586 <<
" /> " << std::endl;
1591 stream <<
"\t \t Name: " <<
fName <<
"\t Low: " <<
fLow <<
"\t High: " <<
fHigh << std::endl;
1596 xml <<
" <OverallSys Name=\"" <<
GetName() <<
"\" "
1597 <<
" High=\"" <<
GetHigh() <<
"\" "
1598 <<
" Low=\"" <<
GetLow() <<
"\" "
1599 <<
" /> " << std::endl;
1605 : fName(Name), fhLow(nullptr), fhHigh(nullptr)
1630 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" HistoLow is nullptr"
1641 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" HistoHigh is nullptr"
1653 xml <<
" <HistoSys Name=\"" <<
GetName() <<
"\" "
1661 <<
" /> " << std::endl;
1677 xml <<
" <ShapeSys Name=\"" <<
GetName() <<
"\" "
1682 <<
" /> " << std::endl;
1688 if (histError ==
nullptr) {
1689 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" ErrorHist is nullptr"
1701 xml <<
" <HistoFactor Name=\"" <<
GetName() <<
"\" "
1710 <<
" /> " << std::endl;
1721 stream <<
"\t \t Name: " <<
fName << std::endl;
1730 stream <<
"\t \t ( Constant ): " << std::endl;
1740 std::cout <<
"Error: Cannot write " <<
GetName() <<
" to file: " << FileName <<
" InitialShape is nullptr"
1753 xml <<
" <ShapeFactor Name=\"" <<
GetName() <<
"\" ";
1759 xml <<
" /> " << std::endl;
1777 <<
"/> " << std::endl
1791 xml <<
" <StatError Activate=\"" << (
GetActivate() ? std::string(
"True") : std::string(
"False")) <<
"\" "
1795 <<
" /> " << std::endl;
1808 std::cout <<
"Error: Stat Error error hist is nullptr" << std::endl;
1821 fInputFileLow{
oth.fInputFileLow},
1822 fHistoNameLow{
oth.fHistoNameLow},
1823 fHistoPathLow{
oth.fHistoPathLow},
1824 fInputFileHigh{
oth.fInputFileHigh},
1825 fHistoNameHigh{
oth.fHistoNameHigh},
1826 fHistoPathHigh{
oth.fHistoPathHigh},
1831 fhLow->SetDirectory(
nullptr);
1833 fhHigh->SetDirectory(
nullptr);
1847 fhLow.reset(
oth.fhLow ?
static_cast<TH1 *
>(
oth.fhLow->Clone()) :
nullptr);
1848 fhHigh.reset(
oth.fhHigh ?
static_cast<TH1 *
>(
oth.fhHigh->Clone()) :
nullptr);
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::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...
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.
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.
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)