ROOT
6.10/09
Reference Guide
hist
hist
inc
TBinomialEfficiencyFitter.h
Go to the documentation of this file.
1
// @(#)root/hist:$Id$
2
// Author: Frank Filthaut, Rene Brun 30/05/2007
3
4
/*************************************************************************
5
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TBinomialEfficiencyFitter
13
#define ROOT_TBinomialEfficiencyFitter
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TBinomialEfficiencyFitter //
19
// //
20
// Binomial Fitter for the division of two histograms. //
21
// Use when you need to calculate a selection's efficiency from two //
22
// histograms, one containing all entries, and one containing the subset//
23
// of these entries that pass the selection //
24
// //
25
//////////////////////////////////////////////////////////////////////////
26
27
#include "
TObject.h
"
28
29
#include "
TFitResultPtr.h
"
30
31
32
33
class
TH1
;
34
class
TF1
;
35
36
namespace
ROOT
{
37
namespace
Fit
{
38
class
Fitter;
39
}
40
}
41
42
class
TBinomialEfficiencyFitter
:
public
TObject
{
43
44
protected
:
45
TH1
*
fDenominator
;
//Denominator histogram
46
TH1
*
fNumerator
;
//Numerator histogram
47
TF1
*
fFunction
;
//Function to fit
48
Double_t
fEpsilon
;
//Precision required for function integration (option "I")
49
Bool_t
fFitDone
;
//Set to kTRUE when the fit has been done
50
Bool_t
fAverage
;
//True if the fit function must be averaged over the bin
51
Bool_t
fRange
;
//True if the fit range must be taken from the function range
52
ROOT::Fit::Fitter
*
fFitter
;
//pointer to the real fitter
53
54
private
:
55
56
void
ComputeFCN(
Double_t
&
f
,
const
Double_t
*
par
);
57
58
public
:
59
TBinomialEfficiencyFitter
();
60
TBinomialEfficiencyFitter
(
const
TH1
*numerator,
const
TH1
*denominator);
61
virtual
~
TBinomialEfficiencyFitter
();
62
63
void
Set(
const
TH1
*numerator,
const
TH1
*denominator);
64
void
SetPrecision(
Double_t
epsilon
);
65
TFitResultPtr
Fit
(
TF1
*
f1
,
Option_t
* option =
""
);
66
ROOT::Fit::Fitter
* GetFitter();
67
Double_t
EvaluateFCN
(
const
Double_t
*
par
) {
68
Double_t
f
= 0;
69
ComputeFCN(f, par);
70
return
f
;
71
}
72
73
ClassDef
(
TBinomialEfficiencyFitter
, 1)
//Binomial Fitter for the division of two histograms
74
75
76
};
77
78
79
#endif
TBinomialEfficiencyFitter::EvaluateFCN
Double_t EvaluateFCN(const Double_t *par)
Definition:
TBinomialEfficiencyFitter.h:67
TBinomialEfficiencyFitter::fFitDone
Bool_t fFitDone
Definition:
TBinomialEfficiencyFitter.h:49
par
double par[1]
Definition:
unuranDistr.cxx:38
ROOT
Namespace for new ROOT classes and functions.
Definition:
StringConv.hxx:21
Option_t
const char Option_t
Definition:
RtypesCore.h:62
TBinomialEfficiencyFitter
Binomial fitter for the division of two histograms.
Definition:
TBinomialEfficiencyFitter.h:42
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TFitResultPtr.h
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:297
TBinomialEfficiencyFitter::fEpsilon
Double_t fEpsilon
Definition:
TBinomialEfficiencyFitter.h:48
TBinomialEfficiencyFitter::fFitter
ROOT::Fit::Fitter * fFitter
Definition:
TBinomialEfficiencyFitter.h:52
ROOT::Fit::Fitter
Fitter class, entry point for performing all type of fits.
Definition:
Fitter.h:77
TFitResultPtr
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition:
TFitResultPtr.h:31
epsilon
REAL epsilon
Definition:
triangle.c:617
TBinomialEfficiencyFitter::fRange
Bool_t fRange
Definition:
TBinomialEfficiencyFitter.h:51
f
double f(double x)
Definition:
testIntegration.cxx:12
Double_t
double Double_t
Definition:
RtypesCore.h:55
TBinomialEfficiencyFitter::fAverage
Bool_t fAverage
Definition:
TBinomialEfficiencyFitter.h:50
HFit::Fit
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition:
HFitImpl.cxx:134
TH1
The TH1 histogram class.
Definition:
TH1.h:56
TBinomialEfficiencyFitter::fNumerator
TH1 * fNumerator
Definition:
TBinomialEfficiencyFitter.h:46
TObject
Mother of all ROOT objects.
Definition:
TObject.h:37
TBinomialEfficiencyFitter::fFunction
TF1 * fFunction
Definition:
TBinomialEfficiencyFitter.h:47
TObject.h
TF1
1-Dim function class
Definition:
TF1.h:150
f1
TF1 * f1
Definition:
legend1.C:11
TBinomialEfficiencyFitter::fDenominator
TH1 * fDenominator
Definition:
TBinomialEfficiencyFitter.h:45