/** * @file pdf.hh * @author Christoph Langenbruch, Renata Kopecna * @date 2009-03-18 * */ #ifndef PDF_H #define PDF_H namespace fcnc { class parameters; class event; class options; ///abstract base class that defines the interface for a pdf ///your pdf needs to inherit form this and implement all the abstract methods class pdf { public: virtual ~pdf() {}; ///returns the probability of one event virtual double prob(const parameters* params, const event& meas) const = 0; virtual double chi2(const parameters* params) {return 0.0;}; ///updates the cached normalization after a parameter change virtual void update_cached_normalization(const parameters* params) = 0; virtual void update_cached_normalization(const parameters* params, std::vector* events) {return;}; virtual void update_cached_integrated_fis(const parameters* params) {return;}; ///updates the cached efficiencies, useable in case of fixed q2 eff or for a weighted fit virtual void update_cached_efficiencies(const parameters* params, std::vector* events) {return;}; ///updates the cached xis paramters for every event, this allows to use a different q2 dependent norm for every event virtual void update_cached_xis(const parameters* params, std::vector* events) {return;}; ///performs the necessary initialisations for the pdf virtual void init(parameters* params) = 0; //I am exposing these for now, needed for the S-wave hack virtual void get_swave_integrated_fj(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6) const {return;}; virtual void get_integrated_fj(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6, double& f7, double& f8, double& f9, double& f10, double& f11, double& f12) const {return;}; virtual void swave_integrated_fj_noacc(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6) const {return;}; //virtual void swave_integrated_fj_chebyshev(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6, double q2) const {return;}; virtual void integrated_fj_noacc(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6, double& f7, double& f8, double& f9, double& f10, double& f11, double& f12) const {return;}; //virtual void integrated_fj_chebyshev(double& f1, double& f2, double& f3, double& f4, double& f5, double& f6, // double& f7, double& f8, double& f9, double& f10, double& f11, double& f12, double q2) const {return;}; }; } #endif