Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4NeutronHPIsoData.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// $Id$
28//
29#ifndef G4NeutronHPIsoData_h
30#define G4NeutronHPIsoData_h 1
31
32 // Hadronic Process: Very Low Energy Neutron X-Sections
33 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
34 // Has the Cross-section data for on isotope.
35
36#include "globals.hh"
37#include "G4ios.hh"
38#include <fstream>
39// #include <strstream>
40#include <stdlib.h>
41#include "G4NeutronHPVector.hh"
42#include "G4NeutronHPNames.hh"
43
45{
46public:
47
49 {
50 theChannelData = 0;
51 theFissionData = 0;
52 theCaptureData = 0;
53 theElasticData = 0;
54 theInelasticData = 0;
55 }
56
57 ~G4NeutronHPIsoData(){if(theChannelData!=0) delete theChannelData;}
58
59 inline G4double GetXsec(G4double energy)
60 {
61 return std::max(0., theChannelData->GetXsec(energy));
62 }
63
64 //G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
65 G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
66 G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
67
68 //void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
69 void Init(G4int A, G4int Z, G4double abun) { G4int M =0;
70 Init( A, Z, M, abun); };
71 void Init(G4int A, G4int Z, G4int M, G4double abun); //fill PhysicsVector for this Isotope
72
74 {return theElasticData;}
76 {return theFissionData;}
78 {return theCaptureData;}
80 {return theInelasticData;}
82 {return theChannelData;}
83
84 G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
85
86 inline void FillChannelData(G4NeutronHPVector * aBuffer)
87 {
88 if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
89 theChannelData = new G4NeutronHPVector;
90 for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
91 {
92 theChannelData->SetPoint(i, aBuffer->GetPoint(i));
93 }
94 }
95
96 inline void ThinOut(G4double precision)
97 {
98 if(theFissionData) theFissionData->ThinOut(precision);
99 if(theCaptureData) theCaptureData->ThinOut(precision);
100 if(theElasticData) theElasticData->ThinOut(precision);
101 if(theInelasticData) theInelasticData->ThinOut(precision);
102 }
103
104private:
105
106 G4NeutronHPVector * theFissionData;
107 G4NeutronHPVector * theCaptureData;
108 G4NeutronHPVector * theElasticData;
109 G4NeutronHPVector * theInelasticData;
110 G4NeutronHPVector * theChannelData;
111
112 G4String theFileName;
113 G4NeutronHPNames theNames;
114};
115
116#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4NeutronHPVector * MakeFissionData()
G4NeutronHPVector * MakeChannelData()
G4NeutronHPVector * MakeElasticData()
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
G4NeutronHPVector * MakeCaptureData()
void FillChannelData(G4NeutronHPVector *aBuffer)
void Init(G4int A, G4int Z, G4double abun)
void ThinOut(G4double precision)
G4NeutronHPVector * MakeInelasticData()
G4String GetName(G4int A, G4int Z, G4String base, G4String rest)
G4double GetXsec(G4double energy)
G4int GetVectorLength() const
G4double GetXsec(G4int i)
void SetPoint(G4int i, const G4NeutronHPDataPoint &it)
const G4NeutronHPDataPoint & GetPoint(G4int i) const
void ThinOut(G4double precision)