47 x(
"x",
"Dependent",this,_x),
48 mean(
"mean",
"Mean",this,_mean),
49 width(
"width",
"Width",this,_width)
56 RooAbsPdf(other,
name),
x(
"x",this,other.
x), mean(
"mean",this,other.mean),
74template<
class Tx,
class Tmean,
class Tw
idth>
75void compute(
size_t batchSize,
76 double * __restrict
output,
77 Tx X, Tmean M, Twidth W)
79 for (
size_t i=0; i<batchSize; i++) {
80 const double arg = X[i]-M[i];
81 output[i] = 1 / (arg*arg + 0.25*W[i]*W[i]);
91 const bool batchX = !xData.empty();
92 const bool batchMean = !meanData.empty();
93 const bool batchWidth = !widthData.empty();
95 if (!batchX && !batchMean && !batchWidth) {
98 batchSize =
findSize({ xData, meanData, widthData });
101 if (batchX && !batchMean && !batchWidth ) {
104 else if (!batchX && batchMean && !batchWidth ) {
107 else if (batchX && batchMean && !batchWidth ) {
110 else if (!batchX && !batchMean && batchWidth ) {
113 else if (batchX && !batchMean && batchWidth ) {
116 else if (!batchX && batchMean && batchWidth ) {
119 else if (batchX && batchMean && batchWidth ) {
120 compute(batchSize,
output.data(), xData, meanData, widthData);
include TDocParser_001 C image html pict1_TDocParser_001 png width
RooSpan< double > makeWritableBatchUnInit(std::size_t begin, std::size_t batchSize)
Make a batch and return a span pointing to the pdf-local memory.
Little adapter that gives a bracket operator to types that don't have one.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
BatchHelpers::BatchData _batchData
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Class RooBreitWigner is a RooAbsPdf implementation that models a non-relativistic Breit-Wigner shape.
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
A simple container to hold a batch of data values.
Double_t min(const char *rname=0) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
RooSpan< const double > getValBatch(std::size_t begin, std::size_t batchSize) const
Double_t max(const char *rname=0) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
size_t findSize(std::vector< RooSpan< const double > > parameters)
This function returns the minimum size of the non-zero-sized batches.
static void output(int code)