GooFit  v2.1.3
SmoothHistogramPdf.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <goofit/BinnedDataSet.h>
4 #include <goofit/PDFs/GooPdf.h>
5 
6 #include <thrust/device_vector.h>
7 #include <thrust/host_vector.h>
8 
9 namespace GooFit {
10 
11 class SmoothHistogramPdf : public GooPdf {
12  public:
13  SmoothHistogramPdf(std::string n, BinnedDataSet *x, Variable smoothing);
14  __host__ fptype normalize() const override;
15  __host__ void extractHistogram(thrust::host_vector<fptype> &host_hist) { host_hist = *dev_base_histogram; }
16  __host__ void copyHistogramToDevice(thrust::host_vector<fptype> &host_histogram);
17 
18  private:
19  thrust::device_vector<fptype> *dev_base_histogram;
20  thrust::device_vector<fptype> *dev_smoothed_histogram;
21  fptype totalEvents;
22  fptype *host_constants;
23 
24  static unsigned int totalHistograms;
25 };
26 } // namespace GooFit
__host__ void copyHistogramToDevice(thrust::host_vector< fptype > &host_histogram)
double fptype
__host__ void extractHistogram(thrust::host_vector< fptype > &host_hist)
SmoothHistogramPdf(std::string n, BinnedDataSet *x, Variable smoothing)
__host__ fptype normalize() const override