CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/HiggsAnalysis/CombinedLimit/interface/MultiDimFit.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_MultiDimFit_h
00002 #define HiggsAnalysis_CombinedLimit_MultiDimFit_h
00003 
00011 #include "../interface/FitterAlgoBase.h"
00012 #include <RooRealVar.h>
00013 #include <vector>
00014 
00015 class MultiDimFit : public FitterAlgoBase {
00016 public:
00017   MultiDimFit() ;
00018   virtual const std::string & name() const {
00019     static const std::string name("MultiDimFit");
00020     return name;
00021   }
00022   virtual void applyOptions(const boost::program_options::variables_map &vm) ;
00023 
00024 protected:
00025   virtual bool runSpecific(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint);
00026 
00027   enum Algo { None, Singles, Cross, Grid, RandomPoints, Contour2D };
00028   static Algo algo_;
00029 
00030   static std::vector<std::string>  poi_;
00031   static std::vector<RooRealVar*>  poiVars_;
00032   static std::vector<float>        poiVals_;
00033   static RooArgList                poiList_; 
00034   static unsigned int              nOtherFloatingPoi_; // keep a count of other POIs that we're ignoring, for proper chisquare normalization
00035   static float                     deltaNLL_;
00036 
00037   // options    
00038   static unsigned int points_, firstPoint_, lastPoint_;
00039   static bool floatOtherPOIs_;
00040   static bool fastScan_;
00041 
00042   // initialize variables
00043   void initOnce(RooWorkspace *w, RooStats::ModelConfig *mc_s) ;
00044 
00045   // variables
00046   void doSingles(RooFitResult &res) ;
00047   void doGrid(RooAbsReal &nll) ;
00048   void doRandomPoints(RooAbsReal &nll) ;
00049   void doContour2D(RooAbsReal &nll) ;
00050 
00051   // utilities
00053   void doBox(RooAbsReal &nll, double cl, const char *name="box", bool commitPoints=true) ;
00054 };
00055 
00056 
00057 #endif