added StaticLorentzKT to PTheory

This commit is contained in:
nemu 2009-03-23 06:19:33 +00:00
parent 98f05c3d3f
commit 229d7c7709
2 changed files with 74 additions and 24 deletions

View File

@ -385,6 +385,10 @@ double PTheory::Func(register double t, const PDoubleVector& paramValues, const
return DynamicGaussKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
fAdd->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT:
return StaticLorentzKT(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
fAdd->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT_LF:
return StaticLorentzKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues) +
fAdd->Func(t, paramValues, funcValues);
@ -465,6 +469,9 @@ double PTheory::Func(register double t, const PDoubleVector& paramValues, const
case THEORY_DYNAMIC_GAUSS_KT_LF:
return DynamicGaussKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT:
return StaticLorentzKT(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT_LF:
return StaticLorentzKTLF(t, paramValues, funcValues) * fMul->Func(t, paramValues, funcValues);
break;
@ -534,6 +541,9 @@ double PTheory::Func(register double t, const PDoubleVector& paramValues, const
case THEORY_DYNAMIC_GAUSS_KT_LF:
return DynamicGaussKTLF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT:
return StaticLorentzKT(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT_LF:
return StaticLorentzKTLF(t, paramValues, funcValues) + fAdd->Func(t, paramValues, funcValues);
break;
@ -601,6 +611,9 @@ double PTheory::Func(register double t, const PDoubleVector& paramValues, const
case THEORY_DYNAMIC_GAUSS_KT_LF:
return DynamicGaussKTLF(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT:
return StaticLorentzKT(t, paramValues, funcValues);
break;
case THEORY_STATIC_LORENTZ_KT_LF:
return StaticLorentzKTLF(t, paramValues, funcValues);
break;
@ -1156,6 +1169,39 @@ double PTheory::DynamicGaussKTLF(register double t, const PDoubleVector& paramVa
return result;
}
//--------------------------------------------------------------------------
/**
* <p> (see Uemura et al. PRB 31, 546 (85))
*
* \param t time in \f$(\mu\mathrm{s})\f$
* \param paramValues
*/
double PTheory::StaticLorentzKT(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
{
// expected parameters: lambda [tshift]
double val[2];
assert(fParamNo.size() <= 2);
// check if FUNCTIONS are used
for (unsigned int i=0; i<fParamNo.size(); i++) {
if (fParamNo[i] < MSR_PARAM_FUN_OFFSET) { // parameter or resolved map
val[i] = paramValues[fParamNo[i]];
} else { // function
val[i] = funcValues[fParamNo[i]-MSR_PARAM_FUN_OFFSET];
}
}
double a_t;
if (fParamNo.size() == 1) // no tshift
a_t = t*val[0];
else // tshift present
a_t = (t-val[1])*val[0];
return 0.333333333333333 * (1.0 + 2.0*(1.0 - a_t)*TMath::Exp(-a_t));
}
//--------------------------------------------------------------------------
/**
* <p>
@ -1446,11 +1492,11 @@ double PTheory::Abragam(register double t, const PDoubleVector& paramValues, con
*/
double PTheory::InternalField(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const
{
// expected parameters: phase frequency rateT rateL [tshift]
// expected parameters: fraction phase frequency rateT rateL [tshift]
double val[5];
double val[6];
assert(fParamNo.size() <= 5);
assert(fParamNo.size() <= 6);
// check if FUNCTIONS are used
for (unsigned int i=0; i<fParamNo.size(); i++) {
@ -1465,12 +1511,10 @@ double PTheory::InternalField(register double t, const PDoubleVector& paramValue
if (fParamNo.size() == 4) // no tshift
tt = t;
else // tshift present
tt = t-val[4];
tt = t-val[5];
return 0.666666666666667*
TMath::Cos(DEG_TO_RAD*val[0]+TWO_PI*val[1]*tt)*
TMath::Exp(-val[2]*tt) +
0.333333333333333*TMath::Exp(-val[3]*tt);
return val[0]*TMath::Cos(DEG_TO_RAD*val[1]+TWO_PI*val[2]*tt)*TMath::Exp(-val[3]*tt) +
(1-val[0])*TMath::Exp(-val[4]*tt);
}
//--------------------------------------------------------------------------
@ -1640,7 +1684,7 @@ double PTheory::Polynom(register double t, const PDoubleVector& paramValues, con
// expected parameters: tshift p0 p1 p2 ...
double result = 0.0;
double tshift;
double tshift = 0.0;
double val;
double expo = 0.0;

View File

@ -52,19 +52,20 @@
#define THEORY_STATIC_GAUSS_KT 4
#define THEORY_STATIC_GAUSS_KT_LF 5
#define THEORY_DYNAMIC_GAUSS_KT_LF 6
#define THEORY_STATIC_LORENTZ_KT_LF 7
#define THEORY_DYNAMIC_LORENTZ_KT_LF 8
#define THEORY_COMBI_LGKT 9
#define THEORY_SPIN_GLASS 10
#define THEORY_RANDOM_ANISOTROPIC_HYPERFINE 11
#define THEORY_ABRAGAM 12
#define THEORY_INTERNAL_FIELD 13
#define THEORY_TF_COS 14
#define THEORY_BESSEL 15
#define THEORY_INTERNAL_BESSEL 16
#define THEORY_SKEWED_GAUSS 17
#define THEORY_POLYNOM 18
#define THEORY_USER_FCN 19
#define THEORY_STATIC_LORENTZ_KT 7
#define THEORY_STATIC_LORENTZ_KT_LF 8
#define THEORY_DYNAMIC_LORENTZ_KT_LF 9
#define THEORY_COMBI_LGKT 10
#define THEORY_SPIN_GLASS 11
#define THEORY_RANDOM_ANISOTROPIC_HYPERFINE 12
#define THEORY_ABRAGAM 13
#define THEORY_INTERNAL_FIELD 14
#define THEORY_TF_COS 15
#define THEORY_BESSEL 16
#define THEORY_INTERNAL_BESSEL 17
#define THEORY_SKEWED_GAUSS 18
#define THEORY_POLYNOM 19
#define THEORY_USER_FCN 20
// function parameter tags, i.e. how many parameters has a specific function
// if there is a comment with a (tshift), the number of parameters is increased by one
@ -75,20 +76,21 @@
#define THEORY_PARAM_STATIC_GAUSS_KT 1 // damping (tshift)
#define THEORY_PARAM_STATIC_GAUSS_KT_LF 2 // frequency, damping (tshift)
#define THEORY_PARAM_DYNAMIC_GAUSS_KT_LF 3 // frequency, damping, hop-rate (tshift)
#define THEORY_PARAM_STATIC_LORENTZ_KT 1 // damping (tshift)
#define THEORY_PARAM_STATIC_LORENTZ_KT_LF 2 // frequency, damping (tshift)
#define THEORY_PARAM_DYNAMIC_LORENTZ_KT_LF 3 // frequency, damping, hop-rate (tshift)
#define THEORY_PARAM_COMBI_LGKT 2 // Lorentz rate, Gauss rate (tshift)
#define THEORY_PARAM_SPIN_GLASS 3 // rate, hop-rate, order parameter (tshift)
#define THEORY_PARAM_RANDOM_ANISOTROPIC_HYPERFINE 2 // frequency, rate (tshift)
#define THEORY_PARAM_ABRAGAM 2 // rate, hop-rate (tshift)
#define THEORY_PARAM_INTERNAL_FIELD 4 // phase, frequency, TF damping, damping (tshift)
#define THEORY_PARAM_INTERNAL_FIELD 5 // fraction, phase, frequency, TF damping, damping (tshift)
#define THEORY_PARAM_TF_COS 2 // phase, frequency (tshift)
#define THEORY_PARAM_BESSEL 2 // phase, frequency (tshift)
#define THEORY_PARAM_INTERNAL_BESSEL 5 // fraction, phase, frequency, TF damping, LF damping (tshift)
#define THEORY_PARAM_SKEWED_GAUSS 4 // phase, frequency, rate minus, rate plus (tshift)
// number of available user functions
#define THEORY_MAX 20
#define THEORY_MAX 21
// maximal number of parameters. Needed in the contents of LF
#define THEORY_MAX_PARAM 10
@ -141,6 +143,9 @@ static PTheoDataBase fgTheoDataBase[THEORY_MAX] = {
{THEORY_DYNAMIC_GAUSS_KT_LF, THEORY_PARAM_DYNAMIC_GAUSS_KT_LF, true,
"dynGssKTLF", "dgktlf", "(frequency damping hopping-rate)", "(frequency damping hopping-rate tshift)"},
{THEORY_STATIC_LORENTZ_KT, THEORY_PARAM_STATIC_LORENTZ_KT, true,
"statExpKT", "sekt", "(rate)", "(rate tshift)"},
{THEORY_STATIC_LORENTZ_KT_LF, THEORY_PARAM_STATIC_LORENTZ_KT_LF, true,
"statExpKTLF", "sektlf", "(frequency damping)", "(frequency damping tshift)"},
@ -206,6 +211,7 @@ class PTheory
virtual double StaticGaussKT(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double StaticGaussKTLF(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double DynamicGaussKTLF(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double StaticLorentzKT(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double StaticLorentzKTLF(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double DynamicLorentzKTLF(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
virtual double CombiLGKT(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;