1 #ifndef __JMATH__JGAUSS__
2 #define __JMATH__JGAUSS__
20 namespace JPP {
using namespace JMATH; }
30 public JMath<JGauss_t>,
59 background(background)
71 const double eps = std::numeric_limits<double>::min())
const
73 return (fabs(
mean - gauss.
mean) <= eps &&
155 return out <<
FIXED(7,3) << gauss.
mean <<
' '
210 const double signal = 1.0,
264 const double w = 1.0 /
sigma;
265 const double u = (x -
mean) * w;
266 const double f0 =
get(
u);
267 const double fs =
signal * f0;
269 gradient.mean = fs * (
u) * w;
270 gradient.sigma = fs * (u + 1.0) * (u - 1.0) *
w;
271 gradient.signal = f0;
272 gradient.background = 1.0;
284 inline double get(
const double u)
const
bool equals(const JGauss_t &gauss, const double eps=std::numeric_limits< double >::min()) const
Equality.
double getValue(const double x) const
Function value.
friend std::istream & operator>>(std::istream &in, JGauss_t &gauss)
Write Gauss to input stream.
double getValue(const JScale_t scale)
Get numerical value corresponding to scale.
Auxiliary base class for aritmetic operations of derived class types.
double operator()(const double x) const
Function value.
const JGauss_t & getGradient(const double x) const
Get gradient.
Auxiliary data structure for floating point format specification.
JGauss()
Default constructor.
JGauss_t & sub(const JGauss_t &gauss)
Subtract gauss.
JGauss_t & mul(const double factor)
Scale gauss.
friend std::ostream & operator<<(std::ostream &out, const JGauss_t &gauss)
Write Gauss to output stream.
JGauss(const double mean, const double sigma, const double signal=1.0, const double background=0.0)
Constructor.
Template definition of auxiliary base class for comparison of data structures.
JGauss_t & add(const JGauss_t &gauss)
Add gauss.
double JGauss::* parameter_type
Type definition of fit parameter.
static const double PI
Mathematical constants.
JGauss_t()
Default constructor.
JGauss_t(const double mean, const double sigma, const double signal, const double background)
Constructor.
JGauss(const JGauss_t &gauss)
Copy constructor.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
then set_variable NUMBER_OF_TESTS else set_variable NUMBER_OF_TESTS fi function gauss()
Base class for data structures with artithmetic capabilities.
double getDerivative(const double x) const
Derivative value.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN