Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 // $Id: 
0003 //----------------------Mod-----------------------------------------------//
0004 //                                                                        //
0005 //  Class Mod   (Modulo)                                                  //
0006 //  Joe Boudreau, Petar Maksimovic, Nov. 2002                             //
0007 //                                                                        //
0008 //  Mod(x) returns x%y                                                    //
0009 //------------------------------------------------------------------------//
0010 #ifndef Mod_h
0011 #define Mod_h 1
0012 #include "CLHEP/GenericFunctions/AbsFunction.hh"
0013 namespace Genfun {
0014 
0015   /**
0016    * @author
0017    * @ingroup genfun
0018    */
0019   class Mod : public AbsFunction  {
0020 
0021     FUNCTION_OBJECT_DEF(Mod)
0022   
0023       public:
0024 
0025     // Constructor
0026     Mod(double y);
0027   
0028     // Copy constructor
0029     Mod(const Mod &right);
0030   
0031     // Destructor
0032     virtual ~Mod();
0033   
0034     // Retrieve function value
0035 
0036     virtual double operator ()(double argument) const override; 
0037     virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0038   
0039   private:
0040 
0041     // It is illegal to assign a fixed constant
0042     const Mod & operator=(const Mod &right);
0043 
0044     double _y; // mod (as a double)
0045 
0046   };
0047 } // namespace Genfun
0048 #endif