43 fStepi = fDx/nPointsx;
44 fStepi2= fStepi*fStepi;
50 fAI.resize(nPointsx+1);
51 fBI.resize(nPointsx+1);
52 fCI.resize(nPointsx+1);
53 fDI.resize(nPointsx+1);
57 fStepj = fDy/nPointsy;
58 fAI3D.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
59 fBI3D.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
60 fCI3D.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
61 fAI3D3.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
62 fBI3D3.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
63 fCI3D3.resize(nPointsx+1, std::vector<G4double>(nPointsy+1));
65 for(
G4int i=0; i<=nPointsx; i++)
67 fCI3D[i][nPointsy]=0.;
78 SplineF = Spline1D(xx);
82 SplineF = Spline2D(xx, yy);
110 fAI3D[i][j] = AI3D0/fStepj/fStepi/6.;
111 fBI3D[i][j] = BI3D0/fStepj/fStepi/6.;
112 fCI3D[i][j] = CI3D0/fStepj/fStepi/6./cm2;
116 fAI3D3[i][j] = AI3D0/fStepj/fStepi/6./cm2;
117 fBI3D3[i][j] = BI3D0/fStepj/fStepi/6./cm2;
118 fCI3D3[i][j] = CI3D0/fStepj/fStepi/6./cm2/cm2;
140 G4int mmx = std::floor(x1/fStepi);
141 x1 -= (mmx+1)*fStepi;
142 G4double Spline3 = fAI[mmx]+x1*(fBI[mmx]+x1*(fCI[mmx]+fDI[mmx]*x1));
173 G4int mmx = std::floor(x1/fStepi);
174 G4int mmy = std::floor(y1/fStepj);
186 G4double spl3dxx1 = fCI3D3[mmx ][mmy]*tt2y3 + fCI3D3[mmx ][mmy+1]*tt1y3 +
187 fAI3D3[mmx ][mmy]*tt2y + fBI3D3[mmx ][mmy]*tt1y;
188 G4double spl3dxx2 = fCI3D3[mmx+1][mmy]*tt2y3 + fCI3D3[mmx+1][mmy+1]*tt1y3 +
189 fAI3D3[mmx+1][mmy]*tt2y + fBI3D3[mmx+1][mmy]*tt1y;
190 G4double spl3d1 = fCI3D[ mmx ][mmy]*tt2y3 + fCI3D[mmx ][mmy+1]*tt1y3 +
191 fAI3D[ mmx ][mmy]*tt2y + fBI3D[mmx ][mmy]*tt1y;
192 G4double spl3d2 = fCI3D[ mmx+1][mmy]*tt2y3 + fCI3D[mmx+1][mmy+1]*tt1y3 +
193 fAI3D[ mmx+1][mmy]*tt2y + fBI3D[mmx+1][mmy]*tt1y;
195 G4double spl3d = spl3dxx1*tt23 + spl3dxx2*tt13 +
196 (spl3d1*6.-spl3dxx1*fStepi2)*tt2 + (spl3d2*6.-spl3dxx2*fStepi2)*tt1;
Definition of the G4ChannelingFastSimInterpolation class The class includes spline interpolation coef...
void SetCoefficients1D(G4double AI0, G4double BI0, G4double CI0, G4double DI0, G4int i)
Set spline coefficients.
void SetCoefficients2D(G4double AI3D0, G4double BI3D0, G4double CI3D0, G4int i, G4int j, G4int k)
G4ChannelingFastSimInterpolation(G4double dx0, G4double dy0, G4int nPointsx0, G4int nPointsy0, G4int iModel0)
G4double GetIF(G4double xx, G4double yy)
Get Spline Function.