File indexing completed on 2025-01-18 09:58:07
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
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #ifndef G4DNACROSSSECTIONDATASET_HH
0048 #define G4DNACROSSSECTIONDATASET_HH 1
0049
0050 #include <CLHEP/Units/SystemOfUnits.h>
0051
0052 #include "G4ShellEMDataSet.hh"
0053
0054 class G4DNACrossSectionDataSet : public G4VEMDataSet
0055 {
0056
0057 public:
0058 G4DNACrossSectionDataSet() = delete;
0059 G4DNACrossSectionDataSet(G4VDataSetAlgorithm* algo,
0060 G4double xUnit=CLHEP::MeV,
0061 G4double dataUnit=CLHEP::barn);
0062
0063 ~G4DNACrossSectionDataSet() override;
0064
0065 G4DNACrossSectionDataSet(const G4DNACrossSectionDataSet & copy) = delete;
0066 G4DNACrossSectionDataSet& operator=(const G4DNACrossSectionDataSet & right) = delete;
0067
0068 G4double FindValue(G4double e, G4int componentId=0) const override;
0069
0070 void PrintData() const override;
0071
0072 const G4VEMDataSet* GetComponent(G4int componentId) const override
0073 { return components[componentId]; }
0074
0075 void AddComponent(G4VEMDataSet* dataSet) override
0076 { components.push_back(dataSet); }
0077
0078 size_t NumberOfComponents() const override
0079 { return components.size(); }
0080
0081 const G4DataVector& GetEnergies(G4int componentId) const override
0082 { return GetComponent(componentId)->GetEnergies(0); }
0083
0084 const G4DataVector& GetData(G4int componentId) const override
0085 { return GetComponent(componentId)->GetData(0); }
0086
0087 const G4DataVector& GetLogEnergies(G4int componentId) const override
0088 { return GetComponent(componentId)->GetLogEnergies(0); }
0089
0090 const G4DataVector& GetLogData(G4int componentId) const override
0091 { return GetComponent(componentId)->GetLogData(0); }
0092
0093 void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId) override;
0094
0095 void SetLogEnergiesData(G4DataVector* x,
0096 G4DataVector* values,
0097 G4DataVector* log_x,
0098 G4DataVector* log_values,
0099 G4int componentId) override;
0100
0101 G4bool LoadData(const G4String & argFileName) override;
0102 G4bool LoadNonLogData(const G4String & argFileName) override;
0103
0104 G4bool SaveData(const G4String & argFileName) const override;
0105
0106 G4double RandomSelect(G4int ) const override { return -1.; };
0107
0108
0109
0110
0111 private:
0112
0113 G4String FullFileName(const G4String & argFileName) const;
0114
0115 std::vector<G4VEMDataSet*> components;
0116
0117 G4int z;
0118
0119 G4VDataSetAlgorithm* algorithm;
0120
0121 G4double unitEnergies;
0122 G4double unitData;
0123
0124 G4double GetUnitEnergies() const { return unitEnergies; }
0125 G4double GetUnitData() const { return unitData; }
0126 const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
0127
0128 void CleanUpComponents();
0129
0130
0131 };
0132 #endif