Cleaned up libBNMR a bit.

This commit is contained in:
Jonas A. Krieger 2018-08-15 10:38:21 +02:00
parent 52ecd62c90
commit e73ded0078
3 changed files with 7 additions and 32 deletions

View File

@ -39,20 +39,10 @@
#define PI 3.14159265358979323846
#define TWOPI 6.28318530717958647692
ClassImp(TBNMR) // for the ROOT-dictionary
ClassImp(ExpRlx)
ClassImp(ExpRlx) // for the ROOT-dictionary
ClassImp(SExpRlx)
ClassImp(MLRes)
double TBNMR::operator()(double x, const vector<double> &par) const {
assert(par.size()==1); // make sure the number of parameters handed to the function is correct
double arg(par[0]*x);
if(!arg)
return 1.0;
return sin(arg)/arg;
}
double ExpRlx::operator()(double x, const vector<double> &par) const {
assert(par.size()==2); // make sure the number of parameters handed to the function is correct
@ -81,10 +71,8 @@ double SExpRlx::operator()(double x, const vector<double> &par) const {
// par[0] time of beam off
// par[1] is the relaxation rate
// par[2] is the exponent
double tau_p;
double y;
tau_p = (tau_Li/(1.+par[1]*tau_Li));
double y;
if ( x >= 0 && x <= par[0] ) {

View File

@ -35,25 +35,11 @@
#include <cmath>
#include <vector>
#ifndef LIBBNMRH
#define LIBBNMRH
using namespace std;
class TBNMR : public PUserFcnBase {
public:
// default constructor and destructor
TBNMR(){}
~TBNMR(){}
Bool_t NeedGlobalPart() const { return false; }
void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
Bool_t GlobalPartIsValid() const { return true; }
// function operator
double operator()(double, const vector<double>&) const;
// definition of the class for the ROOT-dictionary
ClassDef(TBNMR,1)
};
class ExpRlx : public PUserFcnBase {
@ -108,3 +94,5 @@ public:
// definition of the class for the ROOT-dictionary
ClassDef(MLRes,1)
};
#endif //LIBBNMRH

View File

@ -35,7 +35,6 @@
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TBNMR+;
#pragma link C++ class ExpRlx+;
#pragma link C++ class SExpRlx+;
#pragma link C++ class MLRes+;