23 fNormalizeByTheory(false), fStatErrorActivate(false), fhNominal(), fhCountingHist(0) { ; }
27 fName(other.fName), fInputFile(other.fInputFile),
28 fHistoName(other.fHistoName), fHistoPath(other.fHistoPath),
29 fChannelName(other.fChannelName),
31 fOverallSysList(other.fOverallSysList),
32 fNormFactorList(other.fNormFactorList),
33 fHistoSysList(other.fHistoSysList),
34 fHistoFactorList(other.fHistoFactorList),
35 fShapeSysList(other.fShapeSysList),
36 fShapeFactorList(other.fShapeFactorList),
38 fStatError(other.fStatError),
39 fNormalizeByTheory(other.fNormalizeByTheory),
40 fStatErrorActivate(other.fStatErrorActivate),
41 fhNominal(other.fhNominal),
53 fName( SampName ), fInputFile( SampInputFile),
54 fHistoName( SampHistoName ), fHistoPath( SampHistoPath ),
55 fNormalizeByTheory(true), fStatErrorActivate(false), fhNominal(),
56 fhCountingHist(0) { ; }
59 fName( SampName ), fInputFile(
"" ),
60 fHistoName(
"" ), fHistoPath(
"" ),
61 fNormalizeByTheory(true), fStatErrorActivate(false),fhNominal(),
62 fhCountingHist(0) { ; }
66 delete fhCountingHist;
70 TH1* histo = (
TH1*) fhNominal.GetObject();
83 fInputFile = OutputFileName;
84 fHistoName = histNominal->
GetName();
88 GetStatError().writeToFile( OutputFileName, DirName );
92 for(
unsigned int i = 0; i < GetHistoSysList().size(); ++i ) {
93 GetHistoSysList().at(i).writeToFile( OutputFileName, DirName );
95 for(
unsigned int i = 0; i < GetHistoFactorList().size(); ++i ) {
96 GetHistoFactorList().at(i).writeToFile( OutputFileName, DirName );
98 for(
unsigned int i = 0; i < GetShapeSysList().size(); ++i ) {
99 GetShapeSysList().at(i).writeToFile( OutputFileName, DirName );
101 for(
unsigned int i = 0; i < GetShapeFactorList().size(); ++i ) {
102 GetShapeFactorList().at(i).writeToFile( OutputFileName, DirName );
117 std::string SampleHistName = fName +
"_hist";
121 delete fhCountingHist;
123 fhCountingHist =
new TH1F( SampleHistName.c_str(), SampleHistName.c_str(), 1, 0, 1 );
124 fhCountingHist->SetBinContent( 1, val );
128 SetHisto( fhCountingHist );
137 stream <<
"\t \t Name: " << fName
138 <<
"\t \t Channel: " << fChannelName
139 <<
"\t NormalizeByTheory: " << (fNormalizeByTheory ?
"True" :
"False")
140 <<
"\t StatErrorActivate: " << (fStatErrorActivate ?
"True" :
"False")
143 stream <<
"\t \t \t \t "
144 <<
"\t InputFile: " << fInputFile
145 <<
"\t HistName: " << fHistoName
146 <<
"\t HistoPath: " << fHistoPath
147 <<
"\t HistoAddress: " <<
GetHisto()
151 if( fStatError.GetActivate() ) {
152 stream <<
"\t \t \t StatError Activate: " << fStatError.GetActivate()
153 <<
"\t InputFile: " << fInputFile
154 <<
"\t HistName: " << fStatError.GetHistoName()
155 <<
"\t HistoPath: " << fStatError.GetHistoPath()
156 <<
"\t HistoAddress: " << fStatError.GetErrorHist()
178 xml <<
" <Sample Name=\"" << fName <<
"\" "
179 <<
" HistoPath=\"" << fHistoPath <<
"\" "
180 <<
" HistoName=\"" << fHistoName <<
"\" "
181 <<
" InputFile=\"" << fInputFile <<
"\" "
182 <<
" NormalizeByTheory=\"" << (fNormalizeByTheory ? std::string(
"True") : std::string(
"False")) <<
"\" "
187 fStatError.PrintXML( xml );
200 for(
unsigned int i = 0; i < fOverallSysList.size(); ++i ) {
210 for(
unsigned int i = 0; i < fNormFactorList.size(); ++i ) {
222 for(
unsigned int i = 0; i < fHistoSysList.size(); ++i ) {
238 for(
unsigned int i = 0; i < fHistoFactorList.size(); ++i ) {
254 for(
unsigned int i = 0; i < fShapeSysList.size(); ++i ) {
267 for(
unsigned int i = 0; i < fShapeFactorList.size(); ++i ) {
277 xml <<
" </Sample>" << std::endl;
290 fStatError.Activate(
true );
291 fStatError.SetUseHisto(
false );
299 fStatError.Activate(
true );
300 fStatError.SetUseHisto(
true );
302 fStatError.SetInputFile( StatInputFile );
303 fStatError.SetHistoName( StatHistoName );
304 fStatError.SetHistoPath( StatHistoPath );
316 fOverallSysList.push_back( sys );
321 fOverallSysList.push_back(Sys);
334 fNormFactorList.push_back( norm );
339 fNormFactorList.push_back( Factor );
344std::string SysHistoNameLow, std::string SysHistoFileLow, std::string SysHistoPathLow,
345 std::string SysHistoNameHigh, std::string SysHistoFileHigh, std::string SysHistoPathHigh ) {
358 fHistoSysList.push_back( sys );
363 fHistoSysList.push_back( Sys );
368 std::string SysHistoNameHigh, std::string SysHistoFileHigh, std::string SysHistoPathHigh ) {
381 fHistoFactorList.push_back( factor );
386 fHistoFactorList.push_back(Factor);
394 fShapeFactorList.push_back( factor );
400 fShapeFactorList.push_back(Factor);
414 fShapeSysList.push_back( sys );
419 fShapeSysList.push_back(Sys);
Configuration for an unconstrained, coherent shape variation of affected samples.
void SetName(const std::string &Name)
void PrintXML(std::ostream &)
void SetHistoPathLow(const std::string &HistoPathLow)
void SetHistoPathHigh(const std::string &HistoPathHigh)
void SetHistoNameHigh(const std::string &HistoNameHigh)
void SetInputFileHigh(const std::string &InputFileHigh)
void SetInputFileLow(const std::string &InputFileLow)
void SetHistoNameLow(const std::string &HistoNameLow)
Configuration for a constrained, coherent shape variation of affected samples.
void SetHistoNameLow(const std::string &HistoNameLow)
void PrintXML(std::ostream &)
void SetHistoPathHigh(const std::string &HistoPathHigh)
void SetName(const std::string &Name)
void SetInputFileLow(const std::string &InputFileLow)
void SetHistoPathLow(const std::string &HistoPathLow)
void SetInputFileHigh(const std::string &InputFileHigh)
void SetHistoNameHigh(const std::string &HistoNameHigh)
Configuration for an un- constrained overall systematic to scale sample normalisations.
void PrintXML(std::ostream &)
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.
void PrintXML(std::ostream &)
void SetName(const std::string &Name)
void SetHigh(double High)
void AddShapeSys(std::string Name, Constraint::Type ConstraintType, std::string HistoName, std::string HistoFile, std::string HistoPath="")
void writeToFile(std::string FileName, std::string DirName)
void AddNormFactor(std::string Name, Double_t Val, Double_t Low, Double_t High, bool Const=false)
void SetValue(Double_t Val)
void PrintXML(std::ofstream &xml)
void AddOverallSys(std::string Name, Double_t Low, Double_t High)
void AddHistoFactor(std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow, std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh)
void Print(std::ostream &=std::cout)
void AddShapeFactor(std::string Name)
void AddHistoSys(std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow, std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh)
Unconstrained bin-by-bin variation of affected histogram.
void SetName(const std::string &Name)
void PrintXML(std::ostream &)
Constrained bin-by-bin variation of affected histogram.
void SetName(const std::string &Name)
void PrintXML(std::ostream &)
void SetInputFile(const std::string &InputFile)
void SetHistoName(const std::string &HistoName)
void SetConstraintType(Constraint::Type ConstrType)
void SetHistoPath(const std::string &HistoPath)
1-D histogram with a float per channel (see TH1 documentation)}
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
TH1 * GetHisto(TFile *inFile, const std::string name)