Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPIsoData.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 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
28 //
29 #ifndef G4ParticleHPIsoData_h
30 #define G4ParticleHPIsoData_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 "G4ParticleHPVector.hh"
42 #include "G4ParticleHPNames.hh"
44 
46 {
47 public:
48 
50  {
51  theChannelData = 0;
52  theFissionData = 0;
53  theCaptureData = 0;
54  theElasticData = 0;
55  theInelasticData = 0;
56  }
57 
58  ~G4ParticleHPIsoData(){if(theChannelData!=0) delete theChannelData;}
59 
61  {
62  return std::max(0., theChannelData->GetXsec(energy));
63  }
64 
65  //G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
66  G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
67  G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
68 
69  //void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
70  void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile, const char* dataDirVariable) { G4int M =0;
71  Init( A, Z, M, abun, projectile, dataDirVariable ); };
72  void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile, const char* dataDirVariable); //fill PhysicsVector for this Isotope
73 
75  {return theElasticData;}
77  {return theFissionData;}
79  {return theCaptureData;}
81  {return theInelasticData;}
83  {return theChannelData;}
84 
86 
87  inline void FillChannelData(G4ParticleHPVector * aBuffer)
88  {
89  if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
90  theChannelData = new G4ParticleHPVector;
91  for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
92  {
93  theChannelData->SetPoint(i, aBuffer->GetPoint(i));
94  }
95  theChannelData->Hash();
96  }
97 
98  inline void ThinOut(G4double precision)
99  {
100  if(theFissionData) theFissionData->ThinOut(precision);
101  if(theCaptureData) theCaptureData->ThinOut(precision);
102  if(theElasticData) theElasticData->ThinOut(precision);
103  if(theInelasticData) theInelasticData->ThinOut(precision);
104  }
105 
106 private:
107 
108  G4ParticleHPVector * theFissionData;
109  G4ParticleHPVector * theCaptureData;
110  G4ParticleHPVector * theElasticData;
111  G4ParticleHPVector * theInelasticData;
112  G4ParticleHPVector * theChannelData;
113 
114  G4String theFileName;
115  G4ParticleHPNames theNames;
116 };
117 
118 #endif
G4int GetVectorLength() const
G4ParticleHPVector * MakeFissionData()
G4ParticleHPVector * MakeInelasticData()
G4double GetXsec(G4double energy)
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
int G4int
Definition: G4Types.hh:78
G4double GetXsec(G4int i)
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
G4ParticleHPVector * MakeElasticData()
G4ParticleHPVector * MakeCaptureData()
void ThinOut(G4double precision)
G4ParticleHPVector * MakeChannelData()
void SetPoint(G4int i, const G4ParticleHPDataPoint &it)
void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition *projectile, const char *dataDirVariable)
G4String GetName(G4int A, G4int Z, G4String base, G4String rest)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
void FillChannelData(G4ParticleHPVector *aBuffer)
double G4double
Definition: G4Types.hh:76
const G4ParticleHPDataPoint & GetPoint(G4int i) const
void ThinOut(G4double precision)