00001 #ifndef PhysicsTools_Utilities_Exponential_h 00002 #define PhysicsTools_Utilities_Exponential_h 00003 #include "PhysicsTools/Utilities/interface/Parameter.h" 00004 #include <boost/shared_ptr.hpp> 00005 #include <cmath> 00006 00007 namespace funct { 00008 00009 struct Exponential { 00010 Exponential(const Parameter & l) : lambda(l.ptr()) { } 00011 Exponential(boost::shared_ptr<double> l) : lambda(l) { } 00012 Exponential(double l) : lambda(new double(l)) { } 00013 double operator()(double x) const { return std::exp((*lambda)*x); } 00014 boost::shared_ptr<double> lambda; 00015 }; 00016 00017 } 00018 00019 #endif