29 vTestFunction1 =
new TFormula(
"f1",
"[0]*(x^4 - [3] *x^3 + [4] * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)");
30 rhoTestFunction1 =
new TFormula(
"ff1",
"[0]*(((16.0 * x^2 - 9.0 * [3] * x + 4.0*[4]) *cos([1] * y)^2 * exp(-1 *[2]*z^2)) - ((x^2 - [3] * x + [4]) * 2 * [1]^2 * cos(2 * [1] * y) * exp(-1 *[2]*z^2)) + ((x^4 - [3] * x^3 + [4] * x^2) * cos([1] * y)^2 * (4*[2]^2*z^2 - 2 * [2]) * exp(-1 *[2]*z^2)))");
32 erTestFunction1 =
new TFormula(
"er",
" [0]*(4*x^3 - 3 * [3] *x^2 + 2 * [4] * x)*cos([1]* y)^2*exp(-1* [2] * z^2)");
34 " [0]*(x^3 - [3] *x^2 + [4] * x)* -1 * [1] * sin(2 * [1]* y)*exp(-1* [2] * z^2)");
36 " [0]*(x^4 - [3] *x^3 + [4] * x^2)*cos([1]* y)^2*-1*2*[2]*z*exp(-1* [2] * z^2)");
39 " [0]*(4*x^3 - 3 * [3] *x^2 + 2 * [4] * x)*cos([1]* y)^2*((sqrt(pi)*TMath::Erf(sqrt([2]) * z))/(2 * sqrt([2]))) ");
41 "[0]* (x^3 - [3] *x^2 + [4] * x)* -1 * [1] * sin(2 * [1]* y)*((sqrt(pi)*TMath::Erf(sqrt([2]) * z))/(2 * sqrt([2])))");
43 "[0]* (x^4 - [3] *x^3 + [4] * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)");
45 printf(
"Setting Analytic Formula, variables:\n");
46 printf(
"ifc=%f\tofc=%f\tdelz=%f\ndiff=%f\tscale=%f\n", ifc_radius, ofc_radius, tpc_halfz, diff, scalefactor);
47 printf(
"a=%E\nb=%E\nc=%E\nd=%f\ne=%f\n", a, b, c, d, e);
69 ret.RotateZ(pos.Phi());
75 const double alice_chargescale = 8.85e-14;
77 return alice_chargescale *
rhoTestFunction1->Eval(pos.Perp(), pos.Phi(), pos.Z());
83 TVector3 eintI, eintF;
91 TVector3 ret = eintF - eintI;
94 ret.RotateZ(pos.Phi());