/usr/include/root/RooStats/HistFactory/Systematics.h is in libroot-roofit-dev 5.34.00-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | #ifndef HISTFACTORY_SYSTEMATICS_H
#define HISTFACTORY_SYSTEMATICS_H
#include <string>
#include <fstream>
#include <iostream>
#include "TH1.h"
#include "TRef.h"
//#include "RooStats/HistFactory/HistCollector.h"
namespace RooStats{
namespace HistFactory {
namespace Constraint{
enum Type{ Gaussian, Poisson };
std::string Name( Type type );
Type GetType( std::string Name );
}
class OverallSys {
public:
//friend class Channel;
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void SetLow( double Low ) { fLow = Low; }
void SetHigh( double High ) { fHigh = High; }
double GetLow() { return fLow; }
double GetHigh() { return fHigh; }
void Print(std::ostream& = std::cout);
protected:
std::string fName;
double fLow;
double fHigh;
};
class NormFactor {
public:
//friend class Channel;
NormFactor();
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void SetVal( double Val ) { fVal = Val; }
double GetVal() { return fVal; }
void SetConst( bool Const=true ) { fConst = Const; }
bool GetConst() { return fConst; }
void SetLow( double Low ) { fLow = Low; }
void SetHigh( double High ) { fHigh = High; }
double GetLow() { return fLow; }
double GetHigh() { return fHigh; }
void Print(std::ostream& = std::cout);
protected:
std::string fName;
double fVal;
double fLow;
double fHigh;
bool fConst;
};
class HistoSys {
public:
//friend class Channel;
HistoSys() : fhLow(NULL), fhHigh(NULL ) {;}
void Print(std::ostream& = std::cout);
void writeToFile( std::string FileName, std::string DirName );
void SetHistoLow( TH1* Low ) { fhLow = Low; }
void SetHistoHigh( TH1* High ) { fhHigh = High; }
TH1* GetHistoLow();
TH1* GetHistoHigh();
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void SetInputFileLow( const std::string& InputFileLow ) { fInputFileLow = InputFileLow; }
void SetInputFileHigh( const std::string& InputFileHigh ) { fInputFileHigh = InputFileHigh; }
std::string GetInputFileLow() { return fInputFileLow; }
std::string GetInputFileHigh() { return fInputFileHigh; }
void SetHistoNameLow( const std::string& HistoNameLow ) { fHistoNameLow = HistoNameLow; }
void SetHistoNameHigh( const std::string& HistoNameHigh ) { fHistoNameHigh = HistoNameHigh; }
std::string GetHistoNameLow() { return fHistoNameLow; }
std::string GetHistoNameHigh() { return fHistoNameHigh; }
void SetHistoPathLow( const std::string& HistoPathLow ) { fHistoPathLow = HistoPathLow; }
void SetHistoPathHigh( const std::string& HistoPathHigh ) { fHistoPathHigh = HistoPathHigh; }
std::string GetHistoPathLow() { return fHistoPathLow; }
std::string GetHistoPathHigh() { return fHistoPathHigh; }
protected:
std::string fName;
std::string fInputFileLow;
std::string fHistoNameLow;
std::string fHistoPathLow;
std::string fInputFileHigh;
std::string fHistoNameHigh;
std::string fHistoPathHigh;
// The Low and High Histograms
TRef fhLow;
TRef fhHigh;
};
class HistoFactor {
public:
//friend class Channel;
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void SetInputFileLow( const std::string& InputFileLow ) { fInputFileLow = InputFileLow; }
void SetInputFileHigh( const std::string& InputFileHigh ) { fInputFileHigh = InputFileHigh; }
std::string GetInputFileLow() { return fInputFileLow; }
std::string GetInputFileHigh() { return fInputFileHigh; }
void SetHistoNameLow( const std::string& HistoNameLow ) { fHistoNameLow = HistoNameLow; }
void SetHistoNameHigh( const std::string& HistoNameHigh ) { fHistoNameHigh = HistoNameHigh; }
std::string GetHistoNameLow() { return fHistoNameLow; }
std::string GetHistoNameHigh() { return fHistoNameHigh; }
void SetHistoPathLow( const std::string& HistoPathLow ) { fHistoPathLow = HistoPathLow; }
void SetHistoPathHigh( const std::string& HistoPathHigh ) { fHistoPathHigh = HistoPathHigh; }
std::string GetHistoPathLow() { return fHistoPathLow; }
std::string GetHistoPathHigh() { return fHistoPathHigh; }
void Print(std::ostream& = std::cout);
void writeToFile( std::string FileName, std::string DirName );
TH1* GetHistoLow();
TH1* GetHistoHigh();
void SetHistoLow( TH1* Low ) { fhLow = Low; }
void SetHistoHigh( TH1* High ) { fhHigh = High; }
protected:
std::string fName;
std::string fInputFileLow;
std::string fHistoNameLow;
std::string fHistoPathLow;
std::string fInputFileHigh;
std::string fHistoNameHigh;
std::string fHistoPathHigh;
// The Low and High Histograms
TRef fhLow;
TRef fhHigh;
};
class ShapeSys {
public:
//friend class Channel;
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void SetInputFile( const std::string& InputFile ) { fInputFile = InputFile; }
std::string GetInputFile() { return fInputFile; }
void SetHistoName( const std::string& HistoName ) { fHistoName = HistoName; }
std::string GetHistoName() { return fHistoName; }
void SetHistoPath( const std::string& HistoPath ) { fHistoPath = HistoPath; }
std::string GetHistoPath() { return fHistoPath; }
void Print(std::ostream& = std::cout);
void writeToFile( std::string FileName, std::string DirName );
TH1* GetErrorHist();
void SetErrorHist(TH1* hError) { fhError = hError; }
void SetConstraintType( Constraint::Type ConstrType ) { fConstraintType = ConstrType; }
Constraint::Type GetConstraintType() { return fConstraintType; }
protected:
std::string fName;
std::string fInputFile;
std::string fHistoName;
std::string fHistoPath;
Constraint::Type fConstraintType;
// The histogram holding the error
TRef fhError;
};
class ShapeFactor {
public:
//friend class Channel;
void SetName( const std::string& Name ) { fName = Name; }
std::string GetName() { return fName; }
void Print(std::ostream& = std::cout);
protected:
std::string fName;
};
class StatError {
public:
//friend class Channel;
StatError() : fActivate(false), fUseHisto(false), fhError(NULL) {;}
void Print(std::ostream& = std::cout);
void writeToFile( std::string FileName, std::string DirName );
void Activate( bool IsActive=true ) { fActivate = IsActive; }
bool GetActivate() { return fActivate; }
void SetUseHisto( bool UseHisto=true ) { fUseHisto = UseHisto; }
bool GetUseHisto() { return fUseHisto; }
void SetInputFile( const std::string& InputFile ) { fInputFile = InputFile; }
std::string GetInputFile() { return fInputFile; }
void SetHistoName( const std::string& HistoName ) { fHistoName = HistoName; }
std::string GetHistoName() { return fHistoName; }
void SetHistoPath( const std::string& HistoPath ) { fHistoPath = HistoPath; }
std::string GetHistoPath() { return fHistoPath; }
TH1* GetErrorHist();
void SetErrorHist(TH1* Error) { fhError = Error; }
protected:
bool fActivate;
bool fUseHisto; // Use an external histogram for the errors
std::string fInputFile;
std::string fHistoName;
std::string fHistoPath;
// The histogram holding the error
TRef fhError;
};
class StatErrorConfig {
public:
//friend class Channel;
StatErrorConfig() : fRelErrorThreshold( .05 ), fConstraintType( Constraint::Gaussian ) {;}
void Print(std::ostream& = std::cout);
void SetRelErrorThreshold( double Threshold ) { fRelErrorThreshold = Threshold; }
double GetRelErrorThreshold() { return fRelErrorThreshold; }
void SetConstraintType( Constraint::Type ConstrType ) { fConstraintType = ConstrType; }
Constraint::Type GetConstraintType() { return fConstraintType; }
protected:
double fRelErrorThreshold;
Constraint::Type fConstraintType;
};
}
}
#endif
|