Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:44

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer
0003 /*************************************************************************
0004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOSTATS_BernsteinCorrection
0012 #define ROOSTATS_BernsteinCorrection
0013 
0014 
0015 #include "Rtypes.h"
0016 
0017 #include "TH1F.h"
0018 #include "RooWorkspace.h"
0019 
0020 namespace RooStats {
0021 
0022    class BernsteinCorrection {
0023 
0024    public:
0025       BernsteinCorrection(double tolerance = 0.05);
0026       virtual ~BernsteinCorrection() {}
0027 
0028       Int_t ImportCorrectedPdf(RooWorkspace*, const char*,const char*,const char*);
0029       void SetMaxCorrection(double maxCorr){fMaxCorrection = maxCorr;}
0030       void SetMaxDegree(Int_t maxDegree){fMaxDegree = maxDegree;}
0031       void CreateQSamplingDist(RooWorkspace* wks,
0032                                const char* nominalName,
0033                                const char* varName,
0034                                const char* dataName,
0035                                TH1F*, TH1F*,
0036                                Int_t degree,
0037                                Int_t nToys=500);
0038 
0039    private:
0040 
0041       Int_t    fMaxDegree;     ///< maximum polynomial degree correction (default is 10)
0042       double fMaxCorrection; ///< maximum correction factor at any point (default is 100)
0043       double fTolerance;     ///< probability to add an unnecessary term
0044 
0045 
0046    protected:
0047       ClassDef(BernsteinCorrection,2) // A utility to add polynomial correction terms to a model to improve the description of data.
0048    };
0049 }
0050 
0051 
0052 #endif