/usr/include/root/RooStats/SamplingDistribution.h is in libroot-roofit-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | // @(#)root/roostats:$Id$
/*************************************************************************
* Project: RooStats *
* Package: RooFit/RooStats *
* Authors: *
* Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#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:
// Constructor for SamplingDistribution
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);
// Default constructor for SamplingDistribution
SamplingDistribution();
// Destructor of SamplingDistribution
virtual ~SamplingDistribution();
// get the inverse of the Cumulative distribution function
Double_t InverseCDF(Double_t pvalue);
// get the inverse of the Cumulative distribution function
Double_t InverseCDFInterpolate(Double_t pvalue);
// get the inverse of the Cumulative distribution function
// together with the inverse based on sampling variation
Double_t InverseCDF(Double_t pvalue, Double_t sigmaVariaton, Double_t& inverseVariation);
// merge two sampling distributions
void Add(const SamplingDistribution* other);
// size of samples
Int_t GetSize() const{return fSamplingDist.size();}
// Get test statistics values
const std::vector<Double_t> & GetSamplingDistribution() const {return fSamplingDist;}
// Get the sampling weights
const std::vector<Double_t> & GetSampleWeights() const {return fSampleWeights;}
const TString GetVarName() const {return fVarName;}
// numerical integral in these limits
Double_t Integral(Double_t low, Double_t high, Bool_t normalize = kTRUE, Bool_t lowClosed = kTRUE, Bool_t highClosed = kFALSE) const;
// numerical integral in these limits including error estimation
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;
// calculate CDF as a special case of Integral(...) with lower limit equal to -inf
Double_t CDF(Double_t x) const;
private:
mutable std::vector<Double_t> fSamplingDist; // vector of points for the sampling distribution
mutable std::vector<Double_t> fSampleWeights; // vector of weights for the samples
// store a RooRealVar that this distribution corresponds to?
TString fVarName;
mutable std::vector<Double_t> fSumW; //! Chached vector with sum of the weight used to compute integral
mutable std::vector<Double_t> fSumW2; //! Chached vector with sum of the weight used to compute integral error
protected:
// internal function to sort values
void SortValues() const;
ClassDef(SamplingDistribution,2) // Class containing the results of the HybridCalculator
};
}
#endif
|