Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:35

0001 // -*- C++ -*-
0002 // $Id: 
0003 //--------------------------Sigma-------------------------------------------//
0004 //                                                                          //
0005 // Sigma, result of addition of N functions                                 //
0006 //                                                                          //
0007 //--------------------------------------------------------------------------//
0008 
0009 #ifndef Sigma_h
0010 #define Sigma_h 1
0011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0012 
0013 namespace Genfun {
0014 
0015   /**
0016    * @author
0017    * @ingroup genfun
0018    */
0019   class Sigma : public AbsFunction  {
0020 
0021     FUNCTION_OBJECT_DEF(Sigma)
0022   
0023       public:
0024   
0025     // Constructor
0026     Sigma();
0027   
0028     // Copy constructor
0029     Sigma(const Sigma &right);
0030 
0031     // Destructor
0032     virtual ~Sigma();
0033   
0034     // Retreive function value
0035     virtual double operator ()(double argument) const override;
0036     virtual double operator ()(const Argument & a) const override;
0037 
0038     // Dimensionality 
0039     virtual unsigned int dimensionality() const override;
0040 
0041     // Derivative.  
0042     Derivative partial (unsigned int) const override;
0043 
0044     // Does this function have an analytic derivative?
0045     virtual bool hasAnalyticDerivative() const override {return true;}
0046 
0047     // Add a function to the sum:
0048     void accumulate (const AbsFunction & fcn);
0049 
0050   private:
0051 
0052     // It is illegal to assign a Sigma
0053     const Sigma & operator=(const Sigma &right);
0054 
0055     std::vector<const AbsFunction *> _fcn;
0056 
0057   };
0058 } // namespace Genfun
0059 #endif