 ROOT   Reference Guide Go to the documentation of this file.
1/**********************************************************************************
2 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
3 * Package: TMVA *
4 * Class : Interval *
5 * Web : http://tmva.sourceforge.net *
6 * *
7 * Description: *
8 * Extension of the Interval to "logarithmic" intervals *
9 * *
10 * *
11 * *
12 * Authors (alphabetical): *
13 * Helge Voss <helge.voss@cern.ch> - MPI-K Heidelberg, Germany *
14 * *
15 * Copyright (c) 2005: *
16 * CERN, Switzerland *
17 * MPI-K Heidelberg, Germany *
18 * *
19 * Redistribution and use in source and binary forms, with or without *
20 * modification, are permitted according to the terms listed in LICENSE *
22 **********************************************************************************/
23
26
27//////////////////////////////////////////////////////////////////////////////
28// //
29// Interval with non-equi distant bins //
30// that are equi-distant in a logarithmic scale) //
31// //
32// Interval definition, continuous and discrete //
33// //
34// Note: **bin** counting starts from ZERO unlike in ROOT histograms //
35// //
36// ---------------- //
38// i=0 --> 1 note: StepSize(ibin=0) = not defined !! //
39// i=1 --> 10 StepSize(ibin=1) = 9 //
40// i=2 --> 100 StepSize(ibin=2) = 99 //
41// i=3 --> 1000 StepSize(ibin=3) = 999 //
42// i=4 --> 10000 StepSize(ibin=4) = 9999 //
43// //
45// i=0 --> 1 //
46// i=1 --> 1.99526 //
47// i=2 --> 3.98107 //
48// i=3 --> 7.94328 //
49// i=4 --> 15.8489 //
50// i=5 --> 31.6228 //
51// i=6 --> 63.0957 //
52// i=7 --> 125.893 //
53// i=8 --> 251.189 //
54// i=9 --> 501.187 //
55// i=10 --> 1000 //
56// //
58// i=0 --> 1 //
59// i=1 --> 2 //
60// i=2 --> 4 //
61// i=3 --> 8 //
62// i=4 --> 16 //
63// i=5 --> 32 //
64// i=6 --> 64 //
65// i=7 --> 128 //
66// i=8 --> 256 //
67// i=9 --> 512 //
68// i=10 --> 1024 //
69// //
70//////////////////////////////////////////////////////////////////////////////
71#include "Rtypes.h"
72
73#include "Interval.h"
74
75
76
77class TRandom3;
78
79namespace TMVA {
80
81 class MsgLogger;
82
83 class LogInterval : public Interval {
84
85 public:
86
87 LogInterval( Double_t min, Double_t max, Int_t nbins = 0 );
90
91 // accessors
92 virtual Double_t GetMin() const { return fMin; }
93 virtual Double_t GetMax() const { return fMax; }
94 virtual Double_t GetWidth() const;
95 virtual Int_t GetNbins() const { return fNbins; }
96 virtual Double_t GetMean() const;
97 virtual Double_t GetRndm( TRandom3& ) const;
98 virtual Double_t GetElement( Int_t position ) const;
99 virtual Double_t GetStepSize(Int_t iBin=0) const;
100
101 void SetMax( Double_t m ) { fMax = m; }
102 void SetMin( Double_t m ) { fMin = m; }
103
104 MsgLogger& Log() const;
105
106 ClassDef(Interval,0); // Interval definition, continous and discrete
107 };
108
109} // namespace TMVA
110
111#endif
int Int_t
Definition: RtypesCore.h:41
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:326
The TMVA::Interval Class.
Definition: Interval.h:61
Double_t fMin
Definition: Interval.h:87
Int_t fNbins
Definition: Interval.h:88
Double_t fMax
Definition: Interval.h:87
The TMVA::Interval Class.
virtual Double_t GetMean() const
virtual Int_t GetNbins() const
MsgLogger & Log() const
virtual Double_t GetStepSize(Int_t iBin=0) const
returns the step size between the numbers of a "discrete LogInterval"
virtual Double_t GetMax() const
virtual Double_t GetRndm(TRandom3 &) const
get uniformly distributed number within interval
LogInterval(Double_t min, Double_t max, Int_t nbins=0)
virtual Double_t GetWidth() const
void SetMin(Double_t m)
virtual Double_t GetMin() const