Optimization and clean up
This commit is contained in:
8
src/external/libBNMR/TBNMR.cpp
vendored
8
src/external/libBNMR/TBNMR.cpp
vendored
@ -10,8 +10,8 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2010 by Zaher Salman *
|
* Copyright (C) 2010 by Zaher Salman *
|
||||||
* zaher.salman@psi.ch *
|
* zaher.salman@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU General Public License as published by *
|
* it under the terms of the GNU General Public License as published by *
|
||||||
@ -109,12 +109,8 @@ double MLRes::operator()(double x, const vector<double> &par) const {
|
|||||||
// par[0] time of beam off
|
// par[0] time of beam off
|
||||||
// par[1] is the relaxation rate
|
// par[1] is the relaxation rate
|
||||||
// par[2] is the exponent
|
// par[2] is the exponent
|
||||||
double tau_p;
|
|
||||||
double y;
|
double y;
|
||||||
|
|
||||||
tau_p = (tau_Li/(1.+par[1]*tau_Li));
|
|
||||||
|
|
||||||
|
|
||||||
if ( x >= 0 && x <= par[0] ) {
|
if ( x >= 0 && x <= par[0] ) {
|
||||||
TF1 sexp("sexp", "exp(-([0]-x)/[3])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 10000.0);
|
TF1 sexp("sexp", "exp(-([0]-x)/[3])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 10000.0);
|
||||||
sexp.SetParameters(x, par[1], par[2],tau_Li);
|
sexp.SetParameters(x, par[1], par[2],tau_Li);
|
||||||
|
Reference in New Issue
Block a user