31std::vector< RooStats::HistFactory::Measurement > ConfigParser::GetMeasurementsFromXML(
string input ) {
41 std::vector< HistFactory::Measurement > measurement_list;
49 std::cerr <<
"Loading of xml document \"" << input
50 <<
"\" failed" << std::endl;
56 cxcoutIHF <<
"reading input : " << input << endl;
63 cxcoutEHF <<
"Error: Driver DOCTYPE not equal to 'Combination'" << std::endl;
68 std::string OutputFilePrefix;
72 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
76 std::string attrVal = curAttr->
GetValue();
78 if( attrName ==
TString(
"" ) ) {
79 cxcoutEHF <<
" Error: Attribute for 'Combination' with no name found" << std::endl;
83 else if( attrName ==
TString(
"OutputFilePrefix" ) ) {
84 OutputFilePrefix = string(curAttr->
GetValue());
85 cxcoutIHF <<
"output file prefix is : " << OutputFilePrefix << endl;
95 cxcoutEHF <<
" Error: Unknown attribute for 'Combination' encountered: "
96 << attrName << std::endl;
109 std::vector< std::string > xml_channel_files;
113 if( node->
GetText() == NULL ) {
115 <<
" has no text." << std::endl;
118 xml_channel_files.push_back(node->
GetText());
124 if(xml_channel_files.empty()){
125 cerr <<
"no input channels found" << endl;
130 std::ostringstream msg;
131 msg <<
"Found Channels: ";
132 for(
unsigned int i=0; i < xml_channel_files.size(); ++i ) msg <<
" " << xml_channel_files.at(i);
145 std::vector< RooStats::HistFactory::PreprocessFunction > functionObjects;
155 functionObjects.push_back( Func );
160 std::cout << std::endl;
168 cxcoutEHF <<
"Error: Node found in Measurement Driver XML with no name" << std::endl;
176 measurement_list.push_back( measurement );
192 cxcoutEHF <<
"Error: Unknown node found in Measurement Driver XML: "
200 cxcoutIHF <<
"Done Processing Measurements" << std::endl;
202 if( measurement_list.size() == 0 ) {
203 cxcoutEHF <<
"Error: No Measurements found in XML Driver File" << std::endl;
207 std::ostringstream msg;
208 msg <<
"Found Measurements: ";
209 for(
unsigned int i=0; i < measurement_list.size(); ++i ) msg <<
" " << measurement_list.at(i).GetName();
219 for(
unsigned int i = 0; i < measurement_list.size(); ++i) {
220 measurement_list.at(i).SetFunctionObjects( functionObjects );
230 std::vector< HistFactory::Channel > channel_list;
233 for(
unsigned int i = 0; i < xml_channel_files.size(); ++i ) {
234 std::string channel_xml = xml_channel_files.at(i);
235 cxcoutIHF <<
"Parsing Channel: " << channel_xml << std::endl;
241 channel_list.push_back( channel );
245 for(
unsigned int i = 0; i < measurement_list.size(); ++i) {
249 for(
unsigned int j = 0; j < channel_list.size(); ++j ) {
250 measurement.
GetChannels().push_back( channel_list.at(j) );
254 catch(std::exception&
e)
256 std::cout <<
e.what() << std::endl;
260 return measurement_list;
277 cxcoutIHF <<
"Creating new measurement: " << std::endl;
282 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
285 cxcoutEHF <<
"Found XML attribute in Measurement with no name" << std::endl;
307 cout <<
"\n INFO: Mode attribute is deprecated, will ignore\n"<<endl;
314 cxcoutEHF <<
"Found unknown XML attribute in Measurement: " << curAttr->
GetName()
324 while( child != 0 ) {
327 cxcoutEHF <<
"Found XML child node of Measurement with no name" << std::endl;
332 if( child->
GetText() == NULL ) {
334 <<
" has no text." << std::endl;
344 while( ( curParam =
dynamic_cast< TXMLAttr*
>( paramIt() ) ) != 0 ) {
347 cxcoutEHF <<
"Error: Found tag attribute with no name in ParamSetting" << std::endl;
353 if( child->
GetText() == NULL ) {
355 <<
" has no text." << std::endl;
362 double val = atof(curParam->
GetValue());
363 if( child->
GetText() == NULL ) {
365 <<
" has no text." << std::endl;
369 for(
unsigned int i = 0; i < child_nodes.size(); ++i) {
375 cxcoutEHF <<
"Found tag attribute with unknown name in ParamSetting: "
376 << curAttr->
GetName() << std::endl;
390 std::string ParamFixString;
395 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
398 cxcoutEHF <<
"Error: Found tag attribute with no name in ConstraintTerm" << std::endl;
408 ParamFixString = curAttr->
GetValue();
414 cxcoutEHF <<
"Found tag attribute with unknown name in ConstraintTerm: "
415 << curAttr->
GetName() << std::endl;
423 if( ParamFixString==
"" ) {
425 <<
" added, but no parameters are set to be fixed" << std::endl;
440 map<string,double> gammaSyst;
441 map<string,double> uniformSyst;
442 map<string,double> logNormSyst;
445 if( child->
GetText() == NULL ) {
447 <<
" has no text." << std::endl;
455 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
458 cxcoutEHF <<
"Error: Found tag attribute with no name in ConstraintTerm" << std::endl;
466 else if( curAttr->
GetName() ==
TString(
"RelativeUncertainty" ) ) {
471 cxcoutEHF <<
"Found tag attribute with unknown name in ConstraintTerm: "
472 << curAttr->
GetName() << std::endl;
482 if( ! (
type==
"Gamma" ||
type==
"Uniform" ||
483 type==
"LogNormal" ||
type==
"NoConstraint") ) {
484 cxcoutEHF <<
"Error: Encountered unknown type for ConstraintTerm: " <<
type << std::endl;
488 if (
type==
"Gamma" && rel!=0) {
489 for (vector<string>::const_iterator it=syst.begin(); it!=syst.end(); ++it) {
495 if (
type==
"Uniform" && rel!=0) {
496 for (vector<string>::const_iterator it=syst.begin(); it!=syst.end(); ++it) {
502 if (
type==
"LogNormal" && rel!=0) {
503 for (vector<string>::const_iterator it=syst.begin(); it!=syst.end(); ++it) {
509 if (
type==
"NoConstraint") {
510 for (vector<string>::const_iterator it=syst.begin(); it!=syst.end(); ++it) {
512 measurement.
GetNoSyst()[(*it).c_str()] = 1.0;
552 cxcoutEHF <<
"Loading of xml document \"" << filen
553 <<
"\" failed" << std::endl;
563 cxcoutEHF <<
"Error: In parsing a Channel XML, "
564 <<
"Encounterd XML with DOCTYPE: " << rootNode->
GetNodeName()
566 cxcoutEHF <<
" DOCTYPE for channels must be 'Channel' "
567 <<
" Check that your XML is properly written" << std::endl;
585 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
589 std::string attrVal = curAttr->
GetValue();
591 if( attrName ==
TString(
"" ) ) {
592 cxcoutEHF <<
" Error: Attribute for 'Channel' with no name found" << std::endl;
596 else if( attrName ==
TString(
"Name" ) ) {
598 cxcoutIHF <<
" : creating a channel named " << channel.
GetName() << std::endl;
601 else if( attrName ==
TString(
"InputFile" ) ) {
602 cxcoutIHF <<
"Setting InputFile for this channel: " << attrVal << std::endl;
609 cxcoutIHF <<
"Setting HistoPath for this channel: " << attrVal << std::endl;
617 cxcoutEHF <<
"Use of HistoName in Channel is deprecated" << std::endl;
618 cxcoutEHF <<
"This will be ignored" << std::endl;
622 cxcoutEHF <<
" Error: Unknown attribute for 'Channel' encountered: "
623 << attrName << std::endl;
631 if( channel.
GetName() ==
"" ) {
632 cxcoutEHF <<
"Error: Channel created with no name" << std::endl;
652 cxcoutEHF <<
"Error: Encountered node in Channel with no name" << std::endl;
660 cxcoutEHF <<
"Error: You can only rename the datasets of additional data sets. "
661 <<
" Remove the 'Name=" << data.
GetName() <<
"' tag"
662 <<
" from channel: " << channel.
GetName() << std::endl;
684 cxcoutEHF <<
"Error: Encountered node in Channel with unknown name: " << node->
GetNodeName() << std::endl;
692 cxcoutIHF <<
"Created Channel: " << std::endl;
703 cxcoutIHF <<
"Creating Data Element" << std::endl;
715 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
719 std::string attrVal = curAttr->
GetValue();
721 if( attrName ==
TString(
"" ) ) {
722 cxcoutEHF <<
" Error: Attribute for 'Data' with no name found" << std::endl;
726 else if( attrName ==
TString(
"Name" ) ) {
730 else if( attrName ==
TString(
"InputFile" ) ) {
734 else if( attrName ==
TString(
"HistoName" ) ) {
738 else if( attrName ==
TString(
"HistoPath" ) ) {
745 cxcoutEHF <<
" Error: Unknown attribute for 'Data' encountered: " << attrName << std::endl;
753 cxcoutEHF <<
"Error: Data Node has no InputFile" << std::endl;
757 cxcoutEHF <<
"Error: Data Node has no HistoName" << std::endl;
765 << (data.
GetName() !=
"" ?
" Name: " :
"") << data.
GetName() << std::endl;
776 cxcoutIHF <<
"Creating StatErrorConfig Element" << std::endl;
787 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
791 std::string attrVal = curAttr->
GetValue();
793 if( attrName ==
TString(
"RelErrorThreshold" ) ) {
797 if( attrName ==
TString(
"ConstraintType" ) ) {
800 if( attrVal ==
"" ) {
801 cxcoutEHF <<
"Error: Bad Value for StatErrorConfig Constraint Type Found" << std::endl;
805 else if( attrVal==
"Gaussian" || attrVal==
"Gauss" ) {
809 else if( attrVal==
"Poisson" || attrVal==
"Pois" ) {
816 cout <<
"Invalid Stat Constraint Type: " << curAttr->
GetValue() << endl;
822 cxcoutIHF <<
"Created StatErrorConfig Element with"
834 cxcoutIHF <<
"Creating Sample Element" << std::endl;
849 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
853 std::string attrVal = curAttr->
GetValue();
855 if( attrName ==
TString(
"" ) ) {
856 cxcoutEHF <<
" Error: Attribute for 'Sample' with no name found" << std::endl;
860 else if( attrName ==
TString(
"Name" ) ) {
864 else if( attrName ==
TString(
"InputFile" ) ) {
869 else if( attrName ==
TString(
"HistoName" ) ) {
873 else if( attrName ==
TString(
"HistoPath" ) ) {
878 else if( attrName ==
TString(
"NormalizeByTheory" ) ) {
896 cxcoutEHF <<
" Error: Unknown attribute for 'Sample' encountered: " << attrName << std::endl;
903 cxcoutEHF <<
"Error: Sample Node has no Name" << std::endl;
907 cxcoutEHF <<
"Error: Sample Node has no InputFile" << std::endl;
911 cxcoutEHF <<
"Error: Sample Node has no HistoName" << std::endl;
920 while( child != 0 ) {
923 cxcoutEHF <<
"Error: Encountered node in Sample with no name" << std::endl;
940 cxcoutEHF <<
"WARNING: HistoFactor not yet supported" << std::endl;
959 cxcoutEHF <<
"Error: Encountered node in Sample with unknown name: " << child->
GetNodeName() << std::endl;
967 <<
" Name: " << sample.
GetName()
981 cxcoutIHF <<
"Making NormFactor:" << std::endl;
987 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
991 std::string attrVal = curAttr->
GetValue();
993 if( attrName ==
TString(
"" ) ){
994 cxcoutEHF <<
"Error: Encountered Element in NormFactor with no name" << std::endl;
1002 norm.
SetVal( atof(attrVal.c_str()) );
1005 norm.
SetLow( atof(attrVal.c_str()) );
1008 norm.
SetHigh( atof(attrVal.c_str()) );
1015 cxcoutEHF <<
"Error: Encountered Element in NormFactor with unknown name: "
1016 << attrName << std::endl;
1023 cxcoutEHF <<
"Error: NormFactor Node has no Name" << std::endl;
1029 <<
" has lower limit >= its upper limit: "
1030 <<
" Lower: " << norm.
GetLow()
1031 <<
" Upper: " << norm.
GetHigh()
1032 <<
". Please Fix" << std::endl;
1037 <<
" has initial value not within its range: "
1038 <<
" Val: " << norm.
GetVal()
1039 <<
" Lower: " << norm.
GetLow()
1040 <<
" Upper: " << norm.
GetHigh()
1041 <<
". Please Fix" << std::endl;
1053 cxcoutIHF <<
"Making HistoFactor" << std::endl;
1063 cxcoutIHF <<
"Made HistoFactor" << std::endl;
1072 cxcoutIHF <<
"Making HistoSys:" << std::endl;
1093 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1097 std::string attrVal = curAttr->
GetValue();
1099 if( attrName ==
TString(
"" ) ){
1100 cxcoutEHF <<
"Error: Encountered Element in HistoSys with no name" << std::endl;
1129 cxcoutEHF <<
"Error: Encountered Element in HistoSys with unknown name: "
1130 << attrName << std::endl;
1137 if( histoSys.
GetName() ==
"" ) {
1138 cxcoutEHF <<
"Error: HistoSys Node has no Name" << std::endl;
1142 cxcoutEHF <<
"Error: HistoSysSample Node has no InputFileHigh" << std::endl;
1146 cxcoutEHF <<
"Error: HistoSysSample Node has no InputFileLow" << std::endl;
1150 cxcoutEHF <<
"Error: HistoSysSample Node has no HistoNameHigh" << std::endl;
1154 cxcoutEHF <<
"Error: HistoSysSample Node has no HistoNameLow" << std::endl;
1168 cxcoutIHF <<
"Making OverallSys:" << std::endl;
1174 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1178 std::string attrVal = curAttr->
GetValue();
1180 if( attrName ==
TString(
"" ) ){
1181 cxcoutEHF <<
"Error: Encountered Element in OverallSys with no name" << std::endl;
1185 else if( attrName ==
TString(
"Name" ) ) {
1186 overallSys.
SetName( attrVal );
1188 else if( attrName ==
TString(
"High" ) ) {
1189 overallSys.
SetHigh( atof(attrVal.c_str()) );
1191 else if( attrName ==
TString(
"Low" ) ) {
1192 overallSys.
SetLow( atof(attrVal.c_str()) );
1196 cxcoutEHF <<
"Error: Encountered Element in OverallSys with unknown name: "
1197 << attrName << std::endl;
1203 if( overallSys.
GetName() ==
"" ) {
1204 cxcoutEHF <<
"Error: Encountered OverallSys with no name" << std::endl;
1218 cxcoutIHF <<
"Making ShapeFactor" << std::endl;
1232 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1236 std::string attrVal = curAttr->
GetValue();
1238 if( attrName ==
TString(
"" ) ){
1239 cxcoutEHF <<
"Error: Encountered Element in ShapeFactor with no name" << std::endl;
1243 else if( attrName ==
TString(
"Name" ) ) {
1244 shapeFactor.
SetName( attrVal );
1246 else if( attrName ==
TString(
"Const" ) ) {
1250 else if( attrName ==
TString(
"HistoName" ) ) {
1254 else if( attrName ==
TString(
"InputFile" ) ) {
1255 ShapeInputFile = attrVal;
1258 else if( attrName ==
TString(
"HistoPath" ) ) {
1259 ShapeInputPath = attrVal;
1263 cxcoutEHF <<
"Error: Encountered Element in ShapeFactor with unknown name: "
1264 << attrName << std::endl;
1270 if( shapeFactor.
GetName() ==
"" ) {
1271 cxcoutEHF <<
"Error: Encountered ShapeFactor with no name" << std::endl;
1280 <<
" is configured to have an initial shape, but "
1281 <<
"its histogram doesn't have a name"
1298 cxcoutIHF <<
"Making ShapeSys" << std::endl;
1312 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1317 std::string attrVal = curAttr->
GetValue();
1319 if( attrName ==
TString(
"" ) ){
1320 cxcoutEHF <<
"Error: Encountered Element in ShapeSys with no name" << std::endl;
1324 else if( attrName ==
TString(
"Name" ) ) {
1328 else if( attrName ==
TString(
"HistoName" ) ) {
1332 else if( attrName ==
TString(
"HistoPath" ) ) {
1336 else if( attrName ==
TString(
"InputFile" ) ) {
1340 else if( attrName ==
TString(
"ConstraintType" ) ) {
1342 cxcoutEHF <<
"Error: ShapeSys Constraint type is empty" << std::endl;
1345 else if( attrVal==
"Gaussian" || attrVal==
"Gauss" ) {
1348 else if( attrVal==
"Poisson" || attrVal==
"Pois" ) {
1352 cout <<
"Error: Encountered unknown ShapeSys Constraint type: " << attrVal << endl;
1358 cxcoutEHF <<
"Error: Encountered Element in ShapeSys with unknown name: "
1359 << attrName << std::endl;
1366 if( shapeSys.
GetName() ==
"" ) {
1367 cxcoutEHF <<
"Error: Encountered ShapeSys with no Name" << std::endl;
1371 cxcoutEHF <<
"Error: Encountered ShapeSys with no InputFile" << std::endl;
1375 cxcoutEHF <<
"Error: Encountered ShapeSys with no HistoName" << std::endl;
1388 cxcoutIHF <<
"Activating StatError" << std::endl;
1399 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1403 std::string attrVal = curAttr->
GetValue();
1405 if( attrName ==
TString(
"" ) ){
1406 cxcoutEHF <<
"Error: Encountered Element in ActivateStatError with no name" << std::endl;
1410 else if( attrName ==
TString(
"Activate" ) ) {
1414 else if( attrName ==
TString(
"HistoName" ) ) {
1418 else if( attrName ==
TString(
"HistoPath" ) ) {
1422 else if( attrName ==
TString(
"InputFile" ) ) {
1427 cxcoutEHF <<
"Error: Encountered Element in ActivateStatError with unknown name: "
1428 << attrName << std::endl;
1476 cxcoutIHF <<
"Parsing FunctionConfig" << std::endl;
1482 std::string
Name =
"";
1483 std::string Expression =
"";
1484 std::string Dependents =
"";
1487 while( ( curAttr =
dynamic_cast< TXMLAttr*
>( attribIt() ) ) != 0 ) {
1504 cxcoutEHF <<
"Error processing PreprocessFunction: Name attribute is empty" << std::endl;
1507 if( Expression==
"" ){
1508 cxcoutEHF <<
"Error processing PreprocessFunction: Expression attribute is empty" << std::endl;
1511 if( Dependents==
"" ){
1512 cxcoutEHF <<
"Error processing PreprocessFunction: Dependents attribute is empty" << std::endl;
1545 if( attrVal ==
"" ) {
1547 <<
" Expected either 'True' or 'False' but found empty" << std::endl;
1550 else if ( attrVal ==
"True" || attrVal ==
"true" )
return true;
1551 else if ( attrVal ==
"False" || attrVal ==
"false" )
return false;
1554 <<
" Expected either 'True' or 'False' but found: " << attrVal << std::endl;
static RooMathCoreReg dummy
TODO Here, we are missing some documentation.
void SetName(const std::string &name)
This class encapsulates all information for the statistical interpretation of one experiment.
std::string GetInputFile()
get name of input file
void SetName(const std::string &Name)
set name of channel
std::string GetHistoPath()
get path to histograms in input file
void Print(std::ostream &=std::cout)
void AddAdditionalData(const RooStats::HistFactory::Data &data)
add additional data object
void SetData(const RooStats::HistFactory::Data &data)
set data object
void SetInputFile(const std::string &file)
set name of input file containing histograms
std::string GetName()
get name of channel
void SetStatErrorConfig(double RelErrorThreshold, Constraint::Type ConstraintType)
std::vector< RooStats::HistFactory::Sample > & GetSamples()
get vector of samples for this channel
void SetHistoPath(const std::string &file)
set path for histograms in input file
bool IsAcceptableNode(TXMLNode *functionNode)
HistFactory::StatErrorConfig CreateStatErrorConfigElement(TXMLNode *node)
HistFactory::StatError ActivateStatError(TXMLNode *node)
HistFactory::OverallSys MakeOverallSys(TXMLNode *node)
HistFactory::Sample CreateSampleElement(TXMLNode *node)
HistFactory::HistoSys MakeHistoSys(TXMLNode *node)
std::string m_currentInputFile
To facilitate writing xml, when not specified, files and paths default to these cached values.
HistFactory::ShapeFactor MakeShapeFactor(TXMLNode *node)
std::string m_currentChannel
bool CheckTrueFalse(std::string val, std::string Name)
RooStats::HistFactory::Measurement CreateMeasurementFromDriverNode(TXMLNode *node)
HistFactory::PreprocessFunction ParseFunctionConfig(TXMLNode *functionNode)
HistFactory::Data CreateDataElement(TXMLNode *node)
Helpers used to process a channel.
HistFactory::HistoFactor MakeHistoFactor(TXMLNode *node)
std::string m_currentHistoPath
RooStats::HistFactory::Channel ParseChannelXMLFile(std::string filen)
HistFactory::ShapeSys MakeShapeSys(TXMLNode *node)
HistFactory::NormFactor MakeNormFactor(TXMLNode *node)
Helpers used when processing a Sample.
void SetInputFile(const std::string &InputFile)
std::string GetInputFile()
void SetHistoPath(const std::string &HistoPath)
void SetName(const std::string &name)
std::string GetHistoName()
void SetHistoName(const std::string &HistoName)
std::string GetHistoPath()
Configuration for an *un*constrained, coherent shape variation of affected samples.
Configuration for a constrained, coherent shape variation of affected samples.
void SetInputFileHigh(const std::string &InputFileHigh)
void SetName(const std::string &Name)
void SetHistoPathHigh(const std::string &HistoPathHigh)
const std::string & GetName() const
void SetInputFileLow(const std::string &InputFileLow)
const std::string & GetHistoNameHigh() const
const std::string & GetHistoNameLow() const
void SetHistoNameHigh(const std::string &HistoNameHigh)
void SetHistoNameLow(const std::string &HistoNameLow)
virtual void Print(std::ostream &=std::cout) const
const std::string & GetInputFileHigh() const
const std::string & GetInputFileLow() const
void SetHistoPathLow(const std::string &HistoPathLow)
The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple R...
std::map< std::string, double > & GetGammaSyst()
std::map< std::string, double > & GetLogNormSyst()
std::map< std::string, double > & GetNoSyst()
void SetExportOnly(bool ExportOnly)
do not produce any plots or tables, just save the model
std::vector< std::string > & GetPOIList()
get vector of PoI names
void SetLumi(double Lumi)
set integrated luminosity used to normalise histograms (if NormalizeByTheory is true for this sample)
void SetParamValue(const std::string ¶m, double value)
Set a parameter to a specific value (And optionally fix it)
std::map< std::string, double > & GetUniformSyst()
std::vector< std::string > & GetConstantParams()
get vector of all constant parameters
void SetOutputFilePrefix(const std::string &prefix)
set output prefix
void PrintTree(std::ostream &=std::cout)
Print information about measurement object in tree-like structure to given stream.
void SetBinLow(int BinLow)
std::vector< RooStats::HistFactory::Channel > & GetChannels()
void SetBinHigh(int BinHigh)
void SetLumiRelErr(double RelErr)
set relative uncertainty on luminosity
void AddAsimovDataset(RooStats::HistFactory::Asimov dataset)
add an Asimov Dataset
Configuration for an un- constrained overall systematic to scale sample normalisations.
std::string GetName() const
void Print(std::ostream &=std::cout) const
void SetConst(bool Const=true)
void SetHigh(double High)
void SetName(const std::string &Name)
Configuration for a constrained overall systematic to scale sample normalisations.
std::string GetName() const
void SetName(const std::string &Name)
void SetHigh(double High)
void Print(std::ostream &=std::cout) const
std::string GetCommand(std::string Name, std::string Expression, std::string Dependents)
std::vector< RooStats::HistFactory::OverallSys > & GetOverallSysList()
std::string GetHistoName() const
get histogram name
void SetStatError(RooStats::HistFactory::StatError Error)
std::string GetName() const
get name of sample
void SetInputFile(const std::string &InputFile)
set input ROOT file
void SetChannelName(const std::string &ChannelName)
set name of associated channel
void SetHistoName(const std::string &HistoName)
set histogram name
std::string GetHistoPath() const
get histogram path
void SetNormalizeByTheory(bool norm)
defines whether the normalization scale with luminosity
std::vector< RooStats::HistFactory::ShapeFactor > & GetShapeFactorList()
void SetName(const std::string &Name)
set name of sample
void SetHistoPath(const std::string &HistoPath)
set histogram path
std::vector< RooStats::HistFactory::NormFactor > & GetNormFactorList()
std::string GetInputFile() const
get input ROOT file
std::vector< RooStats::HistFactory::HistoSys > & GetHistoSysList()
std::vector< RooStats::HistFactory::ShapeSys > & GetShapeSysList()
*Un*constrained bin-by-bin variation of affected histogram.
void SetInputFile(const std::string &InputFile)
void SetHistoName(const std::string &HistoName)
void Print(std::ostream &=std::cout) const override
void SetConstant(bool constant)
bool HasInitialShape() const
void SetHistoPath(const std::string &HistoPath)
const std::string & GetHistoName() const
Constrained bin-by-bin variation of affected histogram.
std::string GetHistoName() const
void SetInputFile(const std::string &InputFile)
void Print(std::ostream &=std::cout) const override
void SetHistoName(const std::string &HistoName)
void SetConstraintType(Constraint::Type ConstrType)
std::string GetInputFile() const
void SetHistoPath(const std::string &HistoPath)
Configuration to automatically assign nuisance parameters for the statistical error of the Monte Carl...
void SetConstraintType(Constraint::Type ConstrType)
double GetRelErrorThreshold() const
void SetRelErrorThreshold(double Threshold)
Constraint::Type GetConstraintType() const
Statistical error of Monte Carlo predictions.
const std::string & GetHistoPath() const
void Activate(bool IsActive=true)
void SetHistoPath(const std::string &HistoPath)
void SetInputFile(const std::string &InputFile)
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
virtual TXMLDocument * GetXMLDocument() const
Returns the TXMLDocument.
virtual Int_t ParseFile(const char *filename)
Parse the XML file where filename is the XML file name.
virtual void SetName(const char *name)
Set the name of the TNamed.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
TXMLAttribute is the attribute of an Element.
const char * GetValue() const
const char * GetName() const
Returns name of object.
TXMLDocument contains a pointer to an xmlDoc structure, after the parser returns a tree built during ...
TXMLNode * GetRootNode() const
Returns the root element node.
TXMLNode contains a pointer to xmlNode, which is a node under the DOM tree.
TList * GetAttributes()
Returns a list of node's attribute if any, returns 0 if no attribute.
const char * GetText() const
Returns the content of a Text node if node is a TextNode, 0 otherwise.
TXMLNode * GetNextNode()
Returns the next sibling XMLNode in the DOM tree, if any return 0 if no next node.
TXMLNode * GetChildren()
Returns the node's child if any, returns 0 if no child.
const char * GetNodeName() const
Returns the node's name.
void AddSubStrings(vector< std::string > &vs, std::string s)
std::vector< std::string > GetChildrenFromString(std::string str)
void AddParamsToAsimov(RooStats::HistFactory::Asimov &asimov, std::string str)
Namespace for the RooStats classes.