Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4NeutronHPLegendreStore.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 #ifndef G4NeutronHPLegendreStore_h
29 #define G4NeutronHPLegendreStore_h 1
30 
33 #include "G4ios.hh"
34 #include <fstream>
35 
37 {
38  public:
39 
41  {
42  theCoeff = new G4NeutronHPLegendreTable[n];
43  nEnergy = n;
44  }
45 
47  {
48  delete [] theCoeff;
49  }
50 
51  inline void Init(G4int i, G4double e, G4int n)
52  {
53  theCoeff[i].Init(e, n);
54  }
55  inline void SetNPoints(G4int n) { nEnergy = n; }
56  inline void SetEnergy(G4int i, G4double energy) { theCoeff[i].SetEnergy(energy); }
57  inline void SetTemperature(G4int i, G4double temp) { theCoeff[i].SetTemperature(temp); }
58  inline void SetCoeff(G4int i, G4int l, G4double coeff) {theCoeff[i].SetCoeff(l, coeff); }
59  inline void SetCoeff(G4int i, G4NeutronHPLegendreTable * theTable)
60  {
61  if(i>nEnergy) throw G4HadronicException(__FILE__, __LINE__, "LegendreTableIndex out of range");
62  theCoeff[i] = *theTable;
63 // not here -- see G4NeutronHPPhotonDist.cc line 275
64 // delete theTable;
65  }
66 
67  inline G4double GetCoeff(G4int i, G4int l) {return theCoeff[i].GetCoeff(l);}
68  inline G4double GetEnergy(G4int i){return theCoeff[i].GetEnergy();}
69  inline G4double GetTemperature(G4int i){return theCoeff[i].GetTemperature();}
70  inline G4int GetNumberOfPoly(G4int i) {return theCoeff[i].GetNumberOfPoly();}
71 
73  G4double SampleElastic (G4double anEnergy);
76  G4double Integrate(G4int k, G4double costh);
77 
78  void InitInterpolation(std::istream & aDataFile)
79  {
80  theManager.Init(aDataFile);
81  }
82 
84  {
85  theManager = aManager;
86  }
87 
88  private:
89 
90  G4int nEnergy;
91  G4NeutronHPLegendreTable * theCoeff;
92  G4InterpolationManager theManager; // interpolate between different Tables
93 };
94 #endif
void SetEnergy(G4int i, G4double energy)
G4double SampleMax(G4double energy)
G4double Integrate(G4int k, G4double costh)
void Init(G4int aScheme, G4int aRange)
void Init(G4int i, G4double e, G4int n)
void Init(std::istream &aDataFile)
void SetCoeff(G4int i, G4int l, G4double coeff)
G4double GetCoeff(G4int i, G4int l)
int G4int
Definition: G4Types.hh:78
void SetCoeff(G4int i, G4NeutronHPLegendreTable *theTable)
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4double SampleElastic(G4double anEnergy)
G4double SampleDiscreteTwoBody(G4double anEnergy)
void InitInterpolation(std::istream &aDataFile)
const G4int n
void SetCoeff(G4int l, G4double coeff)
void SetManager(G4InterpolationManager &aManager)
G4double Sample(G4double energy)
double G4double
Definition: G4Types.hh:76
void SetTemperature(G4int i, G4double temp)