File indexing completed on 2025-01-18 09:59:05
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
0048 #ifndef G4SHELLEMDATASET_HH
0049 #define G4SHELLEMDATASET_HH 1
0050
0051 #include <vector>
0052 #include <CLHEP/Units/SystemOfUnits.h>
0053
0054 #include "globals.hh"
0055 #include "G4VEMDataSet.hh"
0056
0057 class G4VDataSetAlgorithm;
0058
0059 class G4ShellEMDataSet : public G4VEMDataSet
0060 {
0061 public:
0062 explicit G4ShellEMDataSet(G4int Z,
0063 G4VDataSetAlgorithm* algo,
0064 G4double eUnit=CLHEP::MeV,
0065 G4double dataUnit=CLHEP::barn);
0066 virtual ~G4ShellEMDataSet();
0067
0068 G4double FindValue(G4double energy, G4int componentId=0) const override;
0069
0070 void PrintData(void) const override;
0071
0072 const G4VEMDataSet* GetComponent(G4int componentId) const override { return components[componentId]; }
0073 void AddComponent(G4VEMDataSet* dataSet) override { components.push_back(dataSet); }
0074 size_t NumberOfComponents(void) const override { return components.size(); }
0075
0076 const G4DataVector& GetEnergies(G4int componentId) const override { return GetComponent(componentId)->GetEnergies(0); }
0077 const G4DataVector& GetData(G4int componentId) const override { return GetComponent(componentId)->GetData(0); }
0078 const G4DataVector& GetLogEnergies(G4int componentId) const override
0079 { return GetComponent(componentId)->GetLogEnergies(0); }
0080 const G4DataVector& GetLogData(G4int componentId) const override { return GetComponent(componentId)->GetLogData(0); }
0081
0082 void SetEnergiesData(G4DataVector* energies, G4DataVector* data, G4int componentId) override;
0083 void SetLogEnergiesData(G4DataVector* energies,
0084 G4DataVector* data,
0085 G4DataVector* log_energies,
0086 G4DataVector* log_data,
0087 G4int componentId) override;
0088
0089 G4bool LoadData(const G4String& fileName) override;
0090 G4bool LoadNonLogData(const G4String& fileName) override;
0091 G4bool SaveData(const G4String& fileName) const override;
0092 G4double RandomSelect(G4int ) const override { return -1.; };
0093
0094 G4ShellEMDataSet(const G4ShellEMDataSet& copy) = delete;
0095 G4ShellEMDataSet& operator=(const G4ShellEMDataSet& right) = delete;
0096
0097 protected:
0098 G4double GetUnitEnergies() const { return unitEnergies; }
0099 G4double GetUnitData() const { return unitData; }
0100 const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
0101 void CleanUpComponents();
0102
0103 private:
0104 G4String FullFileName(const G4String& fileName) const;
0105
0106 std::vector<G4VEMDataSet*> components;
0107 G4VDataSetAlgorithm* algorithm;
0108
0109 G4double unitEnergies;
0110 G4double unitData;
0111 G4int z;
0112 };
0113 #endif