24 fName(
other.fName), fInputFile(
other.fInputFile),
25 fHistoName(
other.fHistoName), fHistoPath(
other.fHistoPath),
26 fChannelName(
other.fChannelName),
28 fOverallSysList(
other.fOverallSysList),
29 fNormFactorList(
other.fNormFactorList),
30 fHistoSysList(
other.fHistoSysList),
31 fHistoFactorList(
other.fHistoFactorList),
32 fShapeSysList(
other.fShapeSysList),
33 fShapeFactorList(
other.fShapeFactorList),
35 fStatError(
other.fStatError),
36 fNormalizeByTheory(
other.fNormalizeByTheory),
37 fStatErrorActivate(
other.fStatErrorActivate),
38 fhNominal(
other.fhNominal)
40 if(
other.fhCountingHist ) {
49 fName =
other.fName; fInputFile =
other.fInputFile;
50 fHistoName =
other.fHistoName; fHistoPath =
other.fHistoPath;
51 fChannelName =
other.fChannelName;
53 fOverallSysList =
other.fOverallSysList;
54 fNormFactorList =
other.fNormFactorList;
55 fHistoSysList =
other.fHistoSysList;
56 fHistoFactorList =
other.fHistoFactorList;
57 fShapeSysList =
other.fShapeSysList;
58 fShapeFactorList =
other.fShapeFactorList;
60 fStatError =
other.fStatError;
61 fNormalizeByTheory =
other.fNormalizeByTheory;
62 fStatErrorActivate =
other.fStatErrorActivate;
63 fhNominal =
other.fhNominal;
65 fhCountingHist.reset();
67 if(
other.fhCountingHist ) {
68 SetValue(
other.fhCountingHist->GetBinContent(1) );
70 fhCountingHist.reset();
80 fNormalizeByTheory(
true), fStatErrorActivate(
false)
90 TH1* histo = (
TH1*) fhNominal.GetObject();
105 fHistoPath = DirName;
112 for(
unsigned int i = 0; i < GetHistoSysList().size(); ++i ) {
115 for(
unsigned int i = 0; i < GetHistoFactorList().size(); ++i ) {
116 GetHistoFactorList().at(i).writeToFile(
OutputFileName, DirName );
118 for(
unsigned int i = 0; i < GetShapeSysList().size(); ++i ) {
121 for(
unsigned int i = 0; i < GetShapeFactorList().size(); ++i ) {
122 GetShapeFactorList().at(i).writeToFile(
OutputFileName, DirName );
140 fhCountingHist.reset();
143 fhCountingHist->SetBinContent( 1, val );
147 SetHisto( fhCountingHist.get() );
156 stream <<
"\t \t Name: " << fName
157 <<
"\t \t Channel: " << fChannelName
158 <<
"\t NormalizeByTheory: " << (fNormalizeByTheory ?
"True" :
"False")
159 <<
"\t StatErrorActivate: " << (fStatErrorActivate ?
"True" :
"False")
162 stream <<
"\t \t \t \t "
163 <<
"\t InputFile: " << fInputFile
164 <<
"\t HistName: " << fHistoName
165 <<
"\t HistoPath: " << fHistoPath
166 <<
"\t HistoAddress: " << GetHisto()
170 if( fStatError.GetActivate() ) {
171 stream <<
"\t \t \t StatError Activate: " << fStatError.GetActivate()
172 <<
"\t InputFile: " << fInputFile
173 <<
"\t HistName: " << fStatError.GetHistoName()
174 <<
"\t HistoPath: " << fStatError.GetHistoPath()
175 <<
"\t HistoAddress: " << fStatError.GetErrorHist()
197 xml <<
" <Sample Name=\"" << fName <<
"\" "
198 <<
" HistoPath=\"" << fHistoPath <<
"\" "
199 <<
" HistoName=\"" << fHistoName <<
"\" "
200 <<
" InputFile=\"" << fInputFile <<
"\" "
201 <<
" NormalizeByTheory=\"" << (fNormalizeByTheory ? std::string(
"True") : std::string(
"False")) <<
"\" "
206 fStatError.PrintXML(
xml );
219 for(
unsigned int i = 0; i < fOverallSysList.size(); ++i ) {
229 for(
unsigned int i = 0; i < fNormFactorList.size(); ++i ) {
240 for(
unsigned int i = 0; i < fHistoSysList.size(); ++i ) {
256 for(
unsigned int i = 0; i < fHistoFactorList.size(); ++i ) {
272 for(
unsigned int i = 0; i < fShapeSysList.size(); ++i ) {
285 for(
unsigned int i = 0; i < fShapeFactorList.size(); ++i ) {
295 xml <<
" </Sample>" << std::endl;
307 fStatError.Activate(
true );
308 fStatError.SetUseHisto(
false );
316 fStatError.Activate(
true );
317 fStatError.SetUseHisto(
true );
333 fOverallSysList.push_back( sys );
338 fOverallSysList.push_back(
Sys);
350 fNormFactorList.push_back( norm );
355 fNormFactorList.push_back( Factor );
374 fHistoSysList.push_back( sys );
379 fHistoSysList.push_back(
Sys );
397 fHistoFactorList.push_back( factor );
402 fHistoFactorList.push_back(Factor);
410 fShapeFactorList.push_back( factor );
416 fShapeFactorList.push_back(Factor);
430 fShapeSysList.push_back( sys );
435 fShapeSysList.push_back(
Sys);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
void SetInputFileHigh(const std::string &InputFileHigh)
void SetName(const std::string &Name)
void SetHistoPathHigh(const std::string &HistoPathHigh)
void SetInputFileLow(const std::string &InputFileLow)
void SetHistoNameHigh(const std::string &HistoNameHigh)
void SetHistoNameLow(const std::string &HistoNameLow)
void SetHistoPathLow(const std::string &HistoPathLow)
Configuration for an un- constrained overall systematic to scale sample normalisations.
void PrintXML(std::ostream &) const
void SetHigh(double High)
void SetName(const std::string &Name)
Configuration for a constrained overall systematic to scale sample normalisations.
void SetName(const std::string &Name)
void PrintXML(std::ostream &) const
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)
void AddNormFactor(std::string const &Name, double Val, double Low, double High)
void Print(std::ostream &=std::cout) const
Sample & operator=(const Sample &other)
void AddHistoFactor(std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow, std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh)
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)
void PrintXML(std::ofstream &xml) const
*Un*constrained bin-by-bin variation of affected histogram.
void PrintXML(std::ostream &) const override
Constrained bin-by-bin variation of affected histogram.
void PrintXML(std::ostream &) const override
TH1 is the base class of all histogram classes in ROOT.