CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/HiggsAnalysis/CombinedLimit/interface/DebugProposal.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_DebugProposal_h
00002 #define HiggsAnalysis_CombinedLimit_DebugProposal_h
00003 
00004 #include <memory>
00005 #include <Rtypes.h>
00006 
00007 class RooAbsData;
00008 #include <RooArgSet.h>
00009 #include <RooAbsReal.h>
00010 #include <RooAbsPdf.h>
00011 
00012 #include <RooStats/ProposalFunction.h>
00013 
00014 class DebugProposal : public RooStats::ProposalFunction {
00015 
00016    public:
00017       DebugProposal() : RooStats::ProposalFunction(), prop_(0), nll_(0), params_(), tries_(0)  {}
00018       DebugProposal(RooStats::ProposalFunction *p, RooAbsPdf *pdf, RooAbsData *data, int tries) ;
00019 
00020       // Populate xPrime with a new proposed point
00021       virtual void Propose(RooArgSet& xPrime, RooArgSet& x);
00022 
00023       // Determine whether or not the proposal density is symmetric for
00024       // points x1 and x2 - that is, whether the probabilty of reaching x2
00025       // from x1 is equal to the probability of reaching x1 from x2
00026       virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2) ;
00027 
00028       // Return the probability of proposing the point x1 given the starting
00029       // point x2
00030       virtual Double_t GetProposalDensity(RooArgSet& x1, RooArgSet& x2);
00031 
00032       virtual ~DebugProposal() {}
00033 
00034       ClassDef(DebugProposal,1) // A concrete implementation of ProposalFunction, that uniformly samples the parameter space.
00035 
00036     private:
00037         RooStats::ProposalFunction *prop_;
00038         std::auto_ptr<RooAbsReal> nll_;
00039         RooAbsPdf                 *pdf_;
00040         RooArgSet                 params_;
00041         int  tries_;
00042         void tracePdf(RooAbsReal *pdf) ;
00043 };
00044 
00045 #endif