source: trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPIsoData.hh @ 962

Last change on this file since 962 was 962, checked in by garnier, 15 years ago

update processes

File size: 4.0 KB
Line 
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: G4NeutronHPIsoData.hh,v 1.16 2007/06/06 12:45:13 ahoward Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30#ifndef G4NeutronHPIsoData_h
31#define G4NeutronHPIsoData_h 1
32
33 // Hadronic Process: Very Low Energy Neutron X-Sections
34 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
35 // Has the Cross-section data for on isotope.
36 
37#include "globals.hh"
38#include "G4ios.hh"
39#include <fstream>
40// #include <strstream>
41#include <stdlib.h>
42#include "G4NeutronHPVector.hh"
43#include "G4NeutronHPNames.hh"
44
45class G4NeutronHPIsoData
46{
47public:
48
49  G4NeutronHPIsoData()
50  {
51    theChannelData = 0;
52    theFissionData = 0;
53    theCaptureData = 0;
54    theElasticData = 0;
55    theInelasticData = 0;
56  }
57 
58  ~G4NeutronHPIsoData(){if(theChannelData!=0) delete theChannelData;}
59 
60  inline G4double GetXsec(G4double energy)
61  {
62    return std::max(0., theChannelData->GetXsec(energy));
63  }
64  G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
65 
66  void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
67 
68  inline G4NeutronHPVector * MakeElasticData()
69    {return theElasticData;}
70  inline G4NeutronHPVector * MakeFissionData()
71    {return theFissionData;}
72  inline G4NeutronHPVector * MakeCaptureData()
73    {return theCaptureData;}
74  inline G4NeutronHPVector * MakeInelasticData()
75    {return theInelasticData;}
76  inline G4NeutronHPVector * MakeChannelData()
77    {return theChannelData;}
78
79  G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
80 
81  inline void FillChannelData(G4NeutronHPVector * aBuffer)
82  {
83    if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
84    theChannelData = new G4NeutronHPVector;
85    for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
86    {
87      theChannelData->SetPoint(i, aBuffer->GetPoint(i));
88    }
89  }
90 
91  inline void ThinOut(G4double precision)
92  {
93    if(theFissionData) theFissionData->ThinOut(precision);
94    if(theCaptureData) theCaptureData->ThinOut(precision);
95    if(theElasticData) theElasticData->ThinOut(precision);
96    if(theInelasticData) theInelasticData->ThinOut(precision);
97  }
98 
99private:
100
101  G4NeutronHPVector * theFissionData;
102  G4NeutronHPVector * theCaptureData;
103  G4NeutronHPVector * theElasticData;
104  G4NeutronHPVector * theInelasticData;
105  G4NeutronHPVector * theChannelData;
106
107  G4String theFileName;
108  G4NeutronHPNames theNames;
109};
110
111#endif
Note: See TracBrowser for help on using the repository browser.