Make so far undocumented functions ifgk and ifll public and at the same time properly normalize them.

This commit is contained in:
suter_a 2019-01-18 10:35:26 +01:00
parent 64fc455831
commit 7ace2e7d35
2 changed files with 5 additions and 5 deletions

View File

@ -2115,14 +2115,14 @@ Double_t PTheory::InternalFieldGK(register Double_t t, const PDoubleVector& para
tt = t-val[5];
Double_t result = 0.0;
Double_t nu_t = val[1]*tt;
Double_t w_t = TWO_PI*val[1]*tt;
Double_t rateLF = TMath::Power(val[3]*tt, val[4]);
Double_t rate2 = val[2]*val[2]*tt*tt; // (sigma t)^2
if (val[1] < 0.01) { // internal field frequency is approaching zero
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(1.0-rate2)*TMath::Exp(-0.5*rate2);
} else {
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(TMath::Cos(nu_t)-val[2]*val[2]*tt/val[1]*TMath::Sin(nu_t))*TMath::Exp(-0.5*rate2);
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(TMath::Cos(w_t)-val[2]*val[2]*tt/(TWO_PI*val[1])*TMath::Sin(w_t))*TMath::Exp(-0.5*rate2);
}
return result;
@ -2167,14 +2167,14 @@ Double_t PTheory::InternalFieldLL(register Double_t t, const PDoubleVector& para
tt = t-val[5];
Double_t result = 0.0;
Double_t nu_t = val[1]*tt;
Double_t w_t = TWO_PI*val[1]*tt;
Double_t rateLF = TMath::Power(val[3]*tt, val[4]);
Double_t a_t = val[2]*tt; // a t
if (val[1] < 0.01) { // internal field frequency is approaching zero
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(1.0-a_t)*TMath::Exp(-a_t);
} else {
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(TMath::Cos(nu_t)-val[3]/val[1]*TMath::Sin(nu_t))*TMath::Exp(-a_t);
result = (1.0-val[0])*TMath::Exp(-rateLF) + val[0]*(TMath::Cos(w_t)-val[3]/(TWO_PI*val[1])*TMath::Sin(w_t))*TMath::Exp(-a_t);
}
return result;

View File

@ -196,7 +196,7 @@ static PTheoDataBase fgTheoDataBase[THEORY_MAX] = {
"internFldGK", "ifgk", "(fraction frequency Trate Lrate beta)", "(fraction frequency Trate Lrate beta tshift)"},
{THEORY_INTERNAL_FIELD_LARKIN, THEORY_PARAM_INTERNAL_FIELD_LARKIN, false,
"internFldLL", "ifll", "(fraction frequency Trate Lrate)", "(fraction frequency Trate Lrate tshift)"},
"internFldLL", "ifll", "(fraction frequency Trate Lrate beta)", "(fraction frequency Trate Lrate beta tshift)"},
{THEORY_BESSEL, THEORY_PARAM_BESSEL, false,
"bessel", "b", "(phase frequency)", "(phase frequency tshift)"},