File indexing completed on 2025-09-17 08:59:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef G4ParticleHPIsoData_h
0030 #define G4ParticleHPIsoData_h 1
0031
0032
0033
0034
0035
0036 #include "G4ios.hh"
0037 #include "globals.hh"
0038 #include "G4ParticleHPNames.hh"
0039 #include "G4ParticleHPVector.hh"
0040
0041 class G4ParticleDefinition;
0042
0043 class G4ParticleHPIsoData
0044 {
0045 public:
0046
0047 G4ParticleHPIsoData() = default;
0048
0049 ~G4ParticleHPIsoData() { delete theChannelData; }
0050
0051 inline G4double GetXsec(G4double energy)
0052 {
0053 return std::max(0., theChannelData->GetXsec(energy));
0054 }
0055
0056 G4bool Init(G4int A, G4int Z, G4double abun, const G4String& dirName, const G4String& aFSType)
0057 {
0058 return Init(A, Z, 0, abun, dirName, aFSType);
0059 }
0060
0061 G4bool Init(G4int A, G4int Z, G4int M, G4double abun, const G4String& dirName, const G4String& aFSType);
0062
0063 void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile,
0064 const char* dataDirVariable)
0065 {
0066 Init(A, Z, 0, abun, projectile, dataDirVariable);
0067 }
0068
0069 void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile,
0070 const char* dataDirVariable);
0071
0072 G4ParticleHPVector* MakeElasticData() const { return theElasticData; }
0073 G4ParticleHPVector* MakeFissionData() const { return theFissionData; }
0074 G4ParticleHPVector* MakeCaptureData() const { return theCaptureData; }
0075 G4ParticleHPVector* MakeInelasticData() const { return theInelasticData; }
0076 G4ParticleHPVector* MakeChannelData() const { return theChannelData; }
0077
0078 G4String GetName(G4int A, G4int Z, const G4String& base, const G4String& rest);
0079
0080 void FillChannelData(G4ParticleHPVector* aBuffer);
0081
0082 void ThinOut(G4double precision)
0083 {
0084 if (theFissionData != nullptr) theFissionData->ThinOut(precision);
0085 if (theCaptureData != nullptr) theCaptureData->ThinOut(precision);
0086 if (theElasticData != nullptr) theElasticData->ThinOut(precision);
0087 if (theInelasticData != nullptr) theInelasticData->ThinOut(precision);
0088 }
0089
0090 G4ParticleHPIsoData& operator=(const G4ParticleHPIsoData& right) = delete;
0091 G4ParticleHPIsoData(const G4ParticleHPIsoData&) = delete;
0092
0093 private:
0094
0095 G4ParticleHPVector* theFissionData{nullptr};
0096 G4ParticleHPVector* theCaptureData{nullptr};
0097 G4ParticleHPVector* theElasticData{nullptr};
0098 G4ParticleHPVector* theInelasticData{nullptr};
0099 G4ParticleHPVector* theChannelData{nullptr};
0100
0101 G4String theFileName;
0102 G4ParticleHPNames theNames;
0103 };
0104
0105 #endif