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

#include <G4ParticleHPFastLegendre.hh>

Public Member Functions

 G4ParticleHPFastLegendre ()
 
 ~G4ParticleHPFastLegendre ()
 
G4double Integrate (G4int l, G4double costh)
 
G4double Evaluate (G4int l, G4double costh)
 

Detailed Description

Definition at line 34 of file G4ParticleHPFastLegendre.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPFastLegendre()

G4ParticleHPFastLegendre::G4ParticleHPFastLegendre ( )
inline

Definition at line 38 of file G4ParticleHPFastLegendre.hh.

39 {
40 value = new const G4double * [31];
41 value[0] = l0;
42 value[1] = l1;
43 value[2] = l2;
44 value[3] = l3;
45 value[4] = l4;
46 value[5] = l5;
47 value[6] = l6;
48 value[7] = l7;
49 value[8] = l8;
50 value[9] = l9;
51 value[10] = l10;
52 value[11] = l11;
53 value[12] = l12;
54 value[13] = l13;
55 value[14] = l14;
56 value[15] = l15;
57 value[16] = l16;
58 value[17] = l17;
59 value[18] = l18;
60 value[19] = l19;
61 value[20] = l20;
62 value[21] = l21;
63 value[22] = l22;
64 value[23] = l23;
65 value[24] = l24;
66 value[25] = l25;
67 value[26] = l26;
68 value[27] = l27;
69 value[28] = l28;
70 value[29] = l29;
71 value[30] = l30;
72 integral = new const G4double * [31];
73 integral[0] = i0;
74 integral[1] = i1;
75 integral[2] = i2;
76 integral[3] = i3;
77 integral[4] = i4;
78 integral[5] = i5;
79 integral[6] = i6;
80 integral[7] = i7;
81 integral[8] = i8;
82 integral[9] = i9;
83 integral[10] = i10;
84 integral[11] = i11;
85 integral[12] = i12;
86 integral[13] = i13;
87 integral[14] = i14;
88 integral[15] = i15;
89 integral[16] = i16;
90 integral[17] = i17;
91 integral[18] = i18;
92 integral[19] = i19;
93 integral[20] = i20;
94 integral[21] = i21;
95 integral[22] = i22;
96 integral[23] = i23;
97 integral[24] = i24;
98 integral[25] = i25;
99 integral[26] = i26;
100 integral[27] = i27;
101 integral[28] = i28;
102 integral[29] = i29;
103 integral[30] = i30;
104
105 G4int i;
106 for(i=0;i<31;i++) theNbin[i]=1+200*(i+1);
107 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85

◆ ~G4ParticleHPFastLegendre()

G4ParticleHPFastLegendre::~G4ParticleHPFastLegendre ( )
inline

Definition at line 109 of file G4ParticleHPFastLegendre.hh.

110 {
111 delete [] value;
112 delete [] integral;
113 }

Member Function Documentation

◆ Evaluate()

G4double G4ParticleHPFastLegendre::Evaluate ( G4int  l,
G4double  costh 
)
inline

Definition at line 127 of file G4ParticleHPFastLegendre.hh.

128 {
129 if(l>30) return regularEvaluate(l,costh);
130 G4double result;
131 G4int bin = GetBin(l, costh);
132 if(bin != theNbin[l]-1)
133 {
134 G4double y1, y2;
135 y1 = value[l][bin];
136 y2 = value[l][bin+1];
137 result = Interpolate(bin, l, y1, y2, costh);
138 }
139 else
140 {
141 result = value[l][bin];
142 }
143 return result;
144 }

Referenced by G4ParticleHPLegendreStore::SampleDiscreteTwoBody(), G4ParticleHPLegendreStore::SampleElastic(), and G4ParticleHPLegendreStore::SampleMax().

◆ Integrate()

G4double G4ParticleHPFastLegendre::Integrate ( G4int  l,
G4double  costh 
)
inline

Definition at line 115 of file G4ParticleHPFastLegendre.hh.

116 {
117 if(l>30) return regularIntegrate(l,costh);
118 G4int bin = GetBin(l, costh);
119 G4double y1, y2;
120// G4cout <<"Testhpw G4ParticleHPFastLegendre::Integrate "<<l<<" "<<bin<<G4endl;
121 y1 = integral[l][bin];
122 y2 = integral[l][bin+1];
123// G4cout <<"Testhpw G4ParticleHPFastLegendre::Integrate exit"<<G4endl;
124 return Interpolate(bin, l, y1, y2, costh);
125 }

Referenced by G4ParticleHPLegendreStore::Integrate().


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