Logo ROOT  
Reference Guide
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
18 
19 #include "RooAbsOptTestStatistic.h"
20 #include "RooCmdArg.h"
21 
23 public:
24 
25  // Constructors, assignment etc
27  // Default constructor
28  } ;
29 
30  RooDataWeightedAverage(const char *name, const char *title, RooAbsReal& real, RooAbsData& data, const RooArgSet& projDeps,
31  Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t showProgress=kFALSE, Bool_t verbose=kTRUE) ;
32 
33  RooDataWeightedAverage(const RooDataWeightedAverage& other, const char* name=0);
34  virtual TObject* clone(const char* newname) const { return new RooDataWeightedAverage(*this,newname); }
35 
36  virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& real, RooAbsData& adata,
37  const RooArgSet& projDeps, const char* /*rangeName*/=0, const char* /*addCoefRangeName*/=0,
38  Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t /*splitCutRange*/=kFALSE, Bool_t = kFALSE) {
39  // Virtual constructor
40  return new RooDataWeightedAverage(name,title,real,adata,projDeps,nCPU,interleave,verbose) ;
41  }
42 
43  virtual Double_t globalNormalization() const ;
44 
45  virtual ~RooDataWeightedAverage();
46 
47 
48 protected:
49 
50  Double_t _sumWeight ; // Global sum of weights needed for normalization
51  Bool_t _showProgress ; // Show progress indication during evaluation if true
52  virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const ;
53 
54  ClassDef(RooDataWeightedAverage,1) // Optimized calculator of data weighted average of a RooAbsReal
55 };
56 
57 #endif
RooDataWeightedAverage::~RooDataWeightedAverage
virtual ~RooDataWeightedAverage()
Destructor.
Definition: RooDataWeightedAverage.cxx:85
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooAbsData
Definition: RooAbsData.h:46
RooAbsOptTestStatistic::data
RooAbsData & data()
Definition: RooAbsOptTestStatistic.cxx:792
RooAbsOptTestStatistic.h
RooFit::MPSplit
MPSplit
Definition: RooGlobalFunc.h:70
RooAbsReal
Definition: RooAbsReal.h:61
RooDataWeightedAverage::create
virtual RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &real, RooAbsData &adata, const RooArgSet &projDeps, const char *=0, const char *=0, Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t=kFALSE, Bool_t=kFALSE)
Definition: RooDataWeightedAverage.h:50
bool
RooDataWeightedAverage
Definition: RooDataWeightedAverage.h:22
RooAbsTestStatistic
Definition: RooAbsTestStatistic.h:37
RooDataWeightedAverage::clone
virtual TObject * clone(const char *newname) const
Definition: RooDataWeightedAverage.h:48
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooDataWeightedAverage::_showProgress
Bool_t _showProgress
Definition: RooDataWeightedAverage.h:65
RooFit::BulkPartition
@ BulkPartition
Definition: RooGlobalFunc.h:70
RooDataWeightedAverage::evaluatePartition
virtual Double_t evaluatePartition(std::size_t firstEvent, std::size_t lastEvent, std::size_t stepSize) const
Calculate the data weighted average for events [firstEVent,lastEvent] with step size stepSize.
Definition: RooDataWeightedAverage.cxx:106
RooCmdArg.h
RooDataWeightedAverage::_sumWeight
Double_t _sumWeight
Definition: RooDataWeightedAverage.h:64
Double_t
double Double_t
Definition: RtypesCore.h:59
RooDataWeightedAverage::RooDataWeightedAverage
RooDataWeightedAverage()
Definition: RooDataWeightedAverage.h:40
RooDataWeightedAverage::globalNormalization
virtual Double_t globalNormalization() const
Return global normalization term by which raw (combined) test statistic should be defined to obtain f...
Definition: RooDataWeightedAverage.cxx:96
RooAbsOptTestStatistic
Definition: RooAbsOptTestStatistic.h:28
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooArgSet
Definition: RooArgSet.h:28
int