File indexing completed on 2024-04-06 12:24:18
0001 #ifndef PhysicsTools_Utilities_Exponential_h
0002 #define PhysicsTools_Utilities_Exponential_h
0003 #include "PhysicsTools/Utilities/interface/Parameter.h"
0004
0005 #include <cmath>
0006
0007 namespace funct {
0008
0009 struct Exponential {
0010 Exponential(const Parameter& l) : lambda(l.ptr()) {}
0011 Exponential(std::shared_ptr<double> l) : lambda(l) {}
0012 Exponential(double l) : lambda(new double(l)) {}
0013 double operator()(double x) const { return std::exp((*lambda) * x); }
0014 std::shared_ptr<double> lambda;
0015 };
0016
0017 }
0018
0019 #endif