File indexing completed on 2025-01-18 10:11:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_GAUSS_MODEL
0017 #define ROO_GAUSS_MODEL
0018
0019 #include "RooResolutionModel.h"
0020 #include "RooRealProxy.h"
0021
0022 #include <cmath>
0023 #include <complex>
0024
0025 class RooGaussModel : public RooResolutionModel {
0026 public:
0027
0028 RooGaussModel() = default;
0029 RooGaussModel(const char *name, const char *title, RooAbsRealLValue& x,
0030 RooAbsReal& mean, RooAbsReal& sigma) ;
0031 RooGaussModel(const char *name, const char *title, RooAbsRealLValue& x,
0032 RooAbsReal& mean, RooAbsReal& sigma, RooAbsReal& msSF) ;
0033 RooGaussModel(const char *name, const char *title, RooAbsRealLValue& x,
0034 RooAbsReal& mean, RooAbsReal& sigma, RooAbsReal& meanSF, RooAbsReal& sigmaSF) ;
0035 RooGaussModel(const RooGaussModel& other, const char* name=nullptr);
0036 TObject* clone(const char* newname) const override { return new RooGaussModel(*this,newname) ; }
0037
0038 Int_t basisCode(const char* name) const override ;
0039 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0040 double analyticalIntegral(Int_t code, const char* rangeName) const override ;
0041
0042 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, bool staticInitOK=true) const override;
0043 void generateEvent(Int_t code) override;
0044
0045 void advertiseFlatScaleFactorIntegral(bool flag) { _flatSFInt = flag ; }
0046
0047 void advertiseAymptoticIntegral(bool flag) { _asympInt = flag ; }
0048
0049 void doEval(RooFit::EvalContext &) const override;
0050
0051 bool canComputeBatchWithCuda() const override;
0052
0053 protected:
0054
0055 double evaluate() const override ;
0056 static double evaluate(double x, double mean, double sigma, double param1, double param2, int basisCode);
0057
0058
0059 std::complex<double> evalCerfInt(double sign, double wt, double tau, double umin, double umax, double c) const;
0060
0061 private:
0062 bool _flatSFInt = false;
0063
0064 bool _asympInt = false;
0065
0066 RooRealProxy mean ;
0067 RooRealProxy sigma ;
0068 RooRealProxy msf ;
0069 RooRealProxy ssf ;
0070
0071 ClassDefOverride(RooGaussModel,1)
0072 };
0073
0074 #endif