RooDataWeightedAverage.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooDataWeightedAverage.h 30378 2009-09-23 13:42:12Z wouter $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_DATA_WEIGHTED_AVERAGE
00017 #define ROO_DATA_WEIGHTED_AVERAGE
00018 
00019 #include "RooAbsOptTestStatistic.h"
00020 #include "RooCmdArg.h"
00021 
00022 class RooDataWeightedAverage : public RooAbsOptTestStatistic {
00023 public:
00024 
00025   // Constructors, assignment etc
00026   RooDataWeightedAverage() {
00027     // Default constructor
00028   } ;  
00029 
00030   RooDataWeightedAverage(const char *name, const char *title, RooAbsReal& real, RooAbsData& data, const RooArgSet& projDeps,
00031                          Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t showProgress=kFALSE, Bool_t verbose=kTRUE) ;
00032 
00033   RooDataWeightedAverage(const RooDataWeightedAverage& other, const char* name=0);
00034   virtual TObject* clone(const char* newname) const { return new RooDataWeightedAverage(*this,newname); }
00035 
00036   virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& real, RooAbsData& adata,
00037                                       const RooArgSet& projDeps, const char* /*rangeName*/=0, const char* /*addCoefRangeName*/=0, 
00038                                       Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bool_t /*splitCutRange*/=kFALSE) {
00039     // Virtual constructor
00040     return new RooDataWeightedAverage(name,title,real,adata,projDeps,nCPU,interleave,verbose) ;
00041   }
00042 
00043   virtual Double_t globalNormalization() const ;
00044 
00045   virtual ~RooDataWeightedAverage();
00046 
00047 
00048 protected:
00049 
00050   Double_t _sumWeight ;  // Global sum of weights needed for normalization
00051   Bool_t _showProgress ; // Show progress indication during evaluation if true
00052   virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const ;
00053   
00054   ClassDef(RooDataWeightedAverage,1) // Optimized calculator of data weighted average of a RooAbsReal
00055 };
00056 
00057 #endif

Generated on Tue Jul 5 14:26:09 2011 for ROOT_528-00b_version by  doxygen 1.5.1