• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

BCMTFChannel.h

Go to the documentation of this file.
00001 #ifndef __BCMTFCHANNEL__H
00002 #define __BCMTFCHANNEL__H
00003 
00014 /*
00015  * Copyright (C) 2008-2012, Daniel Kollar and Kevin Kroeninger.
00016  * All rights reserved.
00017  *
00018  * For the licensing terms see doc/COPYING.
00019  */
00020 
00021 // ---------------------------------------------------------
00022 
00023 #include <string>
00024 #include <vector>
00025 #include <TH1D.h>
00026 
00027 class BCMTFTemplate;
00028 class BCMTFSystematicVariation;
00029 class TH2D; 
00030 
00031 // ---------------------------------------------------------
00032 class BCMTFChannel
00033 {
00034 
00035    public:
00036 
00043       BCMTFChannel(const char * name);
00044 
00047       ~BCMTFChannel();
00048 
00055       std::string GetName()
00056          { return fName; };
00057 
00060       BCMTFTemplate * GetData()
00061          { return fData; };
00062 
00067       BCMTFTemplate * GetTemplate(int index)
00068          { return fTemplateContainer.at(index); };
00069 
00074       BCMTFSystematicVariation * GetSystematicVariation(int index)
00075          { return fSystematicVariationContainer.at(index); };
00076 
00079       bool GetFlagChannelActive()
00080          { return fFlagChannelActive; };
00081 
00086          TH2D* GetHistUncertaintyBandExpectation()
00087          { return fHistUncertaintyBandExpectation; }; 
00088 
00092          TH2D* GetHistUncertaintyBandPoisson()
00093          { return fHistUncertaintyBandPoisson; }; 
00094 
00097          double GetRangeYMin()
00098          { return fRangeYMin; }; 
00099 
00102          double GetRangeYMax()
00103          { return fRangeYMax; }; 
00104 
00112       void SetName(const char * name)
00113          { fName = name; };
00114 
00118       void SetData(BCMTFTemplate * bctemplate)
00119          { fData = bctemplate; };
00120 
00125          void SetHistUncertaintyBandExpectation(TH2D* hist) {
00126             fHistUncertaintyBandExpectation = hist; }
00127          
00131          void SetHistUncertaintyBandPoisson(TH2D* hist) {
00132             fHistUncertaintyBandPoisson = hist; }
00133          
00137       void SetFlagChannelActive(bool flag)
00138          { fFlagChannelActive = flag; };
00139 
00144          void SetRangeY(double min, double max) {
00145             fRangeYMin = min; fRangeYMax = max; };
00146 
00155       void AddTemplate(BCMTFTemplate * bctemplate)
00156          { fTemplateContainer.push_back(bctemplate); };
00157 
00161       void AddSystematicVariation(BCMTFSystematicVariation * variation)
00162          { fSystematicVariationContainer.push_back(variation); };
00163 
00166          void CalculateHistUncertaintyBandPoisson();
00167 
00175          TH1D* CalculateUncertaintyBandPoisson(double minimum, double maximumm, int color);
00176 
00185       void PrintTemplates(const char * filename);
00186 
00191       void PrintTemplate(int index, const char * filename);
00192 
00196          void PrintHistUncertaintyBandExpectation(const char* filename); 
00197 
00201          void PrintHistUncertaintyBandPoisson(const char* filename); 
00202 
00206          void PrintHistCumulativeUncertaintyBandPoisson(const char* filename); 
00207 
00210  private:
00211 
00214       std::string fName;
00215 
00218       BCMTFTemplate * fData;
00219 
00222          double fRangeYMin;
00223 
00226          double fRangeYMax;
00227 
00230       std::vector<BCMTFTemplate *> fTemplateContainer;
00231 
00234       std::vector<BCMTFSystematicVariation *> fSystematicVariationContainer;
00235 
00238       bool fFlagChannelActive;
00239 
00242          TH2D* fHistUncertaintyBandExpectation; 
00243 
00246          TH2D* fHistUncertaintyBandPoisson;
00247 
00248 };
00249 // ---------------------------------------------------------
00250 
00251 #endif
00252 

Generated by  doxygen 1.7.1