31 Bool_t useInterpolation, Bool_t fluctuateBins,
32 Double_t avEff, Double_t avEffError, Bool_t useUpperHalfOnly, Bool_t squareDP) :
34 hist_(hist ? dynamic_cast<TH2*>(hist->Clone()) : 0),
35 minX_(0.0), maxX_(0.0),
36 minY_(0.0), maxY_(0.0),
37 rangeX_(0.0), rangeY_(0.0),
38 binXWidth_(0.0), binYWidth_(0.0),
39 nBinsX_(0), nBinsY_(0),
40 useInterpolation_(useInterpolation)
43 std::cerr <<
"ERROR in Lau2DHistDP constructor : the histogram pointer is null." << std::endl;
44 gSystem->Exit(EXIT_FAILURE);
49 TAxis* xAxis = hist_->GetXaxis();
50 minX_ =
static_cast<Double_t
>(xAxis->GetXmin());
51 maxX_ =
static_cast<Double_t
>(xAxis->GetXmax());
52 rangeX_ = maxX_ - minX_;
54 TAxis* yAxis = hist_->GetYaxis();
55 minY_ =
static_cast<Double_t
>(yAxis->GetXmin());
56 maxY_ =
static_cast<Double_t
>(yAxis->GetXmax());
57 rangeY_ = maxY_ - minY_;
59 nBinsX_ =
static_cast<Int_t
>(hist_->GetNbinsX());
60 nBinsY_ =
static_cast<Int_t
>(hist_->GetNbinsY());
62 binXWidth_ =
static_cast<Double_t
>(TMath::Abs(rangeX_)/(nBinsX_*1.0));
63 binYWidth_ =
static_cast<Double_t
>(TMath::Abs(rangeY_)/(nBinsY_*1.0));
66 this->doBinFluctuation(hist_);
68 if (avEff > 0.0 && avEffError > 0.0) {
69 this->raiseOrLowerBins(hist_,avEff,avEffError);
93 Double_t
value =
hist_->GetBinContent(xBinNo+1, yBinNo+1);
111 std::cerr <<
"WARNING in Lau2DHistDP::interpolateXY : Given position is outside the DP boundary, returning 0.0." << std::endl;
134 Double_t deltax = x - cbinx;
135 Double_t deltay = y - cbiny;
137 Int_t i_adj(0), j_adj(0);
149 Bool_t isXBoundary(kFALSE), isYBoundary(kFALSE);
153 if (i_adj >=
nBinsX_ || i_adj < 0) {isYBoundary = kTRUE;}
154 if (j_adj >=
nBinsY_ || j_adj < 0) {isXBoundary = kTRUE;}
157 if (isXBoundary == kTRUE && isYBoundary == kTRUE) {
161 }
else if (isXBoundary == kTRUE && isYBoundary == kFALSE) {
173 Double_t dx0 = TMath::Abs(x - cbinx);
174 Double_t dx1 = TMath::Abs(cbinx_adj - x);
175 Double_t inter_denom = dx0 + dx1;
180 value = (value1*dx1 + value2*dx0)/inter_denom;
184 }
else if (isYBoundary == kTRUE && isXBoundary == kFALSE) {
196 Double_t dy0 = TMath::Abs(y - cbiny);
197 Double_t dy1 = TMath::Abs(cbiny_adj - y);
198 Double_t inter_denom = dy0 + dy1;
203 value = (value1*dy1 + value2*dy0)/inter_denom;
221 Double_t dx0 = TMath::Abs(x - cbinx);
222 Double_t dx1 = TMath::Abs(cbinx_adj - x);
223 Double_t dy0 = TMath::Abs(y - cbiny);
224 Double_t dy1 = TMath::Abs(cbiny_adj - y);
226 Double_t inter_denom = (dx0 + dx1)*(dy0 + dy1);
233 value = value1*dx1*dy1 + value2*dx0*dy1 + value3*dx1*dy0 + value4*dx0*dy0;
234 value /= inter_denom;
Double_t minY_
The histogram y-axis minimum.
Class that defines the particular 3-body decay under study.
Int_t nBinsY_
The number of bins on the y-axis of the histogram.
File containing declaration of LauDaughters class.
Double_t getBinHistValue(Int_t xBinNo, Int_t yBinNo) const
Get the raw bin content from the histogram.
File containing declaration of LauKinematics class.
Double_t minX_
The histogram x-axis minimum.
Abstract base class for defining a variation across a 2D DP based on a histogram. ...
Bool_t withinDPBoundaries(Double_t x, Double_t y) const
Check whether the given co-ordinates are within the kinematic boundary.
File containing declaration of Lau2DHistDP class.
Double_t interpolateXY(Double_t x, Double_t y) const
Perform the interpolation.
File containing LauRandom namespace.
Bool_t useInterpolation_
Control boolean for using the linear interpolation.
Class for defining a 2D DP histogram.
virtual ~Lau2DHistDP()
Destructor.
void getUpperHalf(Double_t &x, Double_t &y) const
If only using the upper half of the (symmetric) DP then transform into the correct half...
Double_t value() const
The value of the parameter.
Int_t nBinsX_
The number of bins on the x-axis of the histogram.
TH2 * hist_
The underlying histogram.
Double_t rangeX_
The histogram x-axis range.
Double_t rangeY_
The histogram y-axis range.