40static const char*
NLL_NAME =
"nll_MarkovChain_local_";
113 for(
int i=0; i < otherChain.
Size(); i++ ) {
116 if( counter > burnIn ) {
128 double counter = 0.0;
129 for(
int i=0; i < otherChain.
Size(); i++ ) {
131 counter += otherChain.
Weight();
132 if( counter > discardEntries ) {
150 if (whichVars ==
nullptr) {
155 args.
add(*whichVars);
158 return RooFit::Detail::owningPtr<RooDataSet>(std::unique_ptr<RooAbsData>{
fChain->
reduce(args)});
166 return RooFit::Detail::owningPtr<RooDataSet>(
167 std::unique_ptr<RooAbsData>{
fChain->
reduce(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)});
173 if (whichVars ==
nullptr) {
178 args.
add(*whichVars);
190 std::unique_ptr<RooAbsData>
data{
fChain->
reduce(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)};
197 if (whichVars ==
nullptr)
200 axes.
add(*whichVars);
203 std::vector<double> min(dim);
204 std::vector<double> max(dim);
205 std::vector<Int_t> bins(dim);
206 std::vector<const char *> names(dim);
208 for (
auto const *var : static_range_cast<RooRealVar *>(axes)) {
209 names[i] = var->GetName();
210 min[i] = var->getMin();
211 max[i] = var->getMax();
212 bins[i] = var->numBins();
217 dim, &bins[0], &min[0], &max[0]);
227 std::vector<double>
x(dim);
228 for ( i = 0; i <
size; i++) {
231 for (
Int_t ii = 0; ii < dim; ii++) {
static const char * DATASET_NAME
static const char * NLL_NAME
static const char * DEFAULT_TITLE
static const char * WEIGHT_NAME
static const char * DEFAULT_NAME
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
THnSparseT< TArrayF > THnSparseF
Abstract container object that can hold multiple RooAbsArg objects.
double getRealValue(const char *name, double defVal=0.0, bool verbose=false) const
Get value of a RooAbsReal stored in set with given name.
Int_t getSize() const
Return the number of elements in the collection.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
virtual RooAbsArg * addClone(const RooAbsArg &var, bool silent=false)
Add a clone of the specified argument to list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooFit::OwningPtr< RooAbsData > reduce(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Create a reduced copy of this dataset.
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Named container for two doubles, two integers two object points and three string pointers that can be...
RooDataSet is a container class to hold unbinned data.
const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
RooFit::OwningPtr< RooDataHist > binnedClone(const char *newName=nullptr, const char *newTitle=nullptr) const
Return binned clone of this dataset.
virtual void addFast(const RooArgSet &row, double weight=1.0, double weightError=0.0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
void add(const RooArgSet &row, double weight, double weightError)
Add one ore more rows of data.
double weight() const override
Return event weight of current event.
RooRealVar represents a variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
Stores the steps in a Markov Chain of points.
virtual void AddFast(RooArgSet &entry, double nllValue, double weight=1.0)
add an entry to the chain ONLY IF you have constructed with parameters or called SetParameters
virtual double NLL() const
get the NLL value of the current (last indexed) entry
virtual void AddWithBurnIn(MarkovChain &otherChain, Int_t burnIn=0)
add another markov chain
virtual RooFit::OwningPtr< RooDataHist > GetAsDataHist(RooArgSet *whichVars=nullptr) const
get this MarkovChain as a RooDataHist whose entries contain the values of whichVars.
virtual void Add(RooArgSet &entry, double nllValue, double weight=1.0)
safely add an entry to the chain
virtual double NLL(Int_t i) const
get the NLL value of entry at position i
virtual RooFit::OwningPtr< RooDataSet > GetAsDataSet(RooArgSet *whichVars=nullptr) const
get this MarkovChain as a RooDataSet whose entries contain the values of whichVars.
virtual THnSparse * GetAsSparseHist(RooAbsCollection *whichVars=nullptr) const
Get a clone of the markov chain on which this interval is based as a sparse histogram.
virtual void SetParameters(RooArgSet ¶meters)
set which of your parameters this chain should store
virtual const RooArgSet * Get(Int_t i) const
get the entry at position i
virtual double Weight() const
get the weight of the current (last indexed) entry
virtual Int_t Size() const
get the number of steps in the chain
Long64_t Fill(const Double_t *x, Double_t w=1.)
Templated implementation of the abstract base THnSparse.
Efficient multidimensional histogram.
void Sumw2() override
Enable calculation of errors.
The TNamed class is the base class for all named ROOT classes.
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
OwningPtr< T > owningPtr(std::unique_ptr< T > &&ptr)
Internal helper to turn a std::unique_ptr<T> into an OwningPtr.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
Namespace for the RooStats classes.
void SetParameters(const RooArgSet *desiredVals, RooArgSet *paramsToChange)