ROOT
tags/v6-34-10
Reference Guide
Loading...
Searching...
No Matches
FeldmanCousins.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_math
3
/// \notebook -nodraw
4
/// Example macro of using the TFeldmanCousins class in root.
5
///
6
/// get a FeldmanCousins calculation object with the default limits
7
/// of calculating a 90% CL with the minimum signal value scanned
8
/// = 0.0 and the maximum signal value scanned of 50.0
9
///
10
/// \macro_output
11
/// \macro_code
12
///
13
/// \author Adrian John Bevan <bevan@SLAC.Stanford.EDU>
14
15
void
FeldmanCousins()
16
{
17
TFeldmanCousins
f
;
18
19
// calculate either the upper or lower limit for 10 observed
20
// events with an estimated background of 3. The calculation of
21
// either upper or lower limit will return that limit and fill
22
// data members with both the upper and lower limit for you.
23
Double_t
Nobserved
= 10.0;
24
Double_t
Nbackground
= 3.0;
25
26
Double_t
ul
=
f
.CalculateUpperLimit(
Nobserved
,
Nbackground
);
27
Double_t
ll =
f
.GetLowerLimit();
28
29
cout <<
"For "
<<
Nobserved
<<
" data observed with and estimated background"
<<endl;
30
cout <<
"of "
<<
Nbackground
<<
" candidates, the Feldman-Cousins method of "
<<endl;
31
cout <<
"calculating confidence limits gives:"
<<endl;
32
cout <<
"\tUpper Limit = "
<<
ul
<< endl;
33
cout <<
"\tLower Limit = "
<< ll << endl;
34
cout <<
"at the 90% CL"
<< endl;
35
}
f
#define f(i)
Definition
RSha256.hxx:104
Double_t
double Double_t
Definition
RtypesCore.h:59
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TFeldmanCousins
<div class="legacybox"><h2>Legacy Code</h2> TFeldmanCousins is a legacy interface: there will be no b...
Definition
TFeldmanCousins.h:47
tutorials
math
FeldmanCousins.C
ROOT tags/v6-34-10 - Reference Guide Generated on Mon Jun 30 2025 10:56:37 (GVA Time) using Doxygen 1.10.0