ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
RooRangeBinning.cxx
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* @(#)root/roofitcore:$Id$
5
* Authors: *
6
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8
* *
9
* Copyright (c) 2000-2005, Regents of the University of California *
10
* and Stanford University. All rights reserved. *
11
* *
12
* Redistribution and use in source and binary forms, *
13
* with or without modification, are permitted according to the terms *
14
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15
*****************************************************************************/
16
17
/**
18
\file RooRangeBinning.cxx
19
\class RooRangeBinning
20
\ingroup Roofitcore
21
22
Binning/range definition that only defines a range
23
but no binning. It it used to store named ranges created by
24
the RooRealVar::setRange() method.
25
**/
26
27
#include "
RooNumber.h
"
28
#include "
RooMsgService.h
"
29
#include "
Riostream.h
"
30
31
#include "
RooRangeBinning.h
"
32
33
using
std::endl;
34
35
36
////////////////////////////////////////////////////////////////////////////////
37
/// Default constructor
38
39
RooRangeBinning::RooRangeBinning
(
const
char
*
name
) :
40
RooAbsBinning
(
name
)
41
{
42
_range
[0] = -
RooNumber::infinity
() ;
43
_range
[1] = +
RooNumber::infinity
() ;
44
45
}
46
47
48
////////////////////////////////////////////////////////////////////////////////
49
/// Construct binning with range [xmin,xmax] with no binning substructure
50
51
RooRangeBinning::RooRangeBinning
(
double
xmin
,
double
xmax
,
const
char
*
name
) :
52
RooAbsBinning
(
name
)
53
{
54
_range
[0] =
xmin
;
55
_range
[1] =
xmax
;
56
}
57
58
59
60
////////////////////////////////////////////////////////////////////////////////
61
/// Copy constructor
62
63
RooRangeBinning::RooRangeBinning
(
const
RooRangeBinning
& other,
const
char
*
name
) :
64
RooAbsBinning
(
name
)
65
{
66
_range
[0] = other.
_range
[0] ;
67
_range
[1] = other.
_range
[1] ;
68
}
69
70
////////////////////////////////////////////////////////////////////////////////
71
/// Change limits of the binning to [xlo,xhi]
72
73
void
RooRangeBinning::setRange
(
double
xlo,
double
xhi)
74
{
75
if
(xlo>xhi) {
76
oocoutE
(
nullptr
,InputArguments) <<
"RooRangeBinning::setRange: ERROR low bound > high bound"
<< std::endl ;
77
return
;
78
}
79
80
_range
[0] = xlo ;
81
_range
[1] = xhi ;
82
}
Riostream.h
RooMsgService.h
oocoutE
#define oocoutE(o, a)
Definition
RooMsgService.h:52
RooNumber.h
RooRangeBinning.h
return
return
Definition
TDirectory.cxx:1438
name
char name[80]
Definition
TGX11.cxx:148
xmin
float xmin
Definition
THbookFile.cxx:95
xmax
float xmax
Definition
THbookFile.cxx:95
RooAbsBinning::RooAbsBinning
RooAbsBinning(const char *name=nullptr)
Definition
RooAbsBinning.h:36
RooNumber::infinity
static constexpr double infinity()
Return internal infinity representation.
Definition
RooNumber.h:25
RooRangeBinning::_range
double _range[2]
Definition
RooRangeBinning.h:48
RooRangeBinning::RooRangeBinning
RooRangeBinning(const char *name=nullptr)
Default constructor.
Definition
RooRangeBinning.cxx:39
RooRangeBinning::setRange
void setRange(double xlo, double xhi) override
Change limits of the binning to [xlo,xhi].
Definition
RooRangeBinning.cxx:73
roofit
roofitcore
src
RooRangeBinning.cxx
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1