Geant4_10
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 //
28 #ifndef G4NeutronHPIsoData_h
29 #define G4NeutronHPIsoData_h 1
30 
31  // Hadronic Process: Very Low Energy Neutron X-Sections
32  // original by H.P. Wellisch, TRIUMF, 14-Feb-97
33  // Has the Cross-section data for on isotope.
34 
35 #include "globals.hh"
36 #include "G4ios.hh"
37 #include <fstream>
38 // #include <strstream>
39 #include <stdlib.h>
40 #include "G4NeutronHPVector.hh"
41 #include "G4NeutronHPNames.hh"
42 
44 {
45 public:
46 
48  {
49  theChannelData = 0;
50  theFissionData = 0;
51  theCaptureData = 0;
52  theElasticData = 0;
53  theInelasticData = 0;
54  }
55 
56  ~G4NeutronHPIsoData(){if(theChannelData!=0) delete theChannelData;}
57 
59  {
60  return std::max(0., theChannelData->GetXsec(energy));
61  }
62 
63  //G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
64  G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
65  G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
66 
67  //void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
68  void Init(G4int A, G4int Z, G4double abun) { G4int M =0;
69  Init( A, Z, M, abun); };
70  void Init(G4int A, G4int Z, G4int M, G4double abun); //fill PhysicsVector for this Isotope
71 
73  {return theElasticData;}
75  {return theFissionData;}
77  {return theCaptureData;}
79  {return theInelasticData;}
81  {return theChannelData;}
82 
84 
85  inline void FillChannelData(G4NeutronHPVector * aBuffer)
86  {
87  if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
88  theChannelData = new G4NeutronHPVector;
89  for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
90  {
91  theChannelData->SetPoint(i, aBuffer->GetPoint(i));
92  }
93  }
94 
95  inline void ThinOut(G4double precision)
96  {
97  if(theFissionData) theFissionData->ThinOut(precision);
98  if(theCaptureData) theCaptureData->ThinOut(precision);
99  if(theElasticData) theElasticData->ThinOut(precision);
100  if(theInelasticData) theInelasticData->ThinOut(precision);
101  }
102 
103 private:
104 
105  G4NeutronHPVector * theFissionData;
106  G4NeutronHPVector * theCaptureData;
107  G4NeutronHPVector * theElasticData;
108  G4NeutronHPVector * theInelasticData;
109  G4NeutronHPVector * theChannelData;
110 
111  G4String theFileName;
112  G4NeutronHPNames theNames;
113 };
114 
115 #endif
G4int GetVectorLength() const
G4String GetName(G4int A, G4int Z, G4String base, G4String rest)
void SetPoint(G4int i, const G4NeutronHPDataPoint &it)
G4NeutronHPVector * MakeFissionData()
void ThinOut(G4double precision)
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
int G4int
Definition: G4Types.hh:78
G4NeutronHPVector * MakeInelasticData()
double energy
Definition: plottest35.C:25
void Init(G4int A, G4int Z, G4double abun)
Float_t Z
Definition: plot.C:39
bool G4bool
Definition: G4Types.hh:79
G4double GetXsec(G4double energy)
G4NeutronHPVector * MakeCaptureData()
G4NeutronHPVector * MakeElasticData()
void FillChannelData(G4NeutronHPVector *aBuffer)
G4double GetXsec(G4int i)
const G4NeutronHPDataPoint & GetPoint(G4int i) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
void ThinOut(G4double precision)
double G4double
Definition: G4Types.hh:76
G4NeutronHPVector * MakeChannelData()