Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
BernsteinCorrection.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOSTATS_BernsteinCorrection
12 #define ROOSTATS_BernsteinCorrection
13 
14 
15 #include "Rtypes.h"
16 
17 #include "TH1F.h"
18 #include "RooWorkspace.h"
19 
20 namespace RooStats {
21 
22  class BernsteinCorrection {
23 
24  public:
25  BernsteinCorrection(double tolerance = 0.05);
26  virtual ~BernsteinCorrection() {}
27 
28  Int_t ImportCorrectedPdf(RooWorkspace*, const char*,const char*,const char*);
29  void SetMaxCorrection(Double_t maxCorr){fMaxCorrection = maxCorr;}
30  void SetMaxDegree(Int_t maxDegree){fMaxDegree = maxDegree;}
31  void CreateQSamplingDist(RooWorkspace* wks,
32  const char* nominalName,
33  const char* varName,
34  const char* dataName,
35  TH1F*, TH1F*,
36  Int_t degree,
37  Int_t nToys=500);
38 
39  private:
40 
41  Int_t fMaxDegree; // maximum polynomial degree correction (default is 10)
42  Double_t fMaxCorrection; // maximum correction factor at any point (default is 100)
43  Double_t fTolerance; // probability to add an unnecessary term
44 
45 
46  protected:
47  ClassDef(BernsteinCorrection,2) // A utility to add polynomial correction terms to a model to improve the description of data.
48  };
49 }
50 
51 
52 #endif