Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooDataWeightedAverage.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_DATA_WEIGHTED_AVERAGE
17#define ROO_DATA_WEIGHTED_AVERAGE
20#include "RooCmdArg.h"
21
23public:
25 // Constructors, assignment etc
26 RooDataWeightedAverage(const char *name, const char *title, RooAbsReal& real, RooAbsData& data, const RooArgSet& projDeps,
27 RooAbsTestStatistic::Configuration const& cfg, bool showProgress=false) ;
28
29 RooDataWeightedAverage(const RooDataWeightedAverage& other, const char* name=nullptr);
30 TObject* clone(const char* newname) const override { return new RooDataWeightedAverage(*this,newname); }
31
32 RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& real, RooAbsData& adata,
33 const RooArgSet& projDeps,
34 RooAbsTestStatistic::Configuration const& cfg) override {
35 // Virtual constructor
36 return new RooDataWeightedAverage(name,title,real,adata,projDeps,cfg) ;
37 }
38
39 double globalNormalization() const override ;
40
41 ~RooDataWeightedAverage() override;
42
43
44protected:
45
46 double _sumWeight ; ///< Global sum of weights needed for normalization
47 bool _showProgress ; ///< Show progress indication during evaluation if true
48 double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override ;
49
50 ClassDefOverride(RooDataWeightedAverage,0) // Optimized calculator of data weighted average of a RooAbsReal
51
52// Undocumented preprocessor define such that the implementation in
53// RooDataWeightedAverage.cxx can suppress the deprecation warning.
54#ifndef __ROOFIT_SUPPRESS_ROODATAWEIGHTEDAVERAGE_DEPRECATION_WARNING
55} R__DEPRECATED(6, 32, "RooDataWeightedAverage is an implementation detail of RooFit that will be removed from the public user interface.");
56#else
57};
58#endif
59
60#endif
#define R__DEPRECATED(MAJOR, MINOR, REASON)
Definition RConfig.hxx:504
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
Abstract base class for all test statistics.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Class RooDataWeightedAverage calculate a weighted average of a function or p.d.f given a dataset with...
double globalNormalization() const override
Return global normalization term by which raw (combined) test statistic should be defined to obtain f...
~RooDataWeightedAverage() override
Destructor.
bool _showProgress
Show progress indication during evaluation if true.
double evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const override
Calculate the data weighted average for events [firstEVent,lastEvent] with step size stepSize.
RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &real, RooAbsData &adata, const RooArgSet &projDeps, RooAbsTestStatistic::Configuration const &cfg) override
double _sumWeight
Global sum of weights needed for normalization.
TObject * clone(const char *newname) const override
Mother of all ROOT objects.
Definition TObject.h:41