CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/HiggsAnalysis/CombinedLimit/interface/CombDataSetFactory.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_CombDataSetFactory_h
00002 #define HiggsAnalysis_CombinedLimit_CombDataSetFactory_h
00003 
00004 #include <RooCategory.h>
00005 #include <RooArgSet.h>
00006 #include <RooDataHist.h>
00007 #include <RooDataSet.h>
00008 #include <RooRealVar.h>
00009 #include <map>
00010 #include <string>
00011 
00012 
00013 //_________________________________________________
00014 /*
00015 BEGIN_HTML
00016 CombDataSetFactory is helper class for creating combined datasets since PyROOT can't call some constructors of RooDataHist 
00017 END_HTML
00018 */
00019 //
00020 class CombDataSetFactory : public TObject {
00021 
00022    public:
00023       CombDataSetFactory() {}
00024       CombDataSetFactory(const RooArgSet &vars, RooCategory &cat) ;
00025       ~CombDataSetFactory() ;
00026 
00027       void addSetBin(const char *label, RooDataHist *set);
00028       void addSetAny(const char *label, RooDataSet  *set);
00029       void addSetAny(const char *label, RooDataHist *set);
00030 
00031       RooDataHist *done(const char *name, const char *title) ;
00032       RooDataSet *doneUnbinned(const char *name, const char *title) ;
00033 
00034       ClassDef(CombDataSetFactory,1) // Make RooDataHist
00035 
00036     private:
00037         RooArgSet vars_;
00038         RooCategory *cat_;
00039         RooRealVar  *weight_;
00040         std::map<std::string, RooDataHist *> map_;
00041         std::map<std::string, RooDataSet *> mapUB_;
00042 };
00043 
00044 #endif