File indexing completed on 2025-01-30 10:03:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _ClassicalSolver_h__
0011 #define _ClassicalSolver_h__
0012
0013 #include "CLHEP/GenericFunctions/PhaseSpace.hh"
0014 #include "CLHEP/GenericFunctions/Variable.hh"
0015 #include "CLHEP/GenericFunctions/Parameter.hh"
0016
0017
0018 namespace Genfun {
0019 class EnergyFunction;
0020 }
0021
0022
0023 namespace Classical {
0024
0025
0026 class Solver {
0027
0028 public:
0029
0030
0031
0032 Solver(){};
0033
0034
0035
0036 virtual ~Solver(){};
0037
0038
0039
0040 virtual Genfun::GENFUNCTION equationOf(const Genfun::Variable & v) const=0;
0041
0042
0043
0044 virtual const PhaseSpace & phaseSpace() const=0;
0045
0046
0047
0048 virtual Genfun::GENFUNCTION hamiltonian() const=0;
0049
0050
0051
0052 virtual Genfun::GENFUNCTION energy() const=0;
0053
0054
0055
0056 virtual Genfun::Parameter *takeQ0(unsigned int index)=0;
0057 virtual Genfun::Parameter *takeP0(unsigned int index)=0;
0058 virtual Genfun::Parameter *createControlParameter(const std::string & variableName="anon",
0059 double defStartingValue=0.0,
0060 double startingValueMin=0.0,
0061 double startingValueMax=0.0) const = 0;
0062
0063
0064
0065 private:
0066
0067
0068 Solver (const Solver &);
0069 Solver & operator=(const Solver &);
0070
0071 };
0072 }
0073
0074 namespace Genfun {
0075
0076 class EnergyFunction: public Genfun::AbsFunction {
0077
0078 FUNCTION_OBJECT_DEF(EnergyFunction)
0079
0080 public:
0081
0082
0083 EnergyFunction(const Classical::Solver &);
0084
0085
0086 virtual ~EnergyFunction();
0087
0088
0089 EnergyFunction(const EnergyFunction &right);
0090
0091
0092 virtual double operator ()(double argument) const override;
0093 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
0094
0095 private:
0096
0097
0098 const EnergyFunction & operator=(const EnergyFunction &right);
0099
0100 const Classical::Solver & solver;
0101
0102 };
0103
0104 }
0105
0106
0107
0108 #endif