- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh
r819 r961 25 25 // 26 26 // 27 // $Id: G4CompositeEMDataSet.hh,v 1. 8 2006/06/29 19:33:08 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4CompositeEMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch) … … 44 44 // ------------------------------------------------------------------- 45 45 46 #ifndef 47 #defineG4COMPOSITEEMDATASET_HH 146 #ifndef G4COMPOSITEEMDATASET_HH 47 #define G4COMPOSITEEMDATASET_HH 1 48 48 49 50 51 49 #include "globals.hh" 50 #include "G4VEMDataSet.hh" 51 #include <vector> 52 52 53 53 class G4VDataSetAlgorithm; 54 54 55 class G4CompositeEMDataSet : public G4VEMDataSet 56 { 57 public: 58 G4CompositeEMDataSet(G4VDataSetAlgorithm* argAlgorithm, G4double argUnitEnergies=MeV, G4double argUnitData=barn, G4int argMinZ=1, G4int argMaxZ=99); 59 virtual ~G4CompositeEMDataSet(); 55 class G4CompositeEMDataSet : public G4VEMDataSet 56 { 57 public: 58 G4CompositeEMDataSet(G4VDataSetAlgorithm* argAlgorithm, 59 G4double eUnit=MeV, 60 G4double dataUnit=barn, 61 G4int zMin=1, 62 G4int zMax=99); 63 64 virtual ~G4CompositeEMDataSet(); 60 65 61 virtual G4double FindValue(G4double argEnergy, G4int argComponentId=0) const;66 virtual G4double FindValue(G4double x, G4int componentId=0) const; 62 67 63 virtual voidPrintData(void) const;68 virtual void PrintData(void) const; 64 69 65 virtual const G4VEMDataSet * GetComponent(G4int argComponentId) const { return components[argComponentId]; }66 virtual void AddComponent(G4VEMDataSet * argDataSet) { components.push_back(argDataSet); }67 virtual size_t NumberOfComponents(void) const { return components.size(); }70 virtual const G4VEMDataSet* GetComponent(G4int componentId) const { return components[componentId]; } 71 virtual void AddComponent(G4VEMDataSet* dataSet) { components.push_back(dataSet); } 72 virtual size_t NumberOfComponents() const { return components.size(); } 68 73 69 virtual const G4DataVector & GetEnergies(G4int argComponentId) const { return GetComponent(argComponentId)->GetEnergies(0); }70 virtual const G4DataVector & GetData(G4int argComponentId) const { return GetComponent(argComponentId)->GetData(0); }71 virtual void SetEnergiesData(G4DataVector * argEnergies, G4DataVector * argData, G4int argComponentId);74 virtual const G4DataVector& GetEnergies(G4int componentId) const { return GetComponent(componentId)->GetEnergies(0); } 75 virtual const G4DataVector& GetData(G4int componentId) const { return GetComponent(componentId)->GetData(0); } 76 virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int componentId); 72 77 73 virtual G4bool LoadData(const G4String & argFileName); 74 virtual G4bool SaveData(const G4String & argFileName) const; 78 virtual G4bool LoadData(const G4String& fileName); 79 virtual G4bool SaveData(const G4String& fileName) const; 80 81 virtual G4double RandomSelect(G4int componentId) const; 82 75 83 76 private: 77 void CleanUpComponents(void); 84 private: 85 86 void CleanUpComponents(void); 78 87 79 80 81 G4CompositeEMDataSet(const G4CompositeEMDataSet& copy);82 G4CompositeEMDataSet & operator=(const G4CompositeEMDataSet& right);88 // Hide copy constructor and assignment operator 89 G4CompositeEMDataSet(); 90 G4CompositeEMDataSet(const G4CompositeEMDataSet& copy); 91 G4CompositeEMDataSet& operator=(const G4CompositeEMDataSet& right); 83 92 84 std::vector<G4VEMDataSet *> components;// Owned pointers93 std::vector<G4VEMDataSet*> components; // Owned pointers 85 94 86 G4VDataSetAlgorithm *algorithm; // Owned pointer95 G4VDataSetAlgorithm* algorithm; // Owned pointer 87 96 88 G4doubleunitEnergies;89 G4doubleunitData;97 G4double unitEnergies; 98 G4double unitData; 90 99 91 G4intminZ;92 G4intmaxZ;93 100 G4int minZ; 101 G4int maxZ; 102 }; 94 103 #endif /* G4COMPOSITEEMDATASET_HH */ 95 104
Note: See TracChangeset
for help on using the changeset viewer.