BayesianAnalysisToolkit
0.9.3
Main Page
Namespaces
Classes
Files
File List
File Members
BAT
BCH1D.h
Go to the documentation of this file.
1
#ifndef __BCH1D__H
2
#define __BCH1D__H
3
15
/*
16
* Copyright (C) 2007-2013, the BAT core developer team
17
* All rights reserved.
18
*
19
* For the licensing terms see doc/COPYING.
20
* For documentation see http://mpp.mpg.de/bat
21
*/
22
23
// ---------------------------------------------------------
24
25
#include <vector>
26
27
#include <TH1.h>
28
29
// ---------------------------------------------------------
30
31
class
BCH1D
32
{
33
public
:
34
40
BCH1D
(TH1D * hist = 0);
41
44
~BCH1D
();
45
53
TH1D*
GetHistogram
()
54
{
return
fHistogram
; };
55
58
double
GetMean
()
59
{
return
fHistogram
->
GetMean
(); };
60
63
double
GetMode
();
64
67
double
GetMedian
()
68
{
return
this
->
GetQuantile
(0.5); };
69
75
double
GetQuantile
(
double
probablity);
76
82
double
GetLimit
(
double
probability)
83
{
return
this->
GetQuantile
(probability); };
84
87
double
GetRMS
()
88
{
return
fHistogram
->GetRMS(); };
89
92
double
GetSTD
()
93
{
return
fHistogram
->GetRMS(); };
94
97
double
GetVariance
()
98
{
return
(
GetSTD
()*
GetSTD
()); };
99
102
double
GetSkew
()
103
{
return
fHistogram
->GetSkewness(); };
104
107
double
GetKurtosis
()
108
{
return
fHistogram
->GetKurtosis(); };
109
115
double
GetIntegral
(
double
valuemin,
double
valuemax);
116
122
double
GetPValue
(
double
probability);
123
128
int
GetColor
(
int
index)
129
{
return
fColors
.at(index); };
130
145
void
SetColorScheme
(
int
scheme);
146
149
void
SetHistogram
(TH1D * hist)
150
{
fHistogram
= hist; };
151
155
void
SetDefaultCLLimit
(
double
limit);
156
159
void
SetGlobalMode
(
double
mode)
160
{
fMode
=mode;
161
fModeFlag
=1; };
162
181
void
Print
(
const
char
* filename, std::string options=
"BTsiB3CS1D0Lmeanmode"
, std::vector<double> intervals=std::vector<double>(0),
int
ww=0,
int
wh=0);
182
192
void
Print
(
const
char
* filename, std::string options,
double
interval,
int
ww=0,
int
wh=0);
193
224
void
Draw
(std::string options=
"BTsiB3CS1D0Lmeanmode"
, std::vector<double> intervals=std::vector<double>(0));
225
231
void
Draw
(std::string options,
double
interval);
232
236
void
DrawDelta
(
double
value)
const
;
237
244
double
GetSmallestInterval
(
double
& min,
double
& max,
double
content=.68);
245
252
TH1D*
GetSmallestIntervalHistogram
(
double
level);
253
265
std::vector<double>
GetSmallestIntervals
(
double
content = 0.68);
266
272
double
IntegralWidth
(
double
min,
double
max);
273
283
TH1D*
GetSubHisto
(
double
min,
double
max,
const
char
* name);
284
287
private
:
288
291
TH1D*
fHistogram
;
292
295
double
fDefaultCLLimit
;
296
299
double
fMode
;
300
303
int
fModeFlag
;
304
307
std::vector<int>
fColors
;
308
311
mutable
std::vector<TObject*>
fROOTObjects
;
312
315
static
unsigned
int
getNextIndex
()
316
{
return
++
fHCounter
; }
317
320
static
unsigned
int
fHCounter
;
321
};
322
323
// ---------------------------------------------------------
324
325
#endif
Generated by
1.8.4