BCMTFSystematicVariation.h
1 #ifndef __BCMTFSYSTEMATICVARIATION__H
2 #define __BCMTFSYSTEMATICVARIATION__H
3 
15 /*
16  * Copyright (C) 2007-2018, the BAT core developer team
17  * All rights reserved.
18  *
19  * For the licensing terms see doc/COPYING.
20  * For documentation see http://mpp.mpg.de/bat
21  */
22 
23 // ---------------------------------------------------------
24 
25 #include <vector>
26 
27 class TH1D;
28 
29 // ---------------------------------------------------------
31 {
32 public:
33 
40  BCMTFSystematicVariation(int nprocesses);
41 
45 
55  TH1D* GetHistogramUp(int index)
56  { return fHistogramUpContainer.at(index); };
57 
63  TH1D* GetHistogramDown(int index)
64  { return fHistogramDownContainer.at(index); };
65 
77  void SetHistogramUp(int index, TH1D* hist)
78  { fHistogramUpContainer[index] = hist; };
79 
87  void SetHistogramDown(int index, TH1D* hist)
88  { fHistogramDownContainer[index] = hist; };
89 
98  void SetHistograms(int index, TH1D* hist_up, TH1D* hist_down)
99  {
100  fHistogramUpContainer[index] = hist_up;
101  fHistogramDownContainer[index] = hist_down;
102  };
103 
113  void AddHistogramUp(TH1D* hist)
114  { fHistogramUpContainer.push_back(hist); };
115 
121  void AddHistogramDown(TH1D* hist)
122  { fHistogramDownContainer.push_back(hist); };
123 
130  void AddHistograms(TH1D* hist_up, TH1D* hist_down)
131  {
132  fHistogramUpContainer.push_back(hist_up);
133  fHistogramDownContainer.push_back(hist_down);
134  };
135 
138 private:
139 
142  std::vector<TH1D*> fHistogramUpContainer;
143 
146  std::vector<TH1D*> fHistogramDownContainer;
147 
148 };
149 // ---------------------------------------------------------
150 
151 #endif
void SetHistogramDown(int index, TH1D *hist)
Set the histogram correponding to the down-scale variation of the systematic.
void AddHistogramUp(TH1D *hist)
Add a histogram for up-scale variations.
void AddHistogramDown(TH1D *hist)
Add a histogram for down-scale variations.
void AddHistograms(TH1D *hist_up, TH1D *hist_down)
Add a histograms for up- and down-scale variations.
TH1D * GetHistogramUp(int index)
Returns the histogram correponding to the up-scale variation of the systematic.
~BCMTFSystematicVariation()
The default destructor.
void SetHistograms(int index, TH1D *hist_up, TH1D *hist_down)
Set the histograms correponding to the up- and down-scale variations of the systematic.
TH1D * GetHistogramDown(int index)
Returns the histogram correponding to the down-scale variation of the systematic. ...
BCMTFSystematicVariation(int nprocesses)
The default constructor.
void SetHistogramUp(int index, TH1D *hist)
Set the histogram correponding to the up-scale variation of the systematic.
A class describing a systematic variation.