// RooLinTransBinning is a special binning implementation for RooLinearVar
// that transforms the binning of the RooLinearVar input variable in the same
// way that RooLinearVar does
// END_HTML
#include "RooFit.h"
#include "RooLinTransBinning.h"
#include "RooLinTransBinning.h"
ClassImp(RooLinTransBinning)
;
RooLinTransBinning::RooLinTransBinning(const RooAbsBinning& input, Double_t slope, Double_t offset, const char* name) :
RooAbsBinning(name),
_array(0)
{
updateInput(input,slope,offset) ;
}
RooLinTransBinning::RooLinTransBinning(const RooLinTransBinning& other, const char* name) :
RooAbsBinning(name),
_array(0)
{
_input = other._input ;
_slope = other._slope ;
_offset = other._offset ;
}
RooLinTransBinning::~RooLinTransBinning()
{
if (_array) delete[] _array ;
}
void RooLinTransBinning::setRange(Double_t , Double_t )
{
}
Double_t* RooLinTransBinning::array() const
{
Int_t n = numBoundaries() ;
if (_array) delete[] _array ;
_array = new Double_t[n] ;
Double_t* inputArray = _input->array() ;
Int_t i ;
if (_slope>0) {
for (i=0 ; i<n ; i++) {
_array[i] = trans(inputArray[i]) ;
}
} else {
for (i=0 ; i<n ; i++) {
_array[i] = trans(inputArray[n-i-1]) ;
}
}
return _array ;
}
void RooLinTransBinning::updateInput(const RooAbsBinning& input, Double_t slope, Double_t offset)
{
_input = (RooAbsBinning*) &input ;
_slope = slope ;
_offset = offset ;
}
RooLinTransBinning.cxx:10 RooLinTransBinning.cxx:11 RooLinTransBinning.cxx:12 RooLinTransBinning.cxx:13 RooLinTransBinning.cxx:14 RooLinTransBinning.cxx:15 RooLinTransBinning.cxx:16 RooLinTransBinning.cxx:17 RooLinTransBinning.cxx:18 RooLinTransBinning.cxx:19 RooLinTransBinning.cxx:20 RooLinTransBinning.cxx:21 RooLinTransBinning.cxx:22 RooLinTransBinning.cxx:23 RooLinTransBinning.cxx:24 RooLinTransBinning.cxx:25 RooLinTransBinning.cxx:26 RooLinTransBinning.cxx:27 RooLinTransBinning.cxx:28 RooLinTransBinning.cxx:29 RooLinTransBinning.cxx:30 RooLinTransBinning.cxx:31 RooLinTransBinning.cxx:32 RooLinTransBinning.cxx:33 RooLinTransBinning.cxx:34 RooLinTransBinning.cxx:35 RooLinTransBinning.cxx:36 RooLinTransBinning.cxx:37 RooLinTransBinning.cxx:38 RooLinTransBinning.cxx:39 RooLinTransBinning.cxx:40 RooLinTransBinning.cxx:41 RooLinTransBinning.cxx:42 RooLinTransBinning.cxx:43 RooLinTransBinning.cxx:44 RooLinTransBinning.cxx:45 RooLinTransBinning.cxx:46 RooLinTransBinning.cxx:47 RooLinTransBinning.cxx:48 RooLinTransBinning.cxx:49 RooLinTransBinning.cxx:50 RooLinTransBinning.cxx:51 RooLinTransBinning.cxx:52 RooLinTransBinning.cxx:53 RooLinTransBinning.cxx:54 RooLinTransBinning.cxx:55 RooLinTransBinning.cxx:56 RooLinTransBinning.cxx:57 RooLinTransBinning.cxx:58 RooLinTransBinning.cxx:59 RooLinTransBinning.cxx:60 RooLinTransBinning.cxx:61 RooLinTransBinning.cxx:62 RooLinTransBinning.cxx:63 RooLinTransBinning.cxx:64 RooLinTransBinning.cxx:65 RooLinTransBinning.cxx:66 RooLinTransBinning.cxx:67 RooLinTransBinning.cxx:68 RooLinTransBinning.cxx:69 RooLinTransBinning.cxx:70 RooLinTransBinning.cxx:71 RooLinTransBinning.cxx:72 RooLinTransBinning.cxx:73 RooLinTransBinning.cxx:74 RooLinTransBinning.cxx:75 RooLinTransBinning.cxx:76 RooLinTransBinning.cxx:77 RooLinTransBinning.cxx:78 RooLinTransBinning.cxx:79 RooLinTransBinning.cxx:80 RooLinTransBinning.cxx:81 RooLinTransBinning.cxx:82 RooLinTransBinning.cxx:83 RooLinTransBinning.cxx:84 RooLinTransBinning.cxx:85 RooLinTransBinning.cxx:86 RooLinTransBinning.cxx:87 RooLinTransBinning.cxx:88 RooLinTransBinning.cxx:89 RooLinTransBinning.cxx:90 RooLinTransBinning.cxx:91 RooLinTransBinning.cxx:92 RooLinTransBinning.cxx:93 RooLinTransBinning.cxx:94 RooLinTransBinning.cxx:95 RooLinTransBinning.cxx:96 RooLinTransBinning.cxx:97 RooLinTransBinning.cxx:98 RooLinTransBinning.cxx:99 RooLinTransBinning.cxx:100 RooLinTransBinning.cxx:101 RooLinTransBinning.cxx:102 RooLinTransBinning.cxx:103 RooLinTransBinning.cxx:104 RooLinTransBinning.cxx:105 RooLinTransBinning.cxx:106 RooLinTransBinning.cxx:107 RooLinTransBinning.cxx:108 RooLinTransBinning.cxx:109 RooLinTransBinning.cxx:110 RooLinTransBinning.cxx:111 RooLinTransBinning.cxx:112 RooLinTransBinning.cxx:113 RooLinTransBinning.cxx:114 RooLinTransBinning.cxx:115 RooLinTransBinning.cxx:116 RooLinTransBinning.cxx:117 RooLinTransBinning.cxx:118 RooLinTransBinning.cxx:119