#ifndef MFunction_h #define MFunction_h #include "TMath.h" #include "TMatrixT.h" #include "TF2.h" #include class MFunction { private: TF2* x[2][2]; //The components of the matrix Double_t x_min; //Hopefully all components have the same variable ranges... Double_t x_max; Double_t y_min; Double_t y_max; public: MFunction(); ~MFunction(); void SetFunctions(TF2*, TF2*, TF2*, TF2*); //Set the functions void Multiply(MFunction&); //Multiplies by another MFunction void Multiply(TF2*); //Multiplies by a scalar function void Add(MFunction&); //Adds another MFunction void MakeDiagonal(); //Drops the off-diagonal elements void AverageDiagonals(); //Averages the diagonal elements void PrintExpFormula(); void PrintData(); void Invert(); //Precise inversion void InvertFast(); //Approximate inversion (precise for diagonal matrices) TMatrixT Eval(Double_t, Double_t); //Evaluates and returns a matrix }; #endif