File indexing completed on 2025-01-18 09:54:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _AnalyticConvolution_h_
0013 #define _AnalyticConvolution_h_
0014 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0015 #include "CLHEP/GenericFunctions/Parameter.hh"
0016 #include <complex>
0017 namespace Genfun {
0018
0019 class Gaussian;
0020 class Exponential;
0021 class Cosine;
0022
0023
0024
0025
0026
0027 class AnalyticConvolution: public AbsFunction {
0028
0029 FUNCTION_OBJECT_DEF(AnalyticConvolution)
0030
0031 public:
0032
0033
0034 enum Type {MIXED =0,
0035 UNMIXED =1,
0036 SMEARED_EXP =2,
0037 SMEARED_COS_EXP=3,
0038 SMEARED_SIN_EXP=4,
0039 SMEARED_NEG_EXP=5};
0040
0041 AnalyticConvolution(Type=SMEARED_EXP);
0042
0043
0044 AnalyticConvolution(const AnalyticConvolution &right);
0045
0046
0047 virtual ~AnalyticConvolution();
0048
0049
0050 virtual double operator ()(double argument) const override;
0051 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0052
0053
0054 Parameter & frequency();
0055 const Parameter & frequency() const;
0056
0057
0058 Parameter & lifetime();
0059 const Parameter & lifetime() const;
0060
0061
0062 Parameter & sigma();
0063 const Parameter & sigma() const;
0064
0065
0066 Parameter & offset();
0067 const Parameter & offset() const;
0068
0069 private:
0070
0071
0072 double pow(double x, int n) const ;
0073 double erfc(double x) const ;
0074 std::complex<double> nwwerf(std::complex<double> z) const;
0075
0076
0077 const AnalyticConvolution & operator=(const AnalyticConvolution &right);
0078
0079 Parameter _lifetime;
0080 Parameter _frequency;
0081 Parameter _sigma;
0082 Parameter _offset;
0083 Type _type;
0084
0085 };
0086 }
0087 #endif