00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _AnalyticConvolution_h_
00013 #define _AnalyticConvolution_h_
00014 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00015 #include "CLHEP/GenericFunctions/Parameter.hh"
00016 #include <complex>
00017 namespace Genfun {
00018
00019 class Gaussian;
00020 class Exponential;
00021 class Cosine;
00022
00027 class AnalyticConvolution: public AbsFunction {
00028
00029 FUNCTION_OBJECT_DEF(AnalyticConvolution)
00030
00031 public:
00032
00033
00034 enum Type {MIXED =0,
00035 UNMIXED =1,
00036 SMEARED_EXP =2,
00037 SMEARED_COS_EXP=3,
00038 SMEARED_SIN_EXP=4};
00039
00040
00041 AnalyticConvolution(Type=SMEARED_EXP);
00042
00043
00044 AnalyticConvolution(const AnalyticConvolution &right);
00045
00046
00047 virtual ~AnalyticConvolution();
00048
00049
00050 virtual double operator ()(double argument) const;
00051 virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00052
00053
00054 Parameter & frequency();
00055 const Parameter & frequency() const;
00056
00057
00058 Parameter & lifetime();
00059 const Parameter & lifetime() const;
00060
00061
00062 Parameter & sigma();
00063 const Parameter & sigma() const;
00064
00065
00066 Parameter & offset();
00067 const Parameter & offset() const;
00068
00069 private:
00070
00071
00072 double pow(double x, int n) const ;
00073 double erfc(double x) const ;
00074 HepSTL::complex<double> nwwerf(HepSTL::complex<double> z) const;
00075
00076
00077 const AnalyticConvolution & operator=(const AnalyticConvolution &right);
00078
00079 Parameter _lifetime;
00080 Parameter _frequency;
00081 Parameter _sigma;
00082 Parameter _offset;
00083 Type _type;
00084
00085 };
00086 }
00087 #endif