File indexing completed on 2025-01-18 09:58:40
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 #ifndef G4MICROELECCROSSSECTIONDATASET_NEW_HH
0031 #define G4MICROELECCROSSSECTIONDATASET_NEW_HH 1
0032
0033 #include <CLHEP/Units/SystemOfUnits.h>
0034 #include "G4ShellEMDataSet.hh"
0035
0036 class G4MicroElecCrossSectionDataSet_new : public G4VEMDataSet
0037 {
0038 public:
0039 explicit G4MicroElecCrossSectionDataSet_new(G4VDataSetAlgorithm* algo,
0040 G4double xUnit=CLHEP::MeV,
0041 G4double dataUnit=CLHEP::barn);
0042 ~G4MicroElecCrossSectionDataSet_new() override;
0043
0044 G4double FindValue(G4double e, G4int componentId=0) const override;
0045 G4double FindShellValue(G4double argEnergy, G4int shell) const;
0046 void PrintData(void) const override;
0047 const G4VEMDataSet* GetComponent(G4int componentId) const override
0048 { return components[componentId]; }
0049 void AddComponent(G4VEMDataSet* dataSet) override
0050 { components.push_back(dataSet); }
0051 size_t NumberOfComponents(void) const override
0052 { return components.size(); }
0053 const G4DataVector& GetEnergies(G4int componentId) const override
0054 { return GetComponent(componentId)->GetEnergies(0); }
0055 const G4DataVector& GetData(G4int componentId) const override
0056 { return GetComponent(componentId)->GetData(0); }
0057 const G4DataVector& GetLogEnergies(G4int componentId) const override
0058 { return GetComponent(componentId)->GetLogEnergies(0); }
0059 const G4DataVector& GetLogData(G4int componentId) const override
0060 { return GetComponent(componentId)->GetLogData(0); }
0061 void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId) override;
0062 void SetLogEnergiesData(G4DataVector* x,
0063 G4DataVector* values,
0064 G4DataVector* log_x,
0065 G4DataVector* log_values,
0066 G4int componentId) override;
0067 G4bool LoadData(const G4String & argFileName) override;
0068 G4bool LoadNonLogData(const G4String & argFileName) override;
0069 G4bool SaveData(const G4String & argFileName) const override;
0070 G4double RandomSelect(G4int ) const override
0071 { return -1.; };
0072
0073 G4MicroElecCrossSectionDataSet_new(const G4MicroElecCrossSectionDataSet_new & copy) = delete;
0074 G4MicroElecCrossSectionDataSet_new& operator=(const G4MicroElecCrossSectionDataSet_new & right) = delete;
0075
0076 private:
0077 G4String FullFileName(const G4String & argFileName) const;
0078 G4double GetUnitEnergies() const { return unitEnergies; }
0079 G4double GetUnitData() const { return unitData; }
0080 const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
0081 void CleanUpComponents();
0082
0083 std::vector<G4VEMDataSet*> components;
0084
0085 G4VDataSetAlgorithm* algorithm;
0086 G4double unitEnergies;
0087 G4double unitData;
0088 };
0089 #endif