Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:24

0001 // $Id: 
0002 // -*- C++ -*-
0003 //
0004 //----------------------Abs---------- --------------------------------------//
0005 //                                                                          //
0006 //  Class Abs                                                               //
0007 //  Joe Boudreau, Petar Maksimovic, Nov. 1999                               //
0008 //                                                                          //
0009 //  Abs is a function that returns the absolute value of its argument       //
0010 //--------------------------------------------------------------------------//
0011 #ifndef Abs_h
0012 #define Abs_h 1
0013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0014 namespace Genfun {
0015   class Abs : public AbsFunction  {
0016 
0017     FUNCTION_OBJECT_DEF(Abs)
0018   
0019       public:
0020 
0021     // Constructor
0022     Abs();
0023   
0024     // Copy constructor
0025     Abs(const Abs &right);
0026   
0027     // Destructor
0028     virtual ~Abs();
0029   
0030     // Retrieve function value
0031     virtual double operator ()(double argument) const override; 
0032     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0033   
0034   private:
0035 
0036     // It is illegal to assign a fixed constant
0037     const Abs & operator=(const Abs &right);
0038 
0039   };
0040 }
0041 
0042 #endif