CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/HiggsAnalysis/CombinedLimit/interface/Combine.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_Combine_h
00002 #define HiggsAnalysis_CombinedLimit_Combine_h
00003 #include <TString.h>
00004 #include <boost/program_options.hpp>
00005 
00006 class TDirectory;
00007 class TTree;
00008 class LimitAlgo;
00009 class RooWorkspace;
00010 class RooAbsData;
00011 namespace RooStats { class ModelConfig; }
00012 
00013 extern Float_t t_cpu_, t_real_, g_quantileExpected_;
00014 //RooWorkspace *writeToysHere = 0;
00015 extern TDirectory *outputFile;
00016 extern TDirectory *writeToysHere;
00017 extern TDirectory *readToysFromHere;
00018 extern LimitAlgo * algo, * hintAlgo ;
00019 extern int verbose;
00020 extern bool withSystematics;
00021 extern bool doSignificance_, lowerLimit_;
00022 extern float cl;
00023 
00024 class Combine {
00025 public:
00026   Combine() ;
00027   
00028   boost::program_options::options_description & statOptions() { return statOptions_; }    
00029   boost::program_options::options_description & ioOptions() { return ioOptions_; }    
00030   boost::program_options::options_description & miscOptions() { return miscOptions_; }    
00031   void applyOptions(const boost::program_options::variables_map &vm) ;
00032   
00033   void run(TString hlfFile, const std::string &dataset, double &limit, double &limitErr, int &iToy, TTree *tree, int nToys);
00034  
00036   static void commitPoint(bool expected, float quantile);
00037 
00039   static void addBranch(const char *name, void *address, const char *leaflist) ;
00040 private:
00041   bool mklimit(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr) ;
00042   
00043   boost::program_options::options_description statOptions_, ioOptions_, miscOptions_;
00044  
00045   // statistics-related variables
00046   bool unbinned_, generateBinnedWorkaround_, newGen_, guessGenMode_; 
00047   float rMin_, rMax_;
00048   std::string prior_;
00049   bool hintUsesStatOnly_;
00050   bool toysNoSystematics_;
00051   bool toysFrequentist_;
00052   float expectSignal_;
00053 
00054   // input-output related variables
00055   bool saveWorkspace_;
00056   std::string workspaceName_;
00057   std::string modelConfigName_, modelConfigNameB_;
00058   bool validateModel_;
00059   bool saveToys_;
00060   float mass_;
00061 
00062   // implementation-related variables
00063   bool compiledExpr_;
00064   bool makeTempDir_;
00065   bool rebuildSimPdf_;
00066   bool optSimPdf_;
00067 
00068   static TTree *tree_;
00069 };
00070 
00071 #endif