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

BCMTFAnalysisFacility.h

Go to the documentation of this file.
00001 #ifndef __BCMTFANALYSISFACILITY__H
00002 #define __BCMTFANALYSISFACILITY__H
00003 
00018 /*
00019  * Copyright (C) 2008-2012, Daniel Kollar and Kevin Kroeninger.
00020  * All rights reserved.
00021  *
00022  * For the licensing terms see doc/COPYING.
00023  */
00024 
00025 // ---------------------------------------------------------
00026 #include <string>
00027 #include <vector>
00028 
00029 #include <TH1D.h>
00030 
00031 #include "../../BAT/BCLog.h"
00032 
00033 class BCMTF;
00034 class TTree;
00035 class TRandom3;
00036 
00037 // ---------------------------------------------------------
00038 class BCMTFAnalysisFacility
00039 {
00040 
00041    public:
00042 
00043       // Constructors and destructor
00044       BCMTFAnalysisFacility(BCMTF * mtf);
00045       ~BCMTFAnalysisFacility();
00046 
00047       // setters
00048 
00049       // set BCMTF
00050       void SetBCMTF(BCMTF * mtf)
00051          { fMTF = mtf; };
00052 
00053       // set flag for using MCMC (true) or not (false)
00054       void SetFlagMCMC(bool flag)
00055          { fFlagMCMC = flag; };
00056 
00057       // getters
00058 
00059       // return BCMTF
00060       BCMTF * GetBCMTF()
00061          { return fMTF; };
00062 
00063       // misc
00064 
00065       // get the log level for the ensemble test
00066       BCLog::LogLevel GetLogLevel()
00067          { return fLogLevel; };
00068 
00069       // set the log level for the ensemble test
00070       void SetLogLevel(BCLog::LogLevel level)
00071          { fLogLevel=level; };
00072 
00073       // perform the full set of single channel analyses and the
00074       // combination
00075       int PerformSingleChannelAnalyses(const char * dirname, const char * options = "");
00076 
00077       // perform the analysis using one systematic at a time, without
00078       // systematic and with all systematics
00079       // flag_nuisance: use nuisance parameters (true) or delta method (false)
00080       int PerformSingleSystematicAnalyses(const char * dirname, const char * options = "");
00081 
00082       // perform calibration curve
00083       int PerformCalibrationAnalysis(const char * dirname, const std::vector<double> & default_parameters, int index, const std::vector<double> & parametervalues, int nensembles = 1000);
00084 
00085       // perform full ensemble test
00086 //      int PerformEnsembleTest(const std::vector<double> & parameters);
00087 
00088       // build a single ensemble based on a single set of parameters
00089       std::vector<TH1D> BuildEnsemble(const std::vector<double> & parameters);
00090 
00091       // build ensembles based on a single set of parameters
00092       TTree * BuildEnsembles(const std::vector<double> & parameters, int nensembles);
00093 
00094       // build ensembles based on a varying sets of parameters, e.g., using the prior or posterior
00095       TTree * BuildEnsembles(TTree * tree, int nensembles);
00096 
00097       // perform ensemble test based on one set of parameters
00098       TTree * PerformEnsembleTest(const std::vector<double> & parameters, int nensembles);
00099 
00100       // perform ensemble test based on varying sets of parameters
00101       TTree * PerformEnsembleTest(TTree * tree, int nensembles, int start = 0);
00102 
00103       // transform a matrix to a set of histograms
00104       std::vector<TH1D> MatrixToHistograms(const std::vector< std::vector<double> > & matrix);
00105 
00106  private:
00107 
00108       // the multi template fitter
00109       BCMTF * fMTF;
00110 
00111       // a random number generator
00112       TRandom3 * fRandom;
00113 
00114       // flag: use MCMC for analysis
00115       bool fFlagMCMC;
00116 
00117       // log level for the ensemble tests
00118       BCLog::LogLevel fLogLevel;
00119 
00120 };
00121 // ---------------------------------------------------------
00122 
00123 #endif
00124 

Generated by  doxygen 1.7.1