// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file Lau2DHistDP.hh
\brief File containing declaration of Lau2DHistDP class.
*/
/*! \class Lau2DHistDP
\brief Class for defining a 2D DP histogram.
Class for defining a 2D DP histogram.
Employs linear interpolation to get the histogram value based on how far away a point in (x,y)
is to nearby bin centres. The returned values are not normalised to the total histogram area
(useful for efficiency histograms for example).
The histogram can be defined in the conventional DP (m13Sq vs m23Sq) or in the square DP.
*/
#ifndef LAU_2DHIST_DP
#define LAU_2DHIST_DP
#include "Lau2DAbsHistDP.hh"
class TH2;
class LauDaughters;
class LauKinematics;
class Lau2DHistDP : public Lau2DAbsHistDP {
public:
//! Constructor
/*!
\param [in] hist the 2D DP histogram
\param [in] daughters the daughter particles
\param [in] useInterpolation boolean flag to determine whether linear interpolation between bins should be used or simply the raw bin values
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation)
- \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation).
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
+ \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins.
+ The seed for the random number generator used to raise or lower the bins should first be set using LauRandom::setSeed.
\param [in] avEffError the error on that efficiency - see Lau2DHistDP::raiseOrLowerBins
\param [in] useUpperHalfOnly boolean flag to specify that the supplied histogram contains only the upper half of a symmetric DP
\param [in] squareDP boolean flag to specify whether the supplied histogram is in square DP coordinates
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file Lau2DHistDPPdf.hh
\brief File containing declaration of Lau2DHistDPPdf class.
*/
/*! \class Lau2DHistDPPdf
\brief Class for defining a 2D DP histogram PDF.
Class for defining a 2D DP histogram PDF.
Employs linear interpolation to get the histogram value based on how far away a point in (x,y)
is to nearby bin centres. The returned values are normalised to the total area.
The histogram can be defined in the conventional DP (m13Sq vs m23Sq) or in the square DP.
*/
#ifndef LAU_2DHIST_DP_PDF
#define LAU_2DHIST_DP_PDF
#include "Lau2DAbsHistDPPdf.hh"
class TH2;
class LauKinematics;
class LauVetoes;
class Lau2DHistDPPdf : public Lau2DAbsHistDPPdf {
public:
//! Constructor
/*!
\param [in] hist the 2D DP histogram
\param [in] kinematics the current DP kinematics
\param [in] vetoes the vetoes within the DP
\param [in] useInterpolation boolean flag to determine whether linear interpolation between bins should be used or simply the raw bin values
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation)
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation).
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
\param [in] useUpperHalfOnly boolean flag to specify that the supplied histogram contains only the upper half of a symmetric DP
\param [in] squareDP boolean flag to specify whether the supplied histogram is in square DP coordinates
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file Lau2DSplineDP.hh
\brief File containing declaration of Lau2DSplineDP class.
*/
/*! \class Lau2DSplineDP
\brief Class for defining variations across a 2D DP using a spline.
Class for defining variations across a 2D DP using a spline.
Employs a 2D cubic spline to get the histogram value based on an input histogram.
The returned values are not normalised to the total histogram area
(useful for efficiency histograms for example).
The histogram can be defined in the conventional DP (m13Sq vs m23Sq) or in the square DP.
*/
#ifndef LAU_2DSPLINE_DP
#define LAU_2DSPLINE_DP
#include "Lau2DAbsHistDP.hh"
class TH2;
class Lau2DCubicSpline;
class LauDaughters;
class LauKinematics;
class Lau2DSplineDP : public Lau2DAbsHistDP {
public:
//! Constructor
/*!
\param [in] hist the 2D DP histogram
\param [in] daughters the daughter particles
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation)
- \param [in] avEff the desired average efficiency - see Lau2DSplineDP::raiseOrLowerBins
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation).
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
+ \param [in] avEff the desired average efficiency - see Lau2DSplineDP::raiseOrLowerBins.
+ The seed for the random number generator used to raise or lower the bins should first be set using LauRandom::setSeed.
\param [in] avEffError the error on that efficiency - see Lau2DSplineDP::raiseOrLowerBins
\param [in] useUpperHalfOnly boolean flag to specify that the supplied histogram contains only the upper half of a symmetric DP
\param [in] squareDP boolean flag to specify whether the supplied histogram is in square DP coordinates
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file Lau2DSplineDPPdf.hh
\brief File containing declaration of Lau2DSplineDPPdf class.
*/
/*! \class Lau2DSplineDPPdf
\brief Class for defining a 2D DP spline PDF.
Class for defining a 2D DP spline PDF.
Employs a 2D cubic spline to get the histogram value based on an input histogram.
The returned values are normalised to the total area.
The histogram can be defined in the conventional DP (m13Sq vs m23Sq) or in the square DP.
*/
#ifndef LAU_2DSPLINE_DP_PDF
#define LAU_2DSPLINE_DP_PDF
#include "Lau2DAbsHistDPPdf.hh"
class TH2;
class Lau2DCubicSpline;
class LauKinematics;
class LauVetoes;
class Lau2DSplineDPPdf: public Lau2DAbsHistDPPdf {
public:
//! Constructor
/*!
\param [in] hist the 2D DP histogram
\param [in] kinematics the current DP kinematics
\param [in] vetoes the vetoes within the DP
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation)
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors (useful for systematic error evaluation).
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
\param [in] useUpperHalfOnly boolean flag to specify that the supplied histogram contains only the upper half of a symmetric DP
\param [in] squareDP boolean flag to specify whether the supplied histogram is in square DP coordinates
\param [in] histo the 2D histogram describing the DP distribution
\param [in] useInterpolation boolean flag to determine whether linear interpolation between bins should be used or simply the raw bin values
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors.
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
\param [in] useUpperHalfOnly boolean flag to determine whether, in the case of a symmetric DP, the histogram supplied only includes the upper half of the DP
\param [in] squareDP boolean flag to determine whether the supplied histogram is given in square DP coordinates
//! Set the background histogram and generate a spline
/*!
\param [in] histo the 2D histogram describing the DP distribution
- \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors
+ \param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors.
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
\param [in] useUpperHalfOnly boolean flag to determine whether, in the case of a symmetric DP, the histogram supplied only includes the upper half of the DP
\param [in] squareDP boolean flag to determine whether the supplied histogram is given in square DP coordinates
//! Set the efficiency variation across the phase space using a predetermined 2D histogram.
/*!
The efficiency is defined in terms of x = m_13^2, y = m_23^2 or x = m', y = theta' for the square Dalitz plot
\param [in] effHisto the 2-dimensional histogram that describes the efficiency variation
\param [in] useInterpolation boolean flag decision to switch on/off linear interpolation between bins should be used or simply the raw bin values.
\param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors.
- \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
+ \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour.
+ The seed for the random number generator used to raise or lower the bins should first be set using LauRandom::setSeed.
\param [in] absError the error on that efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour
\param [in] useUpperHalfOnly boolean flag to determine whether, in the case of a symmetric DP, the histogram supplied only includes the upper half of the DP.
\param [in] squareDP boolean flag to determine whether the supplied histogram is given in square DP coordinates
//! Set the efficiency variation across the phase space using a spline based on a predetermined 2D histogram.
/*!
The efficiency is defined in terms of x = m_13^2, y = m_23^2 or x = m', y = theta' for the square Dalitz plot
\param [in] effHisto the 2-dimensional histogram that describes the efficiency variation
\param [in] fluctuateBins boolean flag to determine whether the bin contents should be fluctuated in accordance with their errors.
- \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour
+ The seed for the random number generator used to fluctuate the bins should first be set using LauRandom::setSeed.
+ \param [in] avEff the desired average efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour.
+ The seed for the random number generator used to raise or lower the bins should first be set using LauRandom::setSeed.
\param [in] absError the error on that efficiency - see Lau2DHistDP::raiseOrLowerBins, values less than zero switch off this behaviour
\param [in] useUpperHalfOnly boolean flag to determine whether, in the case of a symmetric DP, the histogram supplied only includes the upper half of the DP.
\param [in] squareDP boolean flag to determine whether the supplied histogram is given in square DP coordinates
std::cerr << "ERROR in Lau2DHistPdf::generate : Please set the random number generator for this PDF by using the setRandomFun(TRandom*) function." << std::endl;
if (this->getRandomFun()->Rndm() <= genPDFVal/PDFheight) {gotAbscissa = kTRUE;}
if (genPDFVal > PDFheight) {
std::cerr << "WARNING in LauAbsPdf::generate : genPDFVal = " << genPDFVal << " is larger than the specified PDF height " << this->getMaxHeight() << " for (x,y) = (" << genAbscissas[0] << "," << genAbscissas[1] << ")." << std::endl;
std::cerr << " : Need to reset height to be larger than " << genPDFVal << " by using the setMaxHeight(Double_t) function and re-run the Monte Carlo generation!" << std::endl;