Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ChannelingFastSimInterpolation Class Reference

#include <G4ChannelingFastSimInterpolation.hh>

Public Member Functions

 G4ChannelingFastSimInterpolation (G4double dx0, G4double dy0, G4int nPointsx0, G4int nPointsy0, G4int iModel0)
 
 ~G4ChannelingFastSimInterpolation ()=default
 
G4double GetIF (G4double xx, G4double yy)
 Get Spline Function.
 
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)
 

Detailed Description

Definition at line 45 of file G4ChannelingFastSimInterpolation.hh.

Constructor & Destructor Documentation

◆ G4ChannelingFastSimInterpolation()

G4ChannelingFastSimInterpolation::G4ChannelingFastSimInterpolation ( G4double dx0,
G4double dy0,
G4int nPointsx0,
G4int nPointsy0,
G4int iModel0 )

Definition at line 33 of file G4ChannelingFastSimInterpolation.cc.

38{
39 fDx = dx0;
40 fDy = dy0;
41 nPointsx = nPointsx0;
42 nPointsy = nPointsy0;
43 fStepi = fDx/nPointsx;
44 fStepi2= fStepi*fStepi;
45 iModel = iModel0;
46
47 //resize vectors for interpolation coefficients
48 if(iModel==1)
49 {
50 fAI.resize(nPointsx+1);
51 fBI.resize(nPointsx+1);
52 fCI.resize(nPointsx+1);
53 fDI.resize(nPointsx+1);
54 }
55 else if(iModel==2)
56 {
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));
64
65 for(G4int i=0; i<=nPointsx; i++)
66 {
67 fCI3D[i][nPointsy]=0.;
68 }
69 }
70}
int G4int
Definition G4Types.hh:85

◆ ~G4ChannelingFastSimInterpolation()

G4ChannelingFastSimInterpolation::~G4ChannelingFastSimInterpolation ( )
default

Member Function Documentation

◆ GetIF()

G4double G4ChannelingFastSimInterpolation::GetIF ( G4double xx,
G4double yy )

Get Spline Function.

Definition at line 74 of file G4ChannelingFastSimInterpolation.cc.

74 {
75 G4double SplineF=0.;
76 if(iModel==1)
77 {
78 SplineF = Spline1D(xx);
79 }
80 else if(iModel==2)
81 {
82 SplineF = Spline2D(xx, yy);
83 }
84 return SplineF;
85}
double G4double
Definition G4Types.hh:83

Referenced by G4VChannelingFastSimCrystalData::ElectronDensity(), G4VChannelingFastSimCrystalData::Ex(), G4VChannelingFastSimCrystalData::Ey(), and G4VChannelingFastSimCrystalData::MinIonizationEnergy().

◆ SetCoefficients1D()

void G4ChannelingFastSimInterpolation::SetCoefficients1D ( G4double AI0,
G4double BI0,
G4double CI0,
G4double DI0,
G4int i )

Set spline coefficients.

Definition at line 89 of file G4ChannelingFastSimInterpolation.cc.

93 {
94 fAI[i] = AI0;
95 fBI[i] = BI0/cm;
96 fCI[i] = CI0/cm2;
97 fDI[i] = DI0/cm3;
98}

Referenced by G4ChannelingFastSimCrystalData::SetMaterialProperties().

◆ SetCoefficients2D()

void G4ChannelingFastSimInterpolation::SetCoefficients2D ( G4double AI3D0,
G4double BI3D0,
G4double CI3D0,
G4int i,
G4int j,
G4int k )

Definition at line 102 of file G4ChannelingFastSimInterpolation.cc.

107 {
108 if (k==0)
109 {
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;
113 }
114 else if (k==1)
115 {
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;
119 }
120}

Referenced by G4ChannelingFastSimCrystalData::SetMaterialProperties().


The documentation for this class was generated from the following files: