BCMTFTemplate.h
1 #ifndef __BCMTFTEMPLATE__H
2 #define __BCMTFTEMPLATE__H
3 
14 /*
15  * Copyright (C) 2007-2018, the BAT core developer team
16  * All rights reserved.
17  *
18  * For the licensing terms see doc/COPYING.
19  * For documentation see http://mpp.mpg.de/bat
20  */
21 
22 // ---------------------------------------------------------
23 
24 #include <TH1D.h>
25 #include <TRandom3.h>
26 
27 #include <string>
28 
29 class TF1;
30 
31 // ---------------------------------------------------------
33 {
34 public:
35 
43  BCMTFTemplate(const std::string& channelname, const std::string& processname);
44 
48 
56  const std::string& GetChannelName()
57  { return fChannelName; };
58 
61  const std::string& GetProcessName()
62  { return fProcessName; };
63 
66  double GetEfficiency()
67  { return fEfficiency; };
68 
71  TH1D* GetHistogram()
72  { return fHistogram; };
73 
76  double GetNorm()
77  { return fNormalization; };
78 
81  double GetOriginalNorm()
82  { return fOriginalNormalization; };
83 
93  TH1D FluctuateHistogram(const std::string& options = "GZ", double norm = 1);
94 
97  std::vector<TF1*>* GetFunctionContainer()
98  { return fFunctionContainer; };
99 
102  int GetNBins()
103  { return fNBins; };
104 
113  void SetEfficiency(double eff)
114  { fEfficiency = eff; };
115 
121  void SetHistogram(TH1D* hist, double norm = 1);
122 
126  void SetOrignialNormalization(double norm)
127  {
128  fOriginalNormalization = norm;
129  };
130 
134  void SetFunctionContainer(std::vector<TF1*>* funccont, int nbins);
135 
138 private:
139 
142  double fEfficiency;
143 
146  TH1D* fHistogram;
147 
150  std::vector<TF1*>* fFunctionContainer;
151 
154  int fNBins;
155 
158  double fNormalization;
159 
162  double fOriginalNormalization;
163 
166  std::string fChannelName;
167 
170  std::string fProcessName;
171 
174  TRandom3* fRandom;
175 
176 
177 };
178 // ---------------------------------------------------------
179 
180 #endif
void SetFunctionContainer(std::vector< TF1 * > *funccont, int nbins)
Set a function container funccont The function container nbins The number of bins (and functions) ...
const std::string & GetChannelName()
Definition: BCMTFTemplate.h:56
A class describing a template.
Definition: BCMTFTemplate.h:32
void SetOrignialNormalization(double norm)
Set the original normalization.
BCMTFTemplate(const std::string &channelname, const std::string &processname)
The default constructor.
double GetEfficiency()
Definition: BCMTFTemplate.h:66
void SetHistogram(TH1D *hist, double norm=1)
Set the histogram.
TH1D FluctuateHistogram(const std::string &options="GZ", double norm=1)
Fluctuate the original template histogram by the uncertainty on the bin content.
~BCMTFTemplate()
The default destructor.
double GetOriginalNorm()
Definition: BCMTFTemplate.h:81
void SetEfficiency(double eff)
Set the efficiency.
TH1D * GetHistogram()
Definition: BCMTFTemplate.h:71
double GetNorm()
Definition: BCMTFTemplate.h:76
std::vector< TF1 * > * GetFunctionContainer()
Definition: BCMTFTemplate.h:97
const std::string & GetProcessName()
Definition: BCMTFTemplate.h:61