Geant4_10
G4MicroElecCrossSectionDataSet.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // MR - 04/04/2012
27 // Based on G4DNACrossSectionDataSet
28 //
29 
30 #ifndef G4MICROELECCROSSSECTIONDATASET_HH
31 #define G4MICROELECCROSSSECTIONDATASET_HH 1
32 
34 
35 #include "G4ShellEMDataSet.hh"
36 
38 {
39 
40 public:
42  G4double xUnit=CLHEP::MeV,
43  G4double dataUnit=CLHEP::barn);
44 
46 
47  virtual G4double FindValue(G4double e, G4int componentId=0) const;
48 
49  virtual void PrintData(void) const;
50 
51  virtual const G4VEMDataSet* GetComponent(G4int componentId) const
52  { return components[componentId]; }
53 
54  virtual void AddComponent(G4VEMDataSet* dataSet)
55  { components.push_back(dataSet); }
56 
57  virtual size_t NumberOfComponents(void) const
58  { return components.size(); }
59 
60  virtual const G4DataVector& GetEnergies(G4int componentId) const
61  { return GetComponent(componentId)->GetEnergies(0); }
62 
63  virtual const G4DataVector& GetData(G4int componentId) const
64  { return GetComponent(componentId)->GetData(0); }
65 
66  virtual const G4DataVector& GetLogEnergies(G4int componentId) const
67  { return GetComponent(componentId)->GetLogEnergies(0); }
68 
69  virtual const G4DataVector& GetLogData(G4int componentId) const
70  { return GetComponent(componentId)->GetLogData(0); }
71 
72  virtual void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId);
73 
74  virtual void SetLogEnergiesData(G4DataVector* x,
75  G4DataVector* values,
76  G4DataVector* log_x,
77  G4DataVector* log_values,
78  G4int componentId);
79 
80  virtual G4bool LoadData(const G4String & argFileName);
81  virtual G4bool LoadNonLogData(const G4String & argFileName);
82 
83  virtual G4bool SaveData(const G4String & argFileName) const;
84 
85  virtual G4double RandomSelect(G4int /*componentId */) const { return -1.; };
86 
87 
88  // void CleanUpComponents();
89 
90 private:
91 
92  G4String FullFileName(const G4String & argFileName) const;
93 
94  // Hide copy constructor and assignment operator
98 
99  std::vector<G4VEMDataSet*> components; // Owned pointers
100 
101  G4int z;
102 
103  G4VDataSetAlgorithm* algorithm; // Owned pointer
104 
105  G4double unitEnergies;
106  G4double unitData;
107 
108  G4double GetUnitEnergies() const { return unitEnergies; }
109  G4double GetUnitData() const { return unitData; }
110  const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
111 
112  void CleanUpComponents(void);
113 
114 
115 };
116 #endif /* G4MicroElecCrossSectionDataSet_HH */
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual G4double RandomSelect(G4int) const
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *values, G4int componentId)
virtual G4bool LoadNonLogData(const G4String &argFileName)
virtual G4bool SaveData(const G4String &argFileName) const
virtual const G4DataVector & GetData(G4int componentId) const =0
virtual const G4DataVector & GetLogEnergies(G4int componentId) const =0
tuple x
Definition: test.py:50
int G4int
Definition: G4Types.hh:78
virtual void SetLogEnergiesData(G4DataVector *x, G4DataVector *values, G4DataVector *log_x, G4DataVector *log_values, G4int componentId)
void copy(std::vector< T > &main, const std::vector< T > &data)
Definition: DicomRun.hh:91
virtual const G4DataVector & GetLogData(G4int componentId) const
virtual void AddComponent(G4VEMDataSet *dataSet)
virtual size_t NumberOfComponents(void) const
virtual const G4DataVector & GetLogData(G4int componentId) const =0
bool G4bool
Definition: G4Types.hh:79
virtual G4double FindValue(G4double e, G4int componentId=0) const
virtual G4bool LoadData(const G4String &argFileName)
virtual const G4DataVector & GetEnergies(G4int componentId) const
virtual const G4DataVector & GetData(G4int componentId) const
double G4double
Definition: G4Types.hh:76
virtual const G4DataVector & GetLogEnergies(G4int componentId) const