ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticleHPIsoData.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4ParticleHPIsoData.hh
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 
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!!!");
91  for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
92  {
93  theChannelData->SetPoint(i, aBuffer->GetPoint(i));
94  }
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 
113 
116 };
117 
118 #endif