cout << "Could not find nucleus " << name << endl;
return;
}
switch (fF) {
case 0: // Proton
fFunction = new TF1("prot","x*x*exp(-x/[0])",0,10);
fFunction->SetParameter(0,fR);
break;
case 9: // Proton
fFunction = new TF1("prot","x*x*exp(-x*x/[0]/[0]/2)",0,10);
fFunction->SetParameter(0,fR);
break;
case 10: // Proton
fFunction = new TF1("prot","x*x*((1-[0])/[1]^3*exp(-x*x/[1]/[1])+[0]/(0.4*[1])^3*exp(-x*x/(0.4*[1])^2))",0,10);
fFunction->SetParameter(0,0.5);
fFunction->SetParameter(1,fR);
break;
case 1: // 3pF
fFunction = new TF1(name,"x*x*(1+[2]*(x/[0])**2)/(1+exp((x-[0])/[1]))",0,15);
fFunction->SetParameters(fR,fA,fW);
break;
case 2: // 3pG
fFunction = new TF1("3pg","x*x*(1+[2]*(x/[0])**2)/(1+exp((x**2-[0]**2)/[1]**2))",0,15);
fFunction->SetParameters(fR,fA,fW);
break;
case 3: // Hulthen (see nucl-ex/0603010)
fFunction = new TF1("f3","x*x*([0]*[1]*([0]+[1]))/(2*pi*(pow([0]-[1],2)))*pow((exp(-[0]*x)-exp(-[1]*x))/x,2)",0,10);
fFunction->SetParameters(1/4.38,1/.85);
break;
case 4: // Hulthen HIJING
fFunction = new TF1("f4","x*x*([0]*[1]*([0]+[1]))/(2*pi*(pow([0]-[1],2)))*pow((exp(-[0]*x)-exp(-[1]*x))/x,2)",0,20);
fFunction->SetParameters(2/4.38,2/.85);
break;
case 5: // Ellipsoid (Uranium)
fFunction = new TF1(name,"x*x*(1+[2]*(x/[0])**2)/(1+exp((x-[0])/[1]))",0,15);
fFunction->SetParameters(fR,fA,0); // same as 3pF but setting W to zero
break;
case 6: // He3/H3
fFunction = 0; // read in file instead
break;
case 7: // Deformed nuclei, box method
fFunction = 0; // no function: only need beta parameters and use uniform box distribution
break;
case 8: // Deformed nuclei, TF2 method
fFunction2 = new TF2("f77","x*x*TMath::Sin(y)/(1+exp((x-[0]*(1+[2]*0.315*(3*pow(cos(y),2)-1.0)+[3]*0.105*(35*pow(cos(y),4)-30*pow(cos(y),2)+3)))/[1]))",
0,20,0.0,TMath::Pi());
fFunction2->SetNpx(120);
fFunction2->SetNpy(120);
fFunction2->SetParameter(0,fR);
fFunction2->SetParameter(1,fA);
fFunction2->SetParameter(2,fBeta2);
fFunction2->SetParameter(3,fBeta4);
break;
default:
cerr << "Could not find function type " << fF << endl;
}
return;
}
void TGlauNucleus::SetR(Double_t ir)
{
fR = ir;
switch (fF) {
case 0: // Proton
case 9: // Proton
case 1: // 3pF
case 2: // 3pG
case 5: // Ellipsoid (Uranium)
fFunction->SetParameter(0,fR);
break;
case 10: // Proton
fFunction->SetParameter(1,fR);
break;
default:
cout << "Error: fR not needed for function " << fF <<endl;
}
}
void TGlauNucleus::SetA(Double_t ia)
{
fA = ia;
switch (fF) {
case 1: // 3pF
case 2: // 3pG
case 5: // Ellipsoid (Uranium)
fFunction->SetParameter(1,fA);
break;
default:
cout << "Error: fA not needed for function " << fF <<endl;
}
}
void TGlauNucleus::SetW(Double_t iw)
{
fW = iw;
switch (fF) {
case 1: // 3pF
case 2: // 3pG
fFunction->SetParameter(2,fW);
break;
default:
cout << "Error: fW not needed for function " << fF <<endl;