24 class RooGrid :
public TObject,
public RooPrintable {
27 RooGrid(
const RooAbsFunc &
function);
31 virtual void printName(std::ostream& os)
const ;
32 virtual void printTitle(std::ostream& os)
const ;
33 virtual void printClassName(std::ostream& os)
const ;
34 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent=
"")
const;
36 inline virtual void Print(Option_t *options= 0)
const {
37 printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
40 inline Bool_t isValid()
const {
return _valid; }
41 inline UInt_t getDimension()
const {
return _dim; }
42 inline Double_t getVolume()
const {
return _vol; }
43 inline UInt_t getNBins()
const {
return _bins; }
44 inline UInt_t getNBoxes()
const {
return _boxes; }
45 inline void setNBoxes(UInt_t boxes) { _boxes= boxes; }
47 inline Double_t *createPoint()
const {
return _valid ?
new Double_t[_dim] : 0; }
48 inline UInt_t *createIndexVector()
const {
return _valid ?
new UInt_t[_dim] : 0; }
50 Bool_t initialize(
const RooAbsFunc &
function);
51 void resize(UInt_t bins);
53 void generatePoint(
const UInt_t box[], Double_t x[], UInt_t bin[],
54 Double_t &vol, Bool_t useQuasiRandom= kTRUE)
const;
55 void accumulate(
const UInt_t bin[], Double_t amount);
56 void refine(Double_t alpha= 1.5);
58 void firstBox(UInt_t box[])
const;
59 Bool_t nextBox(UInt_t box[])
const;
61 enum { maxBins = 50 };
65 inline Double_t coord(Int_t i, Int_t j)
const {
return _xi[i*_dim + j]; }
66 inline Double_t value(Int_t i,Int_t j)
const {
return _d[i*_dim + j]; }
68 inline Double_t& coord(Int_t i, Int_t j) {
return _xi[i*_dim + j]; }
69 inline Double_t& value(Int_t i,Int_t j) {
return _d[i*_dim + j]; }
70 inline Double_t& newCoord(Int_t i) {
return _xin[i]; }
75 UInt_t _dim,_bins,_boxes;