49 x(
"x",
"Dependent",this,_x),
50 mean(
"mean",
"Mean",this,_mean),
51 width(
"width",
"Breit-Wigner Width",this,_width),
52 sigma(
"sigma",
"Gauss Width",this,_sigma),
61 RooAbsPdf(other,
name),
x(
"x",this,other.
x), mean(
"mean",this,other.mean),
63 _doFast(other._doFast)
79 if (
s==0. && w==0.)
return 1.;
82 if (
s==0.)
return (1./(arg*arg+0.25*w*w));
85 if (w==0.)
return exp(coef*arg*arg);
91 std::complex<Double_t> z(u,
a) ;
92 std::complex<Double_t>
v(0.) ;
107template<
class Tx,
class Tmean,
class Tw
idth,
class Tsigma>
108void compute(
size_t batchSize,
double * __restrict
output,
109 Tx X, Tmean M, Twidth W, Tsigma
S)
111 constexpr double invSqrt2 = 0.707106781186547524400844362105;
112 for (
size_t i=0; i<batchSize; i++) {
113 const double arg = (X[i]-M[i])*(X[i]-M[i]);
114 if (
S[i]==0.0 && W[i]==0.0) {
116 }
else if (
S[i]==0.0) {
117 output[i] = 1/(arg+0.25*W[i]*W[i]);
118 }
else if (W[i]==0.0) {
125 for (
size_t i=0; i<batchSize; i++) {
126 if (
S[i]!=0.0 && W[i]!=0.0) {
128 const double factor = W[i]>0.0 ? 0.5 : -0.5;
129 std::complex<Double_t> z(
output[i]*(X[i]-M[i]) , factor*
output[i]*W[i] );
146 if (info.
nBatches==1 && !xData.empty()) {
147 compute(info.
size,
output.data(), xData.data(),
include TDocParser_001 C image html pict1_TDocParser_001 png width
RooSpan< double > makeWritableBatchUnInit(std::size_t begin, std::size_t batchSize, const RooArgSet *const normSet=nullptr, Tag_t ownerTag=kUnspecified)
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...
BatchHelpers::BatchData _batchData
static std::complex< double > faddeeva(std::complex< double > z)
evaluate Faddeeva function for complex argument
static std::complex< double > faddeeva_fast(std::complex< double > z)
evaluate Faddeeva function for complex argument (fast version)
A simple container to hold a batch of data values.
RooSpan< const typename T::value_type > getValBatch(std::size_t begin, std::size_t batchSize) const
Retrieve a batch of real or category data.
RooVoigtian is an efficient implementation of the convolution of a Breit-Wigner with a Gaussian,...
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
EvaluateInfo getInfo(std::vector< const RooRealProxy * > parameters, size_t begin, size_t batchSize)
RooArgSet S(const RooAbsArg &v1)
static constexpr double s
static void output(int code)