Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4NeutronHPFastLegendre Class Reference

#include <G4NeutronHPFastLegendre.hh>

Public Member Functions

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

Detailed Description

Definition at line 33 of file G4NeutronHPFastLegendre.hh.

Constructor & Destructor Documentation

G4NeutronHPFastLegendre::G4NeutronHPFastLegendre ( )
inline

Definition at line 37 of file G4NeutronHPFastLegendre.hh.

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

Definition at line 108 of file G4NeutronHPFastLegendre.hh.

109  {
110  delete [] value;
111  delete [] integral;
112  }
const XML_Char int const XML_Char * value

Member Function Documentation

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

Definition at line 126 of file G4NeutronHPFastLegendre.hh.

References plottest35::bin.

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

127  {
128  if(l>30) return regularEvaluate(l,costh);
129  G4double result;
130  G4int bin = GetBin(l, costh);
131  if(bin != theNbin[l]-1)
132  {
133  G4double y1, y2;
134  y1 = value[l][bin];
135  y2 = value[l][bin+1];
136  result = Interpolate(bin, l, y1, y2, costh);
137  }
138  else
139  {
140  result = value[l][bin];
141  }
142  return result;
143  }
tuple bin
Definition: plottest35.py:22
int G4int
Definition: G4Types.hh:78
const XML_Char int const XML_Char * value
double G4double
Definition: G4Types.hh:76
G4double G4NeutronHPFastLegendre::Integrate ( G4int  l,
G4double  costh 
)
inline

Definition at line 114 of file G4NeutronHPFastLegendre.hh.

References plottest35::bin.

Referenced by G4NeutronHPLegendreStore::Integrate().

115  {
116  if(l>30) return regularIntegrate(l,costh);
117  G4int bin = GetBin(l, costh);
118  G4double y1, y2;
119 // G4cout <<"Testhpw G4NeutronHPFastLegendre::Integrate "<<l<<" "<<bin<<G4endl;
120  y1 = integral[l][bin];
121  y2 = integral[l][bin+1];
122 // G4cout <<"Testhpw G4NeutronHPFastLegendre::Integrate exit"<<G4endl;
123  return Interpolate(bin, l, y1, y2, costh);
124  }
tuple bin
Definition: plottest35.py:22
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

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