#ifndef ROOSTATS_SamplingDistribution
#define ROOSTATS_SamplingDistribution
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#include "Rtypes.h"
#include "RooDataSet.h"
#include <vector>
namespace RooStats {
class SamplingDistribution : public TNamed {
public:
SamplingDistribution(const char *name,const char *title, std::vector<Double_t>& samplingDist, const char * varName = 0);
SamplingDistribution(const char *name,const char *title,
std::vector<Double_t>& samplingDist, std::vector<Double_t>& sampleWeights, const char * varName = 0);
SamplingDistribution(const char *name,const char *title, const char * varName = 0);
SamplingDistribution(const char *name,const char *title, RooDataSet& dataSet, const char * columnName = 0, const char * varName = 0);
SamplingDistribution();
virtual ~SamplingDistribution();
Double_t InverseCDF(Double_t pvalue);
Double_t InverseCDFInterpolate(Double_t pvalue);
Double_t InverseCDF(Double_t pvalue, Double_t sigmaVariaton, Double_t& inverseVariation);
void Add(const SamplingDistribution* other);
Int_t GetSize() const{return fSamplingDist.size();}
const std::vector<Double_t> & GetSamplingDistribution() const {return fSamplingDist;}
const std::vector<Double_t> & GetSampleWeights() const {return fSampleWeights;}
const TString GetVarName() const {return fVarName;}
Double_t Integral(Double_t low, Double_t high, Bool_t normalize = kTRUE, Bool_t lowClosed = kTRUE, Bool_t highClosed = kFALSE) const;
Double_t IntegralAndError(Double_t & error, Double_t low, Double_t high, Bool_t normalize = kTRUE,
Bool_t lowClosed = kTRUE, Bool_t highClosed = kFALSE) const;
Double_t CDF(Double_t x) const;
private:
mutable std::vector<Double_t> fSamplingDist;
mutable std::vector<Double_t> fSampleWeights;
TString fVarName;
mutable std::vector<Double_t> fSumW;
mutable std::vector<Double_t> fSumW2;
protected:
void SortValues() const;
ClassDef(SamplingDistribution,2)
};
}
#endif
SamplingDistribution.h:10 SamplingDistribution.h:11 SamplingDistribution.h:12 SamplingDistribution.h:13 SamplingDistribution.h:14 SamplingDistribution.h:15 SamplingDistribution.h:16 SamplingDistribution.h:17 SamplingDistribution.h:18 SamplingDistribution.h:19 SamplingDistribution.h:20 SamplingDistribution.h:21 SamplingDistribution.h:22 SamplingDistribution.h:23 SamplingDistribution.h:24 SamplingDistribution.h:25 SamplingDistribution.h:26 SamplingDistribution.h:27 SamplingDistribution.h:28 SamplingDistribution.h:29 SamplingDistribution.h:30 SamplingDistribution.h:31 SamplingDistribution.h:32 SamplingDistribution.h:33 SamplingDistribution.h:34 SamplingDistribution.h:35 SamplingDistribution.h:36 SamplingDistribution.h:37 SamplingDistribution.h:38 SamplingDistribution.h:39 SamplingDistribution.h:40 SamplingDistribution.h:41 SamplingDistribution.h:42 SamplingDistribution.h:43 SamplingDistribution.h:44 SamplingDistribution.h:45 SamplingDistribution.h:46 SamplingDistribution.h:47 SamplingDistribution.h:48 SamplingDistribution.h:49 SamplingDistribution.h:50 SamplingDistribution.h:51 SamplingDistribution.h:52 SamplingDistribution.h:53 SamplingDistribution.h:54 SamplingDistribution.h:55 SamplingDistribution.h:56 SamplingDistribution.h:57 SamplingDistribution.h:58 SamplingDistribution.h:59 SamplingDistribution.h:60 SamplingDistribution.h:61 SamplingDistribution.h:62 SamplingDistribution.h:63 SamplingDistribution.h:64 SamplingDistribution.h:65 SamplingDistribution.h:66 SamplingDistribution.h:67 SamplingDistribution.h:68 SamplingDistribution.h:69 SamplingDistribution.h:70 SamplingDistribution.h:71 SamplingDistribution.h:72 SamplingDistribution.h:73 SamplingDistribution.h:74 SamplingDistribution.h:75 SamplingDistribution.h:76 SamplingDistribution.h:77 SamplingDistribution.h:78 SamplingDistribution.h:79 SamplingDistribution.h:80 SamplingDistribution.h:81 SamplingDistribution.h:82 SamplingDistribution.h:83 SamplingDistribution.h:84 SamplingDistribution.h:85 SamplingDistribution.h:86 SamplingDistribution.h:87 SamplingDistribution.h:88 SamplingDistribution.h:89 SamplingDistribution.h:90 SamplingDistribution.h:91 SamplingDistribution.h:92 SamplingDistribution.h:93 SamplingDistribution.h:94 SamplingDistribution.h:95 SamplingDistribution.h:96 SamplingDistribution.h:97 SamplingDistribution.h:98 SamplingDistribution.h:99 SamplingDistribution.h:100 SamplingDistribution.h:101 SamplingDistribution.h:102 SamplingDistribution.h:103 SamplingDistribution.h:104 SamplingDistribution.h:105